ALIGNN-FF is trained with the same train_alignn.py script but using the
atomwise_alignn model. Instead of id_prop.csv, the script reads id_prop.json with
entries for jid, energy, forces, and stress.
!!! warning "Energy is per atom"
Energy values in id_prop.json must be stored per atom, not per structure.
train_alignn.py \
--root_dir "alignn/examples/sample_data_ff" \
--config "alignn/examples/sample_data_ff/config_example_atomwise.json" \
--output_dir="temp"Pass --restart_model_path with a checkpoint that uses the same model configuration:
train_alignn.py \
--root_dir "alignn/examples/sample_data_ff" \
--restart_model_path "temp/best_model.pt" \
--config "alignn/examples/sample_data_ff/config_example_atomwise.json" \
--output_dir="temp1"A reference notebook compiles a directory of vasprun.xml files into an
id_prop.json:
From v2024.10.30, you can jointly train energy + forces + stress along with
atomwise non-gradient properties (charges, magnetic moments) and optional fingerprint
features. See Multi-output regression and the end-to-end configs under
alignn/examples/.
The Silicon example is the best starting point before training a new force-field on your own data: