Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
114 commits
Select commit Hold shift + click to select a range
900e31a
Update Installation.rst
yiwang62 Oct 4, 2021
f830a19
Merge branch 'master' into 20210826
yiwang62 Oct 4, 2021
3ca2c0f
update
yiwang62 Oct 5, 2021
ef9e419
added workflow "singleV" for single volume relaxation
yiwang62 Oct 6, 2021
7fa90aa
for single volume full relaxation
yiwang62 Oct 6, 2021
fee1eb4
improve OptimizeFW to EDIFFG = -xxx settings
yiwang62 Oct 6, 2021
6521ac6
added function for lattice shape constrained relaxation
yiwang62 Oct 8, 2021
89277b9
cloud calculation without computer dependentce
yiwang62 Oct 11, 2021
034d437
further updates
yiwang62 Oct 11, 2021
452c555
updates
yiwang62 Oct 11, 2021
1541884
Update fworks.py
yiwang62 Oct 11, 2021
701a2a5
Update ftasks.py
yiwang62 Oct 11, 2021
1d9de8d
Update fworks.py
yiwang62 Oct 11, 2021
5e5bcbd
Update fworks.py
yiwang62 Oct 12, 2021
a7d76f1
updates
yiwang62 Oct 12, 2021
36740e2
Update ftasks.py
yiwang62 Oct 12, 2021
9cb3ee2
Update wflows.py
yiwang62 Oct 12, 2021
fc13f72
updates
yiwang62 Oct 12, 2021
1489cc3
update
yiwang62 Oct 13, 2021
5a1fe2a
Update ftasks.py
yiwang62 Oct 13, 2021
e916848
updates
yiwang62 Oct 13, 2021
b8f23d9
Update wflows.py
yiwang62 Oct 13, 2021
dd7c587
updates
yiwang62 Oct 13, 2021
a2b4eac
Update fworks.py
yiwang62 Oct 13, 2021
d9bfb50
Update EVcheck_QHA.py
yiwang62 Oct 13, 2021
12f79ef
Update EVcheck_QHA.py
yiwang62 Oct 13, 2021
943831e
up
yiwang62 Oct 13, 2021
339dfae
up
yiwang62 Oct 13, 2021
244950c
Update wflows.py
yiwang62 Oct 13, 2021
456780a
Update EVcheck_QHA.py
yiwang62 Oct 14, 2021
15ec5c9
update DFTTK References
yiwang62 Oct 14, 2021
e70712c
Update References.rst
yiwang62 Oct 14, 2021
97735b1
Update References.rst
yiwang62 Oct 14, 2021
78b38ea
Update References.rst
yiwang62 Oct 14, 2021
3bf80bd
Update index.rst
yiwang62 Oct 14, 2021
0406410
Update index.rst
yiwang62 Oct 14, 2021
c97b5da
Update index.rst
yiwang62 Oct 14, 2021
ced215c
Update index.rst
yiwang62 Oct 14, 2021
58ebe87
Update index.rst
yiwang62 Oct 14, 2021
24b6ce8
Update index.rst
yiwang62 Oct 14, 2021
76d0c20
Update index.rst
yiwang62 Oct 14, 2021
b399d08
updates
yiwang62 Oct 14, 2021
11f7d87
up
yiwang62 Oct 14, 2021
b7f5a26
Update test_QHAAnalysis.py
yiwang62 Oct 14, 2021
ce336de
up
yiwang62 Oct 14, 2021
420c0a5
Delete EV_check_summary.json
yiwang62 Oct 14, 2021
9866ca9
up
yiwang62 Oct 15, 2021
2a754e3
up
yiwang62 Oct 15, 2021
1b0837d
great framework change on settings
yiwang62 Oct 16, 2021
3895aa7
up
yiwang62 Oct 16, 2021
81bbe9c
Update input_sets.py
yiwang62 Oct 19, 2021
3bc786b
Update wflows.py
yiwang62 Oct 22, 2021
95aa78a
Update input_sets.py
yiwang62 Oct 27, 2021
3dead53
for get EV/Born data
yiwang62 Nov 4, 2021
10d3d72
minor update
yiwang62 Nov 8, 2021
58d0a3c
Update EVcheck_QHA.py
yiwang62 Nov 9, 2021
2e6e33c
Update input_sets.py
yiwang62 Nov 11, 2021
10355a8
Update index.rst
yiwang62 Nov 18, 2021
664e8ef
Update index.rst
yiwang62 Nov 18, 2021
fbfaab6
Update pythelec.py
yiwang62 Dec 8, 2021
504c314
updates for bug fix
yiwang62 Dec 9, 2021
64527bd
Update input_sets.py
yiwang62 Dec 10, 2021
3ade2b3
elastic update
yiwang62 Dec 14, 2021
1866925
Update parse_outputs.py
yiwang62 Dec 14, 2021
49da7da
Update fworks.py
yiwang62 Dec 15, 2021
5b4fc4d
Update fworks.py
yiwang62 Dec 15, 2021
ec5b832
bug fix for isif >4
yiwang62 Dec 15, 2021
eafb37f
Update input_sets.py
yiwang62 Dec 15, 2021
435ef11
debug
yiwang62 Feb 10, 2022
b6f8f99
more changes from local computers
yiwang62 Nov 14, 2022
de7cd4c
Update pythelec.py
yiwang62 Nov 14, 2022
df3a5d7
20221114
yiwang62 Nov 14, 2022
e13c42f
20221115
yiwang62 Nov 15, 2022
d32fc87
Update pythelec.py
yiwang62 Nov 15, 2022
60d18b4
Update setup.py
yiwang62 Nov 15, 2022
3bf88b0
Update setup.py
yiwang62 Nov 15, 2022
2f8c76e
Update setup.py
yiwang62 Nov 15, 2022
3e9e9a8
Update setup.py
yiwang62 Nov 15, 2022
c64cd21
Update setup.py
yiwang62 Nov 15, 2022
0b4bef1
Update pythelec.py
yiwang62 Nov 15, 2022
55ba493
Update ywplot.py
yiwang62 Nov 15, 2022
94e555a
20201117 fix static/phonon match bugs
Nov 17, 2022
c7a12e1
Update pyphon.py
yiwang62 Nov 18, 2022
e66a050
20201122 fix pymatgen/atomate bugs
Nov 22, 2022
46eb372
Merge branch '20221114' of https://github.com/yiwang62/dfttk into 202…
Nov 22, 2022
c0a55ff
Update ftasks.py
yiwang62 Nov 28, 2022
88f45e4
Update setup.py
yiwang62 Nov 28, 2022
825d760
Update utils.py
yiwang62 Nov 28, 2022
6933531
Update setup.py
yiwang62 Nov 28, 2022
c1d1747
vasp6 compatibility update
yiwang62 Nov 28, 2022
ace5f65
Update pythelec.py
yiwang62 Nov 28, 2022
9b009c0
updates
yiwang62 Nov 28, 2022
567ffcc
fixes for crosscom
yiwang62 Nov 29, 2022
586e15c
Update config_dfttk.py
yiwang62 Dec 6, 2022
43049ca
Update config_dfttk.py
yiwang62 Dec 6, 2022
62865e4
update in 20221208 in ROARS clusters
yiwang62 Dec 8, 2022
02e0722
update in 20221208 in ROARS clusters
yiwang62 Dec 8, 2022
a85354e
update in 20221208 in ROARS clusters
yiwang62 Dec 8, 2022
fa77874
20221209
Dec 9, 2022
a7bcfea
Merge branch '20221114' of https://github.com/yiwang62/dfttk into 202…
Dec 9, 2022
21f88fa
docs
Dec 9, 2022
f4cb1fb
docs
Dec 9, 2022
dd1174b
docs
Dec 9, 2022
a737dc6
docs
Dec 9, 2022
e478f54
docs
Dec 9, 2022
cec9cc4
docs
Dec 9, 2022
ee2582b
docs
Dec 9, 2022
d256696
docs
Dec 9, 2022
bfc9de3
docs
Dec 9, 2022
a516570
docs
Dec 9, 2022
9adc758
docs
Dec 9, 2022
3042394
docs
Dec 9, 2022
464c70c
docs
Dec 9, 2022
c84937e
docs
Dec 10, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
200 changes: 183 additions & 17 deletions dfttk/EVcheck_QHA.py

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion dfttk/analysis/debye.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,8 +202,10 @@ def debye_temperature(self, volume):
# Low temperature limit: 1
# take 0 K E-V curve properties
dBdP = self.ev_eos_fit.b1 # bulk modulus/pressure derivative
debye = s*A * (self.ev_eos_fit.v0*1.e-30/self.natoms) ** (1. / 6.) * np.sqrt(self.bulk_modulus*1e9/self.avg_mass)
gamma = (1+dBdP)/2 - self.bp2gru # 0K equilibrium Gruneisen parameter
return debye * (self.ev_eos_fit.v0 / volume) ** (gamma)
debye = debye*(self.ev_eos_fit.v0 / volume) ** (gamma)
return debye
else:
return debye

Expand Down
2 changes: 1 addition & 1 deletion dfttk/analysis/phonon.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def get_f_vib_phonopy(structure, supercell_matrix, vasprun_path,
# get codename and version from vasprun.xml file
code_name, code_version = get_code_version(xml=vasprun_path)
force_constant_factor = 1.0
if code_version[0:1] >= '6':
if code_version[0:3] >= '6.2':
force_constant_factor = 0.004091649655126895

# get the force constants from a vasprun.xml file
Expand Down
37 changes: 23 additions & 14 deletions dfttk/analysis/ywplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -617,7 +617,7 @@ def __init__(self, folder,thermodynamicproperty,x,y,reflin=None, yzero=None,fitt
elif self.thermodynamicproperty.lower()!="heat capacities (J/mol-atom/K)".lower(): self.plot_default()
else: self.plot_Heat_Capacity()

if self.plottitle!=None: plt.title(self.plottitle)
#if self.plottitle!=None: plt.title(self.plottitle)
plt.xlabel(self._xlabel)
plt.ylabel(self._ylabel)
self.ax.legend(loc=0, prop={'size': 24})
Expand All @@ -642,10 +642,11 @@ def plot_EV(self):
self.ax.plot(self.x, self.y, fillstyle='none', marker='o', markersize=12,
color='k', linestyle='None', label=self._label)
xnew = np.linspace(min(self.x)*0.95,max(self.x)*1.05, 300)
from dfttk.pythelec import BMvol4, BMvol, alt_curve_fit
f2, pcov = alt_curve_fit(BMvol4, self.x, self.y)
ynew = BMvol(xnew, f2)
self.ax.plot(xnew,ynew,'-',linewidth=1,color='b', label="BMvol4")
if len(self.x)>=4:
from dfttk.pythelec import BMvol4, BMvol, alt_curve_fit
f2, pcov = alt_curve_fit(BMvol4, self.x, self.y)
ynew = BMvol(xnew, f2)
self.ax.plot(xnew,ynew,'-',linewidth=1,color='b', label="BMvol4")


def plot_Helmholtz_energy_v0(self):
Expand Down Expand Up @@ -1432,7 +1433,7 @@ def mkDict(line):
idx = 1
while True:
if not os.path.exists(dir0): break
recordfile = dir0,"record.json"
recordfile = os.path.join(dir0,"record.json")
newdir = False
try:
if os.path.exists(recordfile):
Expand Down Expand Up @@ -1743,7 +1744,6 @@ def Phonon298(dir0, pvdos=False):
copyfile(os.path.join(plotdatabase,dfile),os.path.join(phdir298,dfile))
cwd = os.getcwd()
os.chdir( phdir298 )
import platform
if platform.system()=="Linux":
cmd = 'timeout 6 pos2s Symmetry.pos -THR 3.e-4 >&symmetry.out'
output = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
Expand Down Expand Up @@ -2366,19 +2366,29 @@ def Plot298(folder, V298, volumes, debug=False, plottitle=None, local=None):
ydir = os.path.join(folder,'..')

vdict = {}
emin = 1.0e36
for root, dirs, files in os.walk(ydir):
for dir in dirs:
poscar = os.path.join(ydir,dir,'POSCAR')

if os.path.exists(poscar):
structure = Structure.from_file(poscar)
vol = 'V{:010.6f}'.format(structure.volume)
vdict[vol]=dir
try:
natom = len(structure.sites)
sa = SpacegroupAnalyzer(structure)
ngroup = sa.get_space_group_number()
except:
return
oszicar = os.path.join(ydir,dir, 'OSZICAR')
if not os.path.exists(poscar): continue
with open(oszicar,"r") as fp:
lines = fp.readlines()
for line in lines:
dat = [s for s in line.split() if s!=""]
if len(dat) < 5: continue
if dat[1]!="F=" or dat[3]!="E0=": continue
e = float(dat[4])
if e < emin:
emin = e
natom = len(structure.sites)
sa = SpacegroupAnalyzer(structure)
ngroup = sa.get_space_group_number()

#print(natom,ngroup)
i1 = 0
Expand Down Expand Up @@ -2435,7 +2445,6 @@ def Plot298(folder, V298, volumes, debug=False, plottitle=None, local=None):
move("vdos.png", os.path.join(cwd,folder,'vdos298.15.png'))

if not os.path.exists('symmetry.mode'):
import platform
if platform.system()=="Linux":
cmd = "pos2s Symmetry.pos -THR 0.001"
output = subprocess.run(cmd, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT,
Expand Down
17 changes: 13 additions & 4 deletions dfttk/analysis/ywutils.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,10 +227,19 @@ def get_Magnetic_State(calc):
magmoms = [k for k in magmoms]
magmoms = np.array(magmoms)
fmax = max(magmoms)
sdw = magmoms[magmoms>0.1]
if len(sdw)>0:
smin = min(sdw)
smax = max(sdw)
else:
smin = 0.0
smax = 0.0
fmax = max(magmoms)
fmin = min(magmoms)
fsum = sum(magmoms)
if fmax>0.1 and fmin<=-0.1:
if abs(fsum) > 0.1: return "_FIM"
elif smax-smin > 0.1: return "_SDW"
else: return "_AFM"
elif fmax>0.1 or fmin<=-0.1: return "_FM"
else: return ""
Expand Down Expand Up @@ -262,7 +271,7 @@ def get_rec_from_metatag(vasp_db,m, test=False):
for calc in static_calculations:
vol = calc['output']['structure']['lattice']['volume']
if kpoints is None: kpoints = calc['orig_inputs']['kpoints']['kpoints']
if vol_within(vol, volumes): continue
if vol_within(vol, volumes, thr=1.e-6): continue
natoms = len(calc['output']['structure']['sites'])
try:
sites = calc['output']['structure']['sites']
Expand All @@ -288,16 +297,16 @@ def get_rec_from_metatag(vasp_db,m, test=False):
else: pressures.append(None)
if not gapfound: gapfound = float(gap) > 0.0
tvolumes = np.array(sorted(volumes))
if len(tvolumes)>1:
dvolumes = tvolumes[1:-1] - tvolumes[0:-2]
if len(tvolumes)>=3:
dvolumes = tvolumes[1:] - tvolumes[0:-1]
dvolumes = sorted(dvolumes)
if abs(dvolumes[-1]-dvolumes[-2]) > 0.01*dvolumes[-1]:
all_static_calculations = vasp_db.collection.\
find({'$and':[ {'metadata.tag': m}, {'adopted': True} ]})
for calc in all_static_calculations:
if len(calc['metadata'])<=1:continue # only check constrained calculation
vol = calc['output']['structure']['lattice']['volume']
if vol_within(vol, volumes): continue
if vol_within(vol, volumes, thr=1.e-6): continue
natoms = len(calc['output']['structure']['sites'])
try:
sites = calc['output']['structure']['sites']
Expand Down
9 changes: 7 additions & 2 deletions dfttk/elasticity/parse_outputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,14 @@ def run_task(self, fw_spec):
}
vasp_input_set = env_chk(self.get('vasp_input_set'), False)
if vasp_input_set:
from pymatgen.io.vasp.inputs import Kpoints
d['vasp_input_set_all'] = vasp_input_set.config
d['vasp_input_set'] = {'INCAR':vasp_input_set.config['INCAR'], \
'KPOINTS':vasp_input_set.config['KPOINTS'].as_dict()}
if isinstance(vasp_input_set.config['KPOINTS'], Kpoints):
d['vasp_input_set'] = {'INCAR':vasp_input_set.config['INCAR'], \
'KPOINTS':vasp_input_set.config['KPOINTS'].as_dict()}
else:
d['vasp_input_set'] = {'INCAR':vasp_input_set.config['INCAR'], \
'KPOINTS':vasp_input_set.config['KPOINTS']}

# Get optimized structure
calc_locs_opt = [cl for cl in fw_spec.get('calc_locs', []) if 'optimiz' in cl['name']]
Expand Down
119 changes: 108 additions & 11 deletions dfttk/ftasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@
from atomate import __version__ as atomate_ver
from dfttk import __version__ as dfttk_ver
from pymatgen.core import __version__ as pymatgen_ver
from dfttk.pythelec import get_static_calculations
from dfttk.scripts.assign_fworker_name import Customizing_Workflows, get_powerups_options
from dfttk.pythelec import get_static_calculations, vol_within
from dfttk.scripts.assign_fworker_name import Customizing_Workflows

def extend_calc_locs(name, fw_spec):
"""
Expand Down Expand Up @@ -340,9 +340,13 @@ def run_task(self, fw_spec):
#always perform phonon calculations when when enough phonon calculations found
#to perform a quasiharmonic phonon calculations, one needs at least phonon results five volumes
#phonon_calculations= list(vasp_db.db['phonon'].find({'$and':[ {'metadata.tag': tag}, {'adopted': True} ]}))
phonon_calculations= list(vasp_db.db['phonon'].find({'$and':[ {'metadata': {'tag':tag}}, {'adopted': True} ]}))
phonon_calculations= list(vasp_db.db['phonon'].find({'$and':[ {'metadata': {'tag':tag}}, {'adopted': True}, {'S_vib': {'$exists': True}} ]}))
num_phonon_finished = len(phonon_calculations)
qha_result['has_phonon'] = num_phonon_finished >= 5
if not qha_result['has_phonon']:
phonon_calculations= list(vasp_db.db['phonon'].find({'$and':[ {'metadata': {'tag':tag}}, {'S_vib': {'$exists': True}} ]}))
num_phonon_finished = len(phonon_calculations)
qha_result['has_phonon'] = num_phonon_finished >= 5
#if self['phonon']:
if qha_result['has_phonon']:
# get the vibrational properties from the FW spec
Expand All @@ -355,12 +359,15 @@ def run_task(self, fw_spec):
vol_s_vib = []
vol_c_vib = []
for calc in phonon_calculations:
if calc['volume'] in vol_vol: continue
if calc['volume'] not in volumes: continue
vol_vol.append(calc['volume'])
#if calc['volume'] in vol_vol: continue
#if calc['volume'] not in volumes: continue
if vol_within(calc['volume'], vol_vol, thr=1.e-6): continue
if not vol_within(calc['volume'],volumes, thr=1.e-6): continue
vol_f_vib.append(calc['F_vib'][::everyT])
vol_s_vib.append(calc['S_vib'])
vol_c_vib.append(calc['CV_vib'])
vol_vol.append(calc['volume'])

# sort them order of the unit cell volumes
vol_f_vib = sort_x_by_y(vol_f_vib, vol_vol)
vol_s_vib = sort_x_by_y(vol_s_vib, vol_vol)
Expand All @@ -371,7 +378,8 @@ def run_task(self, fw_spec):
_energies = []
_dos_objs = []
for iv,vol in enumerate(volumes):
if vol not in vol_vol: continue
#if vol not in vol_vol: continue
if not vol_within(vol,vol_vol, thr=1.e-6): continue
_volumes.append(vol)
_energies.append(energies[iv])
_dos_objs.append(dos_objs[iv])
Expand Down Expand Up @@ -740,6 +748,88 @@ def run_task(self, fw_spec):
kpoint.write_file('KPOINTS')


@explicit_serialize
class Crosscom_Calculation(FiretaskBase):
"""Continue Static/Phonon calculations
"""

required_params = []
optional_params = ['db_file', 'vasp_cmd', 'a_kwargs',
'db_insert', 'tag', 'metadata', 'name', 'vasp_input_set',
't_min', 't_max', 't_step',
'verbose', 'modify_incar_params', 'modify_kpoints_params',
'override_default_vasp_params',
'store_volumetric_data', 'static', 'defo']

def run_task(self, fw_spec):
db_file = self.get('db_file') or DB_FILE
vasp_cmd = self.get('vasp_cmd') or VASP_CMD
db_insert = self.get('db_insert', None)
tag = self.get('tag')
metadata = self.get('metadata')
name = self.get('name', "Crosscom_Calculation")
t_min = self.get('t_min', None)
t_max = self.get('t_max', None)
t_step = self.get('t_step', None)
modify_incar_params = self.get('modify_incar_params', {})
modify_kpoints_params = self.get('modify_kpoints_params', {})
override_default_vasp_params = self.get('override_default_vasp_params', {})
store_volumetric_data = self.get('store_volumetric_data', False)

return FWAction(detours=self.get_detour_workflow(
db_file, vasp_cmd, db_insert, tag, metadata, name,
t_min, t_max, t_step,
modify_incar_params, modify_kpoints_params,
override_default_vasp_params,
store_volumetric_data)
)

def get_detour_workflow(self,
db_file, vasp_cmd, db_insert, tag, metadata, name,
t_min, t_max, t_step,
modify_incar_params, modify_kpoints_params,
override_default_vasp_params,
store_volumetric_data):
from fireworks import Workflow
from .fworks import PhononFW, StaticFW
a_kwargs = self.get('a_kwargs',{})
settings = a_kwargs.get('settings', {})
stable_tor = settings.get('stable_tor', 0.01)

phonon = settings.get('phonon', False)
phonon_supercell_matrix = a_kwargs.get('phonon_supercell_matrix', None)
structure=a_kwargs.get('structure', None)
site_properties = structure.site_properties

detour_fws = []
inp_structure = Structure.from_file('CONTCAR')
if len(site_properties)>0:
for prop, vals in site_properties.items():
inp_structure.add_site_property(prop, vals)

detour_fws.append(StaticFW(inp_structure, name="crosscom-static"+'-defo={:5.3f}'.format(self.get('defo',1.0)),
vasp_cmd=vasp_cmd, metadata=metadata, prev_calc_loc=False, modify_incar=modify_incar_params,
db_file=db_file, tag=tag,
a_kwargs=a_kwargs,
override_default_vasp_params=override_default_vasp_params,
store_volumetric_data=store_volumetric_data))

if phonon:
t_kwargs = {'t_min': t_min, 't_max': t_max, 't_step': t_step}
common_kwargs = {'vasp_cmd': vasp_cmd, 'db_file': db_file, "metadata": metadata, "tag": tag,
'override_default_vasp_params': override_default_vasp_params}
detour_fws.append(PhononFW(inp_structure, phonon_supercell_matrix,
name='crosscom-phonon'+'-defo={:5.3f}'.format(self.get('defo',1.0)),
prev_calc_loc=False, stable_tor=stable_tor,
a_kwargs=a_kwargs,
**t_kwargs, **common_kwargs))
"""
override_default_vasp_params = override_default_vasp_params or {}
user_incar_settings = override_default_vasp_params.get('user_incar_settings',{})
"""
return Customizing_Workflows(detour_fws, powerups_options=settings.get('powerups', None))


@explicit_serialize
class CheckRelaxation(FiretaskBase):
"""Run VASP calculations to get symmetry conserved and symmetry broken structures.
Expand Down Expand Up @@ -806,7 +896,8 @@ class CheckRelaxation(FiretaskBase):

required_params = ["db_file", "tag", "common_kwargs"]
optional_params = ["metadata", "tol_energy", "tol_strain", "tol_bond", 'level', 'isif4', "energy_with_isif",
"static_kwargs", "relax_kwargs", 'store_volumetric_data', 'site_properties']
"static_kwargs", "relax_kwargs", 'store_volumetric_data',
'a_kwargs', 'site_properties']

def run_task(self, fw_spec):
self.db_file = env_chk(self.get("db_file"), fw_spec)
Expand Down Expand Up @@ -930,6 +1021,8 @@ def get_detour_workflow(self, next_steps, final_energy, energy_with_isif={}):

symmetry_options = self.symmetry_options
static_kwargs = self.get('static_kwargs', {})
a_kwargs = self.get('a_kwargs', {})
settings = a_kwargs.get('settings', {})

# Assume the data for the current step is already in the database
db = VaspCalcDb.from_db_file(self.db_file, admin=True).db['relaxations']
Expand All @@ -949,17 +1042,21 @@ def _get_input_structure_for_step(step):
md['symmetry_type'] = step["symmetry_type"]
common_copy["metadata"] = md
detour_fws.append(StaticFW(inp_structure, isif=step['isif'], store_volumetric_data=self.store_volumetric_data,
**static_kwargs, **common_copy))
a_kwargs=a_kwargs,
**static_kwargs, **common_copy))
elif job_type == "relax":
detour_fws.append(RobustOptimizeFW(inp_structure, isif=step["isif"], energy_with_isif=energy_with_isif,
override_symmetry_tolerances=symmetry_options, store_volumetric_data=self.store_volumetric_data, **self["common_kwargs"]))
override_symmetry_tolerances=symmetry_options, store_volumetric_data=self.store_volumetric_data,
a_kwargs=a_kwargs, **self["common_kwargs"]))
else:
raise ValueError(f"Unknown job_type {job_type} for step {step}.")
"""
common_kwargs = self.get('common_kwargs',{})
override_default_vasp_params = common_kwargs.get('override_default_vasp_params',{})
user_incar_settings = override_default_vasp_params.get('user_incar_settings',{})
#user_incar_settings = common_kwargs.get('modify_incar_params',{})
return Customizing_Workflows(detour_fws, powerups_options=user_incar_settings.get('powerups', None))
"""
return Customizing_Workflows(detour_fws, powerups_options=settings.get('powerups', None))


@explicit_serialize
Expand Down
Loading