mdcore  0.1.5
Data Structures | Defines | Functions | Variables
/home/pedro/work/mdcore/src/dihedral.h File Reference

Go to the source code of this file.

Data Structures

struct  dihedral

Defines

#define dihedral_err_ok   0
#define dihedral_err_null   -1
#define dihedral_err_malloc   -2

Functions

int dihedral_eval (struct dihedral *d, int N, struct engine *e, double *epot_out)
 Evaluate a list of dihedraled interactions.
int dihedral_evalf (struct dihedral *d, int N, struct engine *e, FPTYPE *f, double *epot_out)
 Evaluate a list of dihedraled interactions.
int dihedral_eval_mod (struct dihedral *d, int N, int nr_threads, int cid_mod, struct engine *e, double *epot_out)
 Evaluate a list of dihedraled interactions.
int dihedral_eval_div (struct dihedral *d, int N, int nr_threads, int cid_div, struct engine *e, double *epot_out)
 Evaluate a list of dihedraled interactions.

Variables

int dihedral_err

Define Documentation

#define dihedral_err_malloc   -2
#define dihedral_err_null   -1
#define dihedral_err_ok   0

Function Documentation

int dihedral_eval ( struct dihedral d,
int  N,
struct engine e,
double *  epot_out 
)

Evaluate a list of dihedraled interactions.

Parameters:
bPointer to an array of dihedral.
NNr of dihedrals in b.
ePointer to the engine in which these dihedrals are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.
Returns:
dihedral_err_ok or <0 on error (see dihedral_err)
int dihedral_eval_div ( struct dihedral d,
int  N,
int  nr_threads,
int  cid_div,
struct engine e,
double *  epot_out 
)

Evaluate a list of dihedraled interactions.

Parameters:
bPointer to an array of dihedral.
NNr of dihedrals in b.
nr_threadsNumber of computational threads.
cid_divcell id modulus.
ePointer to the engine in which these dihedrals are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.
Returns:
dihedral_err_ok or <0 on error (see dihedral_err)

Computes only the interactions on particles inside cells c where c->id % nr_threads == cid_div.

int dihedral_eval_mod ( struct dihedral d,
int  N,
int  nr_threads,
int  cid_mod,
struct engine e,
double *  epot_out 
)

Evaluate a list of dihedraled interactions.

Parameters:
bPointer to an array of dihedral.
NNr of dihedrals in b.
nr_threadsNumber of computational threads.
cid_modcell id modulus.
ePointer to the engine in which these dihedrals are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.
Returns:
dihedral_err_ok or <0 on error (see dihedral_err)

Computes only the interactions on particles inside cells c where c->id % nr_threads == cid_mod.

int dihedral_evalf ( struct dihedral d,
int  N,
struct engine e,
FPTYPE *  f,
double *  epot_out 
)

Evaluate a list of dihedraled interactions.

Parameters:
bPointer to an array of dihedral.
NNr of dihedrals in b.
ePointer to the engine in which these dihedrals are evaluated.
epot_outPointer to a double in which to aggregate the potential energy.

This function differs from dihedral_eval in that the forces are added to the array f instead of directly in the particle data.

Returns:
dihedral_err_ok or <0 on error (see dihedral_err)

Variable Documentation

ID of the last error

The ID of the last error.

 All Data Structures Files Functions Variables Typedefs Enumerator Defines