>
> external script file running:
>
> script "filename.scr"
>
> but that introduces the same issue.
>
>
> For the quotes, this is a problem only if you are not using
> Jmol-11.js.
==> Bob is so fast in fixing problems, that already after the answer
to my first post in this list,
I have gotten into the habit of checking "Hanson's latest bleeding
edge ZIP file" to see whether
a problem has been fixed before I even had the time to write to the
user's list.
Obviously, you currently are working on side chain hydrogen bonds.
Great!
> What does your link look like?
>
> If you mean the problem with:
>
> <a href="jmolScript('load ""')">...</a>
>
> right, that's not possible. So instead, if you don't want to use
> jmolLink(), you can use:
>
> <a href="jmolScript(unescape('load %22%22'))">...</a>
>
> Or you can just use:
>
> <script type="text/javascript">jmolLink('load "" ',"reload this
> file")</script>
>
> because Jmol-11.js stores this link in an array and then looks it
> up later.
No, this is not what I mean, I am not talking about the javascript
level.
I have an external script (=list of Jmol interactive scripting
commands)
e.g. ColorHydrophathy.scr
which under Chime/Rasmol,
would start with an extended section of undoing everything the users
of my Tutorial might have done to the representation of the molecule:
select all;
wireframe off;
cartoon off;
ssbonds off;
rockets off;
... and so on
before building up the new view of the molecule, e.g.
select protein;
spacefill on;
color white;
select Trp, Tyr, Phe;
color [255,192,0];
select Met, Leu, Ile, Val, Pro, Cys, Ala;
color [255,255,0];
select Ser, Thr, Asn, Gln, Gly;
color [0,255,0];
select Asp, Glu, Lys, Arg, His;
color [0,125,255];
select protein;
spacefill on;
Now this script I can use with the local version of Jmol by typing
ito the console
script ColorHydrophathy.scr
or I can use it with the Applet be calling it e.g. with a Button:
jmolButton("script ColorHydrophathy.scr;", "Color by Hydropathy");
If I now replace the lengthy list of turning off all display modes by
load "";
in the hope of now only having to turn off spacefill and wireframe,
the script does not work any more, but gives an error message.
(of course, it only occurs to me now as I am writing this, that I can
just take the "load "";" out of the script:
jmolButton("load \"\"; script ColorHydrophathy.scr;", "Color by
Hydropathy");
the backslash "hiding" the quotes from javascript and preventing them
from being interpreted as "end of the textstring", and you pointed
out some other ways to do so, such as using the hex code or
alternating single and double quotes).
However, since most other commands in the
"Jmol interactive scripting" documentation work equally well entered
in the console or
collected in a script that is then loaded with the "script" command,
a warning in the documentation might be appropriate.
Coming to think of it - it would be very nice if one could save the
current transformation over such a reload,
e.g by saving the current transformation matrix before the reload
and re-applying it afterwards
With best regards
Annemarie
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users