func2b is now again real func2b ... still -> nan! :/
[physik/posic.git] / moldyn.h
index 41b711a..b2f7522 100644 (file)
--- a/moldyn.h
+++ b/moldyn.h
@@ -73,8 +73,7 @@ typedef struct s_moldyn {
        int (*func1b)(struct s_moldyn *moldyn,t_atom *ai);
        void *pot1b_params;
        int (*func2b)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
-       void (*func2b_post)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,
-                           u8 bc);
+       int (*func2b_post)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
        void *pot2b_params;
        int (*func3b)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,t_atom *ak,
                      u8 bck);
@@ -194,12 +193,14 @@ typedef struct s_tersoff_exchange {
        double d2;
        double c2d2;
        double betan;
+       double n_betan;
 
        u8 run3bp;
+       u8 run2bp_post;
 
        t_3dvec db_ij;
-       double 3bp_sum1;
-       double 3bp_sum2;
+       double sum1_3bp;
+       double sum2_3bp;
 } t_tersoff_exchange;
 
 /* tersoff multi (2!) potential parameters */
@@ -372,6 +373,7 @@ int lennard_jones(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
 int tersoff_mult_complete_params(t_tersoff_mult_params *p);
 int tersoff_mult_1bp(t_moldyn *moldyn,t_atom *ai);
 int tersoff_mult_2bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
+int tersoff_mult_post_2bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
 int tersoff_mult_3bp(t_moldyn *moldyn,t_atom *ai,t_atom *aj,t_atom *ak,u8 bc);
 
 #endif