[lammps-users] Storing initial velocities in LAMMPS (using release 15-jan-2010)

Dear developers,

    I am having some troubles in immediately evaluating variables using the
sign $. The issue is that I am trying to calculate the velocity
self-correlation function. I need the initial values of the atoms'
velocities and use them in the formula:

     Z(t)=<v(t)v(0)>/<v(0)v(0)>

    Attached in this mail are the script file, the log file, and the output
of the script. The input file is self-contained so it can be run
directly with a Lammps executable built with the default options.

    Does my script have any problems? If not, is there any other way to
evaluate the aforementioned calculation?

   Thanks in advance!

    Best regards,

    Mr. Luis Goncalves
    Doctoral student at Federal University of Sao Carlos - Dpt. of Physics

in.LS2 (5.62 KB)

log.lammps (6.92 KB)

out_liq (2.83 KB)

Your script is 200 lines. Please isolate the problem you
are having to a few simple lines of script and post
them in a follow-up message.

Steve

Hi everyone!

  My problem is very simple: how can I store the initial values of a
atom-property vector? I am using

variable a atom vx
variable v0x atom $a

  But lammps gives an error

ERROR on proc 0: Substitution for illegal variable

  Is there any problem in immediately evaluating atom properties such as vx?

  Thanks for your attention!

  Best wishes,
  Luis

If what you asking is for a way to store old velocities (from
some specific time, like initial vels) with each atom for
later computation, then there is no way to do this. Except
for fix store/coord, which won't do velocities. What is needed
is a fix store/state that would allow you to do this for any per-atom
quantity, storing the requested "state" at the time the fix
is invoked and migrating it with the atoms.

I've thought about this being useful in other
contexts, so I'll implement it - but it won't be for a week or two.

Steve

Wow, that would be really useful since it would be an easy way to evaluate
time correlations of any sort!

Thank you!

Luis

Released a 4Jun10 patch with a new fix store command
that allows for this. See if it does what you want.

Steve