Hi David

> "hbonds calculate"

That change was introduced long time ago; it has nothing to do with the 
switch to JSmol. You only need it once, before the first instance of hbonds 
on. You are safe if you add it after load.

> Jmol.jmolCheckbox(myJmol, "spin off; spin on;", "spin on; spin off;",
> " Spin", true); // for spin

I do not see why you'd need 2 instances of spin. Isn't one direct enough? 
Anyway, read below about the _spinning variable.

> I can't just put in a command "spin on" after the flip because the
> user might have turned spin off and in that case the result would be
> wrong. Anyone know why this has changed (it was a very old version of
> Jmol java I was using) and, more to the point, is there a way to put
> in a conditional statement so that the original spin state (on or off)
> is restored?

Yes!  You can check what's the spinning state
Taken from the doc:

_spinning       whether or not the model is currently spinning (true or false). 

if (_spinning);spin off;else;spin on;endif;

In your situation, that could maybe be:

Jmol.jmolCheckbox(myJmol, "if (_spinning);reset;spin on;else;reset;endif;", "if 
(_spinning);reset;rotate x 90;spin on;else;reset;rotate x 90;endif;", 
" Toggle Base-stacking view");

Though I'm not sure you should really need such a convoluted way.


------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to