Issue with spins in Nexus
I've been having issues/uncertainties about how the spins are handled in Nexus. Say I have a metallic system with an odd number of electrons (47 e-) in a primitive cell and want to target a net even spin magnetization (2 mu_B) for that primitive cell. In SCF codes, these kinds of runs are non-issue due to fractional electrons. However, in QMC, we have integer electrons, so we have to tile the primitive cell to a supercell with an even determinant of the expansion matrix. Namely nexus should be able to run a system with an odd number of electrons in the primitive cell and an even number of electrons in the supercell to obtain even magnetization for the primitive cell. Currently, this is not allowed in Nexus due to a check in lib/physical_system.py:
PhysicalSystem error:
requested spin state 2 incompatible with 47 electrons
exiting.
In my opinion, Nexus should not check the net spin against the number of electrons in the primitive cell, rather it should be against the supercell that the user is requesting.
A reproducer for this issue is attached. nexus_issue.zip
Use net_spin='low' and tiled_spin=your_desired_supercell_spin for this case. Let me know if this works.
This doesn't seem to work for me. The written QMC inputs have the same number of up and down electrons; see attached for a reproducer.
Closing this issue since there is ongoing work on GCTA methods that are more suitable for metals. We plan to implement the new method in Nexus.