some changes
authorhackbard <hackbard>
Wed, 16 Aug 2006 14:45:22 +0000 (14:45 +0000)
committerhackbard <hackbard>
Wed, 16 Aug 2006 14:45:22 +0000 (14:45 +0000)
moldyn.c

index 3424d49..dc2dd8e 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
@@ -969,7 +969,7 @@ int tersoff(t_moldyn *moldyn) {
        lc=&(moldyn->lc);
        count=moldyn->count;
        
-       /* reset enrgy counter */
+       /* reset energy counter */
        u=0.0;
 
        for(i=0;i<count;i++) {
@@ -995,6 +995,26 @@ int tersoff(t_moldyn *moldyn) {
 
                        /* 2 body stuff */
 
+                       v3_sub(&dist_ij,btom,&(atom[i]));
+                       d_ij=v3_norm(&dist_ij);
+                       if(d_ij<=S) {
+                               if(d_ij<=R) {
+                                       f_c=1.0;
+                                       df_c=0.0;
+                               }
+                               else {
+                                       s_r=S-R;
+                                       arg1=PI*(d_ij-R)/s_r;
+                                       f_c=0.5+0.5*cos(arg1);
+                                       df_c=-0.5*sin(arg1)*(PI/(s_r*d_ij));
+                               }
+                       }
+                       else 
+                               continue;               
+
+                       
+                       /* end 2 body stuff */ 
+
                        /* determine cell neighbours of btom */
                        ki=(btom->r.x+(moldyn->dim.x/2))/lc->x;
                        kj=(btom->r.y+(moldyn->dim.y/2))/lc->y;
@@ -1013,6 +1033,16 @@ int tersoff(t_moldyn *moldyn) {
                                        continue;
                                
                                /* 3 body stuff (1) */
+                               
+                               theta_ijk=;
+                               sin_theta=;
+                               cos_theta=;
+                               hi_cos=;
+                               hi_cos_square=;
+
+
+                               /* end 3 body stuff (1) */
+
 
                        } while(list_next(thisk)!=L_NO_NEXT_ELEMENT);