X-Git-Url: https://www.hackdaworld.org/gitweb/?a=blobdiff_plain;f=moldyn.c;h=881f0b698565fe7495ee151ecca63239d32e74cf;hb=c0ddf2bdd8067456f39f6b63fe2261624ebde6b7;hp=f564075adece43f086ccd660cba312c4e6cd1ed3;hpb=4871747c5c848e5881bea7949a41ceb589263841;p=physik%2Fposic.git diff --git a/moldyn.c b/moldyn.c index f564075..881f0b6 100644 --- a/moldyn.c +++ b/moldyn.c @@ -344,7 +344,10 @@ int create_lattice(t_moldyn *moldyn,u8 type,double lc,int element,double mass, switch(type) { case CUBIC: - ret=cubic_init(a,b,c,lc,atom,NULL); + origin.x=0.5*lc; + origin.y=0.5*lc; + origin.z=0.5*lc; + ret=cubic_init(a,b,c,lc,atom,&origin); break; case FCC: ret=fcc_init(a,b,c,lc,atom,NULL); @@ -399,8 +402,8 @@ int cubic_init(int a,int b,int c,double lc,t_atom *atom,t_3dvec *origin) { for(i=0;icount*EV; +printf("debug: %f\n",moldyn->atom[0].f.x); /* calculate initial forces */ potential_force_calc(moldyn); +printf("debug: %f\n",moldyn->atom[0].f.x); /* some stupid checks before we actually start calculating bullshit */ if(moldyn->cutoff>0.5*moldyn->dim.x) @@ -1232,8 +1237,8 @@ int moldyn_integrate(t_moldyn *moldyn) { if(!(i%v)) { visual_atoms(&(moldyn->vis),moldyn->time, moldyn->atom,moldyn->count); - printf("\rsched: %d, steps: %d, debug: %f | %f", - sched->count,i,moldyn->p/ATM,moldyn->p/ATM); + printf("\rsched: %d, steps: %d, debug: %f", + sched->count,i,moldyn->p/ATM); fflush(stdout); } }