chemparseplot.parse.eon.gprd

Module Contents

Classes

HDF5CalculatorDimerMidpoint

ASE calculator reading energy/forces from an HDF5 dimer midpoint group.

HDF5Calculator

ASE calculator reading energy/forces from an HDF5 group.

Functions

get_atoms_from_hdf5

Create an ASE Atoms object from a template and HDF5 group.

create_geom_traj_from_hdf5

Creates an ASE trajectory file from an HDF5 file containing optimization data. This only outputs the geometry steps after the initial rotations.

create_nwchem_trajectory

Create an ASE trajectory with NWChem energies and forces.

create_full_traj_from_hdf5

Create an ASE trajectory from an HDF5 optimization file.

Data

log

_DOUBLET_MULT

API

chemparseplot.parse.eon.gprd.log

‘getLogger(…)’

chemparseplot.parse.eon.gprd._DOUBLET_MULT

2

class chemparseplot.parse.eon.gprd.HDF5CalculatorDimerMidpoint(from_hdf5, natms, **kwargs)

Bases: ase.calculators.calculator.Calculator

ASE calculator reading energy/forces from an HDF5 dimer midpoint group.

Added in version 0.0.3.

Initialization

implemented_properties: ClassVar[list[str]]

[‘energy’, ‘forces’]

calculate(atoms=None, properties=None, system_changes=all_changes)
class chemparseplot.parse.eon.gprd.HDF5Calculator(from_hdf5, **kwargs)

Bases: ase.calculators.calculator.Calculator

ASE calculator reading energy/forces from an HDF5 group.

Added in version 0.0.3.

Initialization

implemented_properties: ClassVar[list[str]]

[‘energy’, ‘forces’]

calculate(atoms=None, properties=None, system_changes=all_changes)
chemparseplot.parse.eon.gprd.get_atoms_from_hdf5(template_atoms: ase.Atoms, hdf5_group: h5py.Group) ase.Atoms

Create an ASE Atoms object from a template and HDF5 group.

Contains optimization data.

Added in version 0.0.3.

Args: template_atoms (ase.Atoms): The template ASE Atoms object (initial structure). hdf5_group (h5py.Group): The HDF5 group containing ‘energy’, ‘gradients’, and ‘positions’ datasets.

Returns: ase.Atoms: An ASE Atoms object with positions, energy, and forces from the HDF5 group.

chemparseplot.parse.eon.gprd.create_geom_traj_from_hdf5(hdf5_file: str, output_traj_file: str, initial_structure_file: str, outer_loop_group_name: str = 'outer_loop')

Creates an ASE trajectory file from an HDF5 file containing optimization data. This only outputs the geometry steps after the initial rotations.

Added in version 0.0.3.

Generally this is what you want to see for checking the change in geometry along the run. There are initial rotations and 2 additional calls (one in the beginning and one at the end) which are not accounted for here.

Args: hdf5_file (str): Path to the HDF5 file. output_traj_file (str): Path to the output trajectory file (e.g., ‘gprd_run.traj’). initial_structure_file (str): Path to the file containing the initial structure (e.g., ‘pos.con’). outer_loop_group_name (str, optional): Name of the group containing outer loop data. Defaults to “outer_loop”.

chemparseplot.parse.eon.gprd.create_nwchem_trajectory(template_atoms: ase.Atoms, hdf5_file: str, output_traj_file: str, mult=1, outer_loop_group_name: str = 'outer_loop')

Create an ASE trajectory with NWChem energies and forces.

Positions are taken from an HDF5 file.

Added in version 0.0.3.

Args: template_atoms (ase.Atoms): The template ASE Atoms object (initial structure). hdf5_file (str): Path to the HDF5 file containing positions. output_traj_file (str): Path to the output trajectory file (e.g., ‘nwchem_run.traj’). outer_loop_group_name (str, optional): Name of the group containing outer loop data. Defaults to “outer_loop”.

chemparseplot.parse.eon.gprd.create_full_traj_from_hdf5(hdf5_file: str, output_traj_file: str, initial_structure_file: str, outer_loop_group_name: str = 'outer_loop', inner_loop_group_name: str = 'initial_rotations')

Create an ASE trajectory from an HDF5 optimization file.

Includes estimated points for the initial rotations and the endpoints.

Added in version 0.0.3.

These are correct (correspond to the actual counts) but is slightly convoluted, since the HDF5 contains both the midpoint and the “forward dimer”. Instead, the length of the inner rotations keys is the number of (0 energy) points added to the trajectory. This again makes intuitive sense, since we have the Elvl cutoff in the GPRD as well.

Args: hdf5_file (str): Path to the HDF5 file. output_traj_file (str): Path to the output trajectory file (e.g., ‘gprd_run.traj’). initial_structure_file (str): Path to the file containing the initial structure (e.g., ‘pos.con’). outer_loop_group_name (str, optional): Name of the group containing outer loop data. Defaults to “outer_loop”.