+#define ATOM_ATTR_FP 0x01 /* fixed position (bulk material) */
+#define ATOM_ATTR_HB 0x02 /* coupled to heat bath (velocity scaling) */
+
+#define ATOM_ATTR_1BP 0x10 /* single paricle potential */
+#define ATOM_ATTR_2BP 0x20 /* pair potential */
+#define ATOM_ATTR_3BP 0x40 /* 3 body potential */
+
+/* cell lists */
+
+typedef struct s_linkcell {
+ 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 */
+ int countn; /* amount of neighbours */
+} t_linkcell;
+
+#include "visual/visual.h"
+
+# moldyn structure */
+
+typedef struct s_moldyn {
+
+ int count; /* total amount of atoms */
+ t_atom *atom; /* pointer to the atoms */
+
+ t_3dvec dim; /* dimensions of the simulation volume */
+
+ /* potential force function and parameter pointers */
+ int (*pf_func1b)(struct s_moldyn *,t_atom *);
+ void *pot1b_params;
+ int (*pf_func2b)(struct s_moldyn *,t_atom *,t_atom *);
+ void *pot2b_params;
+ int (*pf_func3b)(struct s_moldyn *,t_atom *,t_atom *,t_atom *);
+ void *pot3b_params;
+ //int (*potential_force_function)(struct s_moldyn *moldyn);
+
+ double cutoff; /* cutoff radius */
+ double cutoff_square; /* square of the cutoff radius */
+
+ t_linkcell lc; /* linked cell method */
+
+ double t; /* temperature */
+
+ /* integration function pointer */
+ int (*integrate)(struct s_moldyn *moldyn);
+ int time_steps; /* amount of iterations */
+ double tau; /* delta t */
+ double tau_square; /* delta t squared */
+
+ double energy; /* energy */
+
+ t_visual vis; /* visualization/log/save interface structure */
+ u8 lvstat; /* log & vis properties */
+ unsigned int ewrite; /* how often to log energy */
+ char efb[64]; /* energy log filename */
+ int efd; /* fd for energy log */
+ unsigned int mwrite; /* how often to log momentum */
+ char mfb[64]; /* momentum log filename */
+ int mfd; /* fd for momentum log */
+ unsigned int vwrite; /* how often to visualize atom information */
+ char vfb[64]; /* visualization file name base */
+ void *visual; /* pointer (hack!) */
+ unsigned int swrite; /* how often to create a save file */
+
+ u8 status; /* general moldyn properties */
+
+ t_random random; /* random interface */
+} t_moldyn;
+
+#define MOLDYN_LVSTAT_TOTAL_E 0x01
+#define MOLDYN_LVSTAT_TOTAL_M 0x02
+#define MOLDYN_LVSTAT_SAVE 0x04
+#define MOLDYN_LVSTAT_VISUAL 0x08
+#define MOLDYN_LVSTAT_INITIALIZED 0x10
+
+#define MOLDYN_STAT_PBX 0x08 /* periodic boudaries in x */
+#define MOLDYN_STAT_PBY 0x10 /* y */
+#define MOLDYN_STAT_PBZ 0x20 /* and z direction */
+
+typedef struct s_ho_params {
+ double spring_constant;
+ double equilibrium_distance;
+} t_ho_params;
+
+typedef struct s_lj_params {
+ double sigma6;
+ double sigma12;
+ double epsilon4;
+} t_lj_params;
+
+/* tersoff exchange structure to exchange 2bp and 3bp calculated values */