class rgpot::XTBPot

Overview

Linked GFN-xTB pot (NEEDED libxtb). More…

#include <XTBPot.hpp>
 
class XTBPot: public rgpot::Potential< XTBPot > {
public:
    // construction
 
    XTBPot();
    XTBPot(const XTBConfig& config);
    XTBPot(const XTBPot&);
    ~XTBPot();
 
    // methods
 
    XTBPot& operator=(const XTBPot&);
    void forceImpl(const ForceInput& in, ForceOut* out) const;
    virtual PotCaps caps() const;
};

Detailed Documentation

Linked GFN-xTB pot (NEEDED libxtb).

libxtb exposes a stable ISO_C_BINDING C API (xtb.h): opaque xtb_TEnvironment / xtb_TCalculator / xtb_TMolecule / xtb_TResults handles with explicit create/update/destroy. We test and use that C contract—not free-form Fortran ABI. Each XTBPot owns its handles; first force builds the molecule, later forces call xtb_updateMolecule. xtb_releaseOutput is called on create (library recommendation for multi-env processes). Do not share one instance across threads; distinct instances may be used from different threads if the loaded libxtb build is reentrant for independent handle sets.

Methods

virtual PotCaps caps() const

Native handles are per-instance; concurrent use needs one instance per thread.