Dear Gabriele Sclauzero: I covered the output, so I gave a new one with the same problems.The input file can be seen in the end. The only difference is the angle and amplitude. The scf converged after 59 steps(In default conv_thr). The output of the magnetic moment is as followed
============================================================================== atom number 1 relative position : 0.3750 0.0000 0.0000 charge : 13.367288 magnetization : 0.000122 0.000076 2.717489 magnetization/charge: 0.000009 0.000006 0.203294 polar coord.: r, theta, phi [deg] : 2.717489 0.003039 31.837662 constrained moment : 0.000000 0.000000 2.800000 ============================================================================== ============================================================================== atom number 2 relative position : 0.6250 0.0000 0.0000 charge : 13.367507 magnetization : 0.000165 0.000174 2.717217 magnetization/charge: 0.000012 0.000013 0.203270 polar coord.: r, theta, phi [deg] : 2.717217 0.005053 46.399234 constrained moment : 0.000000 0.000000 2.800000 ============================================================================== But the constraint energy (Ryd) = 2.04918119. The question is, the lambda has been quite large, scf problems will occur if it is increased. But the constraint energy is still large. How can I get both constraint energy and scf converged in a constraint magnetic moment calculation? Thanks for the reply. INPUTFILE: &control pseudo_dir = "~/pr/QE5/pseudo" outdir="./", calculation="scf", / &system ibrav= 0, nat= 2, ntyp= 2, ecutwfc = 280.0, occupations='smearing', degauss=0.001, smearing='gauss' starting_magnetization(1)=2.8 starting_magnetization(2)=2.8 angle1(1)=0.0 angle1(2)=0.0 angle2(1)=0.0 angle2(2)=0.0 constrained_magnetization="atomic" noncolin=.ture. lambda=150.0 nosym=.true. / &electrons mixing_beta = 0.1 electron_maxstep=200 / ATOMIC_SPECIES Fe1 56 Fe.pbe-sp-hgh.UPF Fe2 56 Fe.pbe-sp-hgh.UPF ATOMIC_POSITIONS angstrom Fe1 3.0 0.0 0.0 Fe2 5.0 0.0 0.0 K_POINTS automatic 1 1 1 0 0 0 CELL_PARAMETERS angstrom 8.0 0.0000000000000000 0.0000000000000000 0.0 8.0 0.0000000000000000 0.0 0.0 8.0 On Fri, 4 Jul 2014 13:36:09 +0200, Gabriele Sclauzero <gabriele.sclauzero at mat.ethz.ch> wrote: > Dear Pang Rui, > > It's difficult to judge just from the input. Has the scf converged? > What are the final values of theta for the two atoms? Can you report the > relevant part of the output? > > GS > > On 06/28/2014 11:40 AM, Pang Rui wrote: >> Dear all >> Could anyone gave me some suggestion to do the constraint magnetic moment >> calculation? >> I followed the constraint magnetic moment calculation of the following >> handson with PWSCF. >> http://www.vasp.at/vasp-workshop/slides/handsonIV.pdf >> VASP uses the same method of PWSCF on constraint MM. However, I found the >> constraint energy is difficult to go zero. In the handson, they use >> lambda=50eV, got a constraint energy of 0.22591E-03eV. I used >> lambda=150Ry, >> but got a constraint energy=0.35Ry. Even PWSCF is different with VASP on >> some detail, I think it is not reasonable for two codes showing so large >> difference. So could anyone point the unreasonable part of my input file? >> Or give me some suggestion? This puzzled me for quite a long time. >> The following is the input file. >> &system >> ibrav= 0, nat= 2, ntyp= 2, >> ecutwfc = 80.0, >> occupations='smearing', >> degauss=0.001, >> smearing='gauss' >> starting_magnetization(1)=2.5 >> starting_magnetization(2)=2.5 >> angle1(1)=0.0 >> angle1(2)=45.0 >> angle2(1)=0.0 >> angle2(2)=90.0 >> constrained_magnetization="atomic direction" >> noncolin=.ture. >> lambda=150.0 >> nosym=.true. >> / >> &electrons >> mixing_beta = 0.1 >> electron_maxstep=200 >> startingwfc='file' >> startingpot='file' >> / >> ATOMIC_SPECIES >> Fe1 56 Fe.pbe-spn-kjpaw_psl.0.2.1.UPF >> Fe2 56 Fe.pbe-spn-kjpaw_psl.0.2.1.UPF >> ATOMIC_POSITIONS angstrom >> Fe1 3.0 0.0 0.0 >> Fe2 5.0 0.0 0.0 >> K_POINTS automatic >> 1 1 1 0 0 0 >> CELL_PARAMETERS angstrom >> 8.0 0.0000000000000000 0.0000000000000000 >> 0.0 8.0 0.0000000000000000 >> 0.0 0.0 8.0 >> >> PS1: I found the PWSCF used starting_magnetization as >> magnetization/charge >> for generating initial wave function,but used it as magnetization in >> constraint MM. So I set 2.5 for them. >> PS2: The startingwfc is of a smaller lambda calculation. -- PostDoc Department of Physics, South University of Science and Technology of China