예제 #1
0
파일: linkatoms.py 프로젝트: t-/adaptive
 def __init__(self,pdb='mol.pdb',top='topol.top'):
     os.system('mkdir res') #qm jobs will go in here ;-)
     #--lamda stuff
     self.R1=1.0
     self.R2=6.0
     #--end
     self.pdb        = gmx_pdb(pdb)
     self.top        = gmx_topology()
     self.top.read_top(top)
     self.assign_bonds() #each atom gets a list of other atoms it is bound to
     #print self.pdb.atoms[1002].bonds
     self.qm_connect = self.assign_qmgroups()  # list of [ [groupmembers],[partners] ] with [partners]=[[groupmember],[outsideatom]] so [ [1,2,3], [[2,5],[3,7]]
     #print self.pdb.atoms[1002].qm_group
     #print self.qm_connect[self.pdb.atoms[1002].qm_group]
     self.center          = [self.pdb.atoms[1008-1].x,self.pdb.atoms[1008-1].y,self.pdb.atoms[1008-1].z]
     self.azone,self.zone_id_list,self.azone_center_id = self.find_azone(self.center,radius=self.R2,center_atom_number=1008)
     self.zones = self.create_adaptive_zones()
     self.mm=[]
     self.mm_ids=[]
     self.qm=[]
     self.qm_ids=[]
     self.input_overhead=[]
     self.read_gin()
     self.create_zones_top()
     self.fort7=self.read_fort7()
예제 #2
0
 def __init__(self,pdb='mol.pdb',top='topol.top'):
     self.pdb        = gmx_pdb(pdb)
     self.top        = gmx_topology()
     self.top.read_top('topol.top')
     self.zoneatoms  = []
     self.read_zoneatoms('qm_atomlist.dat')
     self.assign_bonds()
     self.qm_connect = self.assign_qmgroups()  # list of [ [groupmembers],[partners] ] with [partners]=[[groupmember],[outsideatom]] so [ [1,2,3], [[2,5],[3,7]]
     self.azone,self.zone_id_list,self.azone_center_id=self.find_azone()
     self.create_zones_top_working()