Hello everyone,

I am stuck on a scripting problem.

I'd like to load an isosurface (data from a cube file) to each frame of a 
trajectory to get an animation displaying the isosurface.
 
While I can perfectly manage this by hand, going to each frame of the 
trajectory, load the isosurface and giving it an unique ID, I can't make it 
work in a "for loop":

What I've tried is this:


frame 1

cubeArray = ["cube_file1", "cube_file2"]

num_frames = getProperty("modelInfo.modelCount")

for (var i = 1; i <= num_frames; i = i+1)

                cube_file = "./" + cubeArray[i]
                iso_id = "ID" + i

                isosurface @iso_id cutoff 0.02 @cube_file

                frame next
end for

The problem seems to be that when it gets to the @iso_id it will replace it 
with a String like : "ID2" which causes the isosurface command to look for a 
file named ID2 caused by the " " and doesn't give it a proper ID.

BTW the link to the cube file works perfectly fine.

Can anyone help me with this? I hope I'm at the right place. This is the first 
time I post something in the mailing list and I couldn't find anything in the 
documentation or the web itself.


Thanks very much,

Sebastian
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to