“The Atomic Simulation Environment (ASE) is a set of tools and Python modules for setting up, manipulating, running, visualizing and analyzing atomistic simulations.
The PLAMS interface to ASE is limited to handling
It features access to the
ase.io module for reading/writing
Molecule objects and two functions that translate PLAMS
Molecule objects into ASE
Atoms objects and vice versa.
Please refer to the ASE documentation to see what can be done with ASE
Atoms and its I/O module.
Convert a PLAMS
Moleculeto an ASE molecule (
ase.Atomsinstance). Translate coordinates, atomic numbers, and lattice vectors (if present). The order of atoms is preserved.
Convert an ASE molecule to a PLAMS
Molecule. Translate coordinates, atomic numbers, and lattice vectors (if present). The order of atoms is preserved.
Settingsinstance through the
propertiesoption to inherit them to the returned molecule.
Additional reader and writer for
Read Molecule using ASE engine
readfunction of the
Moleculeclass passes a file descriptor into here, so in this case you must specify the format to be read by ASE:
mol = Molecule('file.cif', inputformat='ase', format='cif')
The ASE Atoms object then gets converted to a PLAMS Molecule and returned. All other options are passed to
ASE.io.read(). See https://wiki.fysik.dtu.dk/ase/ase/io/io.html on how to use it.
The nomenclature of PLAMS and ASE is incompatible for reading multiple geometries, make sure that you only read single geometries with ASE! Reading multiple geometries is not supported, each geometry needs to be read individually.
Write molecular coordinates using ASE engine.
writefunction of the
Moleculeclass passes a file descriptor into here, so in this case you must specify the format to be written by ASE. All other options are passed to
ASE.io.write(). See https://wiki.fysik.dtu.dk/ase/ase/io/io.html on how to use it.
These two write the same content to the respective files:
molecule.write('filename.anyextension', outputformat='ase', format='gen') molecule.writease('filename.anyextension', format='gen')