usage() sys.exit() if not ligand_filename: print('gpf4_to_gpf3: ligand_filename must be specified.') usage() sys.exit() if not receptor_filename: receptor_filename = gpf4_stem + '.pdbqs' print("gpf4_to_gpf3: using default receptor_filename:", receptor_filename) if not gpf4_filename: print('gpf4_to_gpf3: no gpf4_filename specified using GridParameter defaults') #what about nucleic acids??? GPO3 = GridParameters() GPO3.read4(gpf4_filename) GPO3.read(gpf4_filename) if verbose: print('read ', gpf4_filename) #have to set the ligand_types GPO3.set_ligand(ligand_filename) #build an autogrid3 'types' string from autogrid4 ligand_types GPO3.set_ligand_types3(GPO3['ligand_types']['value']) if verbose: print('set ligand to ', ligand_filename) GPO3.set_receptor(receptor_filename) if verbose: print('set receptor to ', receptor_filename) if outputfilename is None: outputfilename = gpf4_stem + '_3.gpf' GPO3.write(outputfilename, grid_parameter_list) if verbose: print("wrote ", outputfilename, ' using:')
if o in ('-h', '--'): usage() sys.exit() if not ligand_filename: print 'gpf3_to_gpf4: ligand_filename must be specified.' usage() sys.exit() if not receptor_filename: receptor_filename = gpf3_stem + '.pdbqt' print "gpf3_to_gpf4: using default receptor_filename:", receptor_filename if not gpf3_filename: print 'gpf3_to_gpf4: no gpf3_filename specified using GridParameter defaults' #what about nucleic acids??? GPO4 = GridParameters() if gpf3_filename: GPO4.read(gpf3_filename) if verbose: print 'read ', gpf3_filename else: if verbose: print 'using gpo defaults' GPO4.set_ligand4(ligand_filename) if verbose: print 'set ligand to ', ligand_filename GPO4.set_receptor4(receptor_filename) if verbose: print 'set receptor to ', receptor_filename if outputfilename is None: outputfilename = gpf3_stem + '_4.gpf' GPO4.write4(outputfilename, grid_parameter_list4) if verbose: print "wrote ", outputfilename, ' using:' for p in grid_parameter_list4:
# # get filenames from the dpf and gpf # from AutoDockTools.DockingParameters import DockingParameters from AutoDockTools.GridParameters import GridParameters dpo = DockingParameters() log.info("reading dpf: %s" % dpf_pathname) dpo.read(dpf_pathname) ligand_filename = dpo["move"]["value"] ligand_pathname = os.path.join(docking_pathname, ligand_filename) log.info("ligand_filename: %s" % ligand_filename) log.debug("ligand_pathname: %s" % ligand_pathname) gpo = GridParameters() log.info("reading gpf: %s" % gpf_pathname) gpo.read(gpf_pathname) receptor_filename = gpo["receptor"]["value"] receptor_pathname = os.path.join(docking_pathname, receptor_filename) log.info("receptor_filename: %s" % receptor_filename) log.debug("receptor_pathname: %s" % receptor_pathname) # docking log pathnames dlg_pathname_list = glob.glob(os.path.join(docking_pathname, '*.dlg')) # At this point, we have pathnames and filenames for all the # input and output files, start reading them ###################################################################### # the ligand from the dpf
def setup(self,gpffile): self.gpffile = gpffile self.gpo = GridParameters() self.gpo.read(gpffile) if len(self.extratypes_dict): print("update each type in extratypes here")