def write(self, filename):
    '\n        Write xyz formatted trajectory file.\n\n        Parameters\n        ----------\n        filename : str\n            Trajectory file name (formats: xyz).\n\n        Returns\n        -------\n        None\n            Writes molecule information to given file name.\n\n        '
    with open(filename, 'w') as traj_file:
        if hasattr(self, 'headers'):
            write_xyz_traj(traj_file, self.atoms, self.coordinates, headers=self.headers)
        else:
            write_xyz_traj(traj_file, self.atoms, self.coordinates)
Write xyz formatted trajectory file.

Parameters
----------
filename : str
    Trajectory file name (formats: xyz).

Returns
-------
None
    Writes molecule information to given file name.
def write(self, filename):
    '\n        Write xyz formatted trajectory file.\n\n        Parameters\n        ----------\n        filename : str\n            Trajectory file name (formats: xyz).\n\n        Returns\n        -------\n        None\n            Writes molecule information to given file name.\n\n        '
    with open(filename, 'w') as traj_file:
        if hasattr(self, 'headers'):
            write_xyz_traj(traj_file, self.atoms, self.coordinates, headers=self.headers)
        else:
            write_xyz_traj(traj_file, self.atoms, self.coordinates)