Visualize LAMMPS metadata in VMD.

Dear Axel,

I am also interested in coloring atoms based on metadata in the *.lammpstrj file. I am currently able to use the lammps plugin to read atom velocities (vx, vy, vz). Although I can select atoms by individual components of the velocity values, I can only color by the magnitude of the velocity. If I were to remap the three velocity components, would there be a way to select which component to color by?

Also, is there any (easy) way to store data to the “user” variables when reading in from the lammpstrj file?

Thank you,

-Christopher Freeze

Department of Materials Science and Engineering
College of Engineering
North Carolina State University

dear christopher,

Dear Axel,
I am also interested in coloring atoms based on metadata in the *.lammpstrj
file. I am currently able to use the lammps plugin to read atom velocities
(vx, vy, vz). Although I can select atoms by individual components of the
velocity values, I can only color by the magnitude of the velocity. If I
were to remap the three velocity components, would there be a way to select
which component to color by?

no. you have to copy the property into one of the four user fields

Also, is there any (easy) way to store data to the "user" variables when
reading in from the lammpstrj file?

not directly, but check out this discussion on the VMD mailing list:
http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/18844.html

cheers,
    axel.

For some reason, trying to remap the velocity fields does not work properly for me. Here is my .tcl script:

global env

set env(LAMMPSREMAPFIELDS) {vx=c_mycompute1,vy=c_mycompute2}

mol new filename.lammpstrj type lammpstrj waitfor all

set framecount [molinfo top get numframes]

set sel [atomselect top all]

for {set frame_no 0} {$frame_no<$framecount} {incr frame_no} {

$sel frame $frame_no

$sel set {user user2 user3} [$sel get {vx vy vz}]

}

$sel delete

(If my understanding is correct, only the bolded section is relevant to my problem, but I included the rest just in case). When I run this script, it will correctly read in the lammpstrj file, but it does not include the remapped velocity columns. If I change the identifiers in the ITEM: Atoms line to vx and vy, they are correctly read in.

Do you have any thoughts on what could be causing my issue?

Thank you,

-Christopher Freeze

Department of Materials Science and Engineering
College of Engineering
North Carolina State University

I am currently traveling and thus cannot check it out. I will try tomorrow.
If you can, please send me an example dump file to me personally.
Thanks,
Axel

For some reason, trying to remap the velocity fields does not work properly
for me. Here is my .tcl script:

global env
set env(LAMMPSREMAPFIELDS) {vx=c_mycompute1,vy=c_mycompute2}
mol new filename.lammpstrj type lammpstrj waitfor all
set framecount [molinfo top get numframes]
set sel [atomselect top all]
for {set frame_no 0} {$frame_no<$framecount} {incr frame_no} {
$sel frame $frame_no
$sel set {user user2 user3} [$sel get {vx vy vz}]
}
$sel delete

(If my understanding is correct, only the bolded section is relevant to my
problem, but I included the rest just in case). When I run this script, it
will correctly read in the lammpstrj file, but it does not include the
remapped velocity columns. If I change the identifiers in the ITEM:
Atoms line to vx and vy, they are correctly read in.
Do you have any thoughts on what could be causing my issue?

christopher,

i have no problems with the -noV testfile that you sent me,
but the testfile with velocities has a problem. the reason for
that is that the vx, vy, and vz fields override the remapped
fields, so in order to get the visualization you desire in this
case, you have to change your dump custom command in
lammps to place the velocity fields before the ones you want
to remap (if you want to keep velocities for other analysis, that is).

so in order to find out why it "doesn't work" for you,
you'll have to provide more details of what exactly
you are doing and how it "does not work".

if you have not done so, you may also try to compile/install
the updated plugin sources. perhaps you are running into a
bug that is already fixed in the VMD development version
and that i forgot about. you can download the sources from
this page.

http://sites.google.com/site/akohlmey/software/lammps-icms#TOC-VMD-molfile-plugin

alternatively, you can download a VMD alpha version.
http://www.ks.uiuc.edu/Research/vmd/alpha/

thanks,
    axel.