Loading...
Searching...
No Matches
xtb.h File Reference
#include <stdbool.h>

Go to the source code of this file.

Macros

#define XTB_API_ENTRY
#define XTB_API_CALL
#define XTB_API_SUFFIX__VERSION_2_0_0
#define XTB_API_VERSION   20000
 Define proprocessor to allow to check for specific API features.
#define XTB_VERSION_6_3_0   1
#define XTB_VERSION_6_3_1   1
#define XTB_VERSION_6_3_2   1
#define XTB_VERSION_6_3_3   1
#define XTB_VERBOSITY_FULL   2
 Possible print levels for API calls.
#define XTB_VERBOSITY_MINIMAL   1
#define XTB_VERBOSITY_MUTED   0
#define xtb_delete(ptr)
 Convencience macro for deleting a handle.

Typedefs

typedef struct _xtb_TEnvironment * xtb_TEnvironment
 Calculation environment class.
typedef struct _xtb_TMolecule * xtb_TMolecule
 Molecular structure data class.
typedef struct _xtb_TCalculator * xtb_TCalculator
 Single point calculator class.
typedef struct _xtb_TResults * xtb_TResults
 Single point results class.

Functions

XTB_API_ENTRY int XTB_API_CALL xtb_getAPIVersion () XTB_API_SUFFIX__VERSION_2_0_0
 Returns API version as 10000 * major + 100 * minor + 1 * patch.
XTB_API_ENTRY xtb_TEnvironment XTB_API_CALL xtb_newEnvironment (void) XTB_API_SUFFIX__VERSION_2_0_0
 Create new xtb calculation environment object.
XTB_API_ENTRY void XTB_API_CALL xtb_delEnvironment (xtb_TEnvironment *) XTB_API_SUFFIX__VERSION_2_0_0
 Delete a xtb calculation environment object.
XTB_API_ENTRY int XTB_API_CALL xtb_checkEnvironment (xtb_TEnvironment) XTB_API_SUFFIX__VERSION_2_0_0
 Check current status of calculation environment.
XTB_API_ENTRY void XTB_API_CALL xtb_showEnvironment (xtb_TEnvironment, const char *) XTB_API_SUFFIX__VERSION_2_0_0
 Show and empty error stack.
XTB_API_ENTRY void XTB_API_CALL xtb_getError (xtb_TEnvironment, char *, const int *) XTB_API_SUFFIX__VERSION_2_0_0
 Return and empty error stack.
XTB_API_ENTRY void XTB_API_CALL xtb_setOutput (xtb_TEnvironment, const char *) XTB_API_SUFFIX__VERSION_2_0_0
 Bind output from this environment.
XTB_API_ENTRY void XTB_API_CALL xtb_releaseOutput (xtb_TEnvironment) XTB_API_SUFFIX__VERSION_2_0_0
 Release output unit from this environment.
XTB_API_ENTRY void XTB_API_CALL xtb_setVerbosity (xtb_TEnvironment, int) XTB_API_SUFFIX__VERSION_2_0_0
 Set verbosity of calculation output.
XTB_API_ENTRY xtb_TMolecule XTB_API_CALL xtb_newMolecule (xtb_TEnvironment, const int *, const int *, const double *, const double *, const int *, const double *, const bool *) XTB_API_SUFFIX__VERSION_2_0_0
 Create new molecular structure data (quantities in Bohr).
XTB_API_ENTRY void XTB_API_CALL xtb_delMolecule (xtb_TMolecule *) XTB_API_SUFFIX__VERSION_2_0_0
 Delete molecular structure data.
XTB_API_ENTRY void XTB_API_CALL xtb_updateMolecule (xtb_TEnvironment, xtb_TMolecule, const double *, const double *) XTB_API_SUFFIX__VERSION_2_0_0
 Update coordinates and lattice parameters (quantities in Bohr).
XTB_API_ENTRY xtb_TCalculator XTB_API_CALL xtb_newCalculator (void) XTB_API_SUFFIX__VERSION_2_0_0
 Create new calculator object.
XTB_API_ENTRY void XTB_API_CALL xtb_delCalculator (xtb_TCalculator *) XTB_API_SUFFIX__VERSION_2_0_0
 Delete calculator object.
XTB_API_ENTRY void XTB_API_CALL xtb_loadGFN0xTB (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, char *) XTB_API_SUFFIX__VERSION_2_0_0
 Load GFN0-xTB calculator.
XTB_API_ENTRY void XTB_API_CALL xtb_loadGFN1xTB (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, char *) XTB_API_SUFFIX__VERSION_2_0_0
 Load GFN1-xTB calculator.
XTB_API_ENTRY void XTB_API_CALL xtb_loadGFN2xTB (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, char *) XTB_API_SUFFIX__VERSION_2_0_0
 Load GFN2-xTB calculator.
XTB_API_ENTRY void XTB_API_CALL xtb_loadGFNFF (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, char *) XTB_API_SUFFIX__VERSION_2_0_0
 Load GFN-FF calculator.
XTB_API_ENTRY void XTB_API_CALL xtb_setSolvent (xtb_TEnvironment, xtb_TCalculator, char *, int *, double *, int *, char *) XTB_API_SUFFIX__VERSION_2_0_0
 Add a solvation model to calculator (requires loaded parametrisation).
XTB_API_ENTRY void XTB_API_CALL xtb_releaseSolvent (xtb_TEnvironment, xtb_TCalculator) XTB_API_SUFFIX__VERSION_2_0_0
 Unset the solvation model.
XTB_API_ENTRY void XTB_API_CALL xtb_setExternalCharges (xtb_TEnvironment, xtb_TCalculator, int *, int *, double *, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Add a external charge potential to calculator (only supported in GFN1/2-xTB).
XTB_API_ENTRY void XTB_API_CALL xtb_releaseExternalCharges (xtb_TEnvironment, xtb_TCalculator) XTB_API_SUFFIX__VERSION_2_0_0
 Unset the external charge potential.
XTB_API_ENTRY void XTB_API_CALL xtb_setAccuracy (xtb_TEnvironment, xtb_TCalculator, double) XTB_API_SUFFIX__VERSION_2_0_0
 Set numerical accuracy of calculator in the range of 1000 to 0.0001.
XTB_API_ENTRY void XTB_API_CALL xtb_setMaxIter (xtb_TEnvironment, xtb_TCalculator, int) XTB_API_SUFFIX__VERSION_2_0_0
 Set maximum number of iterations for self-consistent TB calculators.
XTB_API_ENTRY void XTB_API_CALL xtb_setElectronicTemp (xtb_TEnvironment, xtb_TCalculator, double) XTB_API_SUFFIX__VERSION_2_0_0
 Set electronic temperature for level filling in tight binding calculators in K.
XTB_API_ENTRY void XTB_API_CALL xtb_cpcmx_calc (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, xtb_TResults) XTB_API_SUFFIX__VERSION_2_0_0
XTB_API_ENTRY void XTB_API_CALL xtb_singlepoint (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, xtb_TResults) XTB_API_SUFFIX__VERSION_2_0_0
 Perform singlepoint calculation.
XTB_API_ENTRY void XTB_API_CALL xtb_hessian (xtb_TEnvironment, xtb_TMolecule, xtb_TCalculator, xtb_TResults, double *, int *, int *, double *, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Perform hessian calculation.
XTB_API_ENTRY xtb_TResults XTB_API_CALL xtb_newResults (void) XTB_API_SUFFIX__VERSION_2_0_0
 Create new singlepoint results object.
XTB_API_ENTRY void XTB_API_CALL xtb_delResults (xtb_TResults *) XTB_API_SUFFIX__VERSION_2_0_0
 Delete singlepoint results object.
XTB_API_ENTRY xtb_TResults XTB_API_CALL xtb_copyResults (xtb_TResults) XTB_API_SUFFIX__VERSION_2_0_0
 Create copy from a singlepoint results object.
XTB_API_ENTRY void XTB_API_CALL xtb_getEnergy (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for energy in Hartree.
XTB_API_ENTRY void XTB_API_CALL xtb_getSolvationEnergy (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for solvation energy in Hartree.
XTB_API_ENTRY void XTB_API_CALL xtb_getGradient (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for gradient in Hartree / Bohr.
XTB_API_ENTRY void XTB_API_CALL xtb_getPCGradient (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for pc gradient in Hartree / Bohr.
XTB_API_ENTRY void XTB_API_CALL xtb_getVirial (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for virial in Hartree.
XTB_API_ENTRY void XTB_API_CALL xtb_getDipole (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for dipole in e Bohr.
XTB_API_ENTRY void XTB_API_CALL xtb_getCharges (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for partial charges in e.
XTB_API_ENTRY void XTB_API_CALL xtb_getBondOrders (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for bond orders.
XTB_API_ENTRY void XTB_API_CALL xtb_getNao (xtb_TEnvironment, xtb_TResults, int *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for the number of basis functions.
XTB_API_ENTRY void XTB_API_CALL xtb_getOrbitalEigenvalues (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for orbital energies in Hartree [nao].
XTB_API_ENTRY void XTB_API_CALL xtb_getOrbitalOccupations (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for occupation numbers [nao].
XTB_API_ENTRY void XTB_API_CALL xtb_getOrbitalCoefficients (xtb_TEnvironment, xtb_TResults, double *) XTB_API_SUFFIX__VERSION_2_0_0
 Query singlepoint results object for orbital coefficients [nao][nao].

Macro Definition Documentation

◆ XTB_API_CALL

#define XTB_API_CALL

Definition at line 21 of file xtb.h.

◆ XTB_API_ENTRY

#define XTB_API_ENTRY

Definition at line 20 of file xtb.h.

◆ XTB_API_SUFFIX__VERSION_2_0_0

#define XTB_API_SUFFIX__VERSION_2_0_0

Definition at line 22 of file xtb.h.

◆ XTB_API_VERSION

#define XTB_API_VERSION   20000

Define proprocessor to allow to check for specific API features.

Definition at line 25 of file xtb.h.

◆ xtb_delete

#define xtb_delete ( ptr)
Value:
_Generic((ptr), \
)(&ptr)
struct _xtb_TCalculator * xtb_TCalculator
Single point calculator class.
Definition xtb.h:61
struct _xtb_TEnvironment * xtb_TEnvironment
Calculation environment class.
Definition xtb.h:55
XTB_API_ENTRY void XTB_API_CALL xtb_delMolecule(xtb_TMolecule *) XTB_API_SUFFIX__VERSION_2_0_0
Delete molecular structure data.
XTB_API_ENTRY void XTB_API_CALL xtb_delResults(xtb_TResults *) XTB_API_SUFFIX__VERSION_2_0_0
Delete singlepoint results object.
struct _xtb_TMolecule * xtb_TMolecule
Molecular structure data class.
Definition xtb.h:58
XTB_API_ENTRY void XTB_API_CALL xtb_delEnvironment(xtb_TEnvironment *) XTB_API_SUFFIX__VERSION_2_0_0
Delete a xtb calculation environment object.
struct _xtb_TResults * xtb_TResults
Single point results class.
Definition xtb.h:64
XTB_API_ENTRY void XTB_API_CALL xtb_delCalculator(xtb_TCalculator *) XTB_API_SUFFIX__VERSION_2_0_0
Delete calculator object.

Convencience macro for deleting a handle.

Definition at line 37 of file xtb.h.

37#define xtb_delete(ptr) _Generic((ptr), \
38 xtb_TEnvironment: xtb_delEnvironment, \
39 xtb_TMolecule: xtb_delMolecule, \
40 xtb_TCalculator: xtb_delCalculator, \
41 xtb_TResults: xtb_delResults \
42 )(&ptr)

◆ XTB_VERBOSITY_FULL

#define XTB_VERBOSITY_FULL   2

Possible print levels for API calls.

Definition at line 32 of file xtb.h.

◆ XTB_VERBOSITY_MINIMAL

#define XTB_VERBOSITY_MINIMAL   1

Definition at line 33 of file xtb.h.

◆ XTB_VERBOSITY_MUTED

#define XTB_VERBOSITY_MUTED   0

Definition at line 34 of file xtb.h.

◆ XTB_VERSION_6_3_0

#define XTB_VERSION_6_3_0   1

Definition at line 26 of file xtb.h.

◆ XTB_VERSION_6_3_1

#define XTB_VERSION_6_3_1   1

Definition at line 27 of file xtb.h.

◆ XTB_VERSION_6_3_2

#define XTB_VERSION_6_3_2   1

Definition at line 28 of file xtb.h.

◆ XTB_VERSION_6_3_3

#define XTB_VERSION_6_3_3   1

Definition at line 29 of file xtb.h.

Typedef Documentation

◆ xtb_TCalculator

typedef struct _xtb_TCalculator* xtb_TCalculator

Single point calculator class.

Definition at line 61 of file xtb.h.

◆ xtb_TEnvironment

typedef struct _xtb_TEnvironment* xtb_TEnvironment

Calculation environment class.

Definition at line 55 of file xtb.h.

◆ xtb_TMolecule

typedef struct _xtb_TMolecule* xtb_TMolecule

Molecular structure data class.

Definition at line 58 of file xtb.h.

◆ xtb_TResults

typedef struct _xtb_TResults* xtb_TResults

Single point results class.

Definition at line 64 of file xtb.h.

Function Documentation

◆ xtb_checkEnvironment()

XTB_API_ENTRY int XTB_API_CALL xtb_checkEnvironment ( xtb_TEnvironment )
extern

Check current status of calculation environment.

◆ xtb_copyResults()

Create copy from a singlepoint results object.

◆ xtb_cpcmx_calc()

◆ xtb_delCalculator()

XTB_API_ENTRY void XTB_API_CALL xtb_delCalculator ( xtb_TCalculator * )
extern

Delete calculator object.

◆ xtb_delEnvironment()

XTB_API_ENTRY void XTB_API_CALL xtb_delEnvironment ( xtb_TEnvironment * )
extern

Delete a xtb calculation environment object.

◆ xtb_delMolecule()

XTB_API_ENTRY void XTB_API_CALL xtb_delMolecule ( xtb_TMolecule * )
extern

Delete molecular structure data.

◆ xtb_delResults()

XTB_API_ENTRY void XTB_API_CALL xtb_delResults ( xtb_TResults * )
extern

Delete singlepoint results object.

◆ xtb_getAPIVersion()

XTB_API_ENTRY int XTB_API_CALL xtb_getAPIVersion ( )
extern

Returns API version as 10000 * major + 100 * minor + 1 * patch.

◆ xtb_getBondOrders()

XTB_API_ENTRY void XTB_API_CALL xtb_getBondOrders ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for bond orders.

◆ xtb_getCharges()

XTB_API_ENTRY void XTB_API_CALL xtb_getCharges ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for partial charges in e.

◆ xtb_getDipole()

XTB_API_ENTRY void XTB_API_CALL xtb_getDipole ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for dipole in e Bohr.

◆ xtb_getEnergy()

XTB_API_ENTRY void XTB_API_CALL xtb_getEnergy ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for energy in Hartree.

◆ xtb_getError()

XTB_API_ENTRY void XTB_API_CALL xtb_getError ( xtb_TEnvironment ,
char * ,
const int *  )
extern

Return and empty error stack.

◆ xtb_getGradient()

XTB_API_ENTRY void XTB_API_CALL xtb_getGradient ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for gradient in Hartree / Bohr.

◆ xtb_getNao()

XTB_API_ENTRY void XTB_API_CALL xtb_getNao ( xtb_TEnvironment ,
xtb_TResults ,
int *  )
extern

Query singlepoint results object for the number of basis functions.

◆ xtb_getOrbitalCoefficients()

XTB_API_ENTRY void XTB_API_CALL xtb_getOrbitalCoefficients ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for orbital coefficients [nao][nao].

◆ xtb_getOrbitalEigenvalues()

XTB_API_ENTRY void XTB_API_CALL xtb_getOrbitalEigenvalues ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for orbital energies in Hartree [nao].

◆ xtb_getOrbitalOccupations()

XTB_API_ENTRY void XTB_API_CALL xtb_getOrbitalOccupations ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for occupation numbers [nao].

◆ xtb_getPCGradient()

XTB_API_ENTRY void XTB_API_CALL xtb_getPCGradient ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for pc gradient in Hartree / Bohr.

◆ xtb_getSolvationEnergy()

XTB_API_ENTRY void XTB_API_CALL xtb_getSolvationEnergy ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for solvation energy in Hartree.

◆ xtb_getVirial()

XTB_API_ENTRY void XTB_API_CALL xtb_getVirial ( xtb_TEnvironment ,
xtb_TResults ,
double *  )
extern

Query singlepoint results object for virial in Hartree.

◆ xtb_hessian()

XTB_API_ENTRY void XTB_API_CALL xtb_hessian ( xtb_TEnvironment ,
xtb_TMolecule ,
xtb_TCalculator ,
xtb_TResults ,
double * ,
int * ,
int * ,
double * ,
double *  )
extern

Perform hessian calculation.

◆ xtb_loadGFN0xTB()

XTB_API_ENTRY void XTB_API_CALL xtb_loadGFN0xTB ( xtb_TEnvironment ,
xtb_TMolecule ,
xtb_TCalculator ,
char *  )
extern

Load GFN0-xTB calculator.

◆ xtb_loadGFN1xTB()

XTB_API_ENTRY void XTB_API_CALL xtb_loadGFN1xTB ( xtb_TEnvironment ,
xtb_TMolecule ,
xtb_TCalculator ,
char *  )
extern

Load GFN1-xTB calculator.

◆ xtb_loadGFN2xTB()

XTB_API_ENTRY void XTB_API_CALL xtb_loadGFN2xTB ( xtb_TEnvironment ,
xtb_TMolecule ,
xtb_TCalculator ,
char *  )
extern

Load GFN2-xTB calculator.

◆ xtb_loadGFNFF()

XTB_API_ENTRY void XTB_API_CALL xtb_loadGFNFF ( xtb_TEnvironment ,
xtb_TMolecule ,
xtb_TCalculator ,
char *  )
extern

Load GFN-FF calculator.

◆ xtb_newCalculator()

XTB_API_ENTRY xtb_TCalculator XTB_API_CALL xtb_newCalculator ( void )
extern

Create new calculator object.

◆ xtb_newEnvironment()

XTB_API_ENTRY xtb_TEnvironment XTB_API_CALL xtb_newEnvironment ( void )
extern

Create new xtb calculation environment object.

◆ xtb_newMolecule()

XTB_API_ENTRY xtb_TMolecule XTB_API_CALL xtb_newMolecule ( xtb_TEnvironment ,
const int * ,
const int * ,
const double * ,
const double * ,
const int * ,
const double * ,
const bool *  )
extern

Create new molecular structure data (quantities in Bohr).

◆ xtb_newResults()

XTB_API_ENTRY xtb_TResults XTB_API_CALL xtb_newResults ( void )
extern

Create new singlepoint results object.

◆ xtb_releaseExternalCharges()

XTB_API_ENTRY void XTB_API_CALL xtb_releaseExternalCharges ( xtb_TEnvironment ,
xtb_TCalculator  )
extern

Unset the external charge potential.

◆ xtb_releaseOutput()

XTB_API_ENTRY void XTB_API_CALL xtb_releaseOutput ( xtb_TEnvironment )
extern

Release output unit from this environment.

◆ xtb_releaseSolvent()

XTB_API_ENTRY void XTB_API_CALL xtb_releaseSolvent ( xtb_TEnvironment ,
xtb_TCalculator  )
extern

Unset the solvation model.

◆ xtb_setAccuracy()

XTB_API_ENTRY void XTB_API_CALL xtb_setAccuracy ( xtb_TEnvironment ,
xtb_TCalculator ,
double  )
extern

Set numerical accuracy of calculator in the range of 1000 to 0.0001.

◆ xtb_setElectronicTemp()

XTB_API_ENTRY void XTB_API_CALL xtb_setElectronicTemp ( xtb_TEnvironment ,
xtb_TCalculator ,
double  )
extern

Set electronic temperature for level filling in tight binding calculators in K.

◆ xtb_setExternalCharges()

XTB_API_ENTRY void XTB_API_CALL xtb_setExternalCharges ( xtb_TEnvironment ,
xtb_TCalculator ,
int * ,
int * ,
double * ,
double *  )
extern

Add a external charge potential to calculator (only supported in GFN1/2-xTB).

◆ xtb_setMaxIter()

XTB_API_ENTRY void XTB_API_CALL xtb_setMaxIter ( xtb_TEnvironment ,
xtb_TCalculator ,
int  )
extern

Set maximum number of iterations for self-consistent TB calculators.

◆ xtb_setOutput()

XTB_API_ENTRY void XTB_API_CALL xtb_setOutput ( xtb_TEnvironment ,
const char *  )
extern

Bind output from this environment.

◆ xtb_setSolvent()

XTB_API_ENTRY void XTB_API_CALL xtb_setSolvent ( xtb_TEnvironment ,
xtb_TCalculator ,
char * ,
int * ,
double * ,
int * ,
char *  )
extern

Add a solvation model to calculator (requires loaded parametrisation).

◆ xtb_setVerbosity()

XTB_API_ENTRY void XTB_API_CALL xtb_setVerbosity ( xtb_TEnvironment ,
int  )
extern

Set verbosity of calculation output.

◆ xtb_showEnvironment()

XTB_API_ENTRY void XTB_API_CALL xtb_showEnvironment ( xtb_TEnvironment ,
const char *  )
extern

Show and empty error stack.

◆ xtb_singlepoint()

Perform singlepoint calculation.

◆ xtb_updateMolecule()

XTB_API_ENTRY void XTB_API_CALL xtb_updateMolecule ( xtb_TEnvironment ,
xtb_TMolecule ,
const double * ,
const double *  )
extern

Update coordinates and lattice parameters (quantities in Bohr).