distances#

Functions#

distance(atXYZ, i, j)

Method to calculate the various distances between atoms i and j throughout time

get_distances(…)

Identify bonds (using RDKit) and find the length of each bond in each

Module Contents#

distance(atXYZ, i, j)#

Method to calculate the various distances between atoms i and j throughout time

Parameters:
  • atXYZ (AtXYZ) – Array with atom positions

  • i (int) – Index of the first atom

  • j (int) – Index of the second atom

Returns:

The resulting array holding the pairwise distance between i and j.

Return type:

xr.DataArray

get_distances(atXYZ_source: shnitsel.data.tree.node.TreeNode[Any, shnitsel.data.dataset_containers.trajectory.Trajectory | shnitsel.data.dataset_containers.frames.Frames | xarray.Dataset | xarray.DataArray], structure_selection: shnitsel.filtering.structure_selection.StructureSelection | shnitsel.filtering.structure_selection.StructureSelectionDescriptor | None = None) shnitsel.data.tree.node.TreeNode[Any, xarray.DataArray]#
get_distances(atXYZ_source: shnitsel.data.dataset_containers.trajectory.Trajectory | shnitsel.data.dataset_containers.frames.Frames | xarray.Dataset | xarray.DataArray, structure_selection: shnitsel.filtering.structure_selection.StructureSelection | shnitsel.filtering.structure_selection.StructureSelectionDescriptor | None = None) xarray.DataArray

Identify bonds (using RDKit) and find the length of each bond in each frame.

Parameters:
  • atXYZ_source (TreeNode[Any, Trajectory | Frames | xr.Dataset | xr.DataArray] | Trajectory | Frames | xr.Dataset | xr.DataArray) – An xarray.DataArray of molecular coordinates, with dimensions atom and direction or another source of positional data like a trajectory, a frameset, a dataset representing either of those or a tree structure holding such data.

  • structure_selection (StructureSelection | StructureSelectionDescriptor, optional) – Object encapsulating feature selection on the structure whose positional information is provided in atXYZ. If this argument is omitted altogether, a default selection for all bonds within the structure is created.

Returns:

An xarray.DataArray of bond lengths/distances with dimension descriptor to index the distances along.

Return type:

TreeNode[Any, xr.DataArray] | xr.DataArray