dtrj_trans_info

mdtools.run_time_info.dtrj_trans_info(dtrj)[source]

Generate basic information about the state transitions in a discrete trajectory.

Parameters:

dtrj (array_like) – The discrete trajectory. Array of shape (n, f), where n is the number of compounds and f is the number of frames. The elements of dtrj are interpreted as the indices of the states in which a given compound is at a given frame.

Returns:

  • n_stay (int) – Number of compounds that stay in the same state during the entire trajectory.

  • always_neg (int) – Number of compounds that are always in a negative state during the entire trajectory.

  • never_neg (int) – Number of compounds that are never in a negative state during the entire trajectory.

  • n_frames_neg (int) – Total number of frames with negative states (summed over all compounds).

  • n_trans (int) – Total number of state transitions (summed over all compounds).

  • pos2pos (int) – Total number of Positive -> Positive transitions, i.e. transitions from a state with a positive or zero state index to another state with a positive or zero state index (summed over all compounds).

  • pos2neg (int) – Number of Positive -> Negative transitions.

  • neg2pos (int) – Number of Negative -> Positive transitions.

  • neg2neg (int) – Number of Negative -> Negative transitions.

See also

mdtools.run_time_info.dtrj_trans_info_str()

Create a string containing basic information about the state transitions in a discrete trajectory

Note

Positive states are states with a state index equal(!) to or greater than zero. Negative states are states with a state index less than zero.

Examples

>>> dtrj = np.array([[ 1,  2,  2,  3,  3,  3],
...                  [-2, -2, -3, -3, -3, -1],
...                  [ 3,  3,  3,  1, -2, -2],
...                  [-1,  3,  3,  3, -2, -2],
...                  [ 6,  6,  6,  6,  6,  6]])
>>> mdt.rti.dtrj_trans_info(dtrj)
(1, 1, 2, 11, 8, 3, 2, 1, 2)
>>> mdt.rti.dtrj_trans_info(dtrj.T)
(0, 0, 0, 11, 20, 4, 7, 7, 2)