[ase-users] From CIF files to XYZ
Oscar Xavier Guerrero
oscarxavier.ox at gmail.com
Fri Dec 8 19:36:10 CET 2017
Hello,
When you read the structure an Atoms object is created. You need to store
that object on a variable and then you can write that one. As so:
First read the data:
*from* ase.io *import* read, write
atoms = read('filename.cif')
Then write:
write('filename.xyz', atoms)
or you can use:
atoms.write('filename.xyz')
2017-12-08 12:19 GMT+00:00 Landi, Alessandro via ase-users <
ase-users at listserv.fysik.dtu.dk>:
> Hello everyone.
>
>
> I am using ASE to read some CIF files and (among other things) to convert
> the structure in xyz format.
>
>
> However using the following commands:
>
>
> ase.io.read('filename.cif', atoms_ase)
> ase.io.write('filename.xyz', atoms_ase)
>
> I obtain a wrong structure, since the molecules need to be reconnected.
> This happens for all the molecules I have tested (about 20).
>
> Could you please explain me what I am doing wrong?
>
> If could be of any help, I attached an example:
> "pentacene.cif" is the cif file that I give as input to ASE;
> "pentacene.xyz" is the xyz file written by ASE;
> "realstructure.xyz" is the structure of the reconnected molecules
> (obtained using CCDC Mercury)
>
> Best regards,
> Alessandro
>
>
>
> _______________________________________________
> ase-users mailing list
> ase-users at listserv.fysik.dtu.dk
> https://listserv.fysik.dtu.dk/mailman/listinfo/ase-users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listserv.fysik.dtu.dk/pipermail/ase-users/attachments/20171208/10d2f14b/attachment-0001.html>
More information about the ase-users
mailing list