From: Ignacio Fernández Galván (jellby_at_REMOVE_yahoo.com)
Date: Fri Dec 16 2016 - 08:53:42 CST

On 09/12/16 21:32, John Stone wrote:
> Your strategy for generating a load script would work except that
> the rep IDs for a given "molecule" add up, so if you show two reps
> for one of the cube files, then you'd need to keep track of that rep
> count so that you use the right indices for the next cube file loaded
> into the same molecule.

Thank you for your reply. I think I've done that correctly. I've tried
to reply before but it seems my reply doesn't appear in the list, maybe
it's because it included attachments?

My finding is that I still get the "Invalid repid specified" message if
I create a .vmd file from the GUI. I load two molecules, the first one
with two .cube files (and five representations), the second with four
.cube files (and nine representations). Then if I load this .vmd file I
get the error message in the console. If the first molecule has the four
files and five representations all is fine. Could this be a bug in (my
version of) VMD?

Ignacio

> On Tue, Dec 06, 2016 at 06:49:47PM +0100, Ignacio Fernández Galván wrote:
>> 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
>