Пример #1
0
 def __read_rtp_impropers(self, resname, lines ):
     improps = []
     for line in lines:
         entr = line.split()
         if entr[0] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[0]):
                     entr[0] = _aliases[resname][entr[0]]
         if entr[1] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[1]):
                     entr[1] = _aliases[resname][entr[1]]
         if entr[2] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[2]):
                     entr[2] = _aliases[resname][entr[2]]
         if entr[3] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[3]):
                     entr[3] = _aliases[resname][entr[3]]
         if len(entr) == 5:
             improps.append(entr)
         else:
             improps.append(entr+[''])
     return improps
Пример #2
0
 def __read_rtp_impropers(self, resname, lines ):
     improps = []
     for line in lines:
         entr = line.split()
         if entr[0] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[0]):
                     entr[0] = _aliases[resname][entr[0]]
         if entr[1] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[1]):
                     entr[1] = _aliases[resname][entr[1]]
         if entr[2] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[2]):
                     entr[2] = _aliases[resname][entr[2]]
         if entr[3] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[3]):
                     entr[3] = _aliases[resname][entr[3]]
         if len(entr) == 5:
             improps.append(entr)
         else:
             improps.append(entr+[''])
     return improps
Пример #3
0
 def __read_rtp_bonds(self, resname, lines ):
     bonds = []
     for line in lines:
         entr = line.split()
         if entr[0] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[0]):
                     entr[0] = _aliases[resname][entr[0]]
         if entr[1] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[1]):
                     entr[1] = _aliases[resname][entr[1]]
         bonds.append(entr)
     return bonds
Пример #4
0
 def __read_rtp_bonds(self, resname, lines ):
     bonds = []
     for line in lines:
         entr = line.split()
         if entr[0] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[0]):
                     entr[0] = _aliases[resname][entr[0]]
         if entr[1] not in ['+','-']:
             if _aliases.has_key( resname ) :
                 if _aliases[resname].has_key(entr[1]):
                     entr[1] = _aliases[resname][entr[1]]
         bonds.append(entr)
     return bonds
Пример #5
0
 def __read_rtp_atoms(self, resname, lines ):
     atoms = []
     for line in lines:
         entr = line.split()
         if _aliases.has_key( resname ) :
             if _aliases[resname].has_key(entr[0]):
                 entr[0] = _aliases[resname][entr[0]]
         entr[2] = float(entr[2])
         entr[3] = int(entr[3])
         atoms.append(entr)
     return atoms
Пример #6
0
 def __read_rtp_atoms(self, resname, lines ):
     atoms = []
     for line in lines:
         entr = line.split()
         if _aliases.has_key( resname ) :
             if _aliases[resname].has_key(entr[0]):
                 entr[0] = _aliases[resname][entr[0]]
         entr[2] = float(entr[2])
         entr[3] = int(entr[3])
         atoms.append(entr)
     return atoms