Garden's Almanac of Matter Models CHGNet
September 2023
| Checkpoint | Params | Polaris | Sophia | Perlmutter | Delta | Frontier | Della |
|---|---|---|---|---|---|---|---|
| chgnet-default | 0.4M | — | — | — | ● | ● | ● |
| chgnet:custom | — | — | — | — | — | — |
● verified, last 30 days ○ installed, not recently verified — not installed
No cluster has installed any checkpoint of this model yet.
Running this model
1# from a job or interactive session on a supported cluster:
2from rootstock import RootstockCalculator
3
4with RootstockCalculator(
5 cluster=YOUR_CLUSTER_ID, # eg, "delta", "frontier"
6 checkpoint="chgnet-default",
7 device="cuda",
8) as calc:
9 # model is now running in subprocess on compute node
10 atoms.calc = calc
11 atoms.get_potential_energy()
Environments
Rootstock runs each model family inside an isolated Python environment defined by a single file. This environment file includes the specific dependencies needed, plus a setup() function that loads the model and returns an ASE calculator. These files are usually almost identical for a given model family, but because of cluster-specific quirks (eg, an old CUDA driver) the dependencies and setup code can vary a bit.
chgnet_env.py
1# /// script
2# requires-python = ">=3.11"
3# dependencies = [
4# "chgnet>=0.3.0",
5# "ase>=3.22",
6# "torch>=2.0",
7# ]
8#
9# [tool.uv.sources]
10# torch = { index = "pytorch-cu128" }
11#
12# [[tool.uv.index]]
13# name = "pytorch-cu128"
14# url = "https://download.pytorch.org/whl/cu128"
15# explicit = true
16# ///
17"""CHGNet env — hosts pretrained charge-informed universal potentials."""
18
19CHECKPOINTS = {
20 "chgnet-default": "chgnet-default",
21 # Your own fine-tuned weights: pair with weights= (loaded via setup_from_path).
22 "chgnet:custom": None,
23}
24
25
26def setup(checkpoint: str, device: str = "cuda"):
27 """
28 Load a CHGNet calculator.
29
30 Args:
31 checkpoint: Canonical checkpoint id, must be a key of CHECKPOINTS.
32 device: PyTorch device string (e.g., "cuda", "cuda:0", "cpu")
33
34 Returns:
35 ASE-compatible calculator
36 """
37 from chgnet.model import CHGNet, CHGNetCalculator
38
39 model_name = CHECKPOINTS[checkpoint]
40 model = CHGNet.load() if model_name == "chgnet-default" else CHGNet.load(model_name)
41 return CHGNetCalculator(model=model, use_device=device)
42
43
44def setup_from_path(path: str, device: str = "cuda"):
45 # Custom checkpoints (`:custom` ids with user weights): a weights *file* loads through
46 # CHGNet.from_file, not the named-model CHGNet.load() setup() uses.
47 from chgnet.model import CHGNet, CHGNetCalculator
48
49 model = CHGNet.from_file(path)
50 return CHGNetCalculator(model=model, use_device=device)
51
Built on Delta: 2026-07-30
Couldn't load the current environments from Rootstock.