tau_square=moldyn->tau_square;
for(i=0;i<count;i++) {
+ /* check whether fixed atom */
+ if(atom[i].attr&ATOM_ATTR_FP)
+ continue;
/* new positions */
h=0.5/atom[i].mass;
v3_scale(&delta,&(atom[i].v),tau);
potential_force_calc(moldyn);
for(i=0;i<count;i++) {
+ /* check whether fixed atom */
+ if(atom[i].attr&ATOM_ATTR_FP)
+ continue;
/* again velocities [actually v(t+tau)] */
v3_scale(&delta,&(atom[i].f),0.5*tau/atom[i].mass);
v3_add(&(atom[i].v),&(atom[i].v),&delta);
//printf("\nATOM 0: %f %f %f\n\n",itom->f.x,itom->f.y,itom->f.z);
if(moldyn->time>DSTART&&moldyn->time<DEND) {
printf("force:\n");
- printf(" x: %0.40f\n",moldyn->atom[5832].f.x);
- printf(" y: %0.40f\n",moldyn->atom[5832].f.y);
- printf(" z: %0.40f\n",moldyn->atom[5832].f.z);
+ printf(" x: %0.40f\n",moldyn->atom[DATOM].f.x);
+ printf(" y: %0.40f\n",moldyn->atom[DATOM].f.y);
+ printf(" z: %0.40f\n",moldyn->atom[DATOM].f.z);
}
#endif
moldyn->run3bp=0;
return 0;
}
-//if(ai==&(moldyn->atom[5832]))
-// printf(" %d: %d (%f)\n",ai->tag,aj->tag,moldyn->time);
/* d_ij */
d_ij=sqrt(d_ij2);
#ifdef DEBUG
if(moldyn->time>DSTART&&moldyn->time<DEND) {
- if((ai==&(moldyn->atom[5832]))|(aj==&(moldyn->atom[5832]))) {
+ if((ai==&(moldyn->atom[DATOM]))|(aj==&(moldyn->atom[DATOM]))) {
printf("force 3bp (j2): [%d %d sum]\n",ai->tag,aj->tag);
- printf("adding %f %f %f\n",force.x,force.y,force.z);
+ printf(" adding %f %f %f\n",force.x,force.y,force.z);
if(ai==&(moldyn->atom[0]))
- printf("total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z);
+ printf(" total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z);
if(aj==&(moldyn->atom[0]))
- printf("total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z);
- printf("energy: %f = %f %f %f %f\n",0.5*f_c*(b*f_a+f_r),
+ printf(" total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z);
+ printf(" energy: %f = %f %f %f %f\n",0.5*f_c*(b*f_a+f_r),
f_c,b,f_a,f_r);
- printf(" %f %f %f\n",exchange->zeta_ij,.0,.0);
+ printf(" %f %f %f\n",exchange->zeta_ij,.0,.0);
}
}
#endif
#ifdef DEBUG
if(moldyn->time>DSTART&&moldyn->time<DEND) {
- if(ai==&(moldyn->atom[5832])) {
+ if(ai==&(moldyn->atom[DATOM])) {
printf("force 3bp (k2): [%d %d %d]\n",ai->tag,aj->tag,ak->tag);
- printf("adding %f %f %f\n",force.x,force.y,force.z);
- printf("total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z);
+ printf(" adding %f %f %f\n",force.x,force.y,force.z);
+ printf(" total i: %f %f %f\n",ai->f.x,ai->f.y,ai->f.z);
+ printf(" angle: %f\n",acos(cos_theta)*360.0/(2*M_PI));
+ printf(" d ij ik = %f %f\n",d_ij,d_ik);
}
}
#endif
#ifdef DEBUG
if(moldyn->time>DSTART&&moldyn->time<DEND) {
- if(aj==&(moldyn->atom[5832])) {
+ if(aj==&(moldyn->atom[DATOM])) {
printf("force 3bp (k2): [%d %d %d]\n",ai->tag,aj->tag,ak->tag);
- printf("adding %f %f %f\n",force.x,force.y,force.z);
- printf("total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z);
+ printf(" adding %f %f %f\n",force.x,force.y,force.z);
+ printf(" total j: %f %f %f\n",aj->f.x,aj->f.y,aj->f.z);
+ printf(" angle: %f\n",acos(cos_theta)*360.0/(2*M_PI));
+ printf(" d ij ik = %f %f\n",d_ij,d_ik);
}
}
#endif
#ifdef DEBUG
if(moldyn->time>DSTART&&moldyn->time<DEND) {
- if(ak==&(moldyn->atom[5832])) {
+ if(ak==&(moldyn->atom[DATOM])) {
printf("force 3bp (k2): [%d %d %d]\n",ai->tag,aj->tag,ak->tag);
- printf("adding %f %f %f\n",force.x,force.y,force.z);
- printf("total k: %f %f %f\n",ak->f.x,ak->f.y,ak->f.z);
+ printf(" adding %f %f %f\n",force.x,force.y,force.z);
+ printf(" total k: %f %f %f\n",ak->f.x,ak->f.y,ak->f.z);
+ printf(" angle: %f\n",acos(cos_theta)*360.0/(2*M_PI));
+ printf(" d ij ik = %f %f\n",d_ij,d_ik);
}
}
#endif