[ase-users] What is the command to write extended XYZ file?
James Kermode
james.kermode at gmail.com
Thu Dec 10 08:43:42 CET 2020
Hi Dong,
write_results=True is correct, but will only write forces and energies if (1) there is a calculator attached to the Atoms object and (2) forces and energies have already been computed. The following shows how to do this:
atoms = ... # build system
atoms.calc = ... # set a calculator
atoms.get_forces()
atoms.get_potential_energy()
atoms.write(“out.xyz”) # write_results=True is the default
Hope this helps,
James.
> On 10 Dec 2020, at 07:04, Dong gi Kang via ase-users <ase-users at listserv.fysik.dtu.dk> wrote:
>
>
> Hi ase users,
>
> I would like to generate extended xyz file which includes forces and energies.
>
> I have tried the two commands but they are not working (only collects atom positions and momenta, no forces and energies)
>
> ```
> from ase.io import write
> Write(write('./tmp/atoms_db.xyz', db) #
>
> Write(write('./tmp/atoms_db.xyz', db, write_results=True) # both are not including forces and energies
> ` ` `
>
> Many thanks in advance.
>
>
> _______________________________________________
> 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/20201210/49e5fdd3/attachment-0001.html>
More information about the ase-users
mailing list