TrajectoryRow
Ordered sequence of geometries from a calculation trajectory.
Usage
TrajectoryRow()Attributes
id: uuid.UUID | None-
Primary key.
ndim: int | None-
Length of each linked geometry’s index (inferred from the first link if unset).
axes: list[TrajectoryAxisRow]-
Physical coordinates (e.g. a scanned dihedral) that the dimensions run along, ordered by axis. Dimensions without one are only indexed.
geometry_links: list[GeometryTrajectoryLink]-
Raw link rows connecting geometries to this trajectory.
calculation_links: list[CalculationTrajectoryLink]- Raw link rows connecting calculations to this trajectory.
Methods
| Name | Description |
|---|---|
| geometries_along() | Get the geometries along one dimension, ordered by their index along it. |
| values_along() | Get the physical values of axis for the geometries of geometries_along. |
| view() | Animate the geometries along one dimension with py3Dmol. |
geometries_along()
Get the geometries along one dimension, ordered by their index along it.
Usage
geometries_along(axis=0, at=None)Parameters
axis: int = 0-
Dimension to run along.
at: Sequence[int] | None = None- Indices of the other dimensions (in order, skipping axis) at which to take the slice. Defaults to the lowest index of each.
Returns
list[GeometryRow]-
The geometries whose index matches
atin every other dimension.
Raises
ValueError-
If the trajectory has no indexed geometries, or axis or
atdo not fit its number of dimensions.
values_along()
Get the physical values of axis for the geometries of geometries_along.
Usage
values_along(axis=0, at=None, units=None)Parameters
axis: int = 0-
Dimension to run along.
at: Sequence[int] | None = None-
Indices of the other dimensions, as in geometries_along.
units: str | None = None- Units to convert to. Defaults to the axis’s units.
Returns
npt.NDArray[np.float64]- The values along axis, with NaN where a geometry has none.
Raises
ValueError- As for geometries_along, or if units is given for a dimension without a TrajectoryAxisRow, or is incompatible with it.
view()
Animate the geometries along one dimension with py3Dmol.
Usage
view(axis=0, at=None, *, interval=200, view=None)Parameters
axis: int = 0-
Dimension to animate along.
at: Sequence[int] | None = None-
Indices of the other dimensions (in order, skipping axis) at which to take the slice. Defaults to the lowest index of each.
interval: int = 200-
Time between frames, in milliseconds.
view: py3Dmol.view | None = None-
Existing view to add the animation to. If
None, create one.
Returns
py3Dmol.view- The view containing the animation.
Raises
ValueError- If no geometries lie along the requested slice.