From: Axel Kohlmeyer (akohlmey_at_gmail.com)
Date: Tue Sep 30 2014 - 13:45:03 CDT

On Tue, Sep 30, 2014 at 2:08 PM, Paweł Wolski <pawl.wolski_at_gmail.com> wrote:
> Hi
>
> In VMD -> Graphics -> Colors... -> Categories
> I don't have "10".
> I'm tryinf to run a script. Script look like this:
>
> mol load lammpstrj k165r1.lammpstrj
>
> color Display Background white
>
> set CNT [atomselect top "name 1"]
> set CA [atomselect top "name 2"]
> set MNP [atomselect top "name 3"]
> set Opeg [atomselect top "name 4"]
> set core [atomselect top "name 11"]
> set Si [atomselect top "name 5"]
> set Cchain [atomselect top "name 6"]
> set OA [atomselect top "name 7"]
> set HA [atomselect top "name 8"]
> set N [atomselect top "name 9"]
> set Hchain [atomselect top "name 10"]
> set d [atomselect top "name 33"]
> set Pt [atomselect top "name 12"]
> set cptN [atomselect top "name 13"]
> set Cl [atomselect top "name 14"]
> set cptH [atomselect top "name 15"]
>
> $CNT set radius 0.849917
> $CA set radius 0.849917
> $MNP set radius 50.000000
> $core set radius 50.000000
> $Opeg set radius 0.750000
> $Si set radius 0.750000
> $Pt set radius 0.914750
> $cptN set radius 0.844575
> $Cl set radius 1.156800
> $cptH set radius 0.617838
> $Cchain set radius 0.849917
> $d set radius 5.000000
> $OA set radius 0.739980
> $HA set radius 0.534540
> $N set radius 0.812500
> $Hchain set radius 0.617838
>
> color Name 8 green
> color Name 10 green
> color Name 1 gray
> color Name 2 gray
> color Name 6 gray
> color Name 4 red
> color Name 7 red
> color Name 5 black
> color Name 12 yellow
> color Name 13 blue
> color Name 14 green
> color Name 15 red
> color Name 9 blue
> color Name 3 yellow
> color Name 33 red
> color Name 11 magenta
>
> when i run it, I get error: Unable to change color name. when I delete
> command with 10,11,12,13 ...
> everything works well
> what is wrong?

i already explained it. you *cannot* do this with VMD. full stop.

it may work, if you use the "element" field instead of name, but then
you have to write out element strings in LAMMPS instead of type ids.

axel.

>
>
>
> 2014-09-30 18:08 GMT+02:00 Axel Kohlmeyer <akohlmey_at_gmail.com>:
>>
>> On Tue, Sep 30, 2014 at 10:54 AM, Paweł Wolski <pawl.wolski_at_gmail.com>
>> wrote:
>> > Hi,
>> >
>> > I have problem with change atoms colors when it's name have two chars,
>> > eg:
>> > when I use command:
>> > color Name 1 gray
>> > - everything is ok, by when I use:
>> > color Name 10 gray
>> > I get error: Unable to change color name.
>> > In this structure I have atom's name 10.
>> > What I do wrong?
>>
>> nothing.
>>
>> however VMD limits how strings are recognized in the Name field for
>> most entries to the first character. this has its origin in the custom
>> that in PDB files atom names indicate their topological position with
>> the second character (CA is alpha carbon, HA hydrogen at alpha carbon,
>> CB is beta carbon as so on).
>>
>> axel.
>>
>> >
>> > Best,
>> > Pawel
>>
>>
>>
>> --
>> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
>> College of Science & Technology, Temple University, Philadelphia PA, USA
>> International Centre for Theoretical Physics, Trieste. Italy.
>
>

-- 
Dr. Axel Kohlmeyer  akohlmey_at_gmail.com  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.