ESPResSo 3.2.0-167-g2c9ead1-git
Extensible Simulation Package for Soft Matter Research
Defines | Functions
dihedral.h File Reference

Routines to calculate the dihedral energy or/and and force for a particle quadruple. More...

#include "utils.h"
#include "interaction_data.h"
#include "grid.h"
Include dependency graph for dihedral.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define ANGLE_NOT_DEFINED   -100

Functions

int dihedral_set_params (int bond_type, int mult, double bend, double phase)
 set dihedral parameters
MDINLINE void calc_dihedral_angle (Particle *p1, Particle *p2, Particle *p3, Particle *p4, double a[3], double b[3], double c[3], double aXb[3], double *l_aXb, double bXc[3], double *l_bXc, double *cosphi, double *phi)
 Calculates the dihedral angle between particle quadruple p1, p2, p3 and p4.
MDINLINE int calc_dihedral_force (Particle *p2, Particle *p1, Particle *p3, Particle *p4, Bonded_ia_parameters *iaparams, double force2[3], double force1[2], double force3[2])
 calculate dihedral force between particles p1, p2 p3 and p4 Written by Arijit Maitra, adapted to new force interface by Hanjo, more general new dihedral form by Ana.
MDINLINE int dihedral_energy (Particle *p1, Particle *p2, Particle *p3, Particle *p4, Bonded_ia_parameters *iaparams, double *_energy)
 calculate dihedral energy between particles p1, p2 p3 and p4 Written by Arijit Maitra, adapted to new force interface by Hanjo

Detailed Description

Routines to calculate the dihedral energy or/and and force for a particle quadruple.

Note that usage of dihedrals increases the interaction range of bonded interactions to 2 times the maximal bond length! forces.c

Definition in file dihedral.h.


Define Documentation

#define ANGLE_NOT_DEFINED   -100

Definition at line 33 of file dihedral.h.


Function Documentation

MDINLINE void calc_dihedral_angle ( Particle p1,
Particle p2,
Particle p3,
Particle p4,
double  a[3],
double  b[3],
double  c[3],
double  aXb[3],
double *  l_aXb,
double  bXc[3],
double *  l_bXc,
double *  cosphi,
double *  phi 
)

Calculates the dihedral angle between particle quadruple p1, p2, p3 and p4.

The dihedral angle is the angle between the planes specified by the particle triples (p1,p2,p3) and (p2,p3,p4). Vectors a, b and c are the bond vectors between consequtive particles. If the a,b or b,c are parallel the dihedral angle is not defined in which case the routine returns phi=-1. Calling functions should check for that (Written by: Arijit Maitra)

Definition at line 45 of file dihedral.h.

References dround(), get_mi_vector(), i, ParticlePosition::p, PI, Particle::r, scalar(), sqrlen(), TINY_LENGTH_VALUE, TINY_SIN_VALUE, and vector_product().

Referenced by calc_dihedral_force(), calc_overlap_dihedral_force(), calc_tab_dihedral_force(), dihedral_energy(), overlap_dihedral_energy(), and tab_dihedral_energy().

MDINLINE int calc_dihedral_force ( Particle p2,
Particle p1,
Particle p3,
Particle p4,
Bonded_ia_parameters iaparams,
double  force2[3],
double  force1[2],
double  force3[2] 
)

calculate dihedral force between particles p1, p2 p3 and p4 Written by Arijit Maitra, adapted to new force interface by Hanjo, more general new dihedral form by Ana.

Definition at line 86 of file dihedral.h.

References calc_dihedral_angle(), Bonded_ia_parameters::dihedral, i, Bonded_ia_parameters::p, PI, TINY_SIN_VALUE, and vector_product().

Referenced by add_bonded_force().

MDINLINE int dihedral_energy ( Particle p1,
Particle p2,
Particle p3,
Particle p4,
Bonded_ia_parameters iaparams,
double *  _energy 
)

calculate dihedral energy between particles p1, p2 p3 and p4 Written by Arijit Maitra, adapted to new force interface by Hanjo

Definition at line 158 of file dihedral.h.

References calc_dihedral_angle(), Bonded_ia_parameters::dihedral, and Bonded_ia_parameters::p.

Referenced by add_bonded_energy().

int dihedral_set_params ( int  bond_type,
int  mult,
double  bend,
double  phase 
)