started potentials
[physik/posic.git] / moldyn.h
index 85bbfd7..30c4bf8 100644 (file)
--- a/moldyn.h
+++ b/moldyn.h
@@ -9,6 +9,7 @@
 #define MOLDYN_H
 
 #include "math/math.h"
+#include "random/random.h"
 
 /* datatypes */
 
@@ -21,9 +22,33 @@ typedef struct s_atom {
 } t_atom;
 
 
-/* defines */
+typedef struct s_moldyn {
+       int count;
+       t_atom *atom;
+       double (*potential)(void *ptr);
+       int (*force)(struct s_moldyn *moldyn,void *ptr);
+       unsigned char status;
+} t_moldyn;
 
-#define K_BOLTZMANN            1.3807E-23;
+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
@@ -39,5 +64,12 @@ typedef struct s_atom {
 
 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);
+t_3dvec get_total_p(t_atom *atom,int count);
+
+double potential_lennard_jones_2(t_moldyn *moldyn,void *ptr);
 
 #endif