pele.transition_states._interpolate#
tool for creating interpolated paths as input to NEB
- pele.transition_states._interpolate.interpolate_linear()[source]
-
def interpolate_linear(initial, final, t):Linear interpolation
- Parameters:
- initial:
first point
- final:
second point
- t: float
weight for interpolation [0.,1.]
- pele.transition_states._interpolate.InterpolatedPathDensity()[source]
-
def InterpolatedPathDensity(initial, final, distance, density=10.0, **kwargs):Return a InterpolatedPath object with the appropriate number of images corresponding to the given density
- Parameters:
- initial, finalarray
initial and final configurations
- distance
distance between initial and final configurations
- density
number of images per “unit” separation
- kwargs
additional parameters passed to InterpolatedPath
See also
- class pele.transition_states._interpolate.InterpolatedPath[source]
-
class InterpolatedPath:Wraps interpolation that it can be accessed like a list / array without storing the nodes
- Parameters:
- intitial:
first point
- final:
second point
- nimages: integer
number of images
- interpolator: callable
interpolation algorithm
See also
InterpolatedPathDensityuse image density
Examples
>>> import numpy as np >>> >>> path = InterpolatedPath(np.array([0., 1.]), np.array([1.,0.]), 10) >>> print len(path) # prints 10 >>> print path[5] # access 5th frame >>> >>> for x in path: # it is also iteratable >>> print x