mdcore
0.1.5
|
#include "../config.h"
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include <limits.h>
#include "cycle.h"
#include "errs.h"
#include "fptype.h"
#include "lock.h"
#include "part.h"
#include "potential.h"
#include "potential_eval.h"
#include "cell.h"
#include "fifo.h"
#include "space.h"
#include "engine.h"
#include "dihedral.h"
Defines | |
#define | error(id) ( dihedral_err = errs_register( id , dihedral_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) ) |
Functions | |
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. | |
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 (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. | |
Variables | |
int | dihedral_err = dihedral_err_ok |
unsigned int | dihedral_rcount = 0 |
char * | dihedral_err_msg [2] |
#define error | ( | id | ) | ( dihedral_err = errs_register( id , dihedral_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) ) |
int dihedral_eval | ( | struct dihedral * | d, |
int | N, | ||
struct engine * | e, | ||
double * | epot_out | ||
) |
Evaluate a list of dihedraled interactions.
b | Pointer to an array of dihedral. |
N | Nr of dihedrals in b . |
e | Pointer to the engine in which these dihedrals are evaluated. |
epot_out | Pointer to a double in which to aggregate the potential energy. |
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.
b | Pointer to an array of dihedral. |
N | Nr of dihedrals in b . |
nr_threads | Number of computational threads. |
cid_div | cell id modulus. |
e | Pointer to the engine in which these dihedrals are evaluated. |
epot_out | Pointer to a double in which to aggregate the potential energy. |
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.
b | Pointer to an array of dihedral. |
N | Nr of dihedrals in b . |
nr_threads | Number of computational threads. |
cid_mod | cell id modulus. |
e | Pointer to the engine in which these dihedrals are evaluated. |
epot_out | Pointer to a double in which to aggregate the potential energy. |
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.
b | Pointer to an array of dihedral. |
N | Nr of dihedrals in b . |
e | Pointer to the engine in which these dihedrals are evaluated. |
epot_out | Pointer 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.
int dihedral_err = dihedral_err_ok |
The ID of the last error.
char* dihedral_err_msg[2] |
{ "Nothing bad happened.", "An unexpected NULL pointer was encountered." }
unsigned int dihedral_rcount = 0 |