atomID Quickstart Guide¶
Welcome to the atomID package quickstart guide! This guide will help you get started with using the AnnotateCrystal
class for annotating crystal structures and defects. Follow the steps below to begin.
Installation¶
First, ensure you have the atomID
package installed. You can install it via pip:
pip install atomid
Usage¶
Here's a step-by-step guide on how to use the AnnotateCrystal
class in the atomID package.
1. Import the Required Class¶
Begin by importing the AnnotateCrystal
class from the atomid.annotate
module.
from atomid.annotate import AnnotateCrystal
2. Create an Instance of AnnotateCrystal
¶
Create an instance of the AnnotateCrystal
class.
crystal = AnnotateCrystal()
3. Read the Crystal Structure File¶
Use the read_crystal_structure_file
method to read the crystal structure file. Replace crystal_data_file_path
with the path to your crystal structure file.
crystal.read_crystal_structure_file(crystal_data_file_path, "vasp")
4. Annotate the Crystal Structure¶
Annotate the crystal structure using the annotate_crystal_structure
method.
crystal.annotate_crystal_structure()
5. Annotate Defects¶
Annotate defects by providing a reference file path. Replace ref_file_path
with the path to your reference file.
crystal.annotate_defects(ref_file_path, "vasp")
6. Write to File¶
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")
Example¶
Below is a complete example putting all the steps together:
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")
With these steps, you should be able to start annotating your crystal structures and defects using the atomID package. For more detailed information and advanced usage, please refer to the official documentation.