From: hackbard Date: Thu, 30 Mar 2006 19:00:00 +0000 (+0000) Subject: lennard jones force X-Git-Url: https://hackdaworld.org/gitweb/?a=commitdiff_plain;h=4e6604346459a4a8619bfc45f2a4b7dbd925ae86;p=physik%2Fposic.git lennard jones force --- diff --git a/math/math.c b/math/math.c index 9217c88..6488248 100644 --- a/math/math.c +++ b/math/math.c @@ -76,7 +76,7 @@ double v3_norm(t_3dvec *a) { return(sqrt(v3_absolute_square(a))); } -int v3_per_bounds(t_3dvec *a,t_3dvec *dim) { +int v3_per_bound(t_3dvec *a,t_3dvec *dim) { double x,y,z; diff --git a/math/math.h b/math/math.h index 5ef7163..77100f3 100644 --- a/math/math.h +++ b/math/math.h @@ -27,6 +27,6 @@ int v3_copy(t_3dvec *trg,t_3dvec *src); int v3_cmp(t_3dvec *a,t_3dvec *b); double v3_absolute_square(t_3dvec *a); double v3_norm(t_3dvec *a); -int v3_per_bounds(t_3dvec *a,t_3dvec *dim); +int v3_per_bound(t_3dvec *a,t_3dvec *dim); #endif diff --git a/moldyn.c b/moldyn.c index 82749b2..57ae62f 100644 --- a/moldyn.c +++ b/moldyn.c @@ -226,10 +226,16 @@ int force_lennard_jones(t_moldyn *moldyn) { t_3dvec distance; t_3dvec force; double d,h1,h2; + double eps,sig6,sig12; atom=moldyn->atom; count=moldyn->count; params=moldyn->pot_params; + eps=params->epsilon; + sig6=params->sigma6; + sig12=params->sigma12; + + for(i=0;i