[lammps-users] guessatom in VMD topotools

Hi,

I think this should be a question directed to Axel.

http://www.ks.uiuc.edu/Research/vmd/plugins/topotools/

Even though the online webpage contains a topo command “guessatom”, my VMD doesn’t have this command. Is there any way I can do similar things? The simple issue is that if I go to “Graphics/colors…”, under the color category “Type”, it only shows type 1 – 10. I can’t change the color of atoms with a type numbered more than 10. Do people know how to do this?

Thank you,

-Fei

Hi,

dear fei,

I think this should be a question directed to Axel.

i am happy to answer it here.

http://www.ks.uiuc.edu/Research/vmd/plugins/topotools/

Even though the online webpage contains a topo command “guessatom”, my VMD
doesn’t have this command. Is there any way I can do similar things? The
simple issue is that if I go to “Graphics/colors..”, under the color
category “Type”, it only shows type 1 – 10. I can’t change the color of
atoms with a type numbered more than 10. Do people know how to do this?

first of all try installing version 1.1 of the package from

http://sites.google.com/site/akohlmey/software/topotools

VMD version 1.8.7 contains the 1.0 version of the package,
but the online documentation is automatically generated
from the text in the development version.

if you still have problems, let me know.

cheers,
    axel.

Hi, Axel,

Thank you for your reply.

I downloaded and installed topotools version 1.1.

The guessatom seems to be partially working.

Under the Representations, I can change the representation to "element O"
etc.

However, if I still try to change the color, from color/element/O/ -->
nothing is changed.

I also noticed that under the color/type, there is only one type left. "1".
So if I change the color of 1, all atoms with different element type will be
changed. Is it what VMD supposed to do or I got messed up somewhere?

Thank you,
-Fei

Hi, Axel,

dear fei,

Thank you for your reply.

I downloaded and installed topotools version 1.1.

The guessatom seems to be partially working.

it can only guess from what information you provide.
the plain lammps dump has no information. it is thus
highly recommended to first read in a data file, or
create selections that set masses that can be used
to identify elements.

Under the Representations, I can change the representation to "element
O" etc.

However, if I still try to change the color, from color/element/O/ -->
nothing is changed.

I also noticed that under the color/type, there is only one type left.
"1". So if I change the color of 1, all atoms with different element
type will be changed. Is it what VMD supposed to do or I got messed up
somewhere?

in order to tell if and what you messed up. i would need to
know what you did exactly and have the means to reproduce it.

if you can generate some minimal files, and send me script
of the commands that you executed, i can take a look and
make some recommendations. my crystal ball got broken long
time ago and i have not been able to fix it. :wink:

cheers,
    axel.

Hi,

I did read the data file first before I import the lammps trajectory.

Let us use the peptide example from lammps package, also in the attachment.

I run vmd:
topo readlammpsdata data.peptide
topo guessatom element mass

Now go to Graphics/Represents... /Selections --> element O --> apply

If the background is black, the oxygen atoms are mostly white colored and I want to change that.

I went to Graphics/Colors... Element --> O --> Choosing any color won't have any effect on the image.

Does this make sense?

Best,
-Fei

data.peptide (292 KB)

Hi,

I did read the data file first before I import the lammps trajectory.

Let us use the peptide example from lammps package, also in the attachment.

I run vmd:
topo readlammpsdata data.peptide
topo guessatom element mass

Now go to Graphics/Represents... /Selections --> element O --> apply

If the background is black, the oxygen atoms are mostly white colored and I want to change that.

I went to Graphics/Colors... Element --> O --> Choosing any color won't have any effect on the image.

Does this make sense?

yes. your mistake is that you didn't change the coloring
method in VMD. be default it is set to "Name" but name still
has the atom numbers from the data file. now you have two
choices.
1) you can either do:
set sel [atomselect top all]
$sel set name [$sel get element]
$sel delete
this will copy the "element" field to the "name" field
2) or you can change the coloring method from "Name" to "Element".

i prefer the second, as this keeps your atom numbers
and LAMMPS atom types intact.

there is also an additional - yet undocumented - trick.
if you place comments at the right places in the data
file, topo readlammpsdata will use those as atom names/types
instead of the numbers. just load a regular .psf or .pdb file
and save it to a data with with topo writelammpsdata
to see how this would look like. the first line of the data file
triggers whether the parser tries to look for this additional
information or not.

cheers,
   axel.

Hi, Axel.

Thank you for the reply. By changing back to the Element coloring method, I now can change the color.

I think I tried the trick you mentioned. One day I was playing around with writelammpsdata, I noticed that the comment was actually the name of the atoms. So I tried to do similar things to my data file to see what will happen. Such as:
17 15.999400 #O

When I visualize the data file by VMD. I still get name/type 17 instead of "O". What do you mean by the first line of data file? What I got was (from writelammpsdata of a .pdb file):
LAMMPS data file. CGCMM style. generated by VMD/TopoTools v1.1 on Sat May 22 08:32:46 EDT 2010

I copied this line to my own data file, the commented name is still not recognized.

Thank you again.
-Fei

Hi, Axel.

Thank you for the reply. By changing back to the Element coloring method, I now can change the color.

excellent.

I think I tried the trick you mentioned. One day I was playing around with writelammpsdata, I noticed that the comment was actually the name of the atoms. So I tried to do similar things to my data file to see what will happen. Such as:
17 15.999400 #O

When I visualize the data file by VMD. I still get name/type 17 instead of "O". What do you mean by the first line of data file? What I got was (from writelammpsdata of a .pdb file):
LAMMPS data file. CGCMM style. generated by VMD/TopoTools v1.1 on Sat May 22 08:32:46 EDT 2010

I copied this line to my own data file, the commented name is still not recognized.

yes. the CGCMM style is the trigger. i would need to see the file to
find out what is not working and why. there is a reason why this is
not yet officially documented ... :wink:

cheers,
    axel.