gen_file_writer

A module containing the GenFileWriter class

Summary

Classes:

GenFileWriter

A class for writing gen files.

Reference

class GenFileWriter(
filename: str | None = None,
mode: FileWritingMode | str = 'w',
)[source]

Bases: BaseWriter

A class for writing gen files.

Parameters:
  • filename (str | None, optional) – The filename of the gen file. If None, the file is not opened, by default None.

  • mode (FileWritingMode | str, optional) – The writing mode, by default “w”. The following modes are available: - “w”: write - “a”: append - “o”: overwrite

write(
system: AtomicSystem,
periodic: bool | None = None,
) None[source]

Writes the system to the file.

Parameters:
  • system (AtomicSystem) – The system to write.

  • periodic (bool, optional) – The periodicity of the system. If True, the system is considered periodic. If False, the system is considered non-periodic. If None, the periodicity is inferred from the system, by default None.

Raises:

PQValueError – If the system is non-periodic and periodic is set to True.

logger = <CustomLogger PQAnalysis.GenFileWriter (INFO)>