Who it is forA materials scientist who needs a quick estimate before spending DFT time.
The problemA DFT static calculation for every candidate structure is slow and costly.
The outcomePredicted energy per atom, forces, stress and magnetic moments for your structure.
What you need first
- Python and pip
- A crystal structure file such as a CIF
- pymatgen for loading structures
- CPU, NVIDIA GPU, Intel GPU or Apple silicon (device picked automatically)
Steps
- Install with
pip install chgnet - Load the default model with
chgnet = CHGNet.load() - Read your structure with
Structure.from_file('examples/mp-18767-LiMnO2.cif'), using your own CIF path - Call
chgnet.predict_structure(structure)to get the prediction - Print energy (eV/atom), forces (eV/A), stress (GPa) and magmom (mu_B) from the result
Prompt for your agent
Using CederGroupHub/chgnet, install it with `pip install chgnet`, load a CIF with pymatgen and run `chgnet.predict_structure(structure)`. Print energy, forces, stress and magmom with their units.
Caveat. Predictions are model estimates, so check anything important against DFT.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for CederGroupHub/chgnet and "Predict energy, forces and magnetic moments of a crystal"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer