another good find! I think I've fixed that now.
Yes, the way it is supposed to work is that when you have
x = func();
and inside func() there is a command that requires a new thread because of
some sort of spin, then that spin is either ignored (because it is an
indefinite spin) or turned into an immediate rotation. This is because what
scripts like this do in JavaScript is to save the point in the script we
are at, throw an exception to terminate the script, catch the exception, do
the action as though it were a separate thread, and then re-start the
script exactly where we left off.
But the restarting can't happen if we are in the middle of a math
expression.
This is no problem with just
func();
because then we can restart within that function on the next line after the
spin/rotate command without any problem.
Bob
On Wed, Apr 16, 2014 at 6:54 AM, Alexander Rose <[email protected]
> wrote:
> Hi,
>
> rotation is not performed when called through an intermediary function
> whose return value is used. Translating on the other hand works.
>
> function rot(){
> select all;
> rotateSelected 10.0 {1.0 0.0 0.0} {10.0 0.0 0.0};
> select none;
> return 1;
> }
>
> function no_rot1(){
> return rot();
> }
>
> function no_rot2(){
> var x = rot();
> }
>
> function rot_ok1(){
> rot();
> }
>
>
>
> Alex
>
>
> ----- Ursprüngliche Mail -----
> > Von: "Alexander Rose" <[email protected]>
> > An: [email protected]
> > Gesendet: Mittwoch, 16. April 2014 11:21:08
> > Betreff: Re: [Jmol-users] jmol-14.1.14_2014.04.14.zip
> >
> > Hi,
> >
> >
> > $ n = 2;
> > $ print n
> > 2
> > $ print n* 2
> > script ERROR: invalid argument
> > ----
> > print n* >> 2 <<
> > $ print n*2
> >
> >
> > $ print n * 2
> > 4
> > $ print n*2.0
> > script ERROR: invalid argument
> > ----
> > print n*2 >> 0.0 <<
> >
> >
> >
> > Alex
> >
> >
> > ----- Ursprüngliche Mail -----
> > > Von: "Alexander Rose" <[email protected]>
> > > An: [email protected]
> > > Gesendet: Mittwoch, 16. April 2014 10:30:37
> > > Betreff: Re: [Jmol-users] jmol-14.1.14_2014.04.14.zip
> > >
> > > Hi,
> > >
> > > thx, loading seems to work now. I stumbled about this:
> > >
> > > p = { 1 2 3 };
> > >
> > > print p.X*p.X
> > > script ERROR: invalid argument
> > > ----
> > > print p . X*p . >> X <<
> > >
> > >
> > > print (p.X)*p.X; // works
> > >
> > >
> > >
> > >
> > > Alex
> > >
> > >
> > > ----- Ursprüngliche Mail -----
> > > > Von: "Robert Hanson" <[email protected]>
> > > > An: [email protected]
> > > > Gesendet: Mittwoch, 16. April 2014 06:02:00
> > > > Betreff: Re: [Jmol-users] jmol-14.1.14_2014.04.14.zip
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > Let's try again. Please test.
> > > >
> > > > http://chemapps.stolaf.edu/jmol/zip/jmol-14.1.14_2014.04.15.zip
> > > >
> > > >
> > > > note that the DSSR (secondary stucture of RNA) module is in
> > > > development, and may or may not work any given moment for the
> > > > next
> > > > week or so.
> > > >
> > > > Bob
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Tue, Apr 15, 2014 at 12:08 PM, Robert Hanson <
> > > > [email protected]
> > > > > wrote:
> > > >
> > > >
> > > >
> > > > Forget this one. Sorry. Removing it.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On Mon, Apr 14, 2014 at 10:34 PM, Robert Hanson <
> > > > [email protected]
> > > > > wrote:
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > http://chemapps.stolaf.edu/jmol/zip/jmol-14.1.14_2014.04.14.zip
> > > >
> > > > corrects a few bugs, including problems recently reported with
> > > > mouse
> > > > action and structure disappearing, problems starting Jmol.jar,
> > > > and
> > > > a
> > > > few other items.
> > > >
> > > > Looking at a release of Jmol 14.0.14/14.1.14 later this week
> > > > possibly.
> > > >
> > > > Bob
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Robert M. Hanson
> > > > Larson-Anderson Professor of Chemistry
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Robert M. Hanson
> > > > Larson-Anderson Professor of Chemistry
> > > > 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
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > >
> > > > Robert M. Hanson
> > > > Larson-Anderson Professor of Chemistry
> > > > 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
> > > >
> > > >
> > > >
> ------------------------------------------------------------------------------
> > > > Learn Graph Databases - Download FREE O'Reilly Book
> > > > "Graph Databases" is the definitive new guide to graph databases
> > > > and
> > > > their
> > > > applications. Written by three acclaimed leaders in the field,
> > > > this first edition is now available. Download your free book
> > > > today!
> > > > http://p.sf.net/sfu/NeoTech
> > > > _______________________________________________
> > > > Jmol-users mailing list
> > > > [email protected]
> > > > https://lists.sourceforge.net/lists/listinfo/jmol-users
> > > >
> > >
> > >
> ------------------------------------------------------------------------------
> > > Learn Graph Databases - Download FREE O'Reilly Book
> > > "Graph Databases" is the definitive new guide to graph databases
> > > and
> > > their
> > > applications. Written by three acclaimed leaders in the field,
> > > this first edition is now available. Download your free book today!
> > > http://p.sf.net/sfu/NeoTech
> > > _______________________________________________
> > > Jmol-users mailing list
> > > [email protected]
> > > https://lists.sourceforge.net/lists/listinfo/jmol-users
> > >
> >
> >
> ------------------------------------------------------------------------------
> > Learn Graph Databases - Download FREE O'Reilly Book
> > "Graph Databases" is the definitive new guide to graph databases and
> > their
> > applications. Written by three acclaimed leaders in the field,
> > this first edition is now available. Download your free book today!
> > http://p.sf.net/sfu/NeoTech
> > _______________________________________________
> > Jmol-users mailing list
> > [email protected]
> > https://lists.sourceforge.net/lists/listinfo/jmol-users
> >
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
Robert M. Hanson
Larson-Anderson Professor of Chemistry
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
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their
applications. Written by three acclaimed leaders in the field,
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users