On Thu, Apr 4, 2013 at 1:43 PM, Shane Ó Conchúir <[email protected]>wrote:
> 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 -0.1 // more like PyMOL sticks; the "-" indicates "turn
everything else off"
> 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.
>
You can add a time for the compare to be 0, and it will execute immediately:
compare 0 {1.1}......
Ah, I see that didn't get documented.....
Bob
>
> 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
>
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
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