Pranavkhade / PACKMAN

PACKMAN: PACKing and Motion ANalysis
Other
33 stars 7 forks source link

Always rotate the N-terminal #48

Closed Pranavkhade closed 1 year ago

Pranavkhade commented 1 year ago

https://github.com/Pranavkhade/PACKMAN/blob/52001f3e59607c263950beaafa329436e741868a/packman/molecule/model.py#L490-L491

Pranavkhade commented 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')