fixed several stupid mistakes
[physik/posic.git] / moldyn.h
index e9f1495..3016bc4 100644 (file)
--- a/moldyn.h
+++ b/moldyn.h
@@ -23,7 +23,9 @@ typedef struct s_atom {
 } t_atom;
 
 typedef struct s_linkcell {
+       int listfd;
        int nx,ny,nz;
+       int cells;
        double x,y,z;
        t_list *subcell;
 } t_linkcell;
@@ -53,6 +55,7 @@ typedef struct s_moldyn {
        /* energy */
        double energy;
        /* logging & visualization */
+       t_visual vis;
        unsigned char lvstat;
        unsigned int ewrite;
        char efb[64];
@@ -71,6 +74,8 @@ typedef struct s_moldyn {
        void *visual;
        /* moldyn general status */
        unsigned char status;
+       /* random */
+       t_random random;
 } t_moldyn;
 
 typedef struct s_ho_params {
@@ -102,6 +107,7 @@ typedef struct s_lj_params {
 
 #define MOLDYN_TEMP                    273.0
 #define MOLDYN_TAU                     1.0e-15
+#define MOLDYN_CUTOFF                  10.0e-9
 #define MOLDYN_RUNS                    1000000
 
 #define MOLDYN_INTEGRATE_VERLET                0x00
@@ -125,20 +131,21 @@ typedef struct s_lj_params {
 #define SI                     0x0e
 #define LC_SI                  0.543105e-9                             /* m */
 #define M_SI                   (28.085*AMU)                            /* kg */
-#define LJ_SIGMA_SI            ((0.25*sqrt(3.0)*LC_SI)/1.122462)       /* m */
+#define LJ_SIGMA_SI            ((0.20*sqrt(3.0)*LC_SI)/1.122462)       /* m */
 #define LJ_EPSILON_SI          (2.1678*1.60e-19)                       /* Nm */
 
 /* function prototypes */
 
 int moldyn_usage(char **argv);
 int moldyn_parse_argv(t_moldyn *moldyn,int argc,char **argv);
-int moldyn_log_init(t_moldyn *moldyn,void *v);
+int moldyn_log_init(t_moldyn *moldyn);
+int moldyn_init(t_moldyn *moldyn,int argc,char **argv);
 int moldyn_shutdown(t_moldyn *moldyn);
 
 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_moldyn *moldyn,t_random *random);
+int thermal_init(t_moldyn *moldyn);
 int scale_velocity(t_moldyn *moldyn);
 double get_e_kin(t_atom *atom,int count);
 double get_e_pot(t_moldyn *moldyn);