Re: constraining magnetic field ( No.1 ) 
 Date: 2020/03/08 09:12
 Name: T. Ozaki
 Hi,
As for the constraint by the Zeeman term, one can easily find the local magnetic field. On the other hand, as for the constraint scheme explained at http://www.openmxsquare.org/openmx_man3.9/node113.html
one can deduce "constraining magnetic field" from the constraint energy expression shown at Eq. in the page 23 of https://tozaki.issp.utokyo.ac.jp/ISS18/slides1st/6NCDFTOzaki.pdf
where Ni corresponds to Ns in Eq. 100 in the technical note: http://www.openmxsquare.org/tech_notes/tech21_0.pdf
Regards,
TO

Re: constraining magnetic field ( No.2 ) 
 Date: 2020/03/08 22:09
 Name: YunPeng Wang <yunpengwang@csu.edu.cn>
 Dear Professor Ozaki,
Thanks for your quick response. To make myself clear, I am interested in the constraining magnetic field after setting "scf.Constraint.NC.Spin On". The Equation in page 23 of the 6NCDFTOzaki.pdf is what in my mind, from where the expression of constraining magnetic field is easy to deduce. I am only interested in the spin moment and the effective magnetic field on spin moments. I am not familiar with the OPENMX code structure, so I still need your help to point out where or which subroutine should I look into for finding the local magnetic field? I can try to find a simple way to print the local magnetic field, I believe the local field is already somewhere in the code, or it can be evaluated straightforwardly. I will feed back if I can figure it out.
Best wishes, YunPeng Wang

Re: constraining magnetic field ( No.3 ) 
 Date: 2020/03/09 10:03
 Name: T. Ozaki
 Hi,
The relevant routine is make_NC_v_eff() in Occupation_Number_LDA_U.c. The DFT+U methods, the constraint schemes, and the Zeeman terms all take the same form for the effective Hamiltonian as described in Eq. 124 in http://www.openmxsquare.org/tech_notes/tech21_0.pdf
The v_effecitve are calculated in make_NC_v_eff(). The Zeeman term might be easy to understand for you. Once you make sure how it is implemented, you may be able to understand how the v_effective for the constraint schemes are calculated in the same routine.
Regards,
TO

