Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

updated relax.py to keep EDIFF provided by user and only use 1E-04 if not provided #23

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

uthpalaherath
Copy link
Collaborator

@uthpalaherath uthpalaherath commented May 12, 2021

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

…he option to automatically generate POTCAR or use the current POTCAR for calculations
@uthpalaherath
Copy link
Collaborator Author

uthpalaherath commented May 12, 2021

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

@uthpalaherath
Copy link
Collaborator Author

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

@uthpalaherath
Copy link
Collaborator Author

Update 3:

Fixed bug where make_potcar wasn't functioning in relax.py

-Uthpala

@uthpalaherath
Copy link
Collaborator Author

Update 4:

Added option for using the FIRE algorithm for relaxation.

-Uthpala

@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 37.001% when pulling 1fda687 on uthpalaherath:master into 217e7e3 on MaterialsDiscovery:master.

1 similar comment
@coveralls
Copy link

Coverage Status

Coverage decreased (-0.1%) to 37.001% when pulling 1fda687 on uthpalaherath:master into 217e7e3 on MaterialsDiscovery:master.

@coveralls
Copy link

coveralls commented May 31, 2021

Coverage Status

Coverage increased (+0.04%) to 37.179% when pulling 712f5a2 on uthpalaherath:master into 217e7e3 on MaterialsDiscovery:master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants