Namespaces | Classes | Enumerations | Functions
PLMD::metatensor::vesin Namespace Reference

Namespaces

 cpu
 

Classes

class  BoundingBox
 
struct  CellShift
 A cell shift represents the displacement along cell axis between the actual position of an atom and a periodic image of this atom. More...
 
struct  Matrix
 
struct  Vector
 
struct  VesinNeighborList
 The actual neighbor list. More...
 
struct  VesinOptions
 Options for a neighbor list calculation. More...
 

Enumerations

enum  VesinDevice { VesinUnknownDevice = 0, VesinCPU = 1 }
 Device on which the data can be. More...
 

Functions

Vector operator* (double scalar, Vector vector)
 
Vector operator* (Matrix matrix, Vector vector)
 
Vector operator* (Vector vector, double scalar)
 
Vector operator* (Vector vector, Matrix matrix)
 
CellShift operator+ (CellShift a, CellShift b)
 
Vector operator+ (Vector u, Vector v)
 
CellShift operator- (CellShift a, CellShift b)
 
Vector operator- (Vector u, Vector v)
 
void VESIN_API vesin_free (struct VesinNeighborList *neighbors)
 Free all allocated memory inside a VesinNeighborList, according the it's device. More...
 
int VESIN_API vesin_neighbors (const double(*points)[3], size_t n_points, const double box[3][3], bool periodic, VesinDevice device, struct VesinOptions options, struct VesinNeighborList *neighbors, const char **error_message)
 Compute a neighbor list. More...
 

Enumeration Type Documentation

◆ VesinDevice

Device on which the data can be.

Enumerator
VesinUnknownDevice 

Unknown device, used for default initialization and to indicate no allocated data.

VesinCPU 

CPU device.

Function Documentation

◆ operator*() [1/4]

Vector PLMD::metatensor::vesin::operator* ( double  scalar,
Vector  vector 
)
inline

◆ operator*() [2/4]

Vector PLMD::metatensor::vesin::operator* ( Matrix  matrix,
Vector  vector 
)
inline

◆ operator*() [3/4]

Vector PLMD::metatensor::vesin::operator* ( Vector  vector,
double  scalar 
)
inline

◆ operator*() [4/4]

Vector PLMD::metatensor::vesin::operator* ( Vector  vector,
Matrix  matrix 
)
inline

◆ operator+() [1/2]

CellShift PLMD::metatensor::vesin::operator+ ( CellShift  a,
CellShift  b 
)
inline

◆ operator+() [2/2]

Vector PLMD::metatensor::vesin::operator+ ( Vector  u,
Vector  v 
)
inline

◆ operator-() [1/2]

CellShift PLMD::metatensor::vesin::operator- ( CellShift  a,
CellShift  b 
)
inline

◆ operator-() [2/2]

Vector PLMD::metatensor::vesin::operator- ( Vector  u,
Vector  v 
)
inline

◆ vesin_free()

void VESIN_API PLMD::metatensor::vesin::vesin_free ( struct VesinNeighborList neighbors)

Free all allocated memory inside a VesinNeighborList, according the it's device.

◆ vesin_neighbors()

int VESIN_API PLMD::metatensor::vesin::vesin_neighbors ( const double(*)  points[3],
size_t  n_points,
const double  box[3][3],
bool  periodic,
VesinDevice  device,
struct VesinOptions  options,
struct VesinNeighborList neighbors,
const char **  error_message 
)

Compute a neighbor list.

The data is returned in a VesinNeighborList. For an initial call, the VesinNeighborList should be zero-initialized (or default-initalized in C++). The VesinNeighborList can be re-used across calls to this functions to re-use memory allocations, and once it is no longer needed, users should call vesin_free to release the corresponding memory.

Parameters
pointspositions of all points in the system;
n_pointsnumber of elements in the points array
boxbounding box for the system. If the system is non-periodic, this is ignored. This should contain the three vectors of the bounding box, one vector per row of the matrix.
periodicis the system using periodic boundary conditions?
devicedevice where the points and box data is allocated.
optionsoptions for the calculation
neighborsnon-NULL pointer to VesinNeighborList that will be used to store the computed list of neighbors.
error_messagePointer to a char* that wil be set to the error message if this function fails. This does not need to be freed when no longer needed.