diff --git a/atomrdf/workflow/pyiron/vasp.py b/atomrdf/workflow/pyiron/vasp.py index 4b795ff..4732283 100644 --- a/atomrdf/workflow/pyiron/vasp.py +++ b/atomrdf/workflow/pyiron/vasp.py @@ -99,17 +99,50 @@ def identify_method(job, method_dict): method_dict['method'] = method method_dict['dof'] = dof - encut = mdict['ENCUT'] - method_dict['encut'] = encut - + inputs = [] + inputs.append( + { + "label": "EnergyCutoff", + "value": encut, + "unit": "EV", + } + ) + indf = job.input.to_dict()['kpoints/data_dict'] params = indf['Parameter'] vals = indf['Value'] kpoint_type = vals[2] kpoint_grid = vals[3] - method_dict['kpoint_type'] = kpoint_type - method_dict['kpoint_grid'] = kpoint_grid + + if kpoint_type == 'Monkhorst-pack': + inputs.append( + { + "label": "MonkhorstPackKPointMesh", + "value": kpoint_grid, + } + ) + elif kpoint_type == 'Gamma': + inputs.append( + { + "label": "GammaCenteredKPointMesh", + "value": kpoint_grid, + } + ) + elif kpoint_type in ['Reciprocal', 'Cartesian']: + inputs.append( + { + "label": "ExplicitKPointMesh", + "value": kpoint_grid, + } + ) + else: + inputs.append( + { + "label": "KPointMesh", + "value": kpoint_grid, + } + ) indf = job.input.to_dict()['potcar/data_dict'] xc = indf['Value'][0] @@ -153,39 +186,19 @@ def extract_calculated_quantities(job, method_dict): ) outputs.append( { - "label": "TotalVolume", - "value": np.round(job.output.volume[-1], decimals=5), - "unit": "ANGSTROM3", - "associate_to_sample": True, - } - ) - structure = job.get_structure(frame=-1) - lx = np.linalg.norm(structure.cell[0]) - ly = np.linalg.norm(structure.cell[1]) - lz = np.linalg.norm(structure.cell[2]) - - outputs.append( - { - "label": "SimulationCellLength_x", - "value": np.round(lx, decimals=4), - "unit": "ANGSTROM", + "label": "PotentialEnergy", + "value": np.round(job.output.energy_pot[-1], decimals=5), + "unit": "EV", "associate_to_sample": True, } ) outputs.append( { - "label": "SimulationCellLength_y", - "value": np.round(ly, decimals=4), - "unit": "ANGSTROM", + "label": "Volume", + "value": np.round(job.output.volume[-1], decimals=5), + "unit": "ANGSTROM3", "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 \ No newline at end of file diff --git a/examples/workflow_examples/02_vasp.ipynb b/examples/workflow_examples/02_vasp.ipynb index 5f31989..b29758b 100644 --- a/examples/workflow_examples/02_vasp.ipynb +++ b/examples/workflow_examples/02_vasp.ipynb @@ -22,7 +22,7 @@ { "data": { "application/vnd.jupyter.widget-view+json": { - "model_id": "fe747ff19deb48f78e4a3641d148c6c1", + "model_id": "7d2179bc22d84ea8a30013374dbdad2c", "version_major": 2, "version_minor": 0 }, @@ -43,7 +43,7 @@ "metadata": {}, "outputs": [], "source": [ - "pr = Project('wfy1')" + "pr = Project('wfy1e')" ] }, { @@ -63,7 +63,7 @@ "output_type": "stream", "text": [ "fccSi fccSi\n", - "job was stored with the job ID 468\n" + "job was stored with the job ID 1199\n" ] } ], @@ -117,14 +117,14 @@ "
\n", "