AtomicSystem.write#

AtomicSystem.write(path, **kwargs)#

Write the system to a file.

The format is chosen from the file extension, and **kwargs go straight to the matching writer, as from_file() does for readers. An argument the writer does not know raises a TypeError.

Parameters:
pathstr or Path

Path to the output file (supports .data, .lmp, .pdb).

**kwargs

Additional arguments passed to the specific writer:

  • For LAMMPS data files: atom_style (str, default "full"); oldstyle (bool, default False) to write numeric IDs instead of text labels, as VMD/topotools expect.

  • For PDB files: no additional argument.