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);
for(i=0;i<a;i++) {
r.y=o.y;
for(j=0;j<b;j++) {
+ r.z=o.z;
for(k=0;k<c;k++) {
- r.z=o.z;
v3_copy(&(atom[count].r),&r);
count+=1;
r.z+=lc;
/* energy scaling factor */
energy_scale=moldyn->count*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)
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);
}
}