Loading...
Searching...
No Matches
xtb_c_abi.h File Reference

C ABI between XTBDlopen frontend and libxtb_engine.so. More...

#include <stddef.h>

Go to the source code of this file.

Classes

struct  RgpotXtbConfig

Macros

#define RGPOT_XTB_API   __attribute__((visibility("default")))
#define RGPOT_XTB_ABI_VERSION   1

Typedefs

typedef struct RgpotXtbPot RgpotXtbPot
typedef struct RgpotXtbConfig RgpotXtbConfig

Enumerations

enum  { RGPOT_XTB_METHOD_GFNFF = 0 , RGPOT_XTB_METHOD_GFN0 = 1 , RGPOT_XTB_METHOD_GFN1 = 2 , RGPOT_XTB_METHOD_GFN2 = 3 }
 GFN method codes (stable ABI). More...

Functions

RGPOT_XTB_API int rgpot_xtb_abi_version (void)
RGPOT_XTB_API RgpotXtbPotrgpot_xtb_create (const RgpotXtbConfig *cfg, char *errbuf, size_t errlen)
RGPOT_XTB_API void rgpot_xtb_destroy (RgpotXtbPot *pot)
RGPOT_XTB_API int rgpot_xtb_force (RgpotXtbPot *pot, long nAtoms, const double *positions, const int *atomicNrs, double *forces, double *energy, double *variance, const double *box)
 Energy + forces.
RGPOT_XTB_API int rgpot_xtb_available (void)

Detailed Description

C ABI between XTBDlopen frontend and libxtb_engine.so.

Engine wraps libxtb's ISO_C_BINDING API (xtb.h) behind a small stable plugin surface (create / force / destroy). Host units: positions Å, energy eV, forces eV/Å. Mirrors the metatomic engine split: thin consumer, optional heavy plugin.

Definition in file xtb_c_abi.h.

Macro Definition Documentation

◆ RGPOT_XTB_ABI_VERSION

#define RGPOT_XTB_ABI_VERSION   1

Definition at line 47 of file xtb_c_abi.h.

◆ RGPOT_XTB_API

#define RGPOT_XTB_API   __attribute__((visibility("default")))

Definition at line 25 of file xtb_c_abi.h.

Typedef Documentation

◆ RgpotXtbConfig

typedef struct RgpotXtbConfig RgpotXtbConfig

◆ RgpotXtbPot

typedef struct RgpotXtbPot RgpotXtbPot

Definition at line 28 of file xtb_c_abi.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum

GFN method codes (stable ABI).

Enumerator
RGPOT_XTB_METHOD_GFNFF 
RGPOT_XTB_METHOD_GFN0 
RGPOT_XTB_METHOD_GFN1 
RGPOT_XTB_METHOD_GFN2 

Definition at line 31 of file xtb_c_abi.h.

31 {
36};
@ RGPOT_XTB_METHOD_GFNFF
Definition xtb_c_abi.h:32
@ RGPOT_XTB_METHOD_GFN1
Definition xtb_c_abi.h:34
@ RGPOT_XTB_METHOD_GFN2
Definition xtb_c_abi.h:35
@ RGPOT_XTB_METHOD_GFN0
Definition xtb_c_abi.h:33

Function Documentation

◆ rgpot_xtb_abi_version()

RGPOT_XTB_API int rgpot_xtb_abi_version ( void )

◆ rgpot_xtb_available()

RGPOT_XTB_API int rgpot_xtb_available ( void )

◆ rgpot_xtb_create()

RGPOT_XTB_API RgpotXtbPot * rgpot_xtb_create ( const RgpotXtbConfig * cfg,
char * errbuf,
size_t errlen )

◆ rgpot_xtb_destroy()

RGPOT_XTB_API void rgpot_xtb_destroy ( RgpotXtbPot * pot)

◆ rgpot_xtb_force()

RGPOT_XTB_API int rgpot_xtb_force ( RgpotXtbPot * pot,
long nAtoms,
const double * positions,
const int * atomicNrs,
double * forces,
double * energy,
double * variance,
const double * box )

Energy + forces.

Returns 0 on success. variance may be NULL.