#define MOLDYN_H
#include "math/math.h"
+#include "random/random.h"
/* datatypes */
double mass; /* atom mass */
} t_atom;
+typedef struct s_moldyn {
+ int count;
+ t_atom *atom;
+ double (*potential)(struct s_moldyn *moldyn);
+ void *pot_params;
+ int (*force)(struct s_moldyn *moldyn);
+ double cutoff_square;
+ t_3dvec dim;
+ unsigned char status;
+} t_moldyn;
-/* defines */
+typedef struct s_lj_params {
+ double sigma6;
+ double sigma12;
+ double epsilon;
+} t_lj_params;
+
+/*
+ * defines
+ */
+
+/* general defines */
+
+#define MOLDYN_STAT_POTENTIAL 0x01
+#define MOLDYN_STAT_FORCE 0x02
+
+/* phsical values */
+
+//#define K_BOLTZMANN 1.3807E-23
+#define K_BOLTZMANN 1.0
#define FCC 0x01
#define DIAMOND 0x02
int create_lattice(unsigned char type,int element,double mass,double lc,
int a,int b,int c,t_atom **atom);
+int destroy_lattice(t_atom *atom);
+int thermal_init(t_atom *atom,t_random *random,int count,double t);
+int scale_velocity(t_atom *atom,int count,double t);
+double get_e_kin(t_atom *atom,int count);
+double get_e_pot(t_moldyn *moldyn);
+double get_total_energy(t_moldyn *moldyn);
+t_3dvec get_total_p(t_atom *atom,int count);
+
+double potential_lennard_jones(t_moldyn *moldyn);
#endif