box_reader

A module containing the BoxReader class and its associated methods.

Summary

Classes:

BoxReader

A class for reading data-style box files.

Functions:

read_box

Reads a data-style box file.

Reference

class BoxReader(filename: str | list[str])[source]

Bases: BaseReader

A class for reading data-style box files.

Initializes the BaseReader with the given filename.

Parameters:

filename (str or list of str) – The name of the file to read from or a list of filenames to read from.

Raises:

FileNotFoundError – If the given file does not exist.

read() tuple[ndarray, ndarray, ndarray][source]

Reads a data-style box file.

Returns:

The steps, box lengths and box angles from the box file.

Return type:

tuple[np.ndarray, np.ndarray, np.ndarray]

logger = <CustomLogger PQAnalysis.BoxReader (INFO)>
read_box(
filename: str,
) tuple[ndarray, ndarray, ndarray][source]

Reads a data-style box file.

Parameters:

filename (str) – The box file to read.

Returns:

The steps, box lengths and box angles from the box file.

Return type:

tuple[np.ndarray, np.ndarray, np.ndarray]