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 :

fout : an open file

coords : np.array

array of coordinates

title : title section, optional

title for xyz file

atomtypes : iteratable

list of atomtypes.

See also

read_xyz

Previous topic

pele.utils.xyz.read_xyz

Next topic

Angle Axis Systems (pele.angleaxis)