Skip to content

Commit 53f0b6f

Browse files
authored
Merge pull request #675 from mjwen/elastic
Correct VASP input for elastic workflow
2 parents 52a6906 + 8f6d572 commit 53f0b6f

File tree

2 files changed

+20
-19
lines changed

2 files changed

+20
-19
lines changed

atomate/vasp/workflows/base/elastic.py

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,22 @@ def get_wf_elastic_constant(
3939
"""
4040
Returns a workflow to calculate elastic constants.
4141
42-
Firework 1 : write vasp input set for structural relaxation,
43-
run vasp,
44-
pass run location,
45-
database insertion.
42+
Firework 1: write vasp input set for structural relaxation,
43+
run vasp,
44+
pass run location,
45+
database insertion.
4646
47-
Firework 2 - number of total deformations: Static runs on the deformed structures
47+
Firework 2 - number of total deformations: static runs on the deformed structures
4848
49-
last Firework : Analyze Stress/Strain data and fit the elastic tensor
49+
last Firework: analyze stress/strain data and fit the elastic tensor
5050
5151
Args:
5252
structure (Structure): input structure to be optimized and run.
5353
strain_states (list of Voigt-notation strains): list of ratios of nonzero elements
54-
of Voigt-notation strain, e. g. [(1, 0, 0, 0, 0, 0), (0, 1, 0, 0, 0, 0), etc.].
54+
of Voigt-notation strain, e.g. [(1, 0, 0, 0, 0, 0), (0, 1, 0, 0, 0, 0), etc.].
5555
stencils (list of floats, or list of list of floats): values of strain to multiply
56-
by for each strain state, i. e. stencil for the perturbation along the strain
57-
state direction, e. g. [-0.01, -0.005, 0.005, 0.01]. If a list of lists,
56+
by for each strain state, i.e. stencil for the perturbation along the strain
57+
state direction, e.g. [-0.01, -0.005, 0.005, 0.01]. If a list of lists,
5858
stencils must correspond to each strain state provided.
5959
db_file (str): path to file containing the database credentials.
6060
conventional (bool): flag to convert input structure to conventional structure,
@@ -65,12 +65,12 @@ def get_wf_elastic_constant(
6565
set with ionic relaxation parameters set. Take care if replacing this,
6666
default ensures that ionic relaxation is done and that stress is calculated
6767
for each vasp run.
68-
analysis (bool): flag to indicate whether analysis task should be added
69-
and stresses and strains passed to that task
70-
sym_reduce (bool): Whether or not to apply symmetry reductions
71-
tag (str):
68+
analysis (bool): flag to indicate whether analysis task should be added and
69+
stresses and strains passed to that task.
70+
sym_reduce (bool): whether or not to apply symmetry reductions.
71+
tag (str): tag for the fireworks.
7272
copy_vasp_outputs (bool): whether or not to copy previous vasp outputs.
73-
kwargs (keyword arguments): additional kwargs to be passed to get_wf_deformations
73+
kwargs (keyword arguments): additional kwargs to be passed to get_wf_deformations.
7474
7575
Returns:
7676
Workflow
@@ -79,7 +79,7 @@ def get_wf_elastic_constant(
7979
if conventional:
8080
structure = SpacegroupAnalyzer(structure).get_conventional_standard_structure()
8181

82-
uis_elastic = {"IBRION": 2, "NSW": 99, "ISIF": 2, "ISTART": 1, "PREC": "High"}
82+
uis_elastic = {"IBRION": 2, "NSW": 99, "ISIF": 2, "ISTART": 1}
8383
vis = vasp_input_set or MPStaticSet(structure, user_incar_settings=uis_elastic)
8484
strains = []
8585
if strain_states is None:
@@ -183,7 +183,8 @@ def get_default_strain_states(order=2):
183183
)
184184
if order > 4:
185185
raise ValueError(
186-
"Standard deformations for tensors higher than rank 4 not yet determined"
186+
"Standard deformations for tensors higher than rank 4 not yet "
187+
"determined."
187188
)
188189
strain_states = np.zeros((len(inds), 6))
189190
for n, i in enumerate(inds):

atomate/vasp/workflows/presets/core.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -317,7 +317,7 @@ def wf_elastic_constant(structure, c=None, order=2, sym_reduce=False):
317317
vasp_cmd = c.get("VASP_CMD", VASP_CMD)
318318
db_file = c.get("DB_FILE", DB_FILE)
319319

320-
uis_optimize = {"ENCUT": 700, "EDIFF": 1e-6, "LAECHG": False}
320+
uis_optimize = {"ENCUT": 700, "EDIFF": 1e-6, "LAECHG": False, "LREAL": False}
321321
if order > 2:
322322
uis_optimize.update(
323323
{
@@ -338,7 +338,7 @@ def wf_elastic_constant(structure, c=None, order=2, sym_reduce=False):
338338
stencils = None
339339

340340
uis_static = uis_optimize.copy()
341-
uis_static.update({"ISIF": 2, "IBRION": 2, "NSW": 99, "ISTART": 1, "PREC": "High"})
341+
uis_static.update({"ISIF": 2, "IBRION": 2, "NSW": 99, "ISTART": 1})
342342

343343
# input set for structure optimization
344344
vis_relax = MPRelaxSet(
@@ -370,7 +370,7 @@ def wf_elastic_constant(structure, c=None, order=2, sym_reduce=False):
370370
user_incar_settings=uis_static,
371371
)
372372

373-
# deformations wflow for elasticity calculation
373+
# deformations workflow for elasticity calculation
374374
wf_elastic = get_wf_elastic_constant(
375375
structure,
376376
vasp_cmd=vasp_cmd,

0 commit comments

Comments
 (0)