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
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
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
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