X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.c;h=9d9901c55d90c3effd806ded40ce2d93dc1b2430;hb=d9e7f195bbb219ad4c2de0e5f54d023ef9e669fb;hp=8f6f2625b61feec5bb44ad6bcade796873055edf;hpb=0330ccfb257bae2f8e1c4a23e80fe7fe866feec2;p=physik%2Fposic.git diff --git a/moldyn.c b/moldyn.c index 8f6f262..9d9901c 100644 --- a/moldyn.c +++ b/moldyn.c @@ -385,12 +385,17 @@ int scale_velocity(t_moldyn *moldyn,u8 equi_init) { else if(moldyn->pt_scale&T_SCALE_BERENDSEN) scale=1.0+moldyn->tau*(scale-1.0)/moldyn->t_tc; +printf("scale=%f\n",scale); scale=sqrt(scale); +printf("debug: %f %f %f %f \n",scale,moldyn->t_ref,moldyn->t,moldyn->tau); /* velocity scaling */ - for(i=0;icount;i++) + for(i=0;icount;i++) { +printf("vorher: %f\n",atom[i].v.x); if((equi_init&TRUE)||(atom[i].attr&ATOM_ATTR_HB)) v3_scale(&(atom[i].v),&(atom[i].v),scale); +printf("nachher: %f\n",atom[i].v.x); + } return 0; } @@ -447,12 +452,6 @@ double estimate_time_step(t_moldyn *moldyn,double nn_dist) { /* nn_dist is the nearest neighbour distance */ - if(moldyn->t==5.0) { - printf("[moldyn] i do not estimate timesteps below %f K!\n", - MOLDYN_CRITICAL_EST_TEMP); - return 23.42; - } - tau=(0.05*nn_dist*moldyn->atom[0].mass)/sqrt(3.0*K_BOLTZMANN*moldyn->t); return tau; @@ -813,6 +812,7 @@ int velocity_verlet(t_moldyn *moldyn) { /* generic potential and force calculation */ int potential_force_calc(t_moldyn *moldyn) { +printf("start pot force calc\n"); int i,j,k,count; t_atom *itom,*jtom,*ktom; @@ -833,6 +833,9 @@ int potential_force_calc(t_moldyn *moldyn) { /* get energy and force of every atom */ for(i=0;imu_m=0.5*(p->mu[0]+p->mu[1]); printf("[moldyn] tersoff mult parameter info:\n"); - printf(" S (m) | %.12f | %.12f | %.12f\n",p->S[0],p->S[1],p->Smixed); - printf(" R (m) | %.12f | %.12f | %.12f\n",p->R[0],p->R[1],p->Rmixed); + printf(" S (A) | %f | %f | %f\n",p->S[0],p->S[1],p->Smixed); + printf(" R (A) | %f | %f | %f\n",p->R[0],p->R[1],p->Rmixed); printf(" A (eV) | %f | %f | %f\n",p->A[0]/EV,p->A[1]/EV,p->Amixed/EV); printf(" B (eV) | %f | %f | %f\n",p->B[0]/EV,p->B[1]/EV,p->Bmixed/EV); printf(" lambda | %f | %f | %f\n",p->lambda[0],p->lambda[1],