Hi Luciano,
Bob may have a more elegant solution to your problem, but I am interested
in your question because I guess I learned something about SHOW and PRINT -
i.e. they are not synonymous. I thought a
simple Jmol.evaluate(jmolApplet0,"show residues" would work - not so. When
I checked the docs, they clearly say that this command works with anything
that works with the PRINT command (NOT the SHOW command), and "show
residues" and "print residues" do not both result in residues! So unless
I'm mistaken, you have to get this with a message callback function.
If you set up a message callback function of the form:
function MyCallBack(X, Y, Z) {
Do Stuff Based ON X, Y, Z
}
The "show RESIDUES" will produce three waves of XYZ activity (my applet
below is jmolApplet0):
WAVE 1
X=jmolApplet0
Y=script 13 started
Z=show residues## EDITOR_IGNORE ##
WAVE 2
X=jmolApplet0
Y=[PCA]1:A
[TYR]2:A
[SER]3:A
... Long list of residues (Your Stuff!)
Z=1
WAVE 3
X=jmolApplet0
Y=Script completed
Z=EMPTY}
In MyCallBack, you have to use WAVE1 as a heads up to grab Your Stuff in
WAVE2.
Otis
On Sat, Jan 17, 2015 at 1:30 PM, Luciano Abriata <luciano_abri...@yahoo.com>
wrote:
> Hello!
>
> I need to get the contents of "show RESIDUES" or "show SEQUENCE" from a
> PDB file loaded in JSmol, and put that into a javascript variable so as to
> play with it afterwards.
>
> I tried many things with no success, maybe because I don't understand how
> message callbacks and such work. I'm now totally lost!
>
> Can anybody help me out?
>
> Thanks,
>
> Luciano
>
>
> ------------------------------------------------------------------------------
> New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
> GigeNET is offering a free month of service with a new server in Ashburn.
> Choose from 2 high performing configs, both with 100TB of bandwidth.
> Higher redundancy.Lower latency.Increased capacity.Completely compliant.
> http://p.sf.net/sfu/gigenet
> _______________________________________________
> Jmol-users mailing list
> Jmol-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
--
Otis Rothenberger
o...@chemagic.com
------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users