You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Complexity of MO coefficients in linear vs non-linear systems under DHF #3427
I am using the DHF module to calculate the electronic structure of systems.
I have observed that for non-linear molecules (e.g., Water), the molecular orbital coefficients are complex.
However, for linear molecules (e.g., HF), the coefficients appear to remain strictly real even when symmetry=False is used.
Is there a way to "force" the program to represent these states as complex coefficients in linear systems, or is this a fundamental restriction of the point group symmetry for linear systems?
I am specifically interested in whether PySFC allows the representation of complex orbitals in linear geometries.
I get a genuinely complex solution with this, and an exactly real one on z, for the same molecule with the same settings. If that reproduces for you, the variable is the orientation relative to the spinor quantization axis rather than the molecule being linear.
One note: I would maybe look at mf.make_rdm1() rather than mo_coeff. Orbital coefficients carry an arbitrary phase, and an arbitrary unitary mixing within degenerate sets, so how complex they look depends on the solver path. I get 0.0 or 4.5e-02 for the same HF calculation just by switching init_guess between '1e' and 'minao', with identical total energies. The density matrix has no such freedom.
Yes, locate the molecule along Y axis gives complex values of mo coeffs, thank you.
I've previously tried with: mol = gto.M(atom='H 0 0.625 0; F 0 0 -0.625 ', basis='cc-pvdz')
or mol = gto.M(atom='H 0.625 0 0; F 0 0 -0.625 ', basis='cc-pvdz')
but also that gives real values.
Another important thing is that the behavior of mo coeff of the system located along Y axis is independent of the symmetry=False or symmetry=True option.
In case I need to fix the molecule in the Z axis, there is any way to break the symmetry of the j-adapted basis, which is along the z-axis?
Sorry, I just saw your comment! Thanks for checking. I ran a few more orientations and the pattern is clean: the DHF Fock matrix, density and MO coefficients are exactly real whenever all atoms lie in the xz plane (y = 0), and complex otherwise. HF along z, along x or tilted within xz is real; HF along y or tilted within yz is complex (I get complex for your H 0 0.625 0; F 0 0 -0.625 geometry; could you double-check that one?). Your water example is complex because it sits in the yz plane; the same water rotated into xz is exactly real with an identical energy.
The comes from the spinor basis being built on complex spherical harmonics, where y -> -y acts like complex conjugation. A molecule symmetric under that reflection gets a real Fock matrix. It's a property of the basis convention, not a physical restriction, and symmetry=True doesn't affect it (it doesn't reorient the molecule, and DHF doesn't use point-group symmetry).
So a linear molecule on z will always come out real. mo_coeff is already complex128, and you can apply any phase of Kramers-pair rotation after the SCF without changing the physics. What do you need the complex coefficients for downstream? That decides whether a rotation is enough.
Activity
JustinKyleKirkland commentedon Aug 29, 2026
Hi Daniel,
I could be wrong in how I am going about it, but can you try the same HF molecule rotated onto the y axis?
mol = gto.M(atom='H 0 0.625 0; F 0 -0.625 0', basis='cc-pvdz', symmetry=False)I get a genuinely complex solution with this, and an exactly real one on z, for the same molecule with the same settings. If that reproduces for you, the variable is the orientation relative to the spinor quantization axis rather than the molecule being linear.
One note: I would maybe look at
mf.make_rdm1()rather thanmo_coeff. Orbital coefficients carry an arbitrary phase, and an arbitrary unitary mixing within degenerate sets, so how complex they look depends on the solver path. I get 0.0 or 4.5e-02 for the same HF calculation just by switchinginit_guessbetween '1e' and 'minao', with identical total energies. The density matrix has no such freedom.DanielBajac commentedon Aug 31, 2026
Hi Justin
Yes, locate the molecule along Y axis gives complex values of mo coeffs, thank you.
I've previously tried with:
mol = gto.M(atom='H 0 0.625 0; F 0 0 -0.625 ', basis='cc-pvdz')or
mol = gto.M(atom='H 0.625 0 0; F 0 0 -0.625 ', basis='cc-pvdz')but also that gives real values.
Another important thing is that the behavior of mo coeff of the system located along Y axis is independent of the symmetry=False or symmetry=True option.
In case I need to fix the molecule in the Z axis, there is any way to break the symmetry of the j-adapted basis, which is along the z-axis?
JustinKyleKirkland commentedon Oct 3, 2026
Hi Daniel,
Sorry, I just saw your comment! Thanks for checking. I ran a few more orientations and the pattern is clean: the DHF Fock matrix, density and MO coefficients are exactly real whenever all atoms lie in the xz plane (y = 0), and complex otherwise. HF along z, along x or tilted within xz is real; HF along y or tilted within yz is complex (I get complex for your
H 0 0.625 0; F 0 0 -0.625geometry; could you double-check that one?). Your water example is complex because it sits in the yz plane; the same water rotated into xz is exactly real with an identical energy.The comes from the spinor basis being built on complex spherical harmonics, where y -> -y acts like complex conjugation. A molecule symmetric under that reflection gets a real Fock matrix. It's a property of the basis convention, not a physical restriction, and
symmetry=Truedoesn't affect it (it doesn't reorient the molecule, and DHF doesn't use point-group symmetry).So a linear molecule on z will always come out real.
mo_coeffis already complex128, and you can apply any phase of Kramers-pair rotation after the SCF without changing the physics. What do you need the complex coefficients for downstream? That decides whether a rotation is enough.