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

refactor neb module 🎷 #386

Merged
merged 5 commits into from
Mar 6, 2023
Merged

refactor neb module 🎷 #386

merged 5 commits into from
Mar 6, 2023

Conversation

jacksund
Copy link
Owner

@jacksund jacksund commented Feb 11, 2023

@jacksund jacksund marked this pull request as draft February 11, 2023 19:22
@jacksund
Copy link
Owner Author

@scott-materials @becca9835

This PR is a draft and won't work yet, but take a look at this file.

That file shows how to build the individual steps for a NEB workflow (bulk relax+energy, endpoint relax+energy, and ci-neb) and then piece them all the vasp steps together into a larger workflow (e.g. "single-path" or "all-paths"). The process is still pretty messy and isn't beginner friendly, but hopefully it works for now. Once v0.13.0 is out, you'll be able to make your own python script that uses this template file, and I'll write a utility function that makes this easier too.

For now, let me know what your desired VASP settings are for each step! I'll add them in and merge

@jacksund
Copy link
Owner Author

@becca9835 write out the VASP INCAR that you want to use for each:

  1. unitcell relaxation
  2. unitcell static energy (copy most settings from 1)
  3. endpoint supercell relaxation
  4. endpoint supercell static energy (copy most settings from 3)
  5. NEB for 5 images (copy most settings from 4)

@becca9835
Copy link
Contributor

I'm hoping we can do two NEB workflows, one that will run quite quickly (hopefully in a day, just to get a quick barrier) and one more rigorous workflow (for publication, with climbing image). I'm hoping this won't be a ton of extra work, just copying and modifying the INCARs. I'm thinking the quick version won't need any static energy calculations, and could run with just 3 images. @jacksund @scott-materials please give feedback on the two workflows and the specific settings below! Two questions: Should we instead be making 3 workflows, quick, rigorous without CI, rigorous with CI? Should we be setting a U parameter (dynamically, if needed), or do we not need one because we are not calculating electronic structure?

### - quick NEB:

### 1. unitcell relaxation:

ALGO = Fast
EDIFF = 1e-05
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = 2
ICHARG = 1
ISIF = 3
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
NELM = 200
NSW = 99
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.5
LMAXMIX = 4

### 2. endpoint supercell relaxation:

ALGO = Fast
EDIFF = 5e-04
EDIFFG = -0.02
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = 2
ICHARG = 1
ISIF = 2
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
LCHARG = False
NELM = 200
NSW = 99
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.5
LMAXMIX = 4

### 3. NEB for 3 image:

ALGO = Fast
EDIFF = 5e-04
EDIFFG = -0.02
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = 3
ICHARG = 1
ISIF = 2
ISPIN = 2
ISYM = 0
LORBIT = 11
LREAL = Auto
LWAVE = False
LCHARG = False
NELM = 200
NSW = 99
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.5
LMAXMIX = 4
IMAGES = 3

### - rigorous NEB:

### 1. unitcell relaxation:

ALGO = Fast
EDIFF = 1e-06
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = 2
ICHARG = 1
ISIF = 3
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
MAGMOM = ##I think this has to be set dynamically depending on elements/number of elements?
NELM = 200
NELMIN = 4
NSW = 99
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.35
LMAXMIX = 4

### 2. unitcell static energy:

ALGO = Fast
EDIFF = 1e-06
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = -1
ICHARG = 1
ISIF = 3
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
MAGMOM = ##I think this has to be set dynamically depending on elements/number of elements?
NELM = 200
NELMIN = 4
NSW = 0
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.35
LMAXMIX = 4

### 3. endpoint supercell relaxation:

ALGO = Fast
EDIFF = 5e-05
EDIFFG = -0.01
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = 2
ICHARG = 1
ISIF = 2
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
LCHARG = False
MAGMOM = ##I think this has to be set dynamically depending on elements/number of elements?
NELM = 200
NSW = 99
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.4
LMAXMIX = 4

### 4. endpoint supercell static energy:

ALGO = Fast
EDIFF = 5e-05
EDIFFG = -0.01
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = -1
ICHARG = 1
ISIF = 2
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
LCHARG = False
MAGMOM = ##I think this has to be set dynamically depending on elements/number of elements?
NELM = 200
NSW = 0
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.4
LMAXMIX = 4

### 5. NEB for 5 image:

ALGO = Fast
EDIFF = 5e-05
EDIFFG = -0.01
ENCUT = 520
#can this be set dynamically? To be 1.3x highest elemental ENMAX
IBRION = 3
ICHARG = 1
ISIF = 2
ISPIN = 2
ISYM = 0
IVDW = 12
LORBIT = 11
LREAL = Auto
LWAVE = False
LCHARG = False
MAGMOM = ##I think this has to be set dynamically depending on elements/number of elements?
NELM = 200
NSW = 99
PREC = Accurate
ISMEAR = 0
SIGMA = 0.05
KSPACING = 0.4
LMAXMIX = 4
NIMAGES = 5
LCLIMB = TRUE
SPRING = -5
POTIM = 0
IOPT = 1

@jacksund
Copy link
Owner Author

jacksund commented Mar 6, 2023

@becca9835 Thanks!! I'll build this into the PR today

Should we instead be making 3 workflows, quick, rigorous without CI, rigorous with CI?

I'd vote for only having the two extremes: 1) quick and then 2) rigorous with CI! Anything in between probably won't be used much -- either in exploratory calcs as well as pub-ready ones. We also don't want to fall into the trap of having too many workflows to choose from.

This PR doesn't need everything set up too, so just one workflow is good to merge. We can prep alternative settings for the next release and also work with @SWeav02 to move these workflows into the warren_lab app. Once I merge this PR and make a release, I'll send you an example of how to run custom settings (without doing a full PR or waiting for a release).

Should we be setting a U parameter (dynamically, if needed), or do we not need one because we are not calculating electronic structure?

If you decide to set U dynamically, here's an example of how:
https://github.com/jacksund/simmate/blob/main/src/simmate/apps/vasp/workflows/relaxation/matproj.py#L113-L163

And the code/description of how this config is used can be found here:
https://github.com/jacksund/simmate/blob/main/src/simmate/apps/vasp/inputs/incar_modifiers.py#L122-L204

@jacksund jacksund marked this pull request as ready for review March 6, 2023 19:22
@jacksund jacksund merged commit ed7d874 into main Mar 6, 2023
@jacksund jacksund deleted the neb-update branch March 6, 2023 19:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants