This repository contains the code for generating three kinds of datasets (ULBD, CDDD, GCDD) and for testing the model trained on ULBD, alongside a comparison with CDDD.
Steps to generate CDDD:
-
Get CIF from Materials Project
- Run
CDDD_1_get_Cif.pyto obtain the CIF files from the Materials Project. - Note: You need to obtain your own API key from the Materials Project website.
- Run
-
Generate Diffraction Patterns
- Run
CDDD_2_get_Dataset.pyto generate the diffraction patterns from the CIF files obtained in Step 1.
- Run
Steps to generate GCDD:
-
Generate CIF using Pyxtal
- Run
GCDD_1_generate_Cif.pyto create the CIF files.
- Run
-
Generate Diffraction Patterns
- Run
GCDD_2_get_Dataset.pyto generate the diffraction patterns from the CIF files obtained in Step 1.
- Run
-
Clean the Dataset
- Run
GCDD_3_cleaning_Dataset.pyto remove any NaN and infinite values generated in Step 2.
- Run
Steps to generate ULBD:
- Run
ULBD_get_Dataset_*.pyto generate the ULBD for the specific crystal system you are interested in.
Steps to validate predictions:
- Run
test_cubic/tetragonal/trigonal_hexagonal.pyto obtain the top-1 to top-5 accuracies of the model.
Steps to test generalization ability:
- Run
test_cubic/tetragonal/trigonal_hexagonal_label_by_extinction.pyto evaluate predicting accuracies. - Change the test set and model used in the scripts to observe the variations in accuracy.
Note: Make sure to follow the instructions carefully and adjust any necessary parameters in the scripts as per your requirements.