api

This module provides API functions for the velocity auto-correlation function (VACF) analysis.

Summary

Functions:

read_static_charges

Reads a legacy static charge file.

vacf

Calculates the velocity auto-correlation function (VACF) using a given input file.

Reference

read_static_charges(
filename: str,
md_format: MDEngineFormat | str = MDEngineFormat.PQ,
) Np1DNumberArray[source]

Reads a legacy static charge file.

The file consists of a header line with the number of atoms, one comment line and one “name charge” line per atom (legacy Fluxfreqcalc chrg_file format). For the QMCFC format the first entry is the dummy ‘X’ atom, which is stripped like in the velocity trajectory.

Parameters:
  • filename (str) – The static charge file to read.

  • md_format (MDEngineFormat | str, optional) – the format of the underlying trajectory. Default is “PQ”.

Returns:

The static atomic partial charges.

Return type:

Np1DNumberArray

Raises:

VACFError – If the file header or a charge line cannot be parsed, if the file provides fewer charges than the header announces or if the first atom of a QMCFC charge file is not the dummy ‘X’ atom.

vacf(
input_file: str,
md_format: MDEngineFormat | str = MDEngineFormat.PQ,
)[source]

Calculates the velocity auto-correlation function (VACF) using a given input file.

This is just a wrapper function combining the underlying classes and functions.

For more information on the input file keys please visit vacf_input_file_reader. For more information on the exact calculation of the VACF please visit VACF and for the spectrum vacf_spectrum().

Parameters:
  • input_file (str) – The input file. For more information on the input file keys please visit vacf_input_file_reader.

  • md_format (MDEngineFormat | str, optional) – the format of the input trajectory. Default is “PQ”. For more information on the supported formats please visit MDEngineFormat.