little more tersoff ...
authorhackbard <hackbard>
Wed, 16 Aug 2006 15:22:32 +0000 (15:22 +0000)
committerhackbard <hackbard>
Wed, 16 Aug 2006 15:22:32 +0000 (15:22 +0000)
Makefile
moldyn.c

index 7096b48..3c8fcd1 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,5 @@
 CC=gcc
-CFLAGS=-Wall -DSIMPLE_TESTING
+CFLAGS=-Wall #-DSIMPLE_TESTING
 LDFLAGS=-lm
 
 OBJS=init/init.o visual/visual.o math/math.o random/random.o list/list.o
index dc2dd8e..1b52a56 100644 (file)
--- a/moldyn.c
+++ b/moldyn.c
@@ -998,6 +998,14 @@ int tersoff(t_moldyn *moldyn) {
                        v3_sub(&dist_ij,btom,&(atom[i]));
                        d_ij=v3_norm(&dist_ij);
                        if(d_ij<=S) {
+
+                               S=;
+                               R=;
+                               A=;
+                               lambda=;
+                               B=;
+                               mu=;
+
                                if(d_ij<=R) {
                                        f_c=1.0;
                                        df_c=0.0;
@@ -1007,6 +1015,8 @@ int tersoff(t_moldyn *moldyn) {
                                        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));
+                                       f_r=A*exp(-lambda*d_ij);
+                                       f_a=-B*exp(-mu*d_ij);
                                }
                        }
                        else