pele.utils.xyz.write_xyz#
- pele.utils.xyz.write_xyz(fout, coords, title='', atomtypes=('A',))[source]#
write a xyz file from file handle
Writes coordinates in xyz format. It uses atomtypes as names. The list is cycled if it contains less entries than there are coordinates,
One can also directly write xyz data which was generated with read_xyz.
>>> xx = read_xyz("in.xyz") >>> write_xyz(open("out.xyz", "w"), *xx)
- Parameters:
- foutan open file
- coordsnp.array
array of coordinates
- titletitle section, optional
title for xyz file
- atomtypesiteratable
list of atomtypes.
See also