## TrajectoryAxisRow


Physical coordinate that one dimension of a trajectory runs along.


Usage

``` python
TrajectoryAxisRow()
```


## Examples

A relaxed scan of the H-O-O-H dihedral of hydrogen peroxide:

``` python
>>> axis = TrajectoryAxisRow(axis=0, kind="dihedral", keys=[0, 1, 2, 3])
>>> geo = GeometryRow(
...     symbols=["H", "O", "O", "H"],
...     coordinates=[[0, 0, 1], [0, 0, 0], [0, 1, 0], [1, 1, 0]],
... )
>>> axis.measure(geo)
90.0
```


## Attributes

| Name | Description |
|----|----|
| [axis](#axis) | Dimension of the trajectory's geometry [index](GeometryTrajectoryLink.md#autostorage.GeometryTrajectoryLink.index) that this axis describes. |
| [keys](#keys) | Indices of the atoms defining the coordinate (2, 3, or 4 for a distance, |
| [kind](#kind) | Kind of coordinate; [OTHER](AxisKind.md#autostorage.AxisKind.OTHER) coordinates are not measured from the geometry. |
| [label](#label) | Human-readable description (e.g. `"H-O-O-H torsion"`). |
| [trajectory](#trajectory) | The described [TrajectoryRow](TrajectoryRow.md#autostorage.TrajectoryRow). |
| [trajectory_id](#trajectory_id) | Foreign key to the [TrajectoryRow](TrajectoryRow.md#autostorage.TrajectoryRow) this axis describes. |
| [units](#units) | Units of the values along this axis (a `pint` unit string); on flush, defaults |

------------------------------------------------------------------------


#### axis


Dimension of the trajectory's geometry [index](GeometryTrajectoryLink.md#autostorage.GeometryTrajectoryLink.index) that this axis describes.


`axis: int = Field(primary_key=True)`


------------------------------------------------------------------------


#### keys


Indices of the atoms defining the coordinate (2, 3, or 4 for a distance,


`keys: list[int] | None = Field(default=None, sa_column=(Column(JSON)))`


angle, or dihedral).


------------------------------------------------------------------------


#### kind


Kind of coordinate; [OTHER](AxisKind.md#autostorage.AxisKind.OTHER) coordinates are not measured from the geometry.


`kind: AxisKind`


------------------------------------------------------------------------


#### label


Human-readable description (e.g. `"H-O-O-H torsion"`).


`label: str | None = None`


------------------------------------------------------------------------


#### trajectory


The described [TrajectoryRow](TrajectoryRow.md#autostorage.TrajectoryRow).


`trajectory: TrajectoryRow = Relationship(back_populates=``"axes")`


------------------------------------------------------------------------


#### trajectory_id


Foreign key to the [TrajectoryRow](TrajectoryRow.md#autostorage.TrajectoryRow) this axis describes.


`trajectory_id: uuid.UUID | None = _link_fk_field(``"trajectory.id")`


------------------------------------------------------------------------


#### units


Units of the values along this axis (a `pint` unit string); on flush, defaults


`units: str | None = None`


to Angstrom for distances, degrees for angles, and dimensionless otherwise.


## Methods

| Name | Description |
|----|----|
| [convert()](#convert) | Return [value](PropertyValueRow.md#autostorage.PropertyValueRow.value) in [units](PropertyKindRow.md#autostorage.PropertyKindRow.units); a value without units is assumed to be in them. |
| [measure()](#measure) | Measure this coordinate in `geo`, in [units](PropertyKindRow.md#autostorage.PropertyKindRow.units), or `None` for [OTHER](AxisKind.md#autostorage.AxisKind.OTHER) axes. |

------------------------------------------------------------------------


#### convert()


Return [value](PropertyValueRow.md#autostorage.PropertyValueRow.value) in [units](PropertyKindRow.md#autostorage.PropertyKindRow.units); a value without units is assumed to be in them.


Usage

``` python
convert(value)
```


##### Raises


`ValueError`  
If [value](PropertyValueRow.md#autostorage.PropertyValueRow.value) is a `pint.Quantity` with incompatible units.


------------------------------------------------------------------------


#### measure()


Measure this coordinate in `geo`, in [units](PropertyKindRow.md#autostorage.PropertyKindRow.units), or `None` for [OTHER](AxisKind.md#autostorage.AxisKind.OTHER) axes.


Usage

``` python
measure(geo)
```
