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
.
matgl_relax.py
is a script to relax the generated structures using the matgl
package. You can install the matgl
following the instructions in the matgl repository.
python matgl_relax.py --restore_path RESTORE_PATH --filename FILENAME --relaxation --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_path
: the path to thematgl
model checkpoint
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
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
structure_visualization.ipynb
is a notebook to visualize the generated structures.