- matlantis_features.features.md.post_features.diffusion.get_msd(positions_array: ndarray, masses: ndarray, element_indices: OrderedDict, com_indices: Optional[List[List[int]]] = None, direction: Optional[ndarray] = None, method: str = ‘normal’) Tuple[ndarray, Optional[ndarray]] #
-
Calculate the mean squared displacement.
- Parameters
-
-
positions_array (np.ndarray) – The atomic position of each atom in each step.
-
masses (np.ndarray) – The atomic number of each atom.
-
element_indices (OrderedDict) – The indices of atoms of each element.
-
com_indices (Optional[List[List[int]]], optional) – The indices of atoms who form a molecule. If it is used, the diffusion coefficient
of the center of mass of molecules will be calculated. Defaults to None. -
direction (Optional[np.ndarray], optional) – Calculate the diffusion coefficient along specific directions. It must be a nx3 array
where n is number of directions. If None, only the diffusion coefficient along
x, y and z directions is calculated. Defaults to None -
method (str, optional) – The method to calculate mean square displacement (MSD). Now, two methods, i.e.
“normal” and “segment”, are supported. Defaults to “normal”.
-
- Returns
-
the mean square displacement of each atom, the mean square
displacement of each molecule. - Return type
-
tuple[np.ndarray, np.ndarray or None]
Resource Library
matlantis_features.features.md.post_features.diffusion.get_msd