vacf_output_file_writer

A module containing the classes for writing related to an VACF analysis to a file.

Summary

Classes:

VACFDataWriter

Class for writing the data of an VACF analysis to a file.

VACFLogWriter

Class for writing the log (setup parameters) of an VACF analysis to a file.

VACFSpectrumDataWriter

Class for writing the spectrum of an VACF analysis to a file.

VACFWindowedDataWriter

Class for writing the windowed (apodized) correlation function of an VACF analysis to a file.

Reference

class VACFDataWriter(
filename: str,
export_files: Sequence[str] | None = None,
)[source]

Bases: AnalysisDataWriter

Class for writing the data of an VACF analysis to a file.

The output file is written in the legacy FreqCalc/Fluxfreqcalc format: one row per lag with the columns lag time in ps and normalized VACF.

Parameters:
  • filename (str) – The primary output filename. Its extension selects the format.

  • export_files (Sequence[str] | None, optional) – Additional output filenames, by default None.

write(
data: tuple[Np1DNumberArray, Np1DNumberArray],
)[source]

Writes the data to the file.

Parameters:

data (Tuple[Np1DNumberArray, Np1DNumberArray]) – the time axis and correlation function output from the VACF.run() method

header = '# PQAnalysis: Normalized correlation function\n# FIELDS time normalized_correlation\n# SYMBOLS t C(t)∕C(0)\n# UNITS ps 1'
schema: AnalysisSchema = AnalysisSchema(title='Normalized correlation function', columns=(AnalysisColumn(field='time', symbol='t', unit='ps'), AnalysisColumn(field='normalized_correlation', symbol='C(t)∕C(0)', unit='1')), plot=AnalysisPlotPreset(x_field='time', y_fields=('normalized_correlation',), x_label='t [ps]', y_label='C(t) / C(0)', legends=('C(t) / C(0)',)))
class VACFLogWriter(filename: str | None)[source]

Bases: BaseWriter

Class for writing the log (setup parameters) of an VACF analysis to a file.

Parameters:

filename (str | None) – the filename to write to if None, the output is printed to stdout

write_after_run(
vacf: VACF,
)[source]

Writes the log after the VACF run() method is called.

This includes the number of time origins and the elapsed time of the VACF run() method.

Parameters:

vacf (VACF) – the VACF analysis object

write_before_run(
vacf: VACF,
)[source]

Writes the log before the VACF run() method is called.

This includes the general header of PQAnalysis and the most important setup parameters of the VACF analysis.

Parameters:

vacf (VACF) – the VACF analysis object

class VACFSpectrumDataWriter(
filename: str,
export_files: Sequence[str] | None = None,
)[source]

Bases: AnalysisDataWriter

Class for writing the spectrum of an VACF analysis to a file.

The output file is written in the legacy ft.f format: one row per frequency index with the columns wavenumber in cm^-1 and amplitude.

Parameters:
  • filename (str) – The primary output filename. Its extension selects the format.

  • export_files (Sequence[str] | None, optional) – Additional output filenames, by default None.

write(
data: tuple[Np1DNumberArray, Np1DNumberArray],
)[source]

Writes the spectrum to the file.

Parameters:

data (Tuple[Np1DNumberArray, Np1DNumberArray]) – the wavenumbers and amplitudes output from the vacf_spectrum() function

header = '# PQAnalysis: VACF spectrum\n# FIELDS wavenumber amplitude\n# SYMBOLS ν̃ |Ĉ(ν̃)|\n# UNITS cm⁻¹ arbitrary'
schema: AnalysisSchema = AnalysisSchema(title='VACF spectrum', columns=(AnalysisColumn(field='wavenumber', symbol='ν̃', unit='cm⁻¹'), AnalysisColumn(field='amplitude', symbol='|Ĉ(ν̃)|', unit='arbitrary')), plot=AnalysisPlotPreset(x_field='wavenumber', y_fields=('amplitude',), x_label='Wavenumber [cm\\S-1\\N]', y_label='Amplitude [a.u.]', legends=('Amplitude',)))
class VACFWindowedDataWriter(
filename: str,
export_files: Sequence[str] | None = None,
)[source]

Bases: AnalysisDataWriter

Class for writing the windowed (apodized) correlation function of an VACF analysis to a file.

The output file is written in the legacy ft.f windowfile format: one row per lag with the columns lag time in ps and windowed correlation function.

Parameters:
  • filename (str) – The primary output filename. Its extension selects the format.

  • export_files (Sequence[str] | None, optional) – Additional output filenames, by default None.

write(
data: tuple[Np1DNumberArray, Np1DNumberArray],
)[source]

Writes the windowed correlation function to the file.

Parameters:

data (Tuple[Np1DNumberArray, Np1DNumberArray]) – the time axis and the windowed correlation function output from the vacf_spectrum() function

header = '# PQAnalysis: Windowed correlation function\n# FIELDS time windowed_correlation\n# SYMBOLS t C(t)w(t)\n# UNITS ps 1'
schema: AnalysisSchema = AnalysisSchema(title='Windowed correlation function', columns=(AnalysisColumn(field='time', symbol='t', unit='ps'), AnalysisColumn(field='windowed_correlation', symbol='C(t)w(t)', unit='1')), plot=AnalysisPlotPreset(x_field='time', y_fields=('windowed_correlation',), x_label='t [ps]', y_label='C(t)w(t)', legends=('Windowed correlation',)))