17.1.1.10. pysisyphus.irc package
17.1.1.10.1. Submodules
17.1.1.10.2. pysisyphus.irc.DWI module
17.1.1.10.3. pysisyphus.irc.DampedVelocityVerlet module
17.1.1.10.4. pysisyphus.irc.Euler module
17.1.1.10.5. pysisyphus.irc.EulerPC module
17.1.1.10.6. pysisyphus.irc.GonzalezSchlegel module
17.1.1.10.7. pysisyphus.irc.IMKMod module
17.1.1.10.8. pysisyphus.irc.IRC module
17.1.1.10.9. pysisyphus.irc.IRCDummy module
17.1.1.10.10. pysisyphus.irc.Instanton module
- class pysisyphus.irc.Instanton.Instanton(images, calc_getter, T)[source]
Bases:
object
- property P
- P_bh
the first image is connected to the last image. At k=0 the index k-1 will be -1, which points to the last image.
- Below we pre-calculate some indices (assuming N images).
unshifted indices ks: k = {0, 1, .. , N-1} shifted indices ksm1: k-1 = {-1, 0, 1, .. , N-2} shifted indices ksp1: k+1 = {1, 2, .. , N-1, 0}
- Type:
The Instanton is periodic
- action_gradient()[source]
kin_grad corresponds to the gradient of S_0 in (Eq. 1 in [1], or first term in Eq. 6 in [2].) It boils down to the derivative of a sum of vector norms
d sum_k (||y_k - y_(k-1)||_2)² --- d y_k
The derivative of a norm of a vector difference is quite simple, but care has to be taken to recognize, that y_k appears two times in the sum. It appears in the first summand for k and in the second summand for k+1.
- sum_k (||y_k - y_(k-1)||_2)²
term 2. term
= (||y_k - y_(k-1)||_2)² + (||y_(k+1) - y_k||_2)² + ... and so on
The derivative of the first term is
2 * (y_k - y_(k-1))
and the derivative of the second term is
-2 * (y_(k+1) - y_k))
which is equal to
2 * (y_k - y_(k+1)) .
To summarize:
d sum_k(||y_k - y_(k-1)||_2)² --- d y_k
= 2 * (2 * y_k - y_(k-1) - y_(k+1)) .
- property cart_coords
- property cart_forces
- property cart_hessian
- property coords
- property energy
- property forces
- property gradient
- property hessian
- property path_length
17.1.1.10.11. pysisyphus.irc.LQA module
17.1.1.10.12. pysisyphus.irc.ModeKill module
17.1.1.10.13. pysisyphus.irc.ParamPlot module
17.1.1.10.14. pysisyphus.irc.RK4 module
17.1.1.10.15. pysisyphus.irc.initial_displ module
- class pysisyphus.irc.initial_displ.ThirdDerivResult(coords_plus, energy_plus, H_plus, coords_minus, energy_minus, H_minus, G_vec, vec, ds)
Bases:
tuple
- G_vec
Alias for field number 6
- H_minus
Alias for field number 5
- H_plus
Alias for field number 2
- coords_minus
Alias for field number 3
- coords_plus
Alias for field number 0
- ds
Alias for field number 8
- energy_minus
Alias for field number 4
- energy_plus
Alias for field number 1
- vec
Alias for field number 7
- pysisyphus.irc.initial_displ.cubic_displ(H, v0, w0, Gv, dE, show=False)[source]
- According to Eq. (26) in [2] v1 does not depend on the sign of v0.
v1 = (F0 - 2v0^T F0 v0 I)⁻¹ x ([G0v0] - v0^T [G0v0] v0 I) v0
The first term is obviously independent of v0's sign. Using v0' = -v0 the second term becomes
([G0v0'] - v0'^T [G0v0'] v0' I) v0' (-[G0v0] - v0^T [G0v0'] v0 I) v0' (-[G0v0] + v0^T [G0v0] v0 I) v0' -(-[G0v0] + v0^T [G0v0] v0 I) v0 ([G0v0] - v0^T [G0v0] v0 I) v0
Strictly speaking the contraction [G0v0] should depend on the sign of v0. In the current implementation, the direction of v0 is not taken into account, but
get_curv_vec(H, Gv, v0, w0) == get_curv_vec(H, -Gv, -v0, w0) .
But somehow the Taylor expansion gives bogus results when called with -Gv and -v0...
- pysisyphus.irc.initial_displ.taylor_closure(H, Gv, v0, v1, w0)[source]
Taylor expansion of the energy to 3rd order w/o gradient.
It makes no sense to use this function when there is a significant remaining gradient, as it is not taken into account here.
dx(ds) = ds*v0 + ds**2*v1 / 2 dE(ds) = dx^T H dx / 2 + dx^T [Gv] dx / 6
H = Hessian Gv = 3rd derivative of energy along v0 v0 = Transition vector v1 = Curvature vector w0 = Eigenvalue belonging to v0
Revisting the function below three years later I have to admit that I have no idea what is going on here and why I did it this way. Maybe I derived the expression using sympy and/or on paper?! Nonetheless, the Taylor expansion to 3rd order also seems wrong...
Below, a simple and correct implementation of the Taylor expansion can be found, but it does not support multiple values for ds.
# Precontract some values that will be reused v0v1 = v0.dot(v1) v1Hv1 = v1.dot(H).dot(v1) v0Gvv0 = v0.dot(Gv).dot(v0) v0Gvv1 = v0.dot(Gv).dot(v1) v1Gvv1 = v1.dot(Gv).dot(v1)
- def dE(ds):
ds2 = ds**2 ds3 = ds2 * ds ds4 = ds2 * ds2
# Δx^T H Δx / 2 quad = (w0 * ds2 + ds3 * w0**2 * v0v1 + (ds4 * v1Hv1) / 4) / 2 # Δx^T [Gv] Δx / 6 cubic = (ds2 * v0Gvv0 + ds3 * v0Gvv1 + ds4 * v1Gvv1 / 4) / 6 return quad + cubic