quemb.molbe.scanner.Energy¶
- class quemb.molbe.scanner.Energy(mol, energy_func, displacement=0.0001)¶
PySCF-style wrapper for a custom molecular energy function.
This class provides a minimal interface around an arbitrary energy function
energy_func(mol). It is intended to be compatible with PySCF utilities that expect an object withmol,kernel(), andas_scanner()methods, such aspyscf.tools.finite_diff.This class supplies repeated single-point energies that can be used by finite difference gradient or Hessian drivers.
Attributes
- stdout = <_io.TextIOWrapper name='<stdout>' mode='w' encoding='utf-8'>¶
- verbose = 0¶
Methods
__init__(mol, energy_func[, displacement])Initialize the custom energy wrapper.
apply(fn, *args, **kwargs)Apply the fn to rest arguments: return
fn(*args, **kwargs).Return a PySCF-compatible energy scanner.
Check input of class/object attributes, check whether a class method is overwritten.
copy()Returns a shallow copy
kernel([mol, fd_info])Evaluate the energy for a molecule.
post_kernel(envs)A hook to be run after the main body of the kernel function.
pre_kernel(envs)A hook to be run before the main body of kernel function is executed.
reset()Clean up intermediates
run(*args, **kwargs)Call the kernel function of current object.
set(*args, **kwargs)Update the attributes of the current object.
view(cls)New view of object with the same attributes.