Hi all,

I am currently trying to rewrite a PyMOL script in JSmol and hitting a
problem after the first JSmol compare command.

The PyMOL script is:

select design_ligand, Design and resn LG1
show sticks, design_ligand
select template_ligand, Template and resn LG1
pair_fit template_ligand, design_ligand
super Scaffold, Design
# I'm not sure what the original author intended here
hide lines, Scaffold
hide ribbon, Scaffold
show car, Scaffold
util.cbc Scaffold
disable Scaffold

and I am trying to mimic this with this JSmol script (I may have gotten
some of the translation wrong):

select LG1:X/2; wireframe only; wireframe reset; spacefill reset; // select
design_ligand, Design and resn LG1; show sticks, design_ligand
compare {1.1} {2.1} SUBSET LG1 ROTATE TRANSLATE; // select template_ligand,
Template and resn LG1; pair_fit template_ligand, design_ligand
compare {3.1} {2.1} ROTATE TRANSLATE; // super Scaffold, Design
select 3.1; cartoon only; color chain; hide 3.1; // hide lines,
Scaffold; hide ribbon, Scaffold; show car, Scaffold; util.cbc
Scaffold; disable Scaffold

The JSmol lines above (without the comments) are stored in an array and I
loop through the array calling the Jmol.script function on each line. The
problem is that the first 'compare' command starts an alignment animation
which takes a few seconds and the last line which hides model 3 does not
seem to run. If I pop open a console and run the command manually after the
animation completes, 3.1 is hidden as expected.

Should I do something to wait until the animation stops before
calling Jmol.script again? If so, is there any state function that lets me
know that it is okay to start executing commands?

Regards,
Shane
------------------------------------------------------------------------------
Minimize network downtime and maximize team effectiveness.
Reduce network management and security costs.Learn how to hire 
the most talented Cisco Certified professionals. Visit the 
Employer Resources Portal
http://www.cisco.com/web/learning/employer_resources/index.html
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to