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 d7f972d commit c55abed
Show file tree
Hide file tree
Showing 7 changed files with 111 additions and 0 deletions.
37 changes: 37 additions & 0 deletions examples/phase_diagram/dvc.lock
Original file line number Diff line number Diff line change
Expand Up @@ -469,3 +469,40 @@ stages:
hash: md5
md5: f2bd94bb6158efc7a4f22533448c4ca7
size: 86
mattersim_0_PhaseDiagram:
cmd: zntrack run mlipx.nodes.phase_diagram.PhaseDiagram --name mattersim_0_PhaseDiagram
deps:
- path: nodes/initialize/MPRester/frames.xyz
hash: md5
md5: ba61141c54087769ba8a69da4ea4b82a
size: 1156
params:
params.yaml:
mattersim_0_PhaseDiagram:
chemsys:
data_ids:
fmax: 0.05
geo_opt: false
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs:
module: mattersim.forcefield
outs:
- path: nodes/mattersim/0/PhaseDiagram/frames.xyz
hash: md5
md5: 679ee7c8b95cdc70abd991c32f09246e
size: 2144
- path: nodes/mattersim/0/PhaseDiagram/node-meta.json
hash: md5
md5: 739155364456752974f4e9d9a4308fe6
size: 64
- path: nodes/mattersim/0/PhaseDiagram/phase_diagram.json
hash: md5
md5: 6b839d23cadb7cc88959f1b0584ddc80
size: 2640583
- path: nodes/mattersim/0/PhaseDiagram/results.csv
hash: md5
md5: 50deb51c59a72deac8c32ec19cd7b66d
size: 76
18 changes: 18 additions & 0 deletions examples/phase_diagram/dvc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ plots:
nodes/chgnet/0/PhaseDiagram/results.csv: data_id
y:
nodes/chgnet/0/PhaseDiagram/results.csv: formation_energy
- mattersim_0_PhaseDiagram_results:
x:
nodes/mattersim/0/PhaseDiagram/results.csv: data_id
y:
nodes/mattersim/0/PhaseDiagram/results.csv: formation_energy
stages:
chgnet_0_PhaseDiagram:
cmd: zntrack run mlipx.nodes.phase_diagram.PhaseDiagram --name chgnet_0_PhaseDiagram
Expand Down Expand Up @@ -55,6 +60,19 @@ stages:
- nodes/mace_mp/0/PhaseDiagram/results.csv
params:
- mace_mp_0_PhaseDiagram
mattersim_0_PhaseDiagram:
cmd: zntrack run mlipx.nodes.phase_diagram.PhaseDiagram --name mattersim_0_PhaseDiagram
deps:
- nodes/initialize/MPRester/frames.xyz
metrics:
- nodes/mattersim/0/PhaseDiagram/node-meta.json:
cache: false
outs:
- nodes/mattersim/0/PhaseDiagram/frames.xyz
- nodes/mattersim/0/PhaseDiagram/phase_diagram.json
- nodes/mattersim/0/PhaseDiagram/results.csv
params:
- mattersim_0_PhaseDiagram
orb_v2_0_PhaseDiagram:
cmd: zntrack run mlipx.nodes.phase_diagram.PhaseDiagram --name orb_v2_0_PhaseDiagram
deps:
Expand Down
7 changes: 7 additions & 0 deletions examples/phase_diagram/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,3 @@
/frames.xyz
/phase_diagram.json
/results.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"uuid": "88d4903a-1385-48fa-aa3e-774fe37a9916", "run_count": 1}
11 changes: 11 additions & 0 deletions examples/phase_diagram/params.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,17 @@ mace_mp_0_PhaseDiagram:
kwargs:
model: medium
module: mace.calculators
mattersim_0_PhaseDiagram:
chemsys: null
data_ids: null
fmax: 0.05
geo_opt: false
model:
_cls: mlipx.nodes.generic_ase.GenericASECalculator
class_name: MatterSimCalculator
device: auto
kwargs: null
module: mattersim.forcefield
orb_v2_0_PhaseDiagram:
chemsys: null
data_ids: null
Expand Down
34 changes: 34 additions & 0 deletions examples/phase_diagram/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_PhaseDiagram": {
"nwd": {
"_type": "pathlib.Path",
"value": "nodes/mattersim/0/PhaseDiagram"
},
"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 c55abed

Please sign in to comment.