Skip to content

Commit

Permalink
Merge branch 'mkphuthi/develop' of https://github.com/BattModels/asim…
Browse files Browse the repository at this point in the history
…tools into mkphuthi/develop
  • Loading branch information
mkphuthi committed Jan 3, 2025
2 parents 2d1713d + adc9162 commit 965ce20
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
## [develop] - 2024-11-13

### Added
- ASIMMODULE: vasp/vasp
- ASIMMODULE: benchmarking/distribution
- ASIMMODULE: data/collect_images asimmodule
- CALCULATOR: OMAT24 calculator
Expand Down
2 changes: 2 additions & 0 deletions asimtools/asimmodules/benchmarking/distribution.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ def distribution(
remap_keys = {}
unit_factors = {'meV': 1000, 'eV': 1, 'kcal/mol': 23.0621}
unit_factor = unit_factors[unit]
if remap_keys is None:
remap_keys = {}

unit_dict = {
'energy': f'{unit}/atom',
Expand Down
6 changes: 3 additions & 3 deletions asimtools/asimmodules/vasp/vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,19 +28,19 @@ def vasp(
vaspinput_args: Optional[Dict] = None,
command: str = 'vasp_std',
mpset: Optional[str] = None,
write_image_output: bool = False,
write_image_output: bool = True,
) -> Dict:
"""Run VASP with given input files and specified image
:param image: Initial image for VASP calculation. Image specification,
see :func:`asimtools.utils.get_atoms`
:type image: Dict
:param vaspinput_args: Dictionary of VASP input arguments.
:param vaspinput_args: Dictionary of pymatgen's VASPInput arguments.
See :class:`pymatgen.io.vasp.inputs.VaspInput`
:type vaspinput_args: Dict
:param command: Command with which to run VASP, defaults to 'vasp_std'
:type command: str, optional
:param mpset: Material Project VASP set to use, defaults to None
:param mpset: Materials Project VASP set to use, defaults to None
:type mpset: str, optional
:param write_image_output: Whether to write output image in standard
asimtools format to file, defaults to False
Expand Down
8 changes: 6 additions & 2 deletions asimtools/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def __init__(
self.sim_input['src_dir'] = self.launchdir

self.env_id = self.sim_input.get('env_id', None)
if self.env_id is not None:
if self.env_id is not None and self.env_input is not None:
self.env = self.env_input[self.env_id]
else:
self.env = {
Expand Down Expand Up @@ -1062,7 +1062,11 @@ def load_job_from_directory(workdir: os.PathLike) -> Job:
else:
calc_input = None

job = Job(sim_input, env_input, calc_input)
job = Job(
sim_input=sim_input,
env_input=env_input,
calc_input=calc_input,
)

# This makes sure that wherever we may be loading the job from, we refer
# to the correct input/output files. As of now, it does not seem necessary
Expand Down

0 comments on commit 965ce20

Please sign in to comment.