Time-dependent descriptors (mean squared displacement)
This module is relevant ot time-dependent descriptors of a simulation. At the current status, the only present function computes the Mean Squared Displacement (MSD) of atoms in the system along a simulation.
snow.descriptors.time_dependent
compute_MSD(movie, masks=None, step_by_step=False)
Computes the mean squared displacement (MSD) along a trajectory.
A mask can be used to select specific (groups of) atoms to contribute to the MSD. The calculation can be done relative to the initial positions or to the preceding timestep by appropriately setting the step_by_step flag.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
movie
|
list[ndarray]
|
list of coordinates of sequential frames of the system. Each list item should be a (n,3) np.ndarray coordinates array |
required |
masks
|
list[list[bool]]
|
list of lists of bools for whether to count for an atom or not in the calculation of the MSD. Default to all True. |
None
|
step_by_step
|
bool
|
If True, the MSD at each timestep is computed relative to the timestep before. If False, it is computed relative to the initial position. Default to False |
False
|
Returns:
| Name | Type | Description |
|---|---|---|
MSD |
ndarray
|
mean squared displacement along the trajectory |