printf("-V <steps> <filebase> (rasmol file)\n");
printf("--- physics options ---\n");
printf("-T <temperature> [K] (%f)\n",MOLDYN_TEMP);
- printf("-t <timestep tau> [s] (%f)\n",MOLDYN_TAU);
+ printf("-t <timestep tau> [s] (%.15f)\n",MOLDYN_TAU);
printf("-R <runs> (%d)\n",MOLDYN_RUNS);
printf("\n");
d=v3_norm(&distance);
if(d<=moldyn->cutoff) {
v3_scale(&force,&distance,
- (-sc*(1.0-(equi_dist/d))));
+ -sc*(1.0-(equi_dist/d)));
v3_add(&(atom[i].f),&(atom[i].f),&force);
v3_sub(&(atom[j].f),&(atom[j].f),&force);
}
u=0.0;
for(i=0;i<count;i++) {
for(j=0;j<i;j++) {
- v3_sub(&distance,&(atom[j].r),&(atom[i].r));
+ v3_sub(&distance,&(atom[i].r),&(atom[j].r));
d=1.0/v3_absolute_square(&distance); /* 1/r^2 */
help=d*d; /* 1/r^4 */
help*=d; /* 1/r^6 */
count=moldyn->count;
params=moldyn->pot_params;
eps=params->epsilon4;
- sig6=params->sigma6;
- sig12=params->sigma12;
+ sig6=6*params->sigma6;
+ sig12=12*params->sigma12;
for(i=0;i<count;i++) v3_zero(&(atom[i].f));
for(i=0;i<count;i++) {
for(j=0;j<i;j++) {
- v3_sub(&distance,&(atom[j].r),&(atom[i].r));
+ v3_sub(&distance,&(atom[i].r),&(atom[j].r));
v3_per_bound(&distance,&(moldyn->dim));
d=v3_absolute_square(&distance);
if(d<=moldyn->cutoff_square) {
h2*=sig6;
/* actually there would be a '-', *
* but f=-d/dr potential */
- d=-12.0*h1+6.0*h2;
+ d=h1+h2;
d*=eps;
v3_scale(&force,&distance,d);
v3_add(&(atom[i].f),&(atom[i].f),&force);
/* testing purpose
count=2;
si=malloc(2*sizeof(t_atom));
- si[0].r.x=0.23*sqrt(3.0)*LC_SI/2.0;
+ si[0].r.x=0.13*sqrt(3.0)*LC_SI/2.0;
si[0].r.y=0;
si[0].r.z=0;
si[0].element=SI;
lj.epsilon4=4.0*LJ_EPSILON_SI;
ho.equilibrium_distance=0.25*sqrt(3.0)*LC_SI;
- ho.spring_constant=4.0*LJ_EPSILON_SI;
+ ho.spring_constant=1.0;
u=get_e_pot(&md);