Package schrodinger :: Package structutils :: Module minimize
[hide private]
[frames] | no frames]

Module minimize

A module for force field energy evaluation and minimization.

API examples

A non-conformer serial minimization should use the minimize function:

   for st in structure.StructureReader('various_ligands.mae'):
       minimize.minimize_structure(st)
       st.append('various_ligands-mini-out.mae')

A conformer serial minimization can reduce atom-typing overhead by using the Minimizer class:

   for index, st in enumerate(structure.StructureReader('conformers.mae')):
       if index == 0:
           min = minimize.Minimizer(struct=st)
       else:
           min.updateCoordinates(st)
       min.minimize()
       st = min.getStructure()
       st.append('conformers-out.mae')
Classes [hide private]
  Minimizer
A class to provide force field energy and minimization.
Functions [hide private]
 
initialize(error_handler=None)
Initialize needed mmlibs.
 
terminate()
Terminate the mmlibs initialized in the initialize method.
 
get_converged(struct, ffld_version)
Return the converged status for a Structure.
 
get_rms_gradient(struct, ffld_version)
Return the RMS of derivatives from force field minimization for a Structure.
 
get_energy(struct, ffld_version)
Return the force field energy for a Structure.
 
minimize_structure(struct, ffld_version=14, cleanup=False, **kwargs)
Minimize the provided structure.
 
_minimizer_int_property(mmffld_option, doc=None, readonly=True)
A function to generate an int property for minimizer settings.
 
_minimizer_float_property(mmffld_option, doc=None, readonly=True)
A function to generate an int property for minimizer settings.
Variables [hide private]
  OPLS_2001 = 11
  OPLS_2005 = 14
  PFF_2005 = 15
  OPLSv2 = 16
  MinBFGS = 2
  MinAUTO = 0
  MinCG = 1
  ffld_name = {11: 'OPLS_2001', 14: 'OPLS_2005', 15: 'PFF_2005',...
  min_converged_prefix = 'b_mmffld_Minimization_Converged-'
  min_rms_gradient_prefix = 'r_mmffld_RMS_Derivative-'
  min_energy_prefix = 'r_mmffld_Potential_Energy-'
  _initialized = False
  __package__ = 'schrodinger.structutils'
Function Details [hide private]

initialize(error_handler=None)

 

Initialize needed mmlibs.

This method is called by the Minimizer constructor, so if Minimizer objects are used there is no need to explicitly call it.

terminate()

 

Terminate the mmlibs initialized in the initialize method.

It's only necessary to call this method if you want to free resources used by the underlying lib.

Note that this terminate method isn't automatically called in the __del__ method of Minimizer. This is because there is significant overhead to reading the force field data and it won't be re-read as long as the library reference count is greater than zero.

get_converged(struct, ffld_version)

 

Return the converged status for a Structure.

Parameters:
  • ffld_version - One of the module level properties: OPLS_2001, OPLS_2005, PFF_2005, OPLSv2.

get_rms_gradient(struct, ffld_version)

 

Return the RMS of derivatives from force field minimization for a Structure.

Parameters:
  • ffld_version - One of the module level properties: OPLS_2001, OPLS_2005, PFF_2005, OPLSv2.

get_energy(struct, ffld_version)

 

Return the force field energy for a Structure. Units are kcal/mol.

Parameters:
  • ffld_version - One of the module level properties: OPLS_2001, OPLS_2005, PFF_2005, OPLSv2.

minimize_structure(struct, ffld_version=14, cleanup=False, **kwargs)

 

Minimize the provided structure.

Additional keyword arguments will be used to set properties of the Minimizer instance. See the Minimizer.__init__() method for supported property names.

Parameters:
  • ffld_version (integer module constant) - The force field to use.
  • cleanup (bool) - If True, attempts to automatically clean up the structure will be made. (This uses the C function mmlewis_apply().) Note that this can modify the atom types of the passed in structure.
  • kwargs - Additional keyword arguments.
  • struct (schrodinger.structure.Structure)

Variables Details [hide private]

ffld_name

Value:
{11: 'OPLS_2001', 14: 'OPLS_2005', 15: 'PFF_2005', 16: 'OPLS2.0'}