#include "random/random.h"
#include "list/list.h"
+
/* datatypes */
+
+/* the atom of the md simulation */
+
typedef struct s_atom {
- t_3dvec r; /* positions */
- t_3dvec v; /* velocities */
- t_3dvec f; /* forces */
- int element; /* number of element in pse */
- double mass; /* atom mass */
+ t_3dvec r; /* position */
+ t_3dvec v; /* velocity */
+ t_3dvec f; /* force */
+ int element; /* number of element in pse */
+ double mass; /* atom mass */
+ unsigned char attr; /* attributes */
} t_atom;
+#define ATOM_ATTR_FP 0x01 /* fixed position (bulk material) */
+#define ATOM_ATTR_HB 0x02 /* coupled to heat bath (velocity scaling) */
+
+/* cell lists */
+
typedef struct s_linkcell {
- int listfd;
- int nx,ny,nz;
- int cells;
- double x,y,z;
- t_list *subcell;
+ int nx,ny,nz; /* amount of cells in x, y and z direction */
+ int cells; /* total amount of cells */
+ double len; /* prefered cell edge length */
+ double x,y,z; /* the actual cell lengthes */
+ t_list *subcell; /* pointer to the cell lists */
+ int dnlc; /* direct neighbour lists counter */
} t_linkcell;
#include "visual/visual.h"
+# moldyn properties structure */
+
typedef struct s_moldyn {
- /* atoms, amount, dimensions */
- int count;
- t_atom *atom;
- t_3dvec dim;
+
+ int count; /* total amount of atoms */
+ t_atom *atom; /* pointer to the atoms */
+ t_3dvec dim; /* dimensions of the simulation volume */
/* potential, force & parameters */
+
+ /* potential force funtion created by the user */
int (*potential_force_function)(struct s_moldyn *moldyn);
- void *pot_params;
- /* cut off radius */
+ void *pot_params; /* parameters describing the potential */
+
double cutoff;
double cutoff_square;
/* linked list / cell method */
double epsilon4;
} t_lj_params;
+typedef struct s_tersoff_params {
+ double l_1,l_2;
+ double m_1,m_2;
+ double a_1,a_2;
+ double b_1,b_2;
+ double r_1,r_2;
+ double s_1,s_2;
+} t_tersoff_params;
+
/*
* defines
*/