TrajectoryObserver¶
- class atomate2.forcefields.utils.TrajectoryObserver(atoms, store_md_outputs=False)[source]¶
Bases:
object
Trajectory observer.
This is a hook in the relaxation process that saves the intermediate structures.
- Parameters:
atoms (Atoms)
store_md_outputs (bool)
- compute_energy()[source]¶
Calculate the energy, here we just use the potential energy.
- Return type:
energy (float)
- save(filename, fmt='ase')[source]¶
Save the trajectory file using monty.serialization.
- Parameters:
(str) (filename)
filename (str | PathLike | None)
fmt (Literal['pmg', 'ase'])
- Return type:
None
- to_ase_trajectory(filename='atoms.traj')[source]¶
Convert to an ASE .Trajectory.
- Parameters:
filename (str | None) – Name of the file to write the ASE trajectory to. If None, no file is written.
- Return type:
TrajectoryReader