I built a supercell of a molecular crystal and wish to write an .xyz file in ASE. How do I do that? The molecule has three different types of elements, C, H, and N.
I recommend using the underlying function
import ase.io from ase.build import bulk atoms = bulk('Ag') ase.io.write('ag.xyz', atoms)
Using the function is more general because one could write a series of geometries to one file by providing a list of Atoms objects
ase.io.write('ag.xyz', [atoms, atoms])