InteractionView

class narupatools.frame.hdf5.trajectory.InteractionView(source: narupatools.frame.hdf5.trajectory.HDF5Trajectory, interaction: tables.group.Group)

View of a specific interaction of a HDF5 trajectory.

Inheritance

Inheritance diagram of InteractionView

Methods

__init__

Initialize self.

calculate_cumulative_work

Calculate the cumulative work applied by this interaction for each frame.

calculate_per_particle_work

Calculate the work done by the interaction on each affected particle.

calculate_power

Calculate the average power put in by this interaction.

calculate_work

Calculate the work done by an interaction, in kilojoules per mole.

__init__(source: narupatools.frame.hdf5.trajectory.HDF5Trajectory, interaction: tables.group.Group)

Initialize self. See help(type(self)) for accurate signature.

calculate_cumulative_work()numpy.ndarray[Any, numpy.dtype[numpy.float64]]

Calculate the cumulative work applied by this interaction for each frame.

The size of this array is the same size as the number of frames this interaction was involved in.

The work returned is in kilojoules per mole.

calculate_per_particle_work()numpy.ndarray[Any, numpy.dtype[numpy.float64]]

Calculate the work done by the interaction on each affected particle.

The work is in kilojoules per mole.

calculate_power()float

Calculate the average power put in by this interaction.

The power is in kilojoules per mole per picosecond.

calculate_work()float

Calculate the work done by an interaction, in kilojoules per mole.

The work \(W\) is given by:

\[W = \sum_i \int_{t_0}^{t_1} F_i(t) \cdot d x_i(t)\]

where the sum over \(i\) is over the particles affected by the interaction. In the case of a discretized trajectory, the trapezoidal rule for evaluating integrals is used:

\[W = \sum_i \sum_{n=n_0}^{n_1} \frac{1}{2} (F_i(t + n \delta t) + F_i(t + (n+1) \delta t) \cdot (x_i(t + (n+1) \delta t) - x_i (t + n \delta t))\]

where now the second sum is over adjacent timesteps.

Attributes

duration

Duration of the interaction in picoseconds.

end_frame_index

Index of the end frame.

end_time

End time of the interaction in picoseconds.

forces

Forces on the particles affected by the interaction.

frame_indices

Indices of the frames affected by the interaction.

frame_range

Range of frame indices covered by this interaction.

indices

Indices of the particles affected by the interaction.

interaction_positions

Position of the interaction at each frame affected by it, in nanometers.

interaction_scales

Scale of the interaction at each frame affected by it.

potential_energies

Potential energies of the interaction at each frame.

start_frame_index

Index of the start frame.

start_time

Start time of the interaction in picoseconds.

type

Type of the interaction.

duration

Duration of the interaction in picoseconds.

end_frame_index

Index of the end frame.

end_time

End time of the interaction in picoseconds.

forces

Forces on the particles affected by the interaction.

The forces are in kilojoules per mole per nanometer.

frame_indices

Indices of the frames affected by the interaction.

frame_range

Range of frame indices covered by this interaction.

indices

Indices of the particles affected by the interaction.

interaction_positions

Position of the interaction at each frame affected by it, in nanometers.

interaction_scales

Scale of the interaction at each frame affected by it.

potential_energies

Potential energies of the interaction at each frame.

The energies are in kilojoules per mole.

start_frame_index

Index of the start frame.

start_time

Start time of the interaction in picoseconds.

type

Type of the interaction.