bugfix dg of dV_ji,jk
[physik/posic.git] / moldyn.h
index 9493f5f..23b5100 100644 (file)
--- a/moldyn.h
+++ b/moldyn.h
 /* general */
 typedef unsigned char u8;
 
+/* virial */
+typedef struct s_virial {
+       double xx;      /*                      | xx     xy     xz |    */
+       double yy;      /*      V       =       | yx     yy     yz |    */
+       double zz;      /*                      | zx     zy     zz |    */
+       double xy;      /*                                              */
+       double xz;      /*      with:   xy=yx, xz=zx, yz=zy             */
+       double yz;      /*                                              */
+} t_virial;
+
 /* the atom of the md simulation */
 typedef struct s_atom {
        t_3dvec r;              /* position */
        t_3dvec v;              /* velocity */
        t_3dvec f;              /* force */
-       t_3dvec virial;         /* virial (v_xx, v_yy, v_zz) */
+       t_virial virial;        /* virial */
        double e;               /* site energy */
        int element;            /* number of element in pse */
        double mass;            /* atom mass */
@@ -57,7 +67,8 @@ typedef struct s_linkcell {
 
 /* moldyn schedule structure */
 typedef struct s_moldyn_schedule {
-       int content_count;
+       int count;
+       int total_sched;
        int *runs;
        double *tau;
        int (*hook)(void *moldyn,void *hook);
@@ -184,6 +195,7 @@ typedef struct s_tersoff_exchange {
        double f_a,df_a;
 
        t_3dvec dist_ij;
+       double d_ij2;
        double d_ij;
 
        double chi;
@@ -221,8 +233,10 @@ typedef struct s_tersoff_exchange {
 /* tersoff multi (2!) potential parameters */
 typedef struct s_tersoff_mult_params {
        double S[2];            /* tersoff cutoff radii */
+       double S2[2];           /* tersoff cutoff radii squared */
        double R[2];            /* tersoff cutoff radii */
        double Smixed;          /* mixed S radius */
+       double S2mixed;         /* mixed S radius squared */
        double Rmixed;          /* mixed R radius */
        double A[2];            /* factor of tersoff attractive part */
        double B[2];            /* factor of tersoff repulsive part */
@@ -309,6 +323,7 @@ typedef struct s_tersoff_mult_params {
 #define SI                     0x0e
 #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_EPSILON_SI          (2.1678*EV)                             /* NA */