#include "math/math.h"
#include "random/random.h"
+#include "list/list.h"
/* datatypes */
t_3dvec r; /* positions */
t_3dvec v; /* velocities */
t_3dvec f; /* forces */
+ t_3dvec dr; /* delta r for verlet list updates */
int element; /* number of element in pse */
double mass; /* atom mass */
- //t_list vicinity /* verlet neighbour list */
+ t_list verlet; /* verlet neighbour list */
} t_atom;
+typedef struct s_linkcell {
+ int nx,ny,nz;
+ double x,y,z;
+ t_list *subcell;
+} t_linkcell;
+
#include "visual/visual.h"
typedef struct s_moldyn {
double (*potential)(struct s_moldyn *moldyn);
int (*force)(struct s_moldyn *moldyn);
void *pot_params;
+ /* cut off radius, verlet list & co */
double cutoff;
double cutoff_square;
+ double r_verlet;
+ double dr_max1;
+ double dr_max2;
+ /* linked list / cell method */
+ t_linkcell lc;
/* temperature */
double t;
/* integration of newtons equations */
double estimate_time_step(t_moldyn *moldyn,double nn_dist,double t);
+int verlet_list_init(t_moldyn *moldyn);
+int link_cell_init(t_moldyn *moldyn);
+int verlet_list_update(t_moldyn *moldyn);
+int link_cell_update(t_moldyn *moldyn);
+int verlet_list_shutdown(t_moldyn *moldyn);
+int link_cell_shutdown(t_moldyn *moldyn);
+
int moldyn_integrate(t_moldyn *moldyn);
int velocity_verlet(t_moldyn *moldyn);