So, using pymatgen, I have a structure object. What I want to do is get all of the bond angles within the structure. I could loop over every atom to get all bond angles, but this would include every atom, regardless of how far apart they are, which of course is a problem.
Now, I can find the neighbors of each central atom using the "get_neighbors" function, however, I'm not sure where to go from here, especially because the "get_angle" function takes integer values and not atomic site objects.
Below is the code I have thus far:
import pymatgen as mg
import numpy as np
s = mg.Structure.from_file('POSCAR')
atoms = s.atomic_numbers
van = [x for x in atoms if x == 23]
length = len(van)
nb = ['NONE']*length
x = 0
while x < length:
nb[x] = s.get_neighbors(s[x],2.4)
x += 1
So I have an array of the neighbors and I know which atom they correspond too, now I just need to get the angles for all neighboring atoms.
Any help would be greatly appreciated.