gpridge.integrations.ase_oracle

ASE atoms and calculators as a GPRidge oracle.

ASE positions are Angstrom, get_potential_energy is eV, and get_forces is eV/Angstrom. A FixAtoms constraint freezes every Cartesian component of the listed atoms. Any other constraint is rejected, because a partial freeze is not a GPRidge frozen atom.

The template is copied on each evaluation. The caller’s atoms object keeps the positions it had.

Classes

ASEOracle

Evaluate an existing calculator on copies of an atoms template.

Functions

fixed_mask_from_constraints(→ numpy.ndarray)

Read a full-atom freeze from FixAtoms constraints.

Module Contents

gpridge.integrations.ase_oracle.fixed_mask_from_constraints(constraints, n_atoms: int) → numpy.ndarray

Read a full-atom freeze from FixAtoms constraints.

class gpridge.integrations.ase_oracle.ASEOracle(template, calculator, **kwargs)

Bases: gpridge.integrations.oracle.Oracle

Evaluate an existing calculator on copies of an atoms template.

classmethod from_calculator(atoms, calculator) → ASEOracle

Bind calculator to the geometry currently stored on atoms.