Who it is forA computational chemist preparing inputs for a spin-polarized DFT calculation.
The problemStarting DFT from an unrelaxed structure wastes many ionic steps.
The outcomeA relaxed structure and its total energy, ready to hand to your DFT workflow.
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 - Create the optimizer with
relaxer = StructOptimizer() - Run
result = relaxer.relax(structure)on your pymatgen structure - Use
result["final_structure"]as the relaxed structure - Read the final energy from
result['trajectory'].energies[-1]
Prompt for your agent
With CederGroupHub/chgnet, relax my CIF using `relaxer = StructOptimizer()` and `result = relaxer.relax(structure)`, then print the relaxed structure and total energy in eV.
Caveat. This card is written from the CederGroupHub/chgnet README, not from a test run by Deduped. Before you start, make sure you have Python and pip. Check the repo for newer instructions before you rely on these steps.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for CederGroupHub/chgnet and "Pre-relax structures before a DFT run"
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