Hello everyone,
I have a problem I really have no idea how to solve... some of you might
remember some time ago I was struggling to restore a Jmol session from a
php page in another php page, and at the end, and thanks to your help, I
was able to do so using jmolGetPropertyAsString("stateInfo") and passing it
as a hidden value in a php form.
I succeeded with it, but now I find a small problem. Before I just loaded
in the applet a protein native structure and homology models of such
structure, and when parsing the state obtained
with jmolGetPropertyAsString("stateInfo") I had the following lines:

function _setModelState() {

  structure none ({1303:2612})     # model=2.1;
...
  structure none ({2613:3922})     # model=3.1;
...


These lines are crucial for me as parsing them I know which atoms belong to
each frame (protein loaded); Frame 1.1 would be 0:1302.


However, now, instead of loading a native protein and its homology models,
I am creating another page that loads a single model and the templates used
to build it (structures that can be so different among them), and when
getting the previous state via jmolGetPropertyAsString("stateInfo") and a
php form (exactly the same way), I find the opposite, only the line for 1.1

structure none ({0:1309})     # model=1.1;


This way I cannot know which atoms belong to the other proteins loaded 2.1,
3.1... I did a work around guessing the atoms that belong to each of the
frames extracting them from the lines

select ({3263:4711});
color atoms opaque [xffff00];

or

select ({3263:4711});
Cartoon on;



but this doesn't always work, since there are cases I allow the user to
color structures by property instead of only one color, and also when the
loaded structures are all in the same display (e.g.: all in trace); so in
an example like the one below I have no way to guess which atoms belong to
which frame:

function _setModelState() {

  structure none ({0:1309})     # model=1.1;
...
  select ({318:322 324 337 339 342:347 369 370 372 415:417 420 427 428 431
1310 1311 1314:1316 1321:1323 1578 1580 1582 1858 1860:1863 1886:1889 1893
1894 1897 1898 19
00 1922:1927 1958 1960 4153:4155 4157 4175:4179 4182 4183 4185 4205 4207});
  color atoms opaque [xff00ff];
...
  select ({0:4539});
  Trace on;


No lines for frames 2.1 and 3.1; each structure doesn't have a single
color, they are colored by property, and they neither have a distinctive
display, all are in trace...

So my questions are: How can I know to which frame an atom belongs parsing
the output of jmolGetPropertyAsString("stateInfo")? Can I control somehow
when the lines "structure none ....# model = ..." appear??

Thanks a lot,
Daniel
------------------------------------------------------------------------------
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