 # [lammps-users] r_ij(f_ij*v_i)

Dear Steve & Lammps user

I want to calculate r_ij(f_ij*v_i) as a output qunatity. But it seems I am doing some thing wrong.
the code is as follows:

if (rsq < cutsq[itype][jtype]) {
force->pair->single(i,j,itype,jtype,rsq,factor_coul,factor_lj,0,one);
fforce = one.fforce;
//////////////////////
// multiplying f_ij*v_i

stress[i] -= v[i]*fforce;
stress[i] -= v[i]*fforce;
stress[i] -= v[i]*fforce;
stress[i] -= v[i]*fforce;
stress[i] -= v[i]*fforce;
stress[i] -= v[i]*fforce;

//calculating r_ij (f_ij*v_i)

for (i = 0; i < nlocal; i++) {
if (rsq < cutsq[itype][jtype]) {

stress[i] = delxdelx;
stress[i] = delydely;
stress[i] = delzdelz;
stress[i] = delxdely;
stress[i] = delxdelz;
stress[i] = delydelz;}
}

Is something wrong with the code? because I am not getting the result as I expected. any suggestions???

thanx and regards

Vijay

Do you get the right answer for a 2-atom system?
Then try 3 pairs. You should be able to do this
by hand and see where your mistake is.

Steve