Loading...
Searching...
No Matches
PLMD::metatomic::vesin Namespace Reference

Namespaces

namespace  cpu
 
namespace  cuda
 

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  VesinDevice
 Represents a device on which data can be allocated. More...
 
struct  VesinNeighborList
 The actual neighbor list. More...
 
struct  VesinOptions
 Options for a neighbor list calculation. More...
 

Enumerations

enum  VesinAlgorithm { VesinAutoAlgorithm = 0 , VesinBruteForce = 1 , VesinCellList = 2 }
 Algorithm to use for neighbor list construction. More...
 
enum  VesinDeviceKind { VesinUnknownDevice = 0 , VesinCPU = 1 , VesinCUDA = 2 }
 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.
 
int VESIN_API vesin_neighbors (const double(*points)[3], size_t n_points, const double box[3][3], const bool periodic[3], VesinDevice device, struct VesinOptions options, struct VesinNeighborList *neighbors, const char **error_message)
 Compute a neighbor list.
 

Enumeration Type Documentation

◆ VesinAlgorithm

Algorithm to use for neighbor list construction.

Enumerator
VesinAutoAlgorithm 

Automatically select algorithm based on system characteristics (number of points, size of the box, …), this is the default and recommended option.

VesinBruteForce 

Brute-force O(n^2) algorithm, this requires minimum image convention in CUDA, and is not available on CPU.

VesinCellList 

Cell list algorithm with O(n) scaling.

◆ VesinDeviceKind

Device on which the data can be.

Enumerator
VesinUnknownDevice 

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

VesinCPU 

CPU device.

VesinCUDA 

Function Documentation

◆ operator*() [1/4]

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

◆ operator*() [2/4]

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

◆ operator*() [3/4]

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

◆ operator*() [4/4]

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

◆ operator+() [1/2]

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

◆ operator+() [2/2]

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

◆ operator-() [1/2]

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

◆ operator-() [2/2]

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

◆ vesin_free()

void VESIN_API PLMD::metatomic::vesin::vesin_free ( struct VesinNeighborList * neighbors)

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

◆ vesin_neighbors()

int VESIN_API PLMD::metatomic::vesin::vesin_neighbors ( const double(*) points[3],
size_t n_points,
const double box[3][3],
const bool periodic[3],
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? This
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.