Skip to content

Commit

Permalink
add mattersim
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Dec 4, 2024
1 parent 8105345 commit d7f972d
Show file tree
Hide file tree
Showing 7 changed files with 105 additions and 0 deletions.
33 changes: 33 additions & 0 deletions examples/energy-volume/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,36 @@ stages:
hash: md5
md5: fa8b44ba9924d82a0487acc3e2f55a68
size: 3509
mattersim_0_EnergyVolumeCurve:
cmd: zntrack run mlipx.nodes.energy_volume.EnergyVolumeCurve --name mattersim_0_EnergyVolumeCurve
deps:
- path: nodes/initialize/MPRester/frames.xyz
hash: md5
md5: b2aa0fb43e0b26ef88bedc082a0a2325
size: 866
params:
params.yaml:
mattersim_0_EnergyVolumeCurve:
data_id: -1
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs:
module: mattersim.forcefield
n_points: 50
start: 0.8
stop: 2.0
outs:
- path: nodes/mattersim/0/EnergyVolumeCurve/frames.xyz
hash: md5
md5: 0ad32e40ec27684ee853591e273982f2
size: 86946
- path: nodes/mattersim/0/EnergyVolumeCurve/node-meta.json
hash: md5
md5: 92019096017c6c38d3633632cb0942fc
size: 64
- path: nodes/mattersim/0/EnergyVolumeCurve/results.csv
hash: md5
md5: 1756b0048cae0710eaac8db037e20f6f
size: 3057
17 changes: 17 additions & 0 deletions examples/energy-volume/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ plots:
nodes/chgnet/0/EnergyVolumeCurve/results.csv: scale
y:
nodes/chgnet/0/EnergyVolumeCurve/results.csv: energy
- mattersim_0_EnergyVolumeCurve_results:
x:
nodes/mattersim/0/EnergyVolumeCurve/results.csv: scale
y:
nodes/mattersim/0/EnergyVolumeCurve/results.csv: energy
stages:
chgnet_0_EnergyVolumeCurve:
cmd: zntrack run mlipx.nodes.energy_volume.EnergyVolumeCurve --name chgnet_0_EnergyVolumeCurve
Expand Down Expand Up @@ -53,6 +58,18 @@ stages:
- nodes/mace_mp/0/EnergyVolumeCurve/results.csv
params:
- mace_mp_0_EnergyVolumeCurve
mattersim_0_EnergyVolumeCurve:
cmd: zntrack run mlipx.nodes.energy_volume.EnergyVolumeCurve --name mattersim_0_EnergyVolumeCurve
deps:
- nodes/initialize/MPRester/frames.xyz
metrics:
- nodes/mattersim/0/EnergyVolumeCurve/node-meta.json:
cache: false
outs:
- nodes/mattersim/0/EnergyVolumeCurve/frames.xyz
- nodes/mattersim/0/EnergyVolumeCurve/results.csv
params:
- mattersim_0_EnergyVolumeCurve
orb_v2_0_EnergyVolumeCurve:
cmd: zntrack run mlipx.nodes.energy_volume.EnergyVolumeCurve --name orb_v2_0_EnergyVolumeCurve
deps:
Expand Down
7 changes: 7 additions & 0 deletions examples/energy-volume/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ def get_calculator(self, **kwargs):
class_name="CHGNetCalculator",
)

# https://github.com/CederGroupHub/chgnet
MODELS["mattersim"] = mlipx.GenericASECalculator(
module="mattersim.forcefield",
class_name="MatterSimCalculator",
device="auto",
)


# OPTIONAL
# ========
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/frames.xyz
/results.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "b95d21a6-afe7-453b-aa44-12f636199ded", "run_count": 1}
11 changes: 11 additions & 0 deletions examples/energy-volume/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ mace_mp_0_EnergyVolumeCurve:
n_points: 50
start: 0.8
stop: 2.0
mattersim_0_EnergyVolumeCurve:
data_id: -1
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs: null
module: mattersim.forcefield
n_points: 50
start: 0.8
stop: 2.0
orb_v2_0_EnergyVolumeCurve:
data_id: -1
model:
Expand Down
34 changes: 34 additions & 0 deletions examples/energy-volume/zntrack.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,39 @@
"_type": "pathlib.Path",
"value": "$nwd$/frames.xyz"
}
},
"mattersim_0_EnergyVolumeCurve": {
"nwd": {
"_type": "pathlib.Path",
"value": "nodes/mattersim/0/EnergyVolumeCurve"
},
"model": {
"_type": "@dataclasses.dataclass",
"value": {
"module": "mlipx.nodes.generic_ase",
"cls": "GenericASECalculator"
}
},
"data": {
"_type": "znflow.Connection",
"value": {
"instance": {
"_type": "zntrack.Node",
"value": {
"module": "mlipx.nodes.mp_api",
"name": "initialize_MPRester",
"cls": "MPRester",
"remote": null,
"rev": null
}
},
"attribute": "frames",
"item": null
}
},
"frames_path": {
"_type": "pathlib.Path",
"value": "$nwd$/frames.xyz"
}
}
}

0 comments on commit d7f972d

Please sign in to comment.