Spin-orbit interaction plays a significant role in determining the magnetic density in some transition metal complexes. We present a new ab initio technique, based on an extension of unrestricted Hartree-Fock theory, which includes nonperturbatively these spin-orbit effects, and simultaneously also the effects of a finite magnetic field. We also present a new and efficient method for calculating magnetic structure factors, based on the current density rather than magnetic dipole moment density, for a crystal composed of noninteracting molecular fragments. These structure factors are directly comparable to polarized neutron diffraction experiments. Results for the Cs3CoCl5 crystal are compared with experiment and previous studies. Without one-electron spin-orbit coupling terms, the magnitudes of the predicted structure factors are on average 10-15% too low, whereas, with the spin-orbit terms, the magnitudes are 25-30% too high. Using an effective nuclear charge for Co in the spin-orbit term brings the results into much better agreement, and suggests that the two-electron spin-orbit shielding terms omitted in the present work are important. For over one quarter of the reflections studied, the magnetic contribution to the structure factors is more than 20% of the nuclear contribution. (C) 1995 American Institute of Physics.