schrodinger.application.glide.glide module

Classes for creating Grid Generation and Ligand Docking DICE (Impact) input files from user-friendly keyword/value pairs.

The classes use the mm.mmim* wrappers to convert the keywords and values into the actual DICE input files.

Job parameters are specified by passing a dictionary of keyword/value pairs to the class initialization method. In addition, some parameters, such as constraints, can be specified by calling class methods.

Calling the writeSimplified() method will create the input file that can be passed to $SCHRODINGER/glide. The value of the JOBNAME keyword will be used as the base name for the input file.

For a full list of keywords accepted by the Gridgen and Dock classes, respectively, see the output of

$SCHRODINGER/glide -gridgen-keywords $SCHRODINGER/glide -docking-keywords

Copyright Schrodinger, LLC. All rights reserved.

class schrodinger.application.glide.glide.AcceptorConstraint(label, atoms=None)

Bases: schrodinger.application.glide.glide.Constraint

H-Bond constraint that was specified as a receptor acceptor atom. A ligand must have a DONOR group that is making an interaction with this atom to satisfy this constraint.

atom()
atoms()
class schrodinger.application.glide.glide.Constraint(label, constype)

Class defining a docking constraint in the receptor.

type()

Return the type of the (receptor) constraint as a user-friendly string. Possible return values:

  • ‘Hydrophobic’
  • ‘H-bond donor’
  • ‘H-bond acceptor’
  • ‘Metal’
  • ‘Positional’
  • ‘NOE’
  • ‘Metal coordination’
class schrodinger.application.glide.glide.ConstraintGroup(parent, constraints=None, nrequired=-1)

Class defining a constraint group.

addConstraint(label)
cleanup()

Free the memory associated with this group

setup(cons_labels, feature_sets)
class schrodinger.application.glide.glide.Dock(keywords, jobtypes=None)

Bases: schrodinger.application.glide.glide.GlideJob

Class for generating Glide docking input files.

addConstraintGroup(cons_labels, nrequired)

Add a new constraint group to this Docking instance.

Parameters:
  • cons_labels – A list of labels for constraints to use.
  • nrequired – Minimum number of constraints required for match (Can be ALL).
applyContextDependentDefaults()
checkConflicts()
cleanup()

Free up the group handles

readConsKeywords()

Reads the constraint keywords, parses their values, and returns them as a tuple of (cons groups, feature sets).

setLigRange(start, end)

Shortcut for setting the range of ligands to be read from the LIGANDFILE.

Parameters:end – If zero, means to go to the end of the file.
setNRequired(nrequired)

Set the minimum number of constraints required for the first group. A value of ALL means all constraints are required.

setupJson(jsdict)
useConstraint(label)

Adds specified constraint to the first group.

Default group is #1; constraint type determined automatically.

class schrodinger.application.glide.glide.DonorConstraint(label, atoms=None)

Bases: schrodinger.application.glide.glide.Constraint

H-Bond constraint that was specified as a receptor donor atom. A ligand must have an ACCEPTOR group that is making an interaction with this atom to satisfy this constraint.

atom()
atoms()
class schrodinger.application.glide.glide.Feature(patterns=None)

Bases: future.types.newobject.newobject

A list of FeaturePattern objects. Each pattern has these properties:

smarts, atoms, exclude.
class schrodinger.application.glide.glide.FeaturePattern(smarts, atoms, exclude=False, nfill=None)

Bases: future.types.newobject.newobject

Class defining a constraint feature pattern.

class schrodinger.application.glide.glide.GlideJob(jobtype=None, specs=None, keywords=None, createhandle=False)

Bases: schrodinger.application.inputconfig.InputConfig

Class for writing Glide input files - either Gridgen or Docking. The keywords passed are used to set MMIM directly with no processing.

applyContextDependentDefaults()

Apply context-dependent defaults for a Glide job. It modifies the job object, but marks the modified keywords as “default” so they won’t be written by writeSimplified().

checkConflicts()

Check for invalid keyword combinations. Raises a ValueError if any are found.

checkForceFieldLicense(jsdict)

If we are using the default forcefield (OPLS3) and don’t have an OPLS license, fall back to using OPLS_2005.

cleanup()

Clean up constraints objects.

get(key, default=None)
getAllowedRange(key)

Will return a tuple of (min, max) for the allowed range of value. Either or both of these values may be None.

Returns:The allowed min/max range.
Return type:Tuple of 2 ints/floats.
setupJson(jsdict)

Additional setup to do before writing a JSON file. Base implementation does nothing. This method is expected not to modify ‘self’, but only jsdict, which is the dictionary of keywords that ultimately will be written to the JSON file.

validateValues(*args, **kwargs)

Validate the keywords against the spec. Unlike the parent implementation, raise a ValueError if any unknown keywords are present.

writeJSON()

Write the keywords as a JSON representation. Unlike writeSimplified, this includes the values for all the keywords, not only the non-default ones.

writeSimplified(filename=None, yesno=False)

Writes a simplified input file to “<jobname>.inp”. This input file needs to be run via $SCHRODINGER/glide.

class schrodinger.application.glide.glide.Gridgen(keywords)

Bases: schrodinger.application.glide.glide.GlideJob

Class for writing Glide Grid Generation input files. Currently, the receptor input file for a Gridgen job (NOT created by this class) must be named “<jobname>.mae”.

cleanup()

Free the memory associated with constraings

setupJson(jsdict)
class schrodinger.application.glide.glide.HydrophobicConstraint(label)

Bases: schrodinger.application.glide.glide.Constraint

class schrodinger.application.glide.glide.MetCoordConstraint(label, xmetc, ymetc, zmetc, rmetc)

Bases: schrodinger.application.glide.glide.Constraint

class schrodinger.application.glide.glide.MetalConstraint(label, atoms=None)

Bases: schrodinger.application.glide.glide.Constraint

This constraint was specified as a metal receptor atom. A ligand must interact with this metal atom to satisfy this constraint.

atom()
atoms()
class schrodinger.application.glide.glide.NOEConstraint(label, x=None, y=None, z=None, rmin=None, rmax=None)

Bases: schrodinger.application.glide.glide.Constraint

class schrodinger.application.glide.glide.PositionalConstraint(label, x=None, y=None, z=None, radius=None)

Bases: schrodinger.application.glide.glide.Constraint

schrodinger.application.glide.glide.calc_ligand_size(coords)

Given a list of (x, y, z) coordinates for all atoms in a ligand, calculate the ligand size. This value should be added to the innerbox to get the default outerbox.

Parameters:coords (List of 3-item tuples.) – List of coordinates for all ligand atoms.
Return type:float
Returns:The size of the ligand.
schrodinger.application.glide.glide.get_default_box_size(struct, ligand_asl='all')

Gets the default box size for a grid. This returns the outer and inner box lengths.

Parameters:
  • struct (structure.StructureReader) – The structure containing the reference ligand
  • ligand_asl (str) – The ASL for the ligand. Default: “all”
Return type:

tuple of lists, e.g. ([10, 10, 10], [-5.9863, -1.887 , -0.2703])

schrodinger.application.glide.glide.get_glide_job(input_file)

Return a Gridgen or Dock object given an SIF input filename or keyword dictionary. If it is a filename, use it to set JOBNAME (e.g. for “dir/myjob.in”, set it to “myjob”).

schrodinger.application.glide.glide.get_keyword(keyword)

Return the specification of a Glide keyword as a dictionary, with keys such as “keyword”, “type”, “default”, “allowed”, “min”, “max”, and “comment”. For the full list and description for each field, see the comments in mmim_keywords.yaml.

schrodinger.application.glide.glide.get_keywords_dicts(jobtypes, include_undocumented=False)

Return the raw mmim_keywords.yaml data filtered to include only the keywords for the requested job types.

schrodinger.application.glide.glide.get_keywords_set(jobtypes)

Return the set of all keywords valid for the given job types.

schrodinger.application.glide.glide.is_docking_keyword(keyword)

Return True is a keyword is valid for docking jobs.

schrodinger.application.glide.glide.is_equivalent_to_mininplace(val)

Checks if val is equivalent to mininplace

schrodinger.application.glide.glide.is_false(val)
schrodinger.application.glide.glide.is_gridgen_job(keywords)

Return True if the keywords suggest that this is a gridgen job.

Return type:bool
schrodinger.application.glide.glide.is_gridgen_keyword(keyword)

Return True is a keyword is valid for gridgen jobs.

schrodinger.application.glide.glide.keyword_spec(jobtypes, include_undocumented=False)

Return a string with the specification of the mmim keywords that are valid for the jobtypes given. Jobtypes should be an iterable with items such as ‘docking’, ‘multi_docking’, or ‘gridgen’. Keywords for jobtype ‘all’ are always included.

By default, undocumented keywords are not included in the return value, but that behavior can be overridden by setting ‘include_undocumented’ to True.

schrodinger.application.glide.glide.read_constraints(gridfile)

Reads the receptor constraints from the specified grid file.

The constraints are actually read from the *.cons file. The resulting constraint “type” refers to the atom type in the RECEPTOR, where applicable. Specifically, H-bond and metal-binding constraints.

The matching ligand atom for an H-bond donor receptor constraint should be an H-bond acceptor (by default). Likewire the matching ligand ato for and H-bond acceptor receptor constraint should be a donor (polar H atom).

Other constraint types don’t refer to any specific atom type (Positional, NOE), or require the same atom type in the ligand as in the receptor (Hydrophobic) so the constraint type is valid for both molecules (ligand and receptor).

To get the constraint label, simply do str(Constraint).

Parameters:gridfile – The gridfile name; should be either a *.grd or *.zip file.
Return type:A list of Constraint objects.
schrodinger.application.glide.glide.read_keywords_file()

Read the mmim_keywords.json file from the mmshare data directory and return a list of objects.

schrodinger.application.glide.glide.read_keywords_file_as_dict()

Read the mmim_keywords.json file from the mmshare data directory and return a dict of dicts, where the key is the keyword name and the value is the spec for the keyword (see get_keyword for more details).

schrodinger.application.glide.glide.read_yaml()

Read mmim_keywords.json and return a list of objects. The read_yaml() name was retained for compatibility.

schrodinger.application.glide.glide.validation_specs(jobtype)

Return a list of validation specs for a given jobtype (e.g., ‘docking’ or ‘gridgen’) or list of jobtypes. This includes not only the keywords returned by keyword_spec(jobtype), but also some extra keywords that are supported by glide.py but not by mmim.