angles#
Functions#
|
Method to calculate the angle between atoms with indices a_index, b_index, and c_index in the positions DataArray throughout time. |
|
Method to calculate the cosine and sine of the angle between atoms with indices a_index, b_index, and c_index in the positions DataArray throughout time. |
|
Identify triples of bonded atoms (using RDKit) and calculate bond angles for each frame. |
Module Contents#
- angle(atXYZ, a_index, b_index, c_index, *, deg=False)#
Method to calculate the angle between atoms with indices a_index, b_index, and c_index in the positions DataArray throughout time. The b_index specifies the center atom at which the angle is located. The other two indices specify the legs of the angle.
Can return results in radian (default) and degrees (if deg=True)
- Parameters:
- Returns:
The resulting angles between the denoted atoms.
- Return type:
xr.DataArray
- angle_cos_sin(atXYZ, a_index, b_index, c_index, *, deg=False)#
Method to calculate the cosine and sine of the angle between atoms with indices a_index, b_index, and c_index in the positions DataArray throughout time. The b_index specifies the center atom at which the angle is located. The other two indices specify the legs of the angle.
- get_angles(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, deg: bool | Literal['trig'] = True, signed=True) shnitsel.data.tree.node.TreeNode[Any, xarray.DataArray]#
- get_angles(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, deg: bool | Literal['trig'] = True, signed=True) xarray.DataArray
Identify triples of bonded atoms (using RDKit) and calculate bond angles for each frame.
- Parameters:
atXYZ_source (xr.DataArray | TreeNode[Any, Trajectory | Frames | xr.Dataset | xr.DataArray] | Trajectory | Frames | xr.Dataset) – An
xarray.DataArrayof molecular coordinates, with dimensionsatomanddirectionor 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.
deg (bool | Literal['trig'], optional) – Whether to return angles in degrees (as opposed to radians), by default True. Can also be set to the string literal trig if sin and cos of the calculated angle should be returned instead.
signed (bool, optional) – Whether the result should be returned with a sign or just as an absolute value in the range. Only relevant for trig option in deg.
- Returns:
An
xarray.DataArrayof bond angles with dimension descriptor to index the angles along.- Return type:
TreeNode[Any, xr.DataArray] | xr.DataArray