improved log/report subsystem, playing around w/ pressure, sic hook
[physik/posic.git] / moldyn.h
index 1300998..85a4950 100644 (file)
--- a/moldyn.h
+++ b/moldyn.h
@@ -133,12 +133,18 @@ typedef struct s_moldyn {
        int efd;                /* fd for energy log */
        unsigned int mwrite;    /* how often to log momentum */
        int mfd;                /* fd for momentum log */
+       unsigned int pwrite;    /* how often to log pressure */
+       int pfd;                /* fd for pressure log */
+       unsigned int twrite;    /* how often to log temperature */
+       int tfd;                /* fd for temperature log */
        unsigned int vwrite;    /* how often to visualize atom information */
        unsigned int swrite;    /* how often to create a save file */
        int rfd;                /* report file descriptor */
        char rtitle[64];        /* report title */
        char rauthor[64];       /* report author */
-       int pfd;                /* gnuplot script file descriptor */
+       int epfd;               /* energy gnuplot script file descriptor */
+       int ppfd;               /* pressure gnuplot script file descriptor */
+       int tpfd;               /* temperature gnuplot script file descriptor */
 
        u8 status;              /* general moldyn properties */
 
@@ -201,9 +207,11 @@ typedef struct s_moldyn {
 
 #define LOG_TOTAL_ENERGY               0x01
 #define LOG_TOTAL_MOMENTUM             0x02
-#define SAVE_STEP                      0x04
-#define VISUAL_STEP                    0x08
-#define CREATE_REPORT                  0x10
+#define LOG_PRESSURE                   0x04
+#define LOG_TEMPERATURE                        0x08
+#define SAVE_STEP                      0x10
+#define VISUAL_STEP                    0x20
+#define CREATE_REPORT                  0x40
 
 #define TRUE                           1
 #define FALSE                          0
@@ -230,9 +238,9 @@ typedef struct s_moldyn {
 #define LC_SI                  (0.543105e-9*METER)             /* A */
 #define M_SI                   28.08553                        /* amu */
 
-//#define LJ_SIGMA_SI          ((0.25*sqrt(3.0)*LC_SI)/1.122462)       /* A */
+#define LJ_SIGMA_SI            ((0.25*sqrt(3.0)*LC_SI)/1.122462)       /* A */
 //#define LJ_SIGMA_SI          (LC_SI/1.122462)                        /* A */
-#define LJ_SIGMA_SI            (0.5*sqrt(2.0)*LC_SI/1.122462)                  /* A */
+//#define LJ_SIGMA_SI          (0.5*sqrt(2.0)*LC_SI/1.122462)                  /* A */
 #define LJ_EPSILON_SI          (2.1678*EV)                             /* NA */
 
 #define TM_R_SI                        (2.7e-10*METER)                 /* A */
@@ -292,10 +300,11 @@ int set_pt_scale(t_moldyn *moldyn,u8 ptype,double ptc,u8 ttype,double ttc);
 int set_dim(t_moldyn *moldyn,double x,double y,double z,u8 visualize);
 int set_nn_dist(t_moldyn *moldyn,double dist);
 int set_pbc(t_moldyn *moldyn,u8 x,u8 y,u8 z);
-int set_potential1b(t_moldyn *moldyn,pf_func1b func,void *params);
-int set_potential2b(t_moldyn *moldyn,pf_func2b func,void *params);
-int set_potential2b_post(t_moldyn *moldyn,pf_func2b_post func,void *params);
-int set_potential3b(t_moldyn *moldyn,pf_func3b func,void *params);
+int set_potential1b(t_moldyn *moldyn,pf_func1b func);
+int set_potential2b(t_moldyn *moldyn,pf_func2b func);
+int set_potential2b_post(t_moldyn *moldyn,pf_func2b_post func);
+int set_potential3b(t_moldyn *moldyn,pf_func3b func);
+int set_potential_params(t_moldyn *moldyn,void *params);
 
 int moldyn_set_log_dir(t_moldyn *moldyn,char *dir);
 int moldyn_set_report(t_moldyn *moldyn,char *author,char *title);