implicit_solvent_ddm.restraints.FlatBottom

class implicit_solvent_ddm.restraints.FlatBottom(config, memory=None, cores=None, disk=None, preemptable=None, unitName='', checkpoint=False, displayName='', descriptionClass=None)[source]

A receptor-ligand restraint using a flat potential well with harmonic walls.

A receptor-ligand restraint that uses flat potential inside the host/protein volume with harmonic restrainting walls. It will prevent the ligand drifting too far from the receptor during implicit solvent calculations. The ligand will be allow for free movement in the “bound” region and sample still different binding modes. The restriant will be applied between the groups of atoms that belong to the receptor and ligand respectively.

Parameters:

config (Config) – The config is an configuration file containing user input values

Variables:
  • well_radius (simtk.unit.Quantity, optional) – The distance r0 (see energy expression above) at which the harmonic restraint is imposed in units of distance (default is None).

  • restrained_receptor_atoms (iterable of int, int, or str, optional) – The indices of the receptor atoms to restrain, an This can temporarily be left undefined, but _missing_parameters() will be called which will define receptor atoms by the provided AMBER masks.

  • restrained_ligand_atoms (iterable of int, int, or str, optional) – The indices of the ligand atoms to restrain. This can temporarily be left undefined, but _missing_parameters() will be called which will define ligand atoms by the provided AMBER masks.

  • flat_bottom_width (float, optional) – The distance r0 at which the harmonic restraint is imposed. The well with a square bottom between r2 and r3, with parabolic sides out to a defined distance. This has an default value of 5 Å if not provided.

  • harmonic_restraint (float, optional) – The upper bound parabolic sides out to define distance (r1 and r4 for lower and upper bounds, respectively), and linear sides beyond that distance. This has an default value of 10 Å, if not provided.

  • spring_constant (float) – The spring constant K in units compatible with kJ/mol*nm^2 f (default is 1 kJ/mol*nm^2).

  • flat_bottom_restraints (dict, optional) – User provided {r1, r2, r3, r4, rk2, rk3} restraint parameters. This can be temporily left undefined, but _missing_parameters() will be called which which would define all the restraint parameters. See example down below.

  • receptor_mask (str) – An AMBER mask which denotes all receptor atoms.

  • ligand_mask (str) – An AMBER mask which denotes all ligand atoms.

  • complex_topology (toil.fileStores.FileID) – The complex paramter (.parm7) filepath.

  • complex_coordinate (toil.fileStores.FileID) – The complex coordinate (.ncrst, rst7, ect) filepath.

__init__(config, memory=None, cores=None, disk=None, preemptable=None, unitName='', checkpoint=False, displayName='', descriptionClass=None)[source]

Job initializer.

This method must be called by any overriding constructor.

Parameters:
  • memory (int or string convertible by toil.lib.conversions.human2bytes to an int) – the maximum number of bytes of memory the job will require to run.

  • cores (float, int, or string convertible by toil.lib.conversions.human2bytes to an int) – the number of CPU cores required.

  • disk (int or string convertible by toil.lib.conversions.human2bytes to an int) – the amount of local disk space required by the job, expressed in bytes.

  • accelerators (int, string, dict, or list of those. Strings and dicts must be parseable by parse_accelerator.) – the computational accelerators required by the job. If a string, can be a string of a number, or a string specifying a model, brand, or API (with optional colon-delimited count).

  • preemptible (bool, int in {0, 1}, or string in {'false', 'true'} in any case) – if the job can be run on a preemptible node.

  • preemptable (Union[bool, int, str, None]) – legacy preemptible parameter, for backwards compatibility with workflows not using the preemptible keyword

  • unitName (str) – Human-readable name for this instance of the job.

  • checkpoint (bool) – if any of this job’s successor jobs completely fails, exhausting all their retries, remove any successor jobs and rerun this job to restart the subtree. Job must be a leaf vertex in the job graph when initially defined, see toil.job.Job.checkNewCheckpointsAreCutVertices().

  • displayName (str) – Human-readable job type display name.

  • descriptionClass (class) – Override for the JobDescription class used to describe the job.

  • local – if the job can be run on the leader.

  • files – Set of Files that the job will want to use.

Methods

__init__(config[, memory, cores, disk, ...])

Job initializer.

addChild(childJob)

Add a childJob to be run as child of this job.

addChildFn(fn, *args, **kwargs)

Add a function as a child job.

addChildJobFn(fn, *args, **kwargs)

Add a job function as a child job.

addFollowOn(followOnJob)

Add a follow-on job.

addFollowOnFn(fn, *args, **kwargs)

Add a function as a follow-on job.

addFollowOnJobFn(fn, *args, **kwargs)

Add a follow-on job function.

addService(service[, parentService])

Add a service.

assignConfig(config)

Assign the given config object.

checkJobGraphAcylic()

checkJobGraphConnected()

checkJobGraphForDeadlocks()

Ensures that a graph of Jobs (that hasn't yet been saved to the JobStore) doesn't contain any pathological relationships between jobs that would result in deadlocks if we tried to run the jobs.

checkNewCheckpointsAreLeafVertices()

A checkpoint job is a job that is restarted if either it fails, or if any of its successors completely fails, exhausting their retries.

defer(function, *args, **kwargs)

Register a deferred function, i.e. a callable that will be invoked after the current attempt at running this job concludes.

encapsulate([name])

Encapsulates the job, see toil.job.EncapsulatedJob.

getRootJobs()

Return the set of root job objects that contain this job.

getTopologicalOrderingOfJobs()

getUserScript()

hasChild(childJob)

Check if childJob is already a child of this job.

hasFollowOn(followOnJob)

Check if given job is already a follow-on of this job.

hasPredecessor(job)

Check if a given job is already a predecessor of this job.

hasService(service)

Return True if the given Service is a service of this job, and False otherwise.

loadJob(job_store, job_description)

Retrieves a toil.job.Job instance from a JobStore

log(text[, level])

Log using fileStore.log_to_leader().

prepareForPromiseRegistration(jobStore)

Set up to allow this job's promises to register themselves.

registerPromise(path)

run(fileStore)

Override this function to perform work and dynamically create successor jobs.

rv(*path)

Create a promise (toil.job.Promise).

saveAsRootJob(jobStore)

Save this job to the given jobStore as the root job of the workflow.

saveBody(jobStore)

Save the execution data for just this job to the JobStore, and fill in the JobDescription with the information needed to retrieve it.

wrapFn(fn, *args, **kwargs)

Makes a Job out of a function.

wrapJobFn(fn, *args, **kwargs)

Makes a Job out of a job function.

Attributes

checkpoint

Determine if the job is a checkpoint job or not.

cores

The number of CPU cores required.

description

Expose the JobDescription that describes this job.

disk

The maximum number of bytes of disk the job will require to run.

jobStoreID

Get the ID of this Job.

memory

The maximum number of bytes of memory the job will require to run.

preemptable()

tempDir

Shortcut to calling job.fileStore.getLocalTempDir().