Here is a more concise way of doing the same thing.
from ase.io import read
bec = read("bec_replaced.vasp").write("bec_replaced.xyz")
It is not needed to import ase and import the functions, you want to do one or the other (This is a python thing not ASE). read also returns an atoms object with a write function built in, so there is no need to import a write function. ASE will also assume the file format from the file extension, however you might need to use the format argument when it detects things incorrectly.
Optionally, use the command line instead
ase convert bec_replaced.vasp bec_replaced.xyz
bec_atoms = Atoms('Al8Ge16O64Si8')
as image, but it creates the xyz file without co-ordinates. Like, ` 96 Al 0.000000000000000 0.000000000000000 0.000000000000000 Al 0.000000000000000 0.000000000000000 0.000000000000000 Al 0.000000000000000 0.000000000000000 0.000000000000000 Al 0.000000000000000 0.000000000000000 0.000000000000000 Al 0.000000000000000 0.000000000000000 0.000000000000000 ....` $\endgroup$input
you were trying, and theoutput
it gave you. That would be the most appropriate way to ask this question. $\endgroup$