[lammps-users] A few problems

Hi there,

A few weeks ago I ran LAMMPS to calculate the pressure tensor. I had
expected that “pair_modify tail yes” would give more precise result than
“pair_modify shift yes”, but I turned out that when the former was used
the off-diagonal components of the pressure tensor would not converge
to zero, even for pure nve runs. While when the latter was employed,
there was no such problem. I am wondering if there is something wrong
with “tail” or it should be so?

Another thing is related to the OPLS dihedral coefficients. When we set
these parameters from “read_data”, we should provide the value for
“K”, while in the restart file, “K/2” is saved. When we use restart2data.cpp
to convert the binary into data file, what we get will still be “K/2”. As a result,
if we want to do another simulation from the data file, we have to multiply the
according parameters by a factor of 2. There won’t be any problem if we
restart from the restart files. What I suggest is to modify the restart2data.cpp
slightly to give “K” instead for OPLS dihedral potentials.

Thirdly, in both fix_ave_time.cpp and fix_ave_spatial.cpp, there is an instruction
“if (nvalid < update->ntimestep) error->all…”. This will frequently cause the
code to stop and is not desirable especially when one is using a queueing system
and finally get the chance to run. I would suggest to use
" if (nvalid < update->ntimestep) nvalid += nfreq" istead.

Thanks.

LT Kong
University of Western Ontario

Paul - can you comment on the 1st Q below? I'm thinking maybe
the tail correction for pressure should only be added to the diagonal
components of the pressure tensor, not all 6 ?

Re: OPLS coeffs - you're right, it's inconsistent. I'll change it so that
LAMMPS writes the restart file with the same coeffs you would
enter in a data file or with the dihedral_coeff command. But I'll wait
until the next major release (Jan), since I don't want to change the
contents of the restart file in a patch.

Re: error messages with fix ave/time, etc. This is a good suggestion.
I'll make it reset nvalid rather than generate an error.

Steve

I looked into this issue about whether or not the off diagonal
elements of the pressue tensor should get the same correction as the
diagonal elements when the "pair_modify tail yes" command is invoked.
Unfortunately, I did not find a good literature reference that
explains the issue. Does anyone have a good reference on this that
they could point me to? The math seems to indicate that the off
diagonals should get the tail correction, but when there is no applied
shear, it seems that a correction would make the off diagonals
non-zero, which doesn't seem to make sense. Anyone else have insight
on this? In the meanwhile, I'd recommend using the shifted potential
instead of the tail correction, at least for your application.

Paul