Package schrodinger :: Package application :: Package matsci :: Module rxn_path :: Class ReactionPath
[hide private]
[frames] | no frames]

Class ReactionPath

object --+
         |
        ReactionPath

Generate reaction path.

Instance Methods [hide private]
 
__init__(self)
Create a ReactionPath instance.
list of floats
getSamplePoints(self, sample, densearound, presumed_ts)
Determine the final set of sampling points.
list of int
getReactiveAtoms(self, reactant, product)
Determine the reactive atoms, i.e.
Point
interpolateReactionCoords(self, pointindex, fval, connectivity, rpoint, ppoint, reactiveatoms, logger=None)
Interpolate reaction coordinates between the reactant and product for this sample point.
list of floats
getInitialGuess(self, cartesians, reactiveatoms)
Obtain the initial guess Cartesians for the non-linear least squares solver.
 
doNonLinearFit(self, ipoint, guessparams, reactiveatoms, mixprevious, logger=None)
Using the interpolated redundant internal coordinates and interpolated Cartesian coordinates obtain the final set of Cartesian coordinates for this reaction path point by minimizing a sum-of-squares error function using non-linear least sqaures, i.e.
list of floats, InternalCoords object
getInterpolatedStructure(self, ipoint, optcartesians, reactiveatoms, tosuperpose, fval, connectivity, presumed_ts, rpoint, ppoint)
Build the schrodinger.structure.Structure object from the optimized Cartesian coordinates for the interpolated structure at this sample point and update the internal and Cartesian coordinates in the Point object.
 
runIt(self, reactant, product, job_name='rxnpath', sample=[10.0], presumed_ts='midway', densearound=False, bondweight=1000.0, angleweight=1000.0, dihedralweight=1000.0, cartesianweight=1000.0, penaltyweight=1.0, interpolation='cartesian', mixprevious=0.5, guess='beforesuperposition', connectivity='ts', norxncomplex=False, vdwscale=1.0, reorder=False, reverse_interpolation=False, logger=None)
Function to orchestrate calculation of the reaction path.

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]
  FVALINCREMENT = 0.001
  NORMTHRESH = 1e-12
  BONDPENALTYTHRESH = 1000000000.0
  DIFFLOWTHRESH = 10.0
  DIFFHIGHVAL = 1000000000.0
  RXNINDEX = 'i_matsci_RXN_Index'
  RXNCOORD = 'r_matsci_RXN_Coord'
  REACTIVEATOM = 'b_matsci_Reactive_Atom'
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

 

Create a ReactionPath instance.

Overrides: object.__init__

getSamplePoints(self, sample, densearound, presumed_ts)

 

Determine the final set of sampling points.

Parameters:
  • sample (list of float) - points to be interpolated
  • densearound (bool) - include additional sampling points at specific regions
  • presumed_ts (str) - location of presumed ts
Returns: list of floats
samplepoints, the list of points to be sampled.

getReactiveAtoms(self, reactant, product)

 

Determine the reactive atoms, i.e. those which have changed Cartesian positions in the superposed reactant/product pair.

Parameters:
  • reactant (schrodinger.structure.Structure) - reactant
  • product (schrodinger.structure.Structure) - product
Returns: list of int
reactiveatoms, reactive atoms

interpolateReactionCoords(self, pointindex, fval, connectivity, rpoint, ppoint, reactiveatoms, logger=None)

 

Interpolate reaction coordinates between the reactant and product for this sample point.

Parameters:
  • pointindex (int) - sample point index
  • fval (float) - interpolated reaction path point
  • connectivity (str) - specifies the type of connectivity
  • rpoint (Point) - reactant information
  • ppoint (Point) - product information
  • reactiveatoms (list of ints) - reactive atoms
  • logger (logging.getLogger) - output logger
Returns: Point
ipoint, interpolated point information

getInitialGuess(self, cartesians, reactiveatoms)

 

Obtain the initial guess Cartesians for the non-linear least squares solver. The guess is the interpolated Cartesian coordinates for the reactive atoms.

Parameters:
  • cartesians (list of floats) - all interpolated Cartesian coordinates
  • reactiveatoms (list of ints) - atom indicies of reactive atoms
Returns: list of floats
guessparams, interpolated Cartesian coordinates of the reactive atoms

doNonLinearFit(self, ipoint, guessparams, reactiveatoms, mixprevious, logger=None)

 

Using the interpolated redundant internal coordinates and
interpolated Cartesian coordinates obtain the final set of
Cartesian coordinates for this reaction path point by
minimizing a sum-of-squares error function using non-linear
least sqaures, i.e.

error = \sum_{bonds} bondweight*(r(a,b) - r^{i}(a,b))**2
      + \sum_{angles} angleweight*(theta(a,b,c) - theta^{i}(a,b,c))**2
      + \sum_{dihedrals} dihedralweight*(tau(a,b,c,d) - tau^{i}(a,b,c,d))**2
      + \sum_{atoms} cartweight*[(x(a) - x^{i}(a))**2 + (y(a) - y^{i}(a))**2
      + (z(a) - z^{i}(a))**2]

where those variables marked with "^{i}" are the interpolated
quantities and where

r(a,b) = r(x(a), y(a), z(a), x(b), y(b), z(b)) = norm(vec(a,b))
theta(a,b,c) = arccos[(vec(a,b) \dot vec(c,b))/(norm(vec(a,b))*norm(vec(c,b)))]
tau(a,b,c,d) = arccos[((vec(c,b) \cross vec(a,b)) \dot (vec(d,c) \cross vec(b,c)))
             / (norm((vec(c,b) \cross vec(a,b)))*norm((vec(d,c) \cross vec(b,c))))]

The 3N Cartesian coordinates, x(a), y(a), z(a), x(b), ..., z(N),
are choosen so as to minimize the error.

@type ipoint: Point 
@param ipoint: interpolated point information

@type guessparams: list of floats
@param guessparams: initial parameters, i.e. Cartesian coordinates of the
reactive atoms

@type reactiveatoms: list of ints
@param reactiveatoms: atomic indicies of reactive atoms

@type mixprevious: float
@param mixprevious: specifies to what extent the optimized
Cartesian coordinates from the previous reaction path point
are mixed with the coordinates determined by interpolation
at the current point.

@type logger: logging.getLogger
@param logger: output logger

@rtype: list
@return: optcartesians, non-linear-optimized Cartesian
coordinates for this sample point.

getInterpolatedStructure(self, ipoint, optcartesians, reactiveatoms, tosuperpose, fval, connectivity, presumed_ts, rpoint, ppoint)

 

Build the schrodinger.structure.Structure object from the optimized Cartesian coordinates for the interpolated structure at this sample point and update the internal and Cartesian coordinates in the Point object.

Parameters:
  • ipoint (Point) - interpolated point information
  • optcartesians (list of floats) - optimized Cartesian coordinates for the reactive atoms
  • reactiveatoms (list of ints) - atom indicies of reactive atoms.
  • tosuperpose (list of ints) - contains the atom indicies of the atoms used in the superposition.
  • fval (float) - The interpolated reaction path point.
  • connectivity (str) - specifies the type of connectivity
  • presumed_ts (str) - specifies the location of the presumed ts
  • rpoint (Point) - reactant information
  • ppoint (Point) - product information
Returns: list of floats, InternalCoords object
optcartesianssuperposed, reactiveinternals, the optimized Cartesian coordinates for the reactive atoms after superposition on to the reactant structure and an object containing the interpolated and calculated reactive internal coordinates.

runIt(self, reactant, product, job_name='rxnpath', sample=[10.0], presumed_ts='midway', densearound=False, bondweight=1000.0, angleweight=1000.0, dihedralweight=1000.0, cartesianweight=1000.0, penaltyweight=1.0, interpolation='cartesian', mixprevious=0.5, guess='beforesuperposition', connectivity='ts', norxncomplex=False, vdwscale=1.0, reorder=False, reverse_interpolation=False, logger=None)

 

Function to orchestrate calculation of the reaction path.

Parameters:
  • reactant (schrodinger.structure.Structure) - reactant
  • product (schrodinger.structure.Structure) - product
  • job_name (str) - name of job
  • sample (list of floats) - contains either the list of sample points or the number of points to sample as a "decimal-less" float.
  • presumed_ts (str) - gives the location of the presumed ts.
  • densearound (bool) - Specifies if additional sampling points should be included in the interpolation.
  • bondweight (float) - Specifies the weight of the bonding term in the objective function which is minimized using non-linear least squares.
  • angleweight (float) - Specifies the weight of the angle term in the objective function which is minimized using non-linear least squares.
  • dihedralweight (float) - Specifies the weight of the dihedral term in the objective function which is minimized using non-linear least squares.
  • cartesianweight (float) - Specifies the weight of the Cartesian term in the objective function which is minimized using non-linear least squares.
  • penaltyweight (float) - Specifies the weight of the bond penalty term in the objective function which is minimized using non-linear least squares.
  • interpolation (str) - specifies the coordinate system in which the reaction path points are interpolated.
  • mixprevious (float) - specifies to what extent the optimized Cartesian coordinates from the previous reaction path point are mixed with the coordinates determined by interpolation at the current point.
  • guess (str) - specifies the type of solution guess generated from the optimized Cartesian coordinates of the previous reaction path point.
  • connectivity (str) - specifies the type of connectivity to use in defining the structure objects of points along the reaction path.
  • norxncomplex (boolean) - Disables the preprocessing of reactants and products into reaction complexes for certain bimolecular reactions.
  • vdwscale (float) - Scales the inter-molecular VDW distance used to separate reactant or product structures when forming reaction complexes for certain bimolecular reactions.
  • reorder (boolean) - Specifies to run the protocol to normalize the atom ordering in the reactants and products.
  • reverse_interpolation (boolean) - interpolate the reaction in reverse
  • logger (a logging.getLogger object) - The output logger for this script.