I would like to some help with getting/calculating distance between 2 sites in z-direction.
Here is what I would like to do using pymatgen
- Load a CONTCAR file using Structure
- I need to calculate distance between 2 sites in z-direction
- Arrange them in ascending order in z-direction so that I can use
pymatgen.analysis.defects.core - Vacancyto create surface vacancy
pymatgen.core.sites - Site to get the site but it didnt not work with the
I also tried
Structure.get_distance(i,j) , for example:
al2o3_b = Structure.from_file('./Al2O3/Bulk_Al2O3_550_5/CONTCAR') al2o3_b.get_distance(al2o3_b,al2o3_b)
It also did not work.
Thank you for your time!