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

Class Gridgen

   object --+                    
            |                    
         dict --+                
                |                
configobj.Section --+            
                    |            
  configobj.ConfigObj --+        
                        |        
  inputconfig.InputConfig --+    
                            |    
                     GlideJob --+
                                |
                               Gridgen

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

Instance Methods [hide private]
new empty dictionary

__init__(self, keywords)
Specify a dictionary of keywords, where the key is the short keyword name and the value is what is should be set to.
 
_defaultsTable(self)
 
_conflictsTable(self)
 
_gridfile(self)
Return the grid file to use, normally just the value of the GRIDFILE keyword, but sometimes based on legacy keywords for compatibility.
 
_recep_file(self)
 
_grid_center_from_asl(self, grid_center_asl, delete_atoms=False)
 
_grid_center(self)
Return (grid_center, recep_file).
 
_inner_box(self)
 
_outer_box(self)
 
setupJson(self, jsdict)
Additional setup to do before writing a JSON file.
 
_useSimplifiedConstraints(self)
Return True is using "simplified constraints" keywords such as HBOND_CONSTRAINTS.
 
_setupPositConstraints(self, jsdict)
 
_setupNoeConstraints(self, jsdict)
 
_setupMetcoordConstraints(self, jsdict)
 
_setupReceptorAtomBasedConstraints(self, jsdict, keyword, symmetrize_all=False)
 
_jsonSetupConstraints(self, jsdict)
 
_receptorStructure(self)
 
_parseConsString(self, cons_string)
Parse a string with the format "<label> <atom_index> [nosym]" or "<label> <asl> [nosym]" and return the tuple (label, atomindex, symmetrize).
 
_setupHbondConstraints(self)
 
_setupConstraints(self)
 
cleanup(self)
Free the memory associated with constraings

Inherited from GlideJob: applyContextDependentDefaults, checkConflicts, checkForceFieldLicense, get, getAllowedRange, validateValues, writeJSON, writeSimplified

Inherited from inputconfig.InputConfig: getSpecsString, printout, writeInputFile

Inherited from inputconfig.InputConfig (private): _quote

Inherited from configobj.ConfigObj: __repr__, reload, reset, validate, write

Inherited from configobj.ConfigObj (private): _a_to_u, _decode, _decode_element, _get_single_quote, _get_triple_quote, _handle_bom, _handle_comment, _handle_configspec, _handle_error, _handle_value, _initialise, _load, _match_depth, _multiline, _parse, _set_configspec, _str, _unquote, _write_line, _write_marker

Inherited from configobj.Section: __delitem__, __getitem__, __iter__, __reduce__, __setitem__, __setstate__, __str__, as_bool, as_float, as_int, as_list, clear, dict, items, iteritems, iterkeys, itervalues, keys, merge, pop, popitem, rename, restore_default, restore_defaults, setdefault, update, values, walk

Inherited from configobj.Section (private): _interpolate

Inherited from dict: __cmp__, __contains__, __eq__, __ge__, __getattribute__, __gt__, __le__, __len__, __lt__, __ne__, __new__, __sizeof__, copy, fromkeys, has_key, viewitems, viewkeys, viewvalues

Inherited from object: __delattr__, __format__, __reduce_ex__, __setattr__, __subclasshook__

Class Variables [hide private]

Inherited from configobj.ConfigObj (private): _bools, _keyword, _listvalueexp, _multi_line_double, _multi_line_single, _nolistvalue, _sectionmarker, _single_line_double, _single_line_single, _triple_quote, _valueexp

Inherited from dict: __hash__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, keywords)
(Constructor)

 

Specify a dictionary of keywords, where the key is the short keyword
name and the value is what is should be set to. For indexed keywords,
the value needs to be a list.
It is also possible to specify a file path to a simplified input file
that contains the keywords.

Constraint sites may be set via the following keywords:
    HBOND_CONSTRAINTS
    METAL_CONSTRAINTS
    POSIT_CONSTRAINTS
    NOE_CONSTRAINTS
    METCOORD_CONSTRAINTS
    METCOORD_SITES

@type keywords: dict or file path
@param keywords: Either a dictionary of keywords or a simplified input file path.

@raise RuntimeError: If no job name specified.

Parameters:
  • infile - The name of the input file.
  • specs - A list of strings, each in the format <keywordname> = <validator>(<validatoroptions>). An example string is NUM_RINGS = integer(min=1, max=100, default=1). For available validators, see: http://www.voidspace.org.uk/python/validate.html.
Returns:
new empty dictionary

Overrides: object.__init__

_grid_center(self)

 

Return (grid_center, recep_file). The grid center may come from any of three places, in order of increasing precedence:

1) via a ligand number reference in RECEP_FILE; it will be deleted. 2) via an ASL evaluated against RECEP_FILE 3) via an explicit GRID_CENTER keyword value (or [XYZ]CENT).

The recep_file normally comes from RECEP_FILE or JOBNAME, but it can be a munged file if the LIGAND_MOLECULE option is used.

setupJson(self, 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.

Overrides: GlideJob.setupJson
(inherited documentation)

_useSimplifiedConstraints(self)

 

Return True is using "simplified constraints" keywords such as HBOND_CONSTRAINTS. Raises a ValueError exception if simplified keywords are used together with "low-level" keywords such as GLIDECONSATOMS.

_parseConsString(self, cons_string)

 

Parse a string with the format "<label> <atom_index> [nosym]" or "<label> <asl> [nosym]" and return the tuple (label, atomindex, symmetrize). Raises ValueError if the string is invalid for any reason.

cleanup(self)

 

Free the memory associated with constraings

Overrides: GlideJob.cleanup