awl2struct.py
is a script to transform the generated L, W, A, X
to the cif
format.
python awl2struct.py --output_path YOUR_PATH --label SPACE_GROUP --num_io_process 40
output_path
: the path to read the generatedL, W, A, X
and save thecif
fileslabel
: the label to save thecif
files, which is the space group numbernum_io_process
: the number of processes
compute_metrics.py
is a script to calculate the structure and composition validity of the generated structures.
python ../scripts/compute_metrics.py --root_path YOUR_PATH --filename YOUR_FILE --output_path ./ --num_io_process 40
root_path
: the path to the datasetfilename
: the filename of the generated structuresnum_io_process
: the number of processes
compute_metrics_matbench.py
is a script to calculate the novelty and uniqueness of the generated structures.
python ../scripts/compute_metrics_matbench.py --train_path TRAIN_PATH --test_path TEST_PATH --gen_path GEN_PATH --output_path OUTPUT_PATH --label SPACE_GROUP --num_io_process 40
train_path
: the path to the training datasettest_path
: the path to the test datasetgen_path
: the path to the generated datasetoutput_path
: the path to save the metrics resultslabel
: the label to save the metrics results, which is the space group numberg
num_io_process
: the number of processes
Note that the training, test, and generated datasets should contain the structures within the same space group g
which is specified in the command --label
.
mlff_relax.py
is a script to relax the generated structures using pretrained machine learning force field. Now we support the orb
, MACE
, matgl
and deepmd-kit
models. Please install corresponding packages before running the script.
python mlff_relax.py --restore_path RESTORE_PATH --filename FILENAME --relaxation --model orb --model_path MODEL_PATH
restore_path
: the path to the generated structuresfilename
: the filename of the generated structuresrelaxation
: whether to relax the structures, if not specified, the script will only predict the energy of the structures without relaxationmodel
: the model to use for relaxation, which can beorb
,mace
,matgl
ordp
model_path
: the path to the machine learning force field checkpointprimitive
: whether to convert the structures to primitive cells, if not specified, the script will only relax the structures without converting to primitive cells. This can be used to reduce the number of atoms in the structures and speed up the relaxation processfixsymmetry
: whether to fix the space group symmetry of the structures in the relaxation process
e_above_hull.py
is a script to calculate the energy above the hull of the generated structures based on the Materials Project database. To calculate the energy above the hull, the API key of the Materials Project is required, which can be obtained from the Materials Project website. Furthermore, the mp_api
package should be installed.
python e_above_hull.py --restore_path RESTORE_PATH --filename FILENAME --api_key API_KEY --label LABEL --relaxation
restore_path
: the path to the structuresfilename
: the filename of the structuresapi_key
: the API key of the Materials Projectlabel
: the label to save the energy above the hull filerelaxation
: whether to calculate the energy above the hull based on the relaxed structures
e_above_hull_alex.py
is a script to calculate the energy above the hull of the generated structures based on the Alexandria database. To calculate the energy above the hull, the Alexandria convex hull data is required, which can be obtained from the Alexandria website.
python e_above_hull_alex.py --convex_path CONVEX_PATH --restore_path RESTORE_PATH --filename FILENAME --api_key API_KEY --label LABEL --relaxation
convex_path
: the path to the Alexandria convex hull datarestore_path
: the path to the structuresfilename
: the filename of the structuresapi_key
: the API key of the Materials Projectlabel
: the label to save the energy above the hull filerelaxation
: whether to calculate the energy above the hull based on the relaxed structures
plot_embeddings.py
is a script to visualize the correlation of the learned embedding vectors of different elements.
python plot_embeddings.py --restore_path RESTORE_PATH
restore_path
: the path to the model checkpoint
check_sun_materials.py
is a script to check the stable, unique and novel structures based on the given reference dataset.
python check_sun_materials.py --restore_path RESTORE_PATH --filename FILENAME --ref_path REF_PATH
restore_path
: the path to the generated structuresfilename
: the filename of the generated structuresref_path
: the path to the reference dataset
structure_visualization.ipynb
is a notebook to visualize the generated structures.