namespace rgpot

Overview

Prefix-parameterized loader for the minimum potential ABI profile. More…

namespace rgpot {
 
// namespaces
 
namespace rgpot::abi;
namespace rgpot::aoti_execstack;
namespace rgpot::cache;
namespace rgpot::details;
namespace rgpot::fortranpots;
namespace rgpot::nlist;
namespace rgpot::types;
    namespace rgpot::types::adapt;
        namespace rgpot::types::adapt::capnp;
        namespace rgpot::types::adapt::eigen;
        namespace rgpot::types::adapt::xtensor;
namespace rgpot::units;
namespace rgpot::vesin_compat;
 
// enums
 
enum D3Damping;
enum GFNMethod;
enum Reentrancy;
enum TBLiteMethod;
enum TorchDeterminismPolicy;
 
// structs
 
struct D3Config;
struct D4Config;
struct Fnv1a;
struct ForceBatch;
struct ForceInput;
struct ForceOut;
struct LJClusterConfig;
struct LJConfig;
struct MetatomicConfig;
struct MorseConfig;
struct PotCaps;
struct SkalaConfig;
struct TBLiteConfig;
struct UmaConfig;
struct XTBConfig;
struct XTBDlopenConfig;
struct XcFields;
struct XcGrid;
struct XcMo;
struct ZBLConfig;
struct ZblPairCoeffs;
struct ZblTables;
 
// classes
 
class CPMDPot;
class CalcResult;
class D3Pot;
class D4Pot;
class DynLib;
class Error;
class ExprPot;
class InputSpec;
class LJClusterPot;
class LJPot;
class MOPACPot;
class MetatomicDlopen;
class MetatomicPot;
class MorsePot;
class NWChemPot;
class PotentialBase;
class PotentialHandle;
class RpcClient;
class SkalaPot;
class TBLitePot;
class UmaPot;
class XTBDlopen;
class XTBPot;
class XcKernel;
class ZBLPot;
 
template <typename T>
class registry;
 
// global variables
 
std::atomic<size_t> registry< T >::count {0};
std::atomic<size_t> registry< T >::forceCalls {0};
T* registry< T >::head = nullptr;
double KB_HARTREE;
double ANGSTROM_TO_BOHR;
double HARTREE_TO_EV;
double NEG_GRAD_TO_FORCE;
 
// global functions
 
void apply_torch_determinism_policy(TorchDeterminismPolicy policy);
EngineBundle& probe_engine_bundle();
void zeroForceOut(const size_t& nAtoms, ForceOut* efvd);
void checkParams(const ForceInput& params);
 
} // namespace rgpot

Detailed Documentation

Prefix-parameterized loader for the minimum potential ABI profile.

Header file for the screened nuclear repulsion (ZBL) potential.

Implementation of the ZBL potential methods.

Definition of the native AtomMatrix class.

Conversion utilities between xtensor and native types.

Conversion utilities between Eigen and native types.

Conversion utilities between Cap’n Proto and native types.

Utility templates and functions for potential management.

Implementation of utility functions for potential management.

Base classes and templates for chemical potentials.

Capability descriptors for potential implementations.

Field-by-field FNV-1a hashing for potential parameter sets.

NWChem potential under rgpot PotentialConfig user parameters.

Portable dynamic library loader (dlopen / LoadLibrary family).

Header file for the Morse potential class.

Implementation of the Morse potential methods.

OpenMOPAC frontend. Pure consumer of libmopacc.so.

Header file for the Lennard-Jones potential class.

Header file for the free-boundary Lennard-Jones cluster potential.

Implementation of the free-boundary Lennard-Jones cluster potential.

C++ faces for the Fortran 2018 potential kernels.

POD structures for force and energy calculation interfaces.

Named-child PES algebra compiled with OpenMM Lepton.

CPMD potential under rgpot PotentialConfig user parameters.

Backends (nwchemc, cpmdc, future lammpsc/gromacsc) export the same C symbol set prefix-parameterized on <p> (see potentials-schema PROFILE.md). This loader resolves that whole set from one dlopen’d shared library, so rgpot drives every conforming backend through identical function pointers with no per-backend loader code. Everything stays native: flat binary Cap’n Proto messages both directions, plain C calls in-process.

ExprPot is a Potential. Terms are unique_ptr<PotentialBase> only.

Defines the core data exchange structures used between the high-level potential wrappers and the low-level physics engines.

Each kernel exposes one bind(c) entry taking flat buffers and returning a status. Those entries stay inside librgpot: forceImpl is defined out of line, and the archive holding the Fortran objects is linked with --exclude-libs, so no Fortran symbol reaches the dynamic table and consumers reach the kernels only through these classes.

All of them report Reentrancy::ProcessSerial : the kernels carry no saved physics state, but each keeps one neighbour table in module storage so vesin can reuse its buffers across calls, and that table is process-global. Handing the table to the caller as an opaque handle would lift them to SharedInstance.

Ported from eOn (https://github.com/TheochemUI/eOn, client/potentials/LJCluster), BSD-3-Clause licensed, copyright the eOn Development Team.

This file defines the LJClusterPot class, a 12-6 Lennard-Jones potential evaluated without periodic boundary conditions. The kernel is ported from eOn (https://github.com/TheochemUI/eOn, client/potentials/LJCluster), BSD-3-Clause licensed, copyright the eOn Development Team.

This file defines the LJPot class, which implements a standard 12-6 Lennard-Jones potential with a shifted cutoff for use in atomic simulations.

Packed MopacCParams. Default model is AM1.

Ported from eOn (https://github.com/TheochemUI/eOn, client/potentials/Morse), BSD-3-Clause licensed, copyright the eOn Development Team.

This file defines the MorsePot class, which implements the pairwise Morse potential with a shifted cutoff. The kernel is ported from eOn (https://github.com/TheochemUI/eOn, client/potentials/Morse), BSD-3-Clause licensed, copyright the eOn Development Team; the original attribution names A. Pedersen or G. Henkelman, revised by Jean Claude C. Berthet (2010, University of Iceland).

Used by NWChemPot to resolve libnwchemc at runtime without a build-time link dependency on NWChem.

User path: Cap’n Proto PotentialConfig / NWChemParams only. The frontend serializes that message and passes it through C ABI symbols resolved by dlopen.

Potentials fingerprint their configuration into PotentialBase::paramsKey() so cached results never cross parameter sets. Hash field by field — never memcpy a struct (padding bytes).

Consumers that evaluate potentials from multiple threads (NEB images, dimer endpoints, batched searches) read these instead of maintaining per-potential blocklists.

Provides the abstract interface and CRTP template for all potential energy surfaces. Handles the high-level logic for caching, hashing, and force call registration.

Contains the implementations for global helper functions used to manage and validate the core force and energy data structures.

Defines a static registry for tracking potential instances and global force call counters. It also provides utility functions for structure initialization and validation.

This file contains inline adapter functions designed to facilitate the seamless transfer of data between the Cap’n Proto RPC layer and the internal Eigen based AtomMatrix and other STL types.

This file contains inline adapter functions for integrating the Eigen linear algebra library with the native AtomMatrix and std::vector types used in the rgpot library.

This file provides adapters for the xtensor library, enabling interoperability between multidimensional arrays and rgpot data structures.

This file defines a lightweight, row-major matrix class designed for storing atomic coordinates and forces.

Ported from eOn (https://github.com/TheochemUI/eOn, client/potentials/ZBL), BSD-3-Clause licensed, copyright the eOn Development Team, which adapts the GPL-licensed LAMMPS pair_zbl kernel. Constants follow LAMMPS metal units: eV, Angstrom.

This file defines the ZBLPot class, a universal screened Coulomb repulsion with the LAMMPS switching function. Based on J. F. Ziegler, J. P. Biersack and U. Littmark, “The Stopping and Range of Ions in Matter”, Pergamon (1985). The kernel is ported from eOn (https://github.com/TheochemUI/eOn, client/potentials/ZBL), BSD-3-Clause licensed, copyright the eOn Development Team, which in turn adapts the GPL-licensed LAMMPS pair_zbl implementation.

Global Functions

void zeroForceOut(const size_t& nAtoms, ForceOut* efvd)

Zeroes the members of a ForceOut structure.

This function performs a manual reset of the ForceOut structure. It ensures the energy and variance are set to zero and iterates through the force array to clear components for each atom.

Parameters:

nAtoms

The number of atoms.

efvd

The results structure to reset.

Returns:

Void.

void checkParams(const ForceInput& params)

Validates the input parameters for a potential calculation.

Verifies that the input parameters represent a physically valid configuration. Currently, it strictly checks that the system contains at least one atom.

Warning

Throws a std::runtime_error if nAtoms is zero or less.

Parameters:

params

The configuration structure to check.

Returns:

Void.