Skip to content

Commit

Permalink
new calculator syntax in test_run_train
Browse files Browse the repository at this point in the history
  • Loading branch information
WillBaldwin0 committed Oct 29, 2024
1 parent 8d9f6cb commit 7a19ed6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions tests/test_run_train.py
Original file line number Diff line number Diff line change
Expand Up @@ -686,15 +686,19 @@ def test_run_train_foundation_multihead_json(tmp_path, fitting_configs):
p = subprocess.run(cmd.split(), env=run_env, check=True)
assert p.returncode == 0

calc = MACECalculator(
model_paths=tmp_path / "MACE.model", device="cpu", default_dtype="float64"
)

Es = []
for at in fitting_configs:
config_head = at.info.get("head", "MP2")
calc = MACECalculator(
model_paths=tmp_path / "MACE.model",
device="cpu",
default_dtype="float64",
head=config_head,
)
at.calc = calc
Es.append(at.get_potential_energy())


print("Es", Es)
# from a run on 20/08/2024 on commit
ref_Es = [
Expand Down

0 comments on commit 7a19ed6

Please sign in to comment.