mdcore  0.1.5
Defines | Functions
/home/pedro/work/mdcore/src/engine_bonded.c File Reference
#include <stdlib.h>
#include <stdio.h>
#include <pthread.h>
#include <math.h>
#include <float.h>
#include <string.h>
#include "../config.h"
#include <omp.h>
#include "cycle.h"
#include "errs.h"
#include "fptype.h"
#include "lock.h"
#include "part.h"
#include "cell.h"
#include "fifo.h"
#include "space.h"
#include "potential.h"
#include "runner.h"
#include "bond.h"
#include "rigid.h"
#include "angle.h"
#include "dihedral.h"
#include "exclusion.h"
#include "reader.h"
#include "engine.h"

Defines

#define error(id)   ( engine_err = errs_register( id , engine_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) )

Functions

int engine_bonded_eval_sets (struct engine *e)
 Compute all bonded interactions stored in this engine.
int engine_bonded_sets (struct engine *e, int max_sets)
 Assemble non-conflicting sets of bonded interactions.
int engine_dihedral_add (struct engine *e, int i, int j, int k, int l, int pid)
 Add a dihedral interaction to the engine.
int engine_angle_add (struct engine *e, int i, int j, int k, int pid)
 Add a angle interaction to the engine.
int engine_exclusion_shrink (struct engine *e)
 Remove duplicate exclusions.
int engine_exclusion_add (struct engine *e, int i, int j)
 Add a exclusioned interaction to the engine.
int engine_bond_add (struct engine *e, int i, int j)
 Add a bonded interaction to the engine.
int engine_bonded_eval (struct engine *e)
 Compute all bonded interactions stored in this engine.
int engine_bonded_eval_alt (struct engine *e)
 Compute all bonded interactions stored in this engine.
int engine_dihedral_eval (struct engine *e)
 Compute the dihedral interactions stored in this engine.
int engine_angle_eval (struct engine *e)
 Compute the angled interactions stored in this engine.
int engine_exclusion_eval (struct engine *e)
 Correct for the excluded interactions stored in this engine.
int engine_bond_eval (struct engine *e)
 Compute the bonded interactions stored in this engine.
int engine_bond_addpot (struct engine *e, struct potential *p, int i, int j)
 Add a bond potential.
int engine_dihedral_addpot (struct engine *e, struct potential *p)
 Add a dihedral potential.
int engine_angle_addpot (struct engine *e, struct potential *p)
 Add a angle potential.

Define Documentation

#define error (   id)    ( engine_err = errs_register( id , engine_err_msg[-(id)] , __LINE__ , __FUNCTION__ , __FILE__ ) )

Function Documentation

int engine_angle_add ( struct engine e,
int  i,
int  j,
int  k,
int  pid 
)

Add a angle interaction to the engine.

Parameters:
eThe engine.
iThe ID of the first part.
jThe ID of the second part.
kThe ID of the third part.
pidIndex of the potential for this bond.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_angle_addpot ( struct engine e,
struct potential p 
)

Add a angle potential.

Parameters:
eThe engine.
pThe potential to add to the engine.
Returns:
The ID of the added angle potential or < 0 on error (see engine_err).
int engine_angle_eval ( struct engine e)

Compute the angled interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_bond_add ( struct engine e,
int  i,
int  j 
)

Add a bonded interaction to the engine.

Parameters:
eThe engine.
iThe ID of the first part.
jThe ID of the second part.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_bond_addpot ( struct engine e,
struct potential p,
int  i,
int  j 
)

Add a bond potential.

Parameters:
eThe engine.
pThe potential to add to the engine.
iID of particle type for this interaction.
jID of second particle type for this interaction.
Returns:
engine_err_ok or < 0 on error (see engine_err).

Adds the given bonded potential for pairs of particles of type i and j, where i and j may be the same type ID.

int engine_bond_eval ( struct engine e)

Compute the bonded interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_bonded_eval ( struct engine e)

Compute all bonded interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).

Does the same as engine_bond_eval, engine_angle_eval and #engine_dihedral eval, yet all in one go to avoid excessive updates of the particle forces.

int engine_bonded_eval_alt ( struct engine e)

Compute all bonded interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).

Does the same as engine_bond_eval, engine_angle_eval and #engine_dihedral eval, yet all in one go to avoid excessive updates of the particle forces.

int engine_bonded_eval_sets ( struct engine e)

Compute all bonded interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).

Does the same as engine_bond_eval, engine_angle_eval and #engine_dihedral eval, yet all in one go to avoid excessive updates of the particle forces.

int engine_bonded_sets ( struct engine e,
int  max_sets 
)

Assemble non-conflicting sets of bonded interactions.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_dihedral_add ( struct engine e,
int  i,
int  j,
int  k,
int  l,
int  pid 
)

Add a dihedral interaction to the engine.

Parameters:
eThe engine.
iThe ID of the first part.
jThe ID of the second part.
kThe ID of the third part.
lThe ID of the fourth part.
pidIndex of the potential for this bond.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_dihedral_addpot ( struct engine e,
struct potential p 
)

Add a dihedral potential.

Parameters:
eThe engine.
pThe potential to add to the engine.
Returns:
The ID of the added dihedral potential or < 0 on error (see engine_err).
int engine_dihedral_eval ( struct engine e)

Compute the dihedral interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_exclusion_add ( struct engine e,
int  i,
int  j 
)

Add a exclusioned interaction to the engine.

Parameters:
eThe engine.
iThe ID of the first part.
jThe ID of the second part.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_exclusion_eval ( struct engine e)

Correct for the excluded interactions stored in this engine.

Parameters:
eThe engine.
Returns:
engine_err_ok or < 0 on error (see engine_err).
int engine_exclusion_shrink ( struct engine e)

Remove duplicate exclusions.

Parameters:
eThe engine.
Returns:
The number of unique exclusions or < 0 on error (see engine_err).
 All Data Structures Files Functions Variables Typedefs Enumerator Defines