Welcome to the atomID
package! This README will guide you through the initial steps required to start using the AnnotateCrystal
class for annotating crystal structures and defects. Follow the steps outlined below to get started.
"AtomID" is an open-source Python package designed to annotate crystal structure data, enhancing data standardisation and interoperability in the field of computational materials science.
- Multi-format Data Input: Supports data import from multiple commonly used formats, such as CIF, POSCAR, and LAMMPS, ensuring compatibility across various modelling tools and workflows.
- Crystal Structure Identification: Utilises Common Neighbour Analysis to accurately identify crystal structures within different lattices.
- Defect Detection and Characterisation: Applies Wigner-Seitz analysis to detect and categorise various types of lattice defects.
- Defect Concentration Calculation: Computes the concentration of different point defects.
- Knowledge Graph Creation: Generates a knowledge graph for crystal structures using the Computational Material Sample Ontology (CMSO), which can be exported and stored in Turtle (TTL) format, enabling sharing and complex querying on the data.
To begin, you need to install the atomID
package. This can be done using pip:
pip install atomid
This section provides a step-by-step guide on how to utilise the AnnotateCrystal
class within the atomID
package.
Start by importing the AnnotateCrystal
class from the atomid.annotate
module:
from atomid.annotate import AnnotateCrystal
Next, create an instance of the AnnotateCrystal
class:
crystal = AnnotateCrystal()
Read the crystal structure file by using the read_crystal_structure_file
method. Make sure to replace crystal_data_file_path
with the actual path to your crystal structure file:
crystal.read_crystal_structure_file(crystal_data_file_path, "vasp")
You can now annotate the crystal structure with the annotate_crystal_structure
method:
crystal.annotate_crystal_structure()
To annotate defects, provide a reference file path. Replace ref_file_path
with the actual path to your reference file:
crystal.annotate_defects(ref_file_path, "vasp")
Finally, write the annotated data to a file using the write_to_file
method. Specify the output file name and format:
crystal.write_to_file(output_file_path, "ttl")
Here is a complete example that combines all the steps:
from atomid.annotate import AnnotateCrystal
# Create an instance of AnnotateCrystal
crystal = AnnotateCrystal()
# Read the crystal structure file
crystal.read_crystal_structure_file("path/to/your/interstitial_file.poscar", "vasp")
# Annotate the crystal structure
crystal.annotate_crystal_structure()
# Annotate defects using a reference file
crystal.annotate_defects("path/to/your/reference_file.poscar", "vasp")
# Write the annotated data to a file
crystal.write_to_file("Al_inter.ttl", "ttl")
Detailed documentation for the atomID
package can be found in the docs folder.
Please refer to the CONTRIBUTING GUIDE on contributing to the atomID
package.
For any queries or feedback, kindly create an issue on the GitHub repository.