From: Ignacio Fernández Galván (jellby_at_REMOVE_yahoo.com)
Date: Tue Dec 06 2016 - 11:49:47 CST

Hello,

I don't understand this. I've created a "visualization state" file with
VMD (1.9.1), after loading a bunch of .cube files with volumetric data
and creating representations. I can reload this file with "vmd -e
file.vmd", no problem.

Now I want to modify the file for another set of .cube files, mostly the
same structure, but now some "molecules" have a different number of
representations. Instead of re-creating everything from the GUI, I just
edit the text file, it should be pretty easy: change filenames, remove
or duplicate the stuff that creates representations and that's it. Well,
it works, except when I have some molecule with more representations
than before, then I get "Invalid repid specified", which apparently
corresponds to the part of the script where it sets clip planes. So I
have something like this in the .vmd file:

..
mol clipplane status 5 4 top {0}
mol showrep top 4 0
mol representation Isosurface 0.020000 2 0 0 1 1
mol color ColorID 10
mol selection {all}
mol material Translucent
mol addrep top
mol selupdate 5 top 0
mol colupdate 5 top 0
mol scaleminmax top 5 0.000000 0.000000
mol smoothrep top 5 0
mol drawframes top 5 {now}
mol list top
mol clipplane center 0 5 top {0.0 0.0 0.0}
..

the first two lines were already there, they correspond to the last
"previously existing" representation. From there, I just copied the
lines from another molecule that already had rep #5. The "mol list top"
line I added for debugging. When I load this I get in the terminal:

..
Status of molecule 9-1_-0.16.cube:
9-1_-0.16.cube Atoms:10 Frames (C): 4(3) Status:ADfT
Atom representations: 6
0: on, 9 atoms selected.
   Coloring method: Name
    Representation: CPK 0.300000 0.100000 10.000000 10.000000
         Selection: not name X
1: on, 10 atoms selected.
   Coloring method: ColorID 10
    Representation: Isosurface 0.020000 0 0 0 1 1
         Selection: all
2: on, 10 atoms selected.
   Coloring method: ColorID 15
    Representation: Isosurface -0.020000 0 0 0 1 1
         Selection: all
3: on, 10 atoms selected.
   Coloring method: ColorID 3
    Representation: Isosurface 0.020000 1 0 0 1 1
         Selection: all
4: on, 10 atoms selected.
   Coloring method: ColorID 14
    Representation: Isosurface -0.020000 1 0 0 1 1
         Selection: all
5: on, 10 atoms selected.
   Coloring method: ColorID 10
    Representation: Isosurface 0.020000 2 0 0 1 1
         Selection: all

Invalid repid specified:5
Invalid repid specified:5
Invalid repid specified:5
Invalid repid specified:5
Invalid repid specified:5
Invalid repid specified:5
..

Huh? repid 5 invalid, and it was just listed above? I can't find what's
wrong. Is there anywhere else in the script where the representations
are allocated or something like that? Anyway, one the file is loaded
everything seems to work as expected (but I'm not using clip planes).

Thank you,
Ignacio