block_averaging
- mdtools.check.block_averaging(n_blocks, n_frames, check_CPUs=False, verbose=True)[source]
Check if the number of blocks for block averaging is chosen properly.
The number of blocks must be greater than zero, but less than the number of available frames.
- Parameters:
n_blocks (
int
) – Number of blocks for block averaging.n_frames (
int
) – The number of frames available for analysis, i.e. the number of frames that are/were actually read, not the total number of frames in the trajectory.check_CPUs (
bool
, optional) – IfTrue
, check if the number of available CPUs is a multiple of the number of blocks (or the other way round). If this is not the case, a warning is raised.verbose (
bool
, optional) – IfTrue
(default), any changes to n_blocks are printed to standard output.
- Returns:
- Warns:
RuntimeWarning – If check_CPUs is
True
and the number of available CPUs is not an integer multiple of n_blocks (or the other way round).
See also
mdtools.check.frame_slicing()
Check if the input parameters are suitable for slicing MDAnalysis trajectories
mdtools.check.frame_lag()
Check if a frame lag (‘lag time’) is chosen properly
mdtools.check.time_step()
Check whether all frames in a MDAnalysis trajectory have the same
time step