int set_potential2b_post(t_moldyn *moldyn,pf_func2b_post func,void *params) {
- moldyn->func2b=func;
+ moldyn->func2b_post=func;
moldyn->pot2b_params=params;
return 0;
/* forces depending on chosen potential */
potential_force_calc(moldyn);
- //moldyn->potential_force_function(moldyn);
for(i=0;i<count;i++) {
/* again velocities */
if(ktom==&(itom[i]))
continue;
-//printf("Debug: atom %d before 3bp: %08x %08x %08x | %.15f %.15f %.15f\n",i,&itom[i],jtom,ktom,itom[i].r.x,itom[i].f.x,itom[i].v.x);
moldyn->func3b(moldyn,&(itom[i]),jtom,ktom,bc_ijk);
-//printf("Debug: atom %d after 3bp: %08x %08x %08x | %.15f %.15f %.15f\n",i,&itom[i],jtom,ktom,itom[i].r.x,itom[i].f.x,itom[i].v.x);
} while(list_next(that)!=\
L_NO_NEXT_ELEMENT);
} while(list_next(this)!=L_NO_NEXT_ELEMENT);
/* 2bp post function */
- if(moldyn->func2b_post)
+ if(moldyn->func2b_post) {
+printf("before 2bp post: %.15f %.15f %.15f\n",itom[i].f.x,itom[i].r.x,itom[i].v.x);
moldyn->func2b_post(moldyn,
&(itom[i]),
jtom,bc_ij);
+printf("after 2bp post: %.15f %.15f %.15f\n",itom[i].f.x,itom[i].r.x,itom[i].v.x);
+ }
}
}
mu=params->mu_m;
params->exchange.chi=params->chi;
}
-
if(d_ij>S)
return 0;
bracket=0.0;
bracket_n_1=0.0;
bracket_n=0.0;
- //printf("Foo -> 0: ");
}
else {
bracket=f_c_ik*g;
bracket_n_1=pow(bracket,n-1.0);
bracket_n=bracket_n_1*bracket;
- //printf("Foo -> 1: ");
}
-//printf("%.15f %.15f %.15f\n",bracket_n_1,bracket_n,bracket);
/* calc of db_ij and the 2 sums */
exchange->sum1_3bp+=bracket_n;
int (*func1b)(struct s_moldyn *moldyn,t_atom *ai);
void *pot1b_params;
int (*func2b)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
- void (*func2b_post)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,
- u8 bc);
+ int (*func2b_post)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,u8 bc);
void *pot2b_params;
int (*func3b)(struct s_moldyn *moldyn,t_atom *ai,t_atom *aj,t_atom *ak,
u8 bck);
printf("[sic] creating atoms\n");
create_lattice(&md,DIAMOND,LC_SI,SI,M_SI,
ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP|ATOM_ATTR_HB,
- //ATOM_ATTR_1BP|ATOM_ATTR_2BP|ATOM_ATTR_3BP,
//ATOM_ATTR_2BP|ATOM_ATTR_HB,
0,5,5,5);