Closed Pranavkhade closed 1 year ago
Suggested code:
# Whatever component neighbour 1 is in, rotate that. This keeps $\vec{e_a}$ condition satisfied
if( self.__AllAtoms_inverse[neighbor1] in changed_components[0] ):
to_rotate = list(changed_components[0])
elif( self.__AllAtoms_inverse[neighbor1] in changed_components[1] ):
to_rotate = list(changed_components[1])
else:
logging.warning('Atom :'+str(neighbor1.get_id())+' is not in connected to the components')
https://github.com/Pranavkhade/PACKMAN/blob/52001f3e59607c263950beaafa329436e741868a/packman/molecule/model.py#L490-L491