Package schrodinger :: Package application :: Package glide :: Package packages :: Module driver
[hide private]
[frames] | no frames]

Module driver


This module contains classes and functions needed by the Glide driver.

Simplest usage example:

    Glide().run()

Classes [hide private]
  GlideError
Exception class for fatal errors raised by the Glide driver.
  GlideExit
Exception class for triggering an early job exit.
  Glide
High-level class for running the whole "glide_driver" process, including log file boilerplate, argument parsing, setting up the necessary driver object, and running it.
  CombinedDriver
A driver for running combined jobs, consisting of a gridgen job and a distributed docking job.
  DockingDriver
Driver for distributing a docking job.
  GlideJob
Base class for DockingJob and GridgenJob.
  DockingJobFilenameMixin
A mixin offering read-only properties for "derived files" that may be useful both for DockingJob and DockingSubjob objects.
  DockingJob
This represents the main docking job.
  GridgenJob
Objects of this class represent a gridgen job and additionally have the machinery for running the job.
  DockingSubjob
Objects of this class represent docking subjobs for which the ligand input file is provided by the caller.
  SplitDockingSubjob
Objects of this class represent docking subjobs using a split ligand input file.
  SubjobState
This class provides read access to the contents of the state file for a subjob, <jobname>_state.json.
  DriverState
This is a convenience wrapper to access values from the 'state' table of GlideDB as properties of the DriverState object.
  GlideDB
This class encapsulates access to a database used for holding state while a distributed docking job is running.
  SubjobGenerator
A SubjobGenerator is an iterable that yields DockingSubjob objects given a DockingJob object and a GlideDB.
  JobRunner
This class provides an abstract interface for running a number of DockingSubjob's.
  JobDJRunner
JobRunner subclass for running subjobs using JobDJ.
  JobarrayRunner
JobRunner subclass for running subjobs using SGE job arrays.
  LigWriter
Objects of this class can be used as context managers and as file-like objects (with a .write() method) to write ligands while abstracting away job-dependent aspects such as compression and file headers.
  PoseWriter
This is a subclass of LigWriter that also knows how to write the receptor structure at the beginning of a pv file.
  PlainTextWriter
This class can be used to write plain old files emulating the interface of the StructureReader class (writing is done by calling the .append() method).
Functions [hide private]
 
get_driver(input_filename, options)
Return a driver object of the appropriate class given an input file and command-line options.
 
add_glide_options(parser)
 
parse_args(args=None)
 
format_cpu_time(time, msg)
Return a human-readable CPU time message prefaced by 'msg'.
 
humantime(sec)
Given a time in seconds return a string describing the time in days, hours, minutes, and seconds as necessary to make it "human-readable".
 
show_progress(st_num, last=False, dot_freq=1000, dots_per_line=50)
Write progress dot every dot_freq structures and a count at the end of each line.
 
auto_nstructs(nligs, ncpus, t_lig=30.0, t_launch=10.0, max_jobs_per_cpu=2)
Calculate a "reasonable" value of nstructs based on the number of ligands and CPUs.
 
multi_count_structures(filenames)
Count the structures in multiple files of any format supported by structure.py plus Phase subset.
 
write_empty_file(filename)
 
add_output_file(filename)
 
remove_output_file(filename, leave_empty_file)
Remove a file that we would also like to be removed from the launch directory.
 
get_job_dj(options)
 
resolve_paths(keywords)
Return a copy of a keywords dictionary in which all the values of file-related keywords have been resolved to their runtime paths.
 
get_structure_reader(filename, reader_format)
 
compress_structure(st, as_sd=False)
 
add_to_zip_if_exists(zipfh, fname)
 
unzip_to_dir(gridfile, dirname)
 
write_readme(dirname)
Write a README file to a directory explaining the temporary nature of said directory.
 
find_grd_file(dirname)
Find the *.grd file in a directory.
 
check_cutoff(pose, propname, cutoff)
Variables [hide private]
  logger = log.get_output_logger("glide_driver")
  RECEP_PROP = 'b_glide_receptor'
  __package__ = 'schrodinger.application.glide.packages'
Function Details [hide private]

show_progress(st_num, last=False, dot_freq=1000, dots_per_line=50)

 

Write progress dot every dot_freq structures and a count at the end of each line. Call with last==True to print the final count.

auto_nstructs(nligs, ncpus, t_lig=30.0, t_launch=10.0, max_jobs_per_cpu=2)

 

Calculate a "reasonable" value of nstructs based on the number of ligands and CPUs. The subjob size is designed to maximize throughput by balancing job run time vs job launch time, while capping the number of jobs per CPU.

remove_output_file(filename, leave_empty_file)

 

Remove a file that we would also like to be removed from the launch directory. If we know that the file already exists in the launch directory, the closest we can do until JOBCON-4534 is implemented is leave an empty file.

find_grd_file(dirname)

 

Find the *.grd file in a directory. There must be one and only one!