예제 #1
0
 def bonds(self):
     types, bonds = [], []
     for i, a in enumerate(self.atoms):
         for j in a.conn:
             if i > j: continue
             ij = [i, j]
             t, ij = sort_bond_or_angle([self.atoms[p].ff for p in ij], ij)
             if not t in types: types.append(t)
             bonds.append(AtomSet(ij, types.index(t)))
     return bonds, types
예제 #2
0
 def bonds(self):
     types,bonds = [],[]
     for i, a in enumerate(self.atoms):
         for j in a.conn:
             if i > j: continue
             ij = [i,j]
             t, ij = sort_bond_or_angle([self.atoms[p].ff for p in ij], ij)
             if not t in types: types.append(t)
             bonds.append(AtomSet(ij, types.index(t)))
     return bonds, types
예제 #3
0
 def angles(self):
     types,angles = [],[]
     # Center is atom j.
     for j, a in enumerate(self.atoms):
         for i in a.conn:
             for k in a.conn:
                 if k <= i: continue
                 ijk = [i,j,k]
                 t,ijk = sort_bond_or_angle([self.atoms[p].ff for p in ijk], ijk)
                 if not t in types: 
                     types.append(t)
                 angles.append(AtomSet(ijk, types.index(t)))
     return angles, types
예제 #4
0
 def angles(self):
     types, angles = [], []
     # Center is atom j.
     for j, a in enumerate(self.atoms):
         for i in a.conn:
             for k in a.conn:
                 if k <= i: continue
                 ijk = [i, j, k]
                 t, ijk = sort_bond_or_angle(
                     [self.atoms[p].ff for p in ijk], ijk)
                 if not t in types:
                     types.append(t)
                 angles.append(AtomSet(ijk, types.index(t)))
     return angles, types