def print_structures(self, static_structure, mobile_structure, pdb_file, single_pdb=False): ''' Print all PDB decoys ''' decoy_list = [] for decoy in self: if singlePDB: decoy_structure = decoy.get_structure(mobile_structure) decoy_list.append((static_structure, decoy_structure)) else: decoy.print_structure(static_structure, decoy_structure, pdb_file+'_'+str(decoy.get_num())+'.pdb') if singlePDB: PDB.write_pdb(decoy_list, pdb_file+'.pdb', multi_chain=True, multi_model=True)
def print_decoys(self, static, mobile, pdbFile, singlePDB=False): ''' Print each decoy in a PDB format @singlePDB = Prints each decoy as a model in a single PDB file ''' staticDecoy = self.get_static_structure(static) decoyList = [] for decoy in self.get_decoys(): mobileDecoy = self.get_mobile_structure(static, mobile, decoy) if singlePDB: DecoyList.append((staticDecoy, mobileDecoy)) else: PDB.write_pdb((staticDecoy, mobileDecoy), pdbFile+'_'+str(decoy.get_id())+'.pdb' , multiChain=True, multiModel=False) if singlePDB: PDB.write_pdb(decoyList, pdbFile+'.pdb', multiChain=True, multiModel=True)
def print_structure(self, static_structure, mobile_structure, pdbFile): decoy_structure = self.get_structure(mobile_structure) PDB.write_pdb((static_structure, decoy_structure), pdbFile + '.pdb', multi_chain=True, multi_model=False)