Python energy landscape explorer
 All Classes Namespaces Functions Variables Typedefs
Static Public Member Functions
pele::meta_image< IDX > Struct Template Reference

#include <distance.h>

List of all members.

Static Public Member Functions

static void f (double *const x, const double *_ibox, const double *_box)

Detailed Description

template<size_t IDX>
struct pele::meta_image< IDX >

meta_image applies the nearest periodic image convention to the coordinates of one particle. In particular, meta_image is called by put_in_box once for each particle. x points to the first coodinate of the particle that should be put in the box. The template meta program expands to apply the nearest image convention to all ndim coordinates in the range [x, x + ndim). The function f of meta_image translates x[k] such that its new value is in the range [-box[k]/2, box[k]/2]. To see this, consider the behavior of std::round. E.g. if the input is x[k] == -0.7 _box[k], then round(x[k] * _ibox[k]) == -1 and finally x[k] -= -1 * _box[k] == 0.3 * _box[k]

Definition at line 117 of file distance.h.

Member Function Documentation

template<size_t IDX>
static void pele::meta_image< IDX >::f ( double *const  x,
const double *  _ibox,
const double *  _box 
) [inline, static]

Definition at line 118 of file distance.h.

The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs