Energies and Derivative Properties
CIDER models participate in a self-consistent calculation through their energy density and functional derivatives. Property support depends on the feature family, backend, and any additive correction.
Property |
Molecular PySCF NLDF |
Molecular PySCF SDMX |
GPAW NLDF with PAW |
|---|---|---|---|
Total energy |
Supported |
Supported |
Supported |
Self-consistent potential |
Supported |
Supported |
Supported |
Nuclear forces/gradients |
Supported, subject to the restrictions below |
Not supported |
Supported |
Cell stress |
Not applicable |
Not applicable |
Supported |
Hessians and response properties |
Not implemented by the CIDER decorator |
Not implemented |
Outside the documented interface |
Molecular gradients
For an NLDF CIDER calculation, obtain a PySCF gradient object from the converged mean-field object:
1#!/usr/bin/env python
2"""Evaluate a molecular CIDER26XC energy and analytical gradient."""
3
4from pyscf import dft, gto
5
6from ciderpress.pyscf.dft import make_cider_calc
7
8
9def main():
10 mol = gto.M(
11 atom="""
12 O 0.000000 0.000000 0.117790
13 H 0.000000 0.755453 -0.471161
14 H 0.000000 -0.755453 -0.471161
15 """,
16 basis="def2-svp",
17 charge=0,
18 spin=0,
19 )
20
21 base = dft.RKS(mol)
22 base.grids.level = 3
23 mf = make_cider_calc(base, "CIDER26XCCHEM")
24 mf = mf.density_fit(auxbasis="def2-universal-jfit")
25 mf.conv_tol = 1e-10
26 mf.max_cycle = 200
27 energy = mf.kernel()
28 if not mf.converged:
29 raise RuntimeError("CIDER SCF did not converge")
30
31 gradient = mf.nuc_grad_method().set(grid_response=True).kernel()
32 print(f"total energy = {energy:.12f} Ha")
33 print("gradient (Ha/Bohr):")
34 print(gradient)
35
36
37if __name__ == "__main__":
38 main()
Use grid_response=True to include the response of the atom-centered
integration grid.
CIDER26XCCHEMD4 adds D4 to the final energy. Its
nuc_grad_method() result includes the electronic CIDER derivative, the
nuclear-repulsion derivative, and the analytical D4 derivative. Atom subsets
selected through atmlst are applied consistently to all three terms.
Periodic forces and stress
With classic GPAW and PAW setups, use the standard ASE calls after the CIDER SCF has converged:
1#!/usr/bin/env python
2"""Evaluate forces and stress from a converged CIDER GPAW checkpoint."""
3
4from ase.parallel import parprint
5
6from ciderpress.gpaw.calculator import CiderGPAW, get_cider_functional
7
8
9def main():
10 xc = get_cider_functional(
11 "CIDER26XCSURFSCI",
12 xmix=1.0,
13 xkernel=None,
14 ckernel=None,
15 pasdw_store_funcs=False,
16 )
17 calc = CiderGPAW(
18 restart="si_cider.gpw",
19 xc=xc,
20 parallel={"augment_grids": True},
21 txt="si_cider_properties.txt",
22 )
23 atoms = calc.get_atoms()
24 atoms.calc = calc
25
26 forces = atoms.get_forces()
27 stress = atoms.get_stress(voigt=False)
28 parprint("forces (eV/Angstrom):")
29 parprint(forces)
30 parprint("stress (eV/Angstrom^3):")
31 parprint(stress)
32
33
34if __name__ == "__main__":
35 main()
The analytical contribution includes the FFT feature response and PAW/PASDW terms.
Energy composition
The selected model determines how CIDER enters the total energy:
CIDER23X and CIDER24X use the explicit surrogate-hybrid composition given by
xmix,xkernel, andckernel.CIDER26XC contains the complete exchange-correlation model and uses the full-XC initialization shown in Choosing a CIDER Functional.
CIDER26XCCHEMD4adds its expected D4 contribution once through thee_vdw_deltaaccounting described in Molecular Calculations with PySCF.