From: hackbard Date: Wed, 5 Apr 2006 23:16:30 +0000 (+0000) Subject: even more testing ... X-Git-Url: https://hackdaworld.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bdb198c5a5fe38361d10f98e7db366b0915e56fb;p=physik%2Fposic.git even more testing ... --- diff --git a/moldyn.c b/moldyn.c index db575e9..7f9745a 100644 --- a/moldyn.c +++ b/moldyn.c @@ -33,7 +33,7 @@ int moldyn_usage(char **argv) { printf("-V (rasmol file)\n"); printf("--- physics options ---\n"); printf("-T [K] (%f)\n",MOLDYN_TEMP); - printf("-t [s] (%f)\n",MOLDYN_TAU); + printf("-t [s] (%.15f)\n",MOLDYN_TAU); printf("-R (%d)\n",MOLDYN_RUNS); printf("\n"); @@ -520,7 +520,7 @@ int force_harmonic_oscillator(t_moldyn *moldyn) { d=v3_norm(&distance); if(d<=moldyn->cutoff) { v3_scale(&force,&distance, - (-sc*(1.0-(equi_dist/d)))); + -sc*(1.0-(equi_dist/d))); v3_add(&(atom[i].f),&(atom[i].f),&force); v3_sub(&(atom[j].f),&(atom[j].f),&force); } @@ -554,7 +554,7 @@ double potential_lennard_jones(t_moldyn *moldyn) { u=0.0; for(i=0;icount; params=moldyn->pot_params; eps=params->epsilon4; - sig6=params->sigma6; - sig12=params->sigma12; + sig6=6*params->sigma6; + sig12=12*params->sigma12; for(i=0;idim)); d=v3_absolute_square(&distance); if(d<=moldyn->cutoff_square) { @@ -600,7 +600,7 @@ int force_lennard_jones(t_moldyn *moldyn) { h2*=sig6; /* actually there would be a '-', * * but f=-d/dr potential */ - d=-12.0*h1+6.0*h2; + d=h1+h2; d*=eps; v3_scale(&force,&distance,d); v3_add(&(atom[i].f),&(atom[i].f),&force); diff --git a/posic.c b/posic.c index 992f9d1..8bbfe0e 100644 --- a/posic.c +++ b/posic.c @@ -60,7 +60,7 @@ int main(int argc,char **argv) { /* testing purpose count=2; si=malloc(2*sizeof(t_atom)); - si[0].r.x=0.23*sqrt(3.0)*LC_SI/2.0; + si[0].r.x=0.13*sqrt(3.0)*LC_SI/2.0; si[0].r.y=0; si[0].r.z=0; si[0].element=SI; @@ -111,7 +111,7 @@ int main(int argc,char **argv) { lj.epsilon4=4.0*LJ_EPSILON_SI; ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI; - ho.spring_constant=4.0*LJ_EPSILON_SI; + ho.spring_constant=1.0; u=get_e_pot(&md); diff --git a/posic.h b/posic.h index d31331f..44caf18 100644 --- a/posic.h +++ b/posic.h @@ -23,9 +23,9 @@ #define TEMPERATURE 273.0 -#define LEN_X 3 -#define LEN_Y 3 -#define LEN_Z 3 +#define LEN_X 10 +#define LEN_Y 10 +#define LEN_Z 10 #define R_CUTOFF (0.25*LEN_Z)