check_momentum
Command Line Tool for Checking the Total Linear Momentum
This command line tool can be used to calculate the norm of the total linear momentum P = sum_i m_i * v_i of (a selection of) atoms for every frame of a velocity trajectory. It can be used to check a simulation for center of mass drift.
For every frame one row containing the one-based frame index and the scaled momentum norm is written. With velocities in Angstrom/s (PQ velocity trajectories) the default scaling factor of 1e-15 converts the momentum norm from amu*Angstrom/s to amu*Angstrom/fs.
Note that the velocities are parsed from file in single precision, so reported norms below roughly 1e-7 * sum_i m_i * |v_i| * scale are parsing noise, not physical center of mass drift. The legacy equipartition.jl tool parses the velocities in double precision and therefore resolves correspondingly smaller drift for momentum-conserving trajectories.
Summary
Classes:
Command Line Tool for Checking the Total Linear Momentum |
Functions:
Main function of the check_momentum command line tool, which is basically just a wrapper for the check_momentum function. |
Reference
- class CheckMomentumCLI[source]
Bases:
CLIBaseCommand Line Tool for Checking the Total Linear Momentum
- classmethod add_arguments(
- parser: _ArgumentParser,
Adds the arguments to the parser.
- Parameters:
parser (_ArgumentParser) – The parser to which the arguments should be added.
- main()[source]
Main function of the check_momentum command line tool, which is basically just a wrapper for the check_momentum function. For more information on the check_momentum function please visit
PQAnalysis.analysis.momentum.api.check_momentum().