Skip to content

Commit

Permalink
run mattersim
Browse files Browse the repository at this point in the history
  • Loading branch information
PythonFZ committed Dec 5, 2024
1 parent c55abed commit ff62dd1
Show file tree
Hide file tree
Showing 85 changed files with 1,399 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/diatomics/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```bash
mlipx recipes homonuclear-diatomics --models mace_mp,sevennet,orb_v2 --smiles="[Li+].[Cl-]" --repro
mlipx recipes homonuclear-diatomics --models mace_mp,sevennet,orb_v2,mattersim --smiles="[Li+].[Cl-]" --repro
mlipx compare --glob "*HomonuclearDiatomics"
```
34 changes: 34 additions & 0 deletions examples/diatomics/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -236,3 +236,37 @@ stages:
hash: md5
md5: f05ba44025dbc070e740fedc0c6d2be2
size: 64
mattersim_HomonuclearDiatomics:
cmd: zntrack run mlipx.nodes.diatomics.HomonuclearDiatomics --name mattersim_HomonuclearDiatomics
deps:
- path: nodes/initialize/Smiles2Conformers/frames.xyz
hash: md5
md5: e5492061936ed82d534cc2d7c62937ea
size: 153
params:
params.yaml:
mattersim_HomonuclearDiatomics:
elements: []
eq_distance: covalent-radiuis
max_distance: 2.0
min_distance: 0.5
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs:
module: mattersim.forcefield
n_points: 100
outs:
- path: nodes/mattersim/HomonuclearDiatomics/frames.json
hash: md5
md5: f27250c6ea623b2a9a38b92717cd97af
size: 421800
- path: nodes/mattersim/HomonuclearDiatomics/node-meta.json
hash: md5
md5: bc45e1ec53bd983d26b89c74fc127b40
size: 64
- path: nodes/mattersim/HomonuclearDiatomics/results.csv
hash: md5
md5: b70e500ccf4307772b390389fb6e5a1d
size: 5843
12 changes: 12 additions & 0 deletions examples/diatomics/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,18 @@ stages:
- nodes/mace_mp/HomonuclearDiatomics/results.csv
params:
- mace_mp_HomonuclearDiatomics
mattersim_HomonuclearDiatomics:
cmd: zntrack run mlipx.nodes.diatomics.HomonuclearDiatomics --name mattersim_HomonuclearDiatomics
deps:
- nodes/initialize/Smiles2Conformers/frames.xyz
metrics:
- nodes/mattersim/HomonuclearDiatomics/node-meta.json:
cache: false
outs:
- nodes/mattersim/HomonuclearDiatomics/frames.json
- nodes/mattersim/HomonuclearDiatomics/results.csv
params:
- mattersim_HomonuclearDiatomics
orb_v2_HomonuclearDiatomics:
cmd: zntrack run mlipx.nodes.diatomics.HomonuclearDiatomics --name orb_v2_HomonuclearDiatomics
deps:
Expand Down
2 changes: 1 addition & 1 deletion examples/diatomics/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
with project.group(model_name):
neb = mlipx.HomonuclearDiatomics(
elements=[],
data=sum(frames, []),
data=sum(frames, []), # Use all elements from all frames
model=model,
n_points=100,
min_distance=0.5,
Expand Down
8 changes: 8 additions & 0 deletions examples/diatomics/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,14 @@ def get_calculator(self, **kwargs):
MODELS["orb_v2"] = OrbCalc(name="orb_v2", device="auto")


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


# OPTIONAL
# ========
# If you have custom property names you can use the UpdatedFramesCalc
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/frames.json
/results.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "c5addb02-3509-4d8c-a32a-b2908b12a680", "run_count": 1}
12 changes: 12 additions & 0 deletions examples/diatomics/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,18 @@ mace_mp_HomonuclearDiatomics:
model: medium
module: mace.calculators
n_points: 100
mattersim_HomonuclearDiatomics:
elements: []
eq_distance: covalent-radiuis
max_distance: 2.0
min_distance: 0.5
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs: null
module: mattersim.forcefield
n_points: 100
orb_v2_HomonuclearDiatomics:
elements: []
eq_distance: covalent-radiuis
Expand Down
30 changes: 30 additions & 0 deletions examples/diatomics/zntrack.json
Original file line number Diff line number Diff line change
Expand Up @@ -98,5 +98,35 @@
"item": null
}
}
},
"mattersim_HomonuclearDiatomics": {
"nwd": {
"_type": "pathlib.Path",
"value": "nodes/mattersim/HomonuclearDiatomics"
},
"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.smiles",
"name": "initialize_Smiles2Conformers",
"cls": "Smiles2Conformers",
"remote": null,
"rev": null
}
},
"attribute": "frames",
"item": null
}
}
}
}
2 changes: 1 addition & 1 deletion examples/energy-volume/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
```bash
mlipx recipes ev --models mace_mp,sevennet,orb_v2,chgnet --material-ids=mp-1143 --repro
mlipx recipes ev --models mace_mp,sevennet,orb_v2,chgnet,mattersim --material-ids=mp-1143 --repro
mlipx compare --glob "*EnergyVolumeCurve"
```
1 change: 1 addition & 0 deletions examples/energy-volume/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ def get_calculator(self, **kwargs):
class_name="CHGNetCalculator",
)


# https://github.com/CederGroupHub/chgnet
MODELS["mattersim"] = mlipx.GenericASECalculator(
module="mattersim.forcefield",
Expand Down
2 changes: 1 addition & 1 deletion examples/invariances/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
```bash
mlipx recipes invariances --models mace_mp,sevennet,orb_v2,chgnet --material-ids=mp-1143 --repro
mlipx recipes invariances --models mace_mp,sevennet,orb_v2,chgnet,mattersim --material-ids=mp-1143 --repro
mlipx compare --glob "*RotationalInvariance"
mlipx compare --glob "*TranslationalInvariance"
mlipx compare --glob "*PermutationInvariance"
Expand Down
105 changes: 105 additions & 0 deletions examples/invariances/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -437,3 +437,108 @@ stages:
hash: md5
md5: 9c6a8b5fe9083d3b630a1eeae994bb32
size: 2174
mattersim_0_RotationalInvariance:
cmd: zntrack run mlipx.nodes.invariances.RotationalInvariance --name mattersim_0_RotationalInvariance
deps:
- path: nodes/initialize/MPRester/frames.xyz
hash: md5
md5: b2aa0fb43e0b26ef88bedc082a0a2325
size: 866
params:
params.yaml:
mattersim_0_RotationalInvariance:
data_id: -1
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs:
module: mattersim.forcefield
n_points: 100
outs:
- path: nodes/mattersim/0/RotationalInvariance/frames.xyz
hash: md5
md5: 707a6dc4eecc8a0a0b02fd95ca83e443
size: 174713
- path: nodes/mattersim/0/RotationalInvariance/metrics.json
hash: md5
md5: 77ccde3a333100eb4349487f89f5b6bb
size: 59
- path: nodes/mattersim/0/RotationalInvariance/node-meta.json
hash: md5
md5: a85268bf8a3ecc93b11a7147b83ae77d
size: 64
- path: nodes/mattersim/0/RotationalInvariance/plots.csv
hash: md5
md5: 2bde6d882f64043daf58e44cf084e23e
size: 1333
mattersim_0_PermutationInvariance:
cmd: zntrack run mlipx.nodes.invariances.PermutationInvariance --name mattersim_0_PermutationInvariance
deps:
- path: nodes/initialize/MPRester/frames.xyz
hash: md5
md5: b2aa0fb43e0b26ef88bedc082a0a2325
size: 866
params:
params.yaml:
mattersim_0_PermutationInvariance:
data_id: -1
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs:
module: mattersim.forcefield
n_points: 100
outs:
- path: nodes/mattersim/0/PermutationInvariance/frames.xyz
hash: md5
md5: 1b409395466af84044d0287f895045bf
size: 165300
- path: nodes/mattersim/0/PermutationInvariance/metrics.json
hash: md5
md5: 4e4427ee1edb555656e7147e83f02c3f
size: 40
- path: nodes/mattersim/0/PermutationInvariance/node-meta.json
hash: md5
md5: e781deaac25d66bceb3516f0d782411b
size: 64
- path: nodes/mattersim/0/PermutationInvariance/plots.csv
hash: md5
md5: 1c1c42ccb7cb6a2c7fa26e80401d4b2c
size: 1298
mattersim_0_TranslationalInvariance:
cmd: zntrack run mlipx.nodes.invariances.TranslationalInvariance --name mattersim_0_TranslationalInvariance
deps:
- path: nodes/initialize/MPRester/frames.xyz
hash: md5
md5: b2aa0fb43e0b26ef88bedc082a0a2325
size: 866
params:
params.yaml:
mattersim_0_TranslationalInvariance:
data_id: -1
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs:
module: mattersim.forcefield
n_points: 100
outs:
- path: nodes/mattersim/0/TranslationalInvariance/frames.xyz
hash: md5
md5: 46b9c42ac7326387e45bd50371a4fb84
size: 165318
- path: nodes/mattersim/0/TranslationalInvariance/metrics.json
hash: md5
md5: 7d4ad028825f3dc04b1f1dd31af3ad8a
size: 58
- path: nodes/mattersim/0/TranslationalInvariance/node-meta.json
hash: md5
md5: 5637f1d232f8039a0a364fd6daa150b4
size: 64
- path: nodes/mattersim/0/TranslationalInvariance/plots.csv
hash: md5
md5: f1d21493378826913984aa19aa0dc61b
size: 1316
42 changes: 42 additions & 0 deletions examples/invariances/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,48 @@ stages:
- nodes/mace_mp/0/TranslationalInvariance/plots.csv
params:
- mace_mp_0_TranslationalInvariance
mattersim_0_PermutationInvariance:
cmd: zntrack run mlipx.nodes.invariances.PermutationInvariance --name mattersim_0_PermutationInvariance
deps:
- nodes/initialize/MPRester/frames.xyz
metrics:
- nodes/mattersim/0/PermutationInvariance/metrics.json:
cache: false
- nodes/mattersim/0/PermutationInvariance/node-meta.json:
cache: false
outs:
- nodes/mattersim/0/PermutationInvariance/frames.xyz
- nodes/mattersim/0/PermutationInvariance/plots.csv
params:
- mattersim_0_PermutationInvariance
mattersim_0_RotationalInvariance:
cmd: zntrack run mlipx.nodes.invariances.RotationalInvariance --name mattersim_0_RotationalInvariance
deps:
- nodes/initialize/MPRester/frames.xyz
metrics:
- nodes/mattersim/0/RotationalInvariance/metrics.json:
cache: false
- nodes/mattersim/0/RotationalInvariance/node-meta.json:
cache: false
outs:
- nodes/mattersim/0/RotationalInvariance/frames.xyz
- nodes/mattersim/0/RotationalInvariance/plots.csv
params:
- mattersim_0_RotationalInvariance
mattersim_0_TranslationalInvariance:
cmd: zntrack run mlipx.nodes.invariances.TranslationalInvariance --name mattersim_0_TranslationalInvariance
deps:
- nodes/initialize/MPRester/frames.xyz
metrics:
- nodes/mattersim/0/TranslationalInvariance/metrics.json:
cache: false
- nodes/mattersim/0/TranslationalInvariance/node-meta.json:
cache: false
outs:
- nodes/mattersim/0/TranslationalInvariance/frames.xyz
- nodes/mattersim/0/TranslationalInvariance/plots.csv
params:
- mattersim_0_TranslationalInvariance
orb_v2_0_PermutationInvariance:
cmd: zntrack run mlipx.nodes.invariances.PermutationInvariance --name orb_v2_0_PermutationInvariance
deps:
Expand Down
8 changes: 8 additions & 0 deletions examples/invariances/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,14 @@ def get_calculator(self, **kwargs):
)


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


# OPTIONAL
# ========
# If you have custom property names you can use the UpdatedFramesCalc
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/frames.xyz
/plots.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mean": -74.80252075195312, "std": 0.0}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "132511da-f3af-424e-b685-d340efe58b19", "run_count": 1}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/frames.xyz
/plots.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mean": -74.80253601074219, "std": 1.0976787052641157e-05}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "3a230a3a-6819-44ad-824f-4cf6be3b17be", "run_count": 1}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/frames.xyz
/plots.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"mean": -74.80253601074219, "std": 1.199053440359421e-05}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "62751729-608e-44d3-861a-75087b8b6053", "run_count": 1}
Loading

0 comments on commit ff62dd1

Please sign in to comment.