Skip to content

Commit

Permalink
update qe
Browse files Browse the repository at this point in the history
  • Loading branch information
srmnitc committed Oct 21, 2024
1 parent 32a1bd0 commit f4795fd
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 37 deletions.
5 changes: 4 additions & 1 deletion atomrdf/workflow/pyiron/vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,8 @@ def identify_method(job, method_dict):
method_dict['dof'] = dof

inputs = []

encut = mdict['ENCUT']
inputs.append(
{
"label": "EnergyCutoff",
Expand Down Expand Up @@ -143,7 +145,8 @@ def identify_method(job, method_dict):
"value": kpoint_grid,
}
)

method_dict['inputs'] = inputs

indf = job.input.to_dict()['potcar/data_dict']
xc = indf['Value'][0]
method_dict['xc_functional'] = xc
Expand Down
68 changes: 32 additions & 36 deletions atomrdf/workflow/qe/qe.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,13 +91,39 @@ def identify_method(job, method_dict):

encut = data['system']['ecutwfc']
#convert to eV
method_dict['encut'] = encut*13.6057039763
inputs = []
inputs.append(
{
"label": "EnergyCutoff",
"value": encut*13.6057039763,
"unit": "EV",
}
)

#get kpoints
if tab['K_POINTS']['extra'] == 'automatic':
method_dict['kpoint_type'] = 'Monkhorst-Pack'
method_dict['kpoint_grid'] = " ".join(tab['K_POINTS']['value'][0].split()[:3])

inputs.append(
{
"label": "MonkhorstPackKPointMesh",
"value": " ".join(tab['K_POINTS']['value'][0].split()[:3]),
}
)
elif tab['K_POINTS']['extra'] == 'gamma':
inputs.append(
{
"label": "GammaCenteredKPointMesh",
"value": " ",
}
)
else:
inputs.append(
{
"label": "ExplicitKPointMesh",
"value": " ",
}
)
method_dict['inputs'] = inputs

#get pseudopotentials
pseudo = None
with open(outfile, 'r') as fin:
Expand Down Expand Up @@ -132,39 +158,9 @@ def extract_calculated_quantities(job, method_dict):
)
outputs.append(
{
"label": "TotalVolume",
"label": "Volume",
"value": np.round(struct.get_volume(), decimals=5),
"unit": "ANGSTROM3",
"associate_to_sample": True,
}
)

lx = np.linalg.norm(struct.cell[0])
ly = np.linalg.norm(struct.cell[1])
lz = np.linalg.norm(struct.cell[2])

outputs.append(
{
"label": "SimulationCellLength_x",
"value": np.round(lx, decimals=4),
"unit": "ANGSTROM",
"associate_to_sample": True,
}
)
outputs.append(
{
"label": "SimulationCellLength_y",
"value": np.round(ly, decimals=4),
"unit": "ANGSTROM",
"associate_to_sample": True,
}
)
outputs.append(
{
"label": "SimulationCellLength_z",
"value": np.round(lz, decimals=4),
"unit": "ANGSTROM",
"associate_to_sample": True,
}
)
method_dict['outputs'] = outputs
)

0 comments on commit f4795fd

Please sign in to comment.