Пример #1
0
 def angle_to(self, other):
     """
     Register this atom as angle partners. Cannot angle to itself. If that
     is attempted, a BondError is raised
     """
     if self is other:
         raise BondError('Cannot angle atom to itself')
     self._angle_partners.add(other)
     other._angle_partners.add(self)
Пример #2
0
 def dihedral_to(self, other):
     """
     Register this atom as dihedral partners. Cannot dihedral to itself. If
     that is attempted, a BondError is raised
     """
     if self is other:
         raise BondError('Cannot dihedral atom to itself')
     self._dihedral_partners.add(other)
     other._dihedral_partners.add(self)
Пример #3
0
 def bond_to(self, other):
     """
     Register this atom as bonded partners. Cannot bond to itself. If that
     is attempted, a BondError is raised
     """
     if self is other:
         raise BondError('Cannot bond atom to itself')
     self._bond_partners.add(other)
     other._bond_partners.add(self)