last day (1217 days later) » 

7:09 AM
7
Q: Getting different total magnetic moment in 'scf' and 'vc-relax' calculations in Quantum ESPRESSO

Ujjawal M.I am performing a spin polarized DFT calculations in Quantum Espresso on a Co2MnSi ferromagnetic crystal. For this I have performed these steps: 1) Performed vc-relax calculation to find its lattice constant. Here is some lines from output file: CELL_PARAMETERS (alat= 10.00000000) -0.531670336 ...

 
@Andrew Rosen, Yes SCF was converged in second step. I have used the same cutoff frequency for 'vc-relax' and 'scf' calculation yet getting different results.
@Anoop A Nair, I have got no means to upload it on this site otherwise I'd have already attached the input files.
 
How does the final vc-relax step compare with the additional scf calculation done with the new g-vectors (still in the vc-relax output)? Are the atomic forces and cell stress still within convergence? Does the magnetic moment differ there as well? First thing I would check is ecutwfc convergence.
 
I have used the same ecutwfc for both the 'vc-relax' and 'scf' calculation. And final vc-relax step has same magnetic moment as the final scf in the 'vc-relax'. I am uploading the input out put file to my GitHub account and providing a link here.
Here is the link of input and output files :github.com/UJ5/DFT-Calculations
@Andrew Rosen, No I haven't updated the atomic positions in scf because crystal structure at the end of bfgs is completely distorted (not even a fcc which I want) from the initial structure that I have provided. Can you tell me how can I plug the optimised atomic positions into scf input file without disturbing initial structure?
 
@UjjawalM. I looked at your output file for the vc-relax and it is not distorted. What do you mean?
 
@Kevin J. M. I have uploaded the distorted and initial crystal structure image to my github repository. Please look at those images and suggest me.
 
7:09 AM
@UjjawalM. Was that generated from the same vc-relax output file as on your github? Because your image is incorrect if that's the case. Your vc-relax output is not distorted.
 
Yes both images are generated from the same vc-relax output file in xcrysden software in animation mode. Say if the structure is not distorted then why the magnetization is different in two results.
 
@UjjawalM. The structure is not distorted if you just look at the coordinates. The final scf step in your vc-relax for example. The coordinates, in terms of the original alat = 10, end up being the exact 1/4 and 1/2 fractions of your relaxed cell parameter. Also, the same number of symmetry ops are found. Also, the forces on the atoms in every single bfgs step are zero. I opened in XCrySDen myself and it looked fine, so I'm not sure where this distorted image is coming from.
 
@KevinJ.M. I have uploaded another image to my github repo for more clarification. You may see the atomic co-ordinates. I think I should run the scf calculation again with the updated starting magnetization from the 'vc-relax' output file.
 
@UjjawalM. That image is not correct. It looks like an XCrySDen bug with QE's alat output format. If you load optimized or final coordinates, it looks like this: ibb.co/mhz86dt I'll just say it again: your output is not distorted!
I think I might know what is causing some confusion. If you were to write an input file for scf from your vc-relax results, what would your alat, and atomic positions be?
It's not what you showed in your most recent image.
Take Mn for example. 0.265835168, etc... This is in terms of your original alat of 10.0. Not the relaxed alat of 10.63340672!
QE's vc-relax output always keeps coordinates and lattice vectors in terms of your original alat
So when you "reset" your coordinates to be cubic again, you were coincidentally putting in the real final coordinates of your relax calculation :)
 
yes, optimised crystal structure is correct I have got your point.
 
7:15 AM
Hope this has helped, and I hope you figure out what you need for your calculation
 
So should I plug the updated alat for teh new scf calculation?
or not?
 
If you do you will need to define cell_parameters with lattice vectors 0.53... etc. again. I would just keep the updated alat and use the cubic coordinates again for your atomic positions.
I meant if you go back to the original alat=10, you need to define cell_paramters. If you keep the updated alat, you need to go back to the 0.25, 0.50, etc. atomic positions
Sorry if that wasn't clear
 
Either I have to update the alat or the atomic positions in the new scf. Is this what you are saying?
 
Yes. Unfortunately with QE, in either alat or crystal coordinates it always keeps in terms of original alat. So if you copy the new coordinates and the new alat, the structure will be wrong
 
I understand now.
 
7:21 AM
I wasted many calculations before figuring that out :)
 
I think I should run the calculation with updated starting magnetization. Isn't it? That's the problem I guess
You experience is helping me. Thank you for that!
 
I am 99% sure that is the issue. You can either run a vc-relax calculation again with your original starting magnetization (you may end up at the same, or different ground state), or run an scf calculation with the magnetizations at the end of your vc-relax. If you run another vc-relax it should converge much faster than the first one
You're welcome, good luck
 
Where are you from?
 
Canada, I live in the USA right now though
 
Oh, I am from India. THANKS!
 
7:29 AM
No problem!
 
 
8 hours later…
3:21 PM
It's always possible that the calculations converges to a different set of magnetic moments since there are many local minima and it only finds one. However, that doesn't seem to be the case here since the magnetizations are close yet different. Have you checked to make sure that the SCF was converged in Step #2? It seem unlikely that the total magnetization will be non-integer.
 
Could you link your input and output files for both the SCF and VC-relax? You'll get a proper answer if more information is provided.
 
@Anoop A Nair, I have got no means to upload it on this site otherwise I'd have already attached the input files.
 
Uploading it to your GitHub account and linking it to this question would be an easy task I suppose :) Or you could host it on your google drive and share the link . There are a lot of ways
 
@UjjawalM. +1 For a good question, but please look at the edits I made for your in-line "code" text. Furhtermore, if the input and output files have fewer than a thousand lines, please paste them into the question. Otherwise upload them here: github.com/HPQC-LABS/Modeling_Matters in a folder called 3968 since your question is post number 3968 (as you can see in the URL of your question).
 
Is it possible that your atomic positions relaxed some? You put your lattice constant into the SCF input rather than doing a SCF calculation with the relaxed geometry?
 
3:21 PM
@UjjawalM. -- you updated the lattice constants, but have you also used the same updated atomic positions in the SCF calculation? In other words, is the structure identical between the end of the relaxation and the SCF calculation?
 
@Andrew Rosen, No I haven't updated the atomic positions in scf because crystal structure at the end of bfgs is completely distorted (not even a fcc which I want) from the initial structure that I have provided. Can you tell me how can I plug the optimised atomic positions into scf input file without disturbing initial structure?
 
Well that seems like your problem. See my answer below.
 
 
1 hour later…
4:31 PM
@KevinJ.M. Your explanation was awesome! So in conclusion if I am to write the scf input file from the vc-relax output, I would either keep :
1) The {updated alat + updated cell parameters} and the original atomic positions
OR
2) The {original alat and original cell parameters} and the updated atomic positions
Am i right/
?
 
 
5 hours later…
9:39 PM
1) Kindof. In this case, the only cell parameter is alat. And you keep the original atomic positions just in this case, because the cubic symmetries constrained the relaxation such that there was no atomic relaxation
2) If you keep the original alat, you need to construct new cell parameters using the CELL_PARAMETERS card in your input file. It's typically recommended to use ibrav and alat instead to avoid numerical issues. You'd basically change your input file to have the same info as your vc-relax output:
`CELL_PARAMETERS (alat= 10.00000000)
-0.531670336 0.000000000 0.531670336
0.000000000 0.531670336 0.531670336
-0.531670336 0.531670336 -0.000000000

ATOMIC_POSITIONS (alat)
Co 0.000000000 0.000000000 -0.000000000
Mn 0.265835168 0.265835168 0.265835168
Co 0.531670336 0.531670336 0.531670336
Si -0.265835168 -0.265835168 -0.265835168`
But with the original alat, celldm(1), kept in the &SYSTEM card. Also the parameters header should be CELL_PARAMETERS (alat), without the "= 10.0000..." part
 
10:24 PM
CELL_PARAMETERS (alat= 10.00000000)
-0.531670336 0.000000000  0.531670336
 0.000000000 0.531670336  0.531670336
-0.531670336 0.531670336 -0.000000000

ATOMIC_POSITIONS (alat)
Co  0.000000000  0.000000000 -0.000000000
Mn  0.265835168  0.265835168  0.265835168
Co  0.531670336  0.531670336  0.531670336
Si -0.265835168 -0.265835168 -0.265835168
@KevinJ.M. when you type code that spans multiple lines, instead of using the ` delimiters, you can press the "fixed font" button, which appears when you make a new line (by pressing CTRL+ENTER)
 

  last day (1217 days later) »