Hi Dominic Varghese,
Thanks for your question. I am not entirely sure why you would need to introduce an additional subroutine to constrain a structural relaxation to the z direction.
You should be able to achieve a relaxation in only a single lattice direction by setting Selective Dynamics in the POSCAR file. E.g. if you want to relax only the z-coordinates in your cell, set up your POSCAR like this to constrain the x and y coordinates of all atoms and the z coordinate of the atom at the origin:
Code: Select all
Ba8 O8
1.00000000000000
-5.3665983243299999 -5.3665983243299999 0.0000000000000000
-5.3665983243299999 0.0000000000000000 -5.3665983243299999
0.0000000000000000 -5.3665983243299999 -5.3665983243299999
Ba O
8 8
Selective Dynamics
Direct
0.0000000000000000 0.0000000000000000 0.0000000000000000 F F F
0.0000000000000000 0.0000000000000000 0.5000000000000000 F F T
0.0000000000000000 0.5000000000000000 0.0000000000000000 F F T
0.0000000000000000 0.5000000000000000 0.5000000000000000 F F T
0.5000000000000000 0.0000000000000000 0.0000000000000000 F F T
0.5000000000000000 0.0000000000000000 0.5000000000000000 F F T
0.5000000000000000 0.5000000000000000 0.0000000000000000 F F T
0.5000000000000000 0.5000000000000000 0.5000000000000000 F F T
0.2500000000000000 0.2500000000000000 0.2500000000000000 F F T
0.2500000000000000 0.2500000000000000 0.7500000000000000 F F T
0.2500000000000000 0.7500000000000000 0.2500000000000000 F F T
0.2500000000000000 0.7500000000000000 0.7500000000000000 F F T
0.7500000000000000 0.2500000000000000 0.2500000000000000 F F T
0.7500000000000000 0.2500000000000000 0.7500000000000000 F F T
0.7500000000000000 0.7500000000000000 0.2500000000000000 F F T
0.7500000000000000 0.7500000000000000 0.7500000000000000 F F T
If this is not quite what you want, or you want more general constraints which can be achieved in a molecular dynamics run, it will also be worth checking out the ICONST file.
It might also be useful to know that external forces can be put on any atom since version 6.5.0, using the INCAR tag EFOR.
Also, I could not reproduce the BRMIX problems when running a single ionic step using your setup, without any modifications to the 6.5.0 source code. The calculation converges fine in 29 steps, but after step 19, I do get some warnings:
Code: Select all
WARNING in EDDRMM: call to ZHEGV failed, returncode = 6 3 23
However, these warnings can be easily avoided when using ALGO=Normal, which converges with no errors or warnings in 18 steps.
As a general comment: Your EDIFFG setting is very tight for relaxations. Forces below 0.001 eV/A will be effected by noise a lot.
If you need more assistance, please also provide OUTCAR and the standard output alongside your input files in your next post, so I can help you more efficiently.
All the best,
Michael