chemcoord.ric_functions.RIC_interpolate
- chemcoord.ric_functions.RIC_interpolate(start, end, N, *, opt_alg='LM', coord_idx=None, max_iter=500, seeds=None, bond_dict=None, linearity_thrshld=5, schedule='automatic', rtol=0.0001, atol=1e-08, weights=None, default_weights=None)[source]
Generates an N-image interpolation between start and end.
- Parameters:
start (Cartesian) – starting structure
end (Cartesian) – ending structure
N (int) – number of images, including start and end (so minimum 2)
opt_alg (Literal['gauss', 'LM']) – default ‘LM’, either Levenberg-Marquardt or Gauss-Newton, the optimization algorithm used to generate
Cartesianrepresentations ofRedundantInternalCoordinatesviaget_cartesian()coord_idx (None | SortedSet) – default
None, optional specification of internal coordinate set to usemax_iter (int) – default 500, maximum number of steps for the
get_cartesian()optimization cycleseeds (Cartesian | Sequence[Cartesian] | None) – default
None, specifies the seed value for theget_cartesian()optimization cycle. Can be set to oneCartesian, which is used for each image, or to a sequence ofCartesianof length N. If it isNone, it uses appropiate method-dependent seeds, e.g. for"from_start"it uses the previous, converged solution.bond_dict (Mapping[AtomIdx, Set[AtomIdx]] | None) – default
None, optional specification of connectivity. If not specified, generated automatically. NOTE: this connects disconnected fragments in both start and end with a bond between the closest two atoms in each fragmentlinearity_thrshld (float) – default 5, tolerance for linearity, in degrees
schedule (Literal['automatic', 'independent', 'from_both', 'from_start', 'from_end']) – default “automatic”, the scheduling to be used when generating the path. Can be “from_both” which builds it from the endpoints in, “from_start”, or “from_end”. “automatic” attempts each in that order, returning the first one to succeed
rtol (float) – default 1e-4, relative tolerance for convergence
atol (float) – default 1e-8, absolute tolerance for convergence
weights (ndarray[tuple[int], dtype[floating]] | Sequence[float] | None) – default
None, weights used for each internal coordinate in the weighted least-squares step. A higher value means that that coordinate will be more likely to change linearly. Using values far above 1 can cause instabilitydefault_weights (DefaultWeights | Mapping[str, float] | None) – default {“length” : 1.0, “angle” : 0.1, “dihedral” : 0.05, “bending” : 0.01}, the weights which each type of coordinate default to
- Returns:
The generated path as list of
Cartesian.- Return type:
References
The algorithm is described in [4]. If you use this function, please cite it.