RgpotPot (direct in-process rgpot)¶
Added in version 2.16.0.
When eOn is built with -Dwith_rgpot=true, potential type RGPOT links
rgpot NWChemPot / CPMDPot and loads
libnwchemc.so / libcpmdc.so with dlopen in the eOn process.
Sibling roles live elsewhere: potserv Cap’n Proto clients, eonclient --serve
(Serve mode), and SocketNWChem (i-PI to a standalone
NWChem binary). Overview: rgpot integration.
Build¶
meson setup bbdir-rgpot -Dwith_rgpot=true -Dwith_tests=true
meson compile -C bbdir-rgpot
Requires Cap’n Proto headers and libs (method params are Cap’n Proto messages
passed into the C ABI) and the rgpot Meson subproject
(subprojects/rgpot.wrap). The build pulls nwchempot_dep / cpmdpot_dep.
Serve mode uses ptlrpc_dep under -Dwith_serve.
Engines are resolved at runtime:
NWCHEMC_LIBRARYorRGPOT_NWCHEMC_ENGINE(NWChem embed library), or[RgpotPot] engine_path/engine_libraryin the config.
enginePath in the Cap’n Proto blob is stripped before the ABI call (host-only
locator); see rgpot NWChemPot.
Config¶
[Main]
job = point
[Potential]
potential = RGPOT
[RgpotPot]
backend = nwchemc
basis = sto-3g
theory = scf
scf_type = rhf
charge = 0
multiplicity = 1
# engine_path = /path/to/libnwchemc.so
For CPMD:
[RgpotPot]
backend = cpmdc
functional = BLYP
cutoff_ry = 70.0
For Metatomic (dlopen engine; no fat metatomic/torch link into eOn):
[Potential]
potential = RGPOT
[RgpotPot]
backend = metatomic
model_path = /path/to/model.pt
device = cpu
# engine_path = /path/to/libmetatomic_engine.so
# or: export RGPOT_METATOMIC_ENGINE=...
For xTB (preferred packaging path; leaves -Dwith_xtb=false):
[Potential]
potential = RGPOT
[RgpotPot]
backend = xtb
paramset = GFN2xTB
accuracy = 1.0
# engine_path = /path/to/libxtb_engine.so
# or: export RGPOT_XTB_ENGINE=...
Optional input_block (or env RGPOT_NWCHEM_INPUT_BLOCK) supplies NWChem
inputBlocks (e.g. explicit dft / xc stanzas). When theory=dft and
scf_type looks like an XC label (e.g. b3lyp), a minimal DFT block is
emitted automatically.
Installed rgpot ≥ 2.5.0 is preferred via pkg-config (dependency('rgpot'));
the Meson wrap is the fallback for hermetic/dev builds.
vs SocketNWChem¶
SocketNWChem |
RGPOT (this pot) |
|
|---|---|---|
Protocol |
i-PI socket; eOn listens |
In-process |
Engine process |
External NWChem |
|
Multi-call SCF |
Warm NWChem across POSDATA |
nwchemc warm params cache (skip full RTDB reset when method blob unchanged) |
Implementation notes¶
RgpotPot(eOnPotential) owns an opaqueRGPotEngineTU that includes only rgpot headers — avoids Cap’n Proto type namePotentialcolliding with eOn’sPotentialclass.Forces and energies use eOn units (eV, eV/Å) after rgpot conversion from Hartree / Hartree·bohr⁻¹.