momentum_output_file_writer
A module containing the writer for the data of a
Momentum analysis.
Summary
Classes:
Class for writing the data of a |
Reference
- class MomentumDataWriter(
- filename: str | None = None,
- mode: str | FileWritingMode = 'w',
Bases:
BaseWriterClass for writing the data of a
Momentumanalysis to a file.Each row contains the one-based frame index and the scaled norm of the total linear momentum of that frame, reproducing the legacy
equipartition.jloutput layout.- Parameters:
filename (str | None, optional) – The filename to write to. If None, the output is printed to stdout, by default None.
mode (str | FileWritingMode, optional) – The writing mode, by default “w”.
- write(
- data: Np1DNumberArray,
Writes the momentum norms to the file.
- Parameters:
data (Np1DNumberArray) – The scaled momentum norms as returned by the
run()method.