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.
File-backed velocity trajectories are parsed in double precision. The atom-order accumulation, vector norm and scaling reproduce the arithmetic order of the legacy equipartition.jl tool, including momentum residuals near the float64 noise floor.
For column definitions and units see total-momentum output.
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().