pele.transition_states._interpolate#

Module source

tool for creating interpolated paths as input to NEB

pele.transition_states._interpolate.interpolate_linear()[source]

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]

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

InterpolatedPath
class pele.transition_states._interpolate.InterpolatedPath[source]

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

InterpolatedPathDensity

use 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