api

A module containing different functions to read and write .gen files.

Summary

Functions:

read_gen_file

Function to read a gen file.

write_gen_file

Function to write a gen file.

Reference

read_gen_file(
filename: str,
) AtomicSystem[source]

Function to read a gen file.

Parameters:

filename (str) – The filename of the gen file.

Returns:

The AtomicSystem including the Cell object.

Return type:

AtomicSystem

write_gen_file(
system: AtomicSystem,
filename: str | None = None,
periodic: bool | None = None,
mode: FileWritingMode | str = 'w',
) None[source]

Function to write a gen file.

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

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

  • 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.

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