PyChemia
PyChemia copied to clipboard
updated relax.py to keep EDIFF provided by user and only use 1E-04 if not provided
Hello Guillermo,
In some of my structural relaxation I wanted to keep a lower EDIFF value so I added this in relax.py to use the EDIFF provided by the user in the INCAR. If not provided it will use the default value of EDIFF=1E-04.
I simply changed:
# How to change EDIFF
if vj.input_variables["EDIFF"] > -0.01 * vj.input_variables["EDIFFG"]:
vj.input_variables["EDIFF"] = round_small(
-0.01 * vj.input_variables["EDIFFG"]
)
else:
vj.input_variables["EDIFF"] = 1e-4
to
# How to change EDIFF
if vj.input_variables["EDIFF"] > -0.01 * vj.input_variables["EDIFFG"]:
vj.input_variables["EDIFF"] = round_small(
-0.01 * vj.input_variables["EDIFFG"]
)
else:
if self.extra_vars["EDIFF"]:
vj.input_variables["EDIFF"] = self.extra_vars["EDIFF"]
else:
vj.input_variables["EDIFF"] = 1e-4
If you think it's something that is useful please merge it and add it to pip.
Thank you,
Best, Uthpala
UPDATE:
Added a boolean flag, "make_potcar" to convergence.py and relax.py so that users can have the option to automatically generate a POTCAR or use a currently existing one. The default is set to TRUE which is what PyChemia currently does.
-Uthpala
UPDATE 2:
Added the flag "auto_ibrion" in relax.py to turn on adaptive IBRION update which was commented out. This first runs the relaxation with IBRION=2 and once the forces are lower it sets IBRION=1.
-Uthpala
Update 3:
Fixed bug where make_potcar wasn't functioning in relax.py
-Uthpala
Update 4:
Added option for using the FIRE algorithm for relaxation.
-Uthpala
Coverage decreased (-0.1%) to 37.001% when pulling 1fda687ba8085cbc663c786db2d991ce5fee8867 on uthpalaherath:master into 217e7e3d0f7dd755f7ae242fc4d865b23a3505b9 on MaterialsDiscovery:master.
Coverage decreased (-0.1%) to 37.001% when pulling 1fda687ba8085cbc663c786db2d991ce5fee8867 on uthpalaherath:master into 217e7e3d0f7dd755f7ae242fc4d865b23a3505b9 on MaterialsDiscovery:master.