re:A bug is found in pair lj/smooth/linear and problem is cracked

Sorry, instead of saying “used this potential”, I should have said “replaced this potential”. In addition, I used the lammps version 10Apr12. I am not sure if this problem is solved in later versions. Anyway, hopefully the corrected code could be or have already been included in the latest package, so that more people could benefit.

hi steffani,

Sorry, instead of saying "used this potential", I should have said "replaced
this potential". In addition, I used the lammps version 10Apr12. I am not
sure if this problem is solved in later versions. Anyway, hopefully the

no, it isn't. this is one of the "features", where the fault is clearly
due to insufficient testing of the contributing author of the code,
but it could be avoided in the baseline code.

however people like me have failed to convinced steve that this
is the way to go. please see the most recent thread on this in
the mailing list archives.

http://lammps.sandia.gov/threads/msg28684.html

cheers,
     axel.

Thank you, Dr. Kohlmeyer. It is good to know there exist such problems before trying to use these parts of the code to do research. I guess it would be very helpful to point it out in Lammps developer's manual explicitly so that people can be cautious about it while adding a force field.

hi steffani,

Sorry, instead of saying "used this potential", I should have said "replaced
this potential". In addition, I used the lammps version 10Apr12. I am not
sure if this problem is solved in later versions. Anyway, hopefully the

no, it isn't. this is one of the "features", where the fault is clearly
due to insufficient testing of the contributing author of the code,
but it could be avoided in the baseline code.

Axel and I were worried these inconsistencies would find their way
into user-submitted pair styles.
http://lammps.sandia.gov/threads/msg28689.html

I think it is not a bad idea to insure that
"cut[itype][jtype]=cut[jtype][itype];" in the core pair_styles which
use cutoffs. Thanks Steffani. Let's bug Steve.

(Since I'm at it, incidentally, there's a broken image link in the online docs
http://lammps.sandia.gov/doc/pair_lj_smooth_linear.html)

Cheers
Andrew

Posted a patch to fix this bug in pair lj/smooth/linear.

The only pair styles that need to do this are those that
use cut[][] in their compute() method. There are only a couple
that do this. It's a bug if the developer doesn't set j,i = i.j
in the init_one() method for any type-based array that is used
in compute(), including cut[][]. I don't see that cut[][] should
be treated any differently than the others.

It can't be set in the parent Pair() class, b/c the parent
doesn't know about cut. The child class declares and allocates
it.

Thanks,
Steve