Skip to content

Commit

Permalink
Merge branch 'main' into rgao_delete_distributed
Browse files Browse the repository at this point in the history
  • Loading branch information
rayg1234 authored Sep 10, 2024
2 parents b4fb1ec + 98c61b8 commit b256296
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/fairchem/core/datasets/ase_datasets.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ def _load_dataset_get_ids(self, config: dict) -> list[int]:

self.dbs = []

for path in filepaths:
for path in sorted(filepaths):
try:
self.dbs.append(self.connect_db(path, config.get("connect_args", {})))
except ValueError:
Expand Down
2 changes: 1 addition & 1 deletion src/fairchem/data/oc/core/slab.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def __init__(
shift: float | None = None,
top: bool | None = None,
oriented_bulk: Structure = None,
min_ab: float = 0.8,
min_ab: float = 8.0,
):
assert bulk is not None
self.bulk = bulk
Expand Down
7 changes: 6 additions & 1 deletion src/fairchem/data/oc/utils/vasp.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ def calculate_surface_k_points(atoms):
)


def write_vasp_input_files(atoms, outdir=".", vasp_flags=None, pp_setups="minimal"):
def write_vasp_input_files(
atoms, outdir=".", vasp_flags=None, pp_setups="minimal", pp_env="VASP_PP_PATH"
):
"""
Effectively goes through the same motions as the `run_vasp` function,
except it only writes the input files instead of running.
Expand All @@ -78,11 +80,14 @@ def write_vasp_input_files(atoms, outdir=".", vasp_flags=None, pp_setups="minima
Defaults to '.'
vasp_flags A dictionary of settings we want to pass to the `Vasp`
calculator. Defaults to a standerd set of values if `None`
pp_setups Pseudopotential setups to use - https://gitlab.com/ase/ase/-/blob/master/ase/calculators/vasp/setups.py
pp_env Environment variable to read for pseudopotentials.
"""
if vasp_flags is None: # Immutable default
vasp_flags = VASP_FLAGS

atoms, vasp_flags = _clean_up_inputs(atoms, vasp_flags.copy())
calc = Vasp(directory=outdir, **vasp_flags)
calc.VASP_PP_PATH = pp_env
calc.input_params["setups"] = pp_setups
calc.write_input(atoms)
2 changes: 1 addition & 1 deletion src/fairchem/data/oc/utils/vasp_flags.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"xc": "PBE",
"ivdw": 11,
"encut": 400.0,
"ediff": 1e-6,
"ediff": 1e-4,
"nelm": 100,
"ismear": 0,
"sigma": 0.1,
Expand Down

0 comments on commit b256296

Please sign in to comment.