namespace rgpot

Overview

POD structures for force and energy calculation interfaces. More…

namespace rgpot {

// namespaces

namespace rgpot::cache;
namespace rgpot::types;
    namespace rgpot::types::adapt;
        namespace rgpot::types::adapt::capnp;
        namespace rgpot::types::adapt::eigen;
        namespace rgpot::types::adapt::xtensor;

// structs

struct ForceInput;
struct ForceOut;

// classes

class CuH2Pot;
class LJPot;
class PotentialBase;

template 
class registry;

// global variables

size_t registry< T >::count = 0;
size_t registry< T >::forceCalls = 0;
T* registry< T >::head = nullptr;

// global functions

void zeroForceOut(const size_t& nAtoms, ForceOut* efvd);
void checkParams(const ForceInput& params);

} // namespace rgpot

Detailed Documentation

POD structures for force and energy calculation interfaces.

Definition of the native AtomMatrix class.

Conversion utilities between Cap’n Proto and native types.

Utility templates and functions for potential management.

Implementation of utility functions for potential management.

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

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 defines a lightweight, row-major matrix class designed for storing atomic coordinates and forces.

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.