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

Module glide


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.

Classes [hide private]
  Constraint
Class defining a docking constraint in the receptor.
  DonorConstraint
H-Bond constraint that was specified as a *receptor* donor atom.
  AcceptorConstraint
H-Bond constraint that was specified as a *receptor* acceptor atom.
  MetalConstraint
This constraint was specified as a metal receptor atom.
  PositionalConstraint
  NOEConstraint
  MetCoordConstraint
  HydrophobicConstraint
  FeaturePattern
Class defining a constraint feature pattern.
  Feature
A list of FeaturePattern objects.
  ConstraintGroup
Class defining a constraint group.
  GlideJob
Class for writing Glide input files - either Gridgen or Docking.
  Gridgen
Class for writing Glide Grid Generation input files.
  Dock
Class for generating Glide docking input files.
Functions [hide private]
A list of Constraint objects.
read_constraints(gridfile)
Reads the receptor constraints from the specified grid file.
 
read_yaml()
Read mmim_keywords.json and return a list of objects.
 
read_keywords_file()
Read the mmim_keywords.json file from the mmshare data directory and return a list of objects.
 
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.
 
keyword_spec(jobtypes, include_undocumented=False)
Return a string with the specification of the mmim keywords that are valid for the jobtypes given.
 
validation_specs(jobtype)
Return a list of validation specs for a given jobtype (e.g., 'docking' or 'gridgen') or list of jobtypes.
 
get_keywords_set(jobtypes)
Return the set of all keywords valid for the given job types.
 
is_gridgen_keyword(keyword)
Return True is a keyword is valid for gridgen jobs.
 
is_docking_keyword(keyword)
Return True is a keyword is valid for docking jobs.
float
calc_ligand_size(coords)
Given a list of (x, y, z) coordinates for all atoms in a ligand, calculate the ligand size.
tuple of lists, e.g. ([10, 10, 10], [-5.9863, -1.887 , -0.2703])
get_default_box_size(struct, ligand_asl='all')
Gets the default box size for a grid.
 
get_glide_job(input_file)
Return a Gridgen or Dock object given an SIF input filename or keyword dictionary.
 
is_false(val)
Variables [hide private]
  __doc__ = ...
  DEBUG = False
hash(x)
  HYDROPHOBIC = 'Hydrophobic'
  HBOND_DONOR = 'H-bond donor'
  HBOND_ACCEPTOR = 'H-bond acceptor'
  METAL = 'Metal'
  POSITIONAL = 'Positional'
  NOE = 'NOE'
  METCOORD = 'Metal coordination'
  NA = 'NA'
  mmim_cons_types = ['NA', 'Hydrophobic', 'H-bond donor', 'H-bon...
  FREE = 'free'
  FIXED = 'fixed'
  PENALIZE = 'penal'
  TRANS = 'trans'
  HTVS = 'HTVS'
  SP = 'SP'
  XP = 'XP'
  PV = 'poseviewer'
  LIB = 'ligandlib'
  PV_SD = 'poseviewer_sd'
  LIB_SD = 'ligandlib_sd'
  PHASE_SUBSET = 'phase_subset'
  OPLS_2005 = 'OPLS_2005'
  OPLS3 = 'OPLS3'
  ALL = -1
  SECTIONS = set(['CONSTRAINT_GROUP', 'FEATURE', 'TORCONS'])
  EXTRA_KEYWORDS = set(['ACTXRANGE', 'ACTYRANGE', 'ACTZRANGE', '...
  _old_keywords = {'COREATOMS': 'CORE_ATOMS', 'CORE_DEF': 'CORE_...
  torcons_section_allowed_keywords = set(['ALL', 'ATOMS', 'SMART...
  consgroup_section_allowed_keywords = set(['NREQUIRED_CONS', 'U...
  _keywords_data = None
hash(x)
  mmim_to_inputconfig_type_map = {'boolean': 'boolean', 'boolean...
  __package__ = 'schrodinger.application.glide'
Function Details [hide private]

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.
Returns: A list of Constraint objects.

read_yaml()

 

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

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.

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.

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.
Returns: float
The size of the ligand.

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"
Returns: tuple of lists, e.g. ([10, 10, 10], [-5.9863, -1.887 , -0.2703])

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").


Variables Details [hide private]

__doc__

Value:
"""
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 valu\
es into
the actual DICE input files.
...

mmim_cons_types

Value:
['NA',
 'Hydrophobic',
 'H-bond donor',
 'H-bond acceptor',
 'NA',
 'Metal',
 'Positional',
 'NOE',
...

EXTRA_KEYWORDS

Value:
set(['ACTXRANGE',
     'ACTYRANGE',
     'ACTZRANGE',
     'DIELECTRIC',
     'GRIDLIG',
     'READBASE',
     'READZIP',
     'REF_LIGAND_SOURCE',
...

_old_keywords

Value:
{'COREATOMS': 'CORE_ATOMS',
 'CORE_DEF': 'CORE_DEFINITION',
 'LIGAND_SOURCE': 'LIGSOURCE',
 'LIGCCUT': 'LIG_CCUT',
 'LVDW': 'LIG_VSCALE',
 'MODEL_FILE': 'RECEP_FILE',
 'OUTTYPE': 'POSE_OUTTYPE',
 'POSTDOCKNPOSE': 'POSTDOCK_NPOSE',
...

torcons_section_allowed_keywords

Value:
set(['ALL', 'ATOMS', 'SMARTS', 'TORVAL', 'USEVAL'])

consgroup_section_allowed_keywords

Value:
set(['NREQUIRED_CONS', 'USE_CONS'])

mmim_to_inputconfig_type_map

Value:
{'boolean': 'boolean',
 'boolean_array': 'bool_list',
 'float': 'float',
 'float_array': 'float_list',
 'integer': 'integer',
 'integer_array': 'int_list',
 'string': 'string',
 'string_array': 'string_list'}