From: hackbard Date: Wed, 16 Aug 2006 15:22:32 +0000 (+0000) Subject: little more tersoff ... X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=d445878769b7fcc15959d2d10f2eeced803c5487;p=physik%2Fposic.git little more tersoff ... --- diff --git a/Makefile b/Makefile index 7096b48..3c8fcd1 100644 --- 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 diff --git a/moldyn.c b/moldyn.c index dc2dd8e..1b52a56 100644 --- 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