pele.transition_states._NEB#
- class pele.transition_states._NEB.NEB[source]
-
class NEB:Doubly nudged elastic band implementation
- Parameters:
- path: iteratable
iteratable object of all images
- potential
the potential object
- distancecallable
distance function for the elastic band
- kfloat, optional
the elastic band spring constant
- adjustk_freqinteger
frequency to adjust k, set to zero to disable
- adjustk_tolfloat
tolerance for adjusting k up or down
- adjustk_factorfloat
the multiplicative factor used to adjust k
- dneb: bool, optional
do double nudging, default True
- with_springenergy: boolean, optional
add the spring energy to the total energy of the band, default is False
- copy_potentialbool, optional
if True a separate copy of the potential will be made for each image. This can be used to keep neighbor lists from being rebuilt over and over again.
- quenchRoutinecallable
the quench routine to use in optimizing the band
- quenchParams
parameters passed to the quench routine. The default tolerance for quench is 1e-4
- save_energiesbool
if True and quenchParams.iprint exists and is positive, then the energy along the NEB path will be printed to a file of the form “neb.EofS.####” every iprint steps.
- verboseinteger
verbosity level
- eventslist of callables
list of callback functions called just before getEnergyGradient returns
- use_minimizer_callback: boolean, optional
use the callback function of theminimizer to adjust k, it is not recommended to change this to false
See also
InterpolatedPathused to construct required parameter path
InterpolatedPathDensityalternate interpolater
Notes
use the Interpolation tools in this package to construct the initial path from a starting and ending point
- NEB.optimize()[source]
-
def optimize(self, quenchRoutine=None, **kwargs):Optimize the band
Notes
the potential for the NEB optimization is not Hamiltonian. This means that there is no meaningful energy associated with the potential. Therefore, during the optimization, we can do gradient following, but we can’t rely on the energy for, e.g. determining step size, which is the default behavior for many optimizers. This can be worked around by choosing a small step size and a large maxErise, or by using an optimizer that uses only gradients.
scipy.lbfgs_b seems to work with NEB pretty well, but lbfgs_py and mylbfgs tend to fail. If you must use one of those try, e.g. maxErise = 1., maxstep=0.01, tol=1e-2
- QuenchRoutine:
quench algorithm to use for optimization.
- QuenchParams:
parameters for the quench
- NEB.getEnergy()[source]
-
def getEnergy(self, coords):this is a very dumb way of getting the energy. it should be replaced
- NEB.getEnergyGradient()[source]
-
def getEnergyGradient(self, coords1d):Calculates the gradient for the whole NEB. only use force based minimizer!
- coords1d:
coordinates of the whole neb active images (no end points)
- NEB.tangent_old()[source]
-
def tangent_old(self, central, left, right, gleft, gright):Old tangent construction based on average of neighbouring images
- coords1d:
coordinates of the whole neb active images (no end points)
- NEB.tangent()[source]
-
def tangent(self, central, left, right, gleft, gright):New uphill tangent formulation
The method was described in “Improved tangent estimate in the nudged elastic band method for finding minimum energy paths and saddle points” Graeme Henkelman and Hannes Jonsson J. Chem. Phys 113 (22), 9978 (2000)
- Parameters:
- centralfloat
central image energy
- leftfloat
left image energy
- rightfloat
right image energy
- gleftnp.array
gradient to left image (x_0 - x_left)
- grightnp.array
gradient to right image (x_0 - x_right)
- NEB.NEBForce()[source]
-
def NEBForce(self, isclimbing, image, left, right, greal, icenter):Calculate NEB force for 1 image. That contains projected real force and spring force.
The current implementation is the DNEB (doubly nudged elastic band) as described in
“A doubly nudged elastic band method for finding transition states” Semen A. Trygubenko and David J. Wales J. Chem. Phys. 120, 2082 (2004); doi: 10.1063/1.1636455
- NEB.MakeHighestImageClimbing()[source]
-
def MakeHighestImageClimbing(self):Make the image with the highest energy a climbing image
- NEB.MakeAllMaximaClimbing()[source]
-
def MakeAllMaximaClimbing(self):Make all maxima along the neb climbing images.
- NEB.printState()[source]
-
def printState(self):print the current state of the NEB. Useful for bug testing