def __init__(self, b1, b2, ca): self.b1 = b1 # bond 1 self.b2 = b2 # bond 2 self.ca = ca # common atom if Utility.uniqueID(self.b2) < Utility.uniqueID(self.b1): self.b1, self.b2 = self.b2, self.b1 self.a1 = b1.otherAtom(ca) self.a2 = b2.otherAtom(ca) Utility.uniqueID.registerObject(self)
def __init__(self, blueprint, memo=None): if type(blueprint) is type(()): self.a1 = blueprint[0] self.a2 = blueprint[1] else: self.a1 = Database.instantiate(blueprint.a1, memo) self.a2 = Database.instantiate(blueprint.a2, memo) if Utility.uniqueID(self.a2) < Utility.uniqueID(self.a1): self.a1, self.a2 = self.a2, self.a1 Utility.uniqueID.registerObject(self)
def __init__(self, blueprint, memo = None): if type(blueprint) is type(()): self.a1 = blueprint[0] self.a2 = blueprint[1] else: self.a1 = Database.instantiate(blueprint.a1, memo) self.a2 = Database.instantiate(blueprint.a2, memo) if Utility.uniqueID(self.a2) < Utility.uniqueID(self.a1): self.a1, self.a2 = self.a2, self.a1 Utility.uniqueID.registerObject(self)
def __init__(self, ba1, ba2, cb): self.ba1 = ba1 # bond angle 1 self.ba2 = ba2 # bond angle 2 # cb is the common bond, i.e. the central bond for a proper dihedral if Utility.uniqueID(self.ba2) < Utility.uniqueID(self.ba1): self.ba1, self.ba2 = self.ba2, self.ba1 self.improper = (self.ba1.ca is self.ba2.ca) if self.improper: self.b1 = self.ba1.otherBond(cb) self.b2 = cb self.b3 = self.ba2.otherBond(cb) self.a1 = self.ba1.ca # central atom self.a2 = self.b1.otherAtom(self.ba1.ca) self.a3 = cb.otherAtom(self.ba1.ca) self.a4 = self.b3.otherAtom(self.ba2.ca) # each improper dihedral will come in three versions; # identify an arbitrary unique one for constructing the list self.normalized = Utility.uniqueID(cb) < Utility.uniqueID(self.b1)\ and Utility.uniqueID(cb) < \ Utility.uniqueID(self.b3) else: self.b1 = self.ba1.otherBond(cb) self.b2 = cb self.b3 = self.ba2.otherBond(cb) self.a1 = self.b1.otherAtom(self.ba1.ca) self.a2 = self.ba1.ca # these two are self.a3 = self.ba2.ca # on the common bond self.a4 = self.b3.otherAtom(self.ba2.ca) self.normalized = self.a1 is not self.a4