Hi Otis,
Thanks for your help and time. I'm not sure if my question was clear enough, or
if it was but I am not understanding your answer.
What I want to do is the following. I have a working JSmol applet, with a PDB
file loaded. Then I have a piece of javascript code doing stuff, and at some
point I want something like
...
var protein_sequence = (something here that retrieves the protein's sequence
from the running JSmol)...
That said, it is totally unclear to me where the "show SEQUENCE" would go (in a
function for the messagecallback?), whether I need to set up anything like
Info.messagecallback at all, and where will I get the "waves" of data that
include the sequence... In brief, I have no clue!
Thanks again!
Luciano
De: Otis Rothenberger <osrot...@chemagic.com>
Para: Luciano Abriata <luciano_abri...@yahoo.com>;
"jmol-users@lists.sourceforge.net" <jmol-users@lists.sourceforge.net>
Enviado: Domingo, 18 de enero, 2015 17:56:42
Asunto: Re: [Jmol-users] JSmol: how to put a protein's sequence into a
javascript variable
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 " " will produce three waves of XYZ activity (my applet below is
jmolApplet0):
WAVE 1X=jmolApplet0Y=script 13 startedZ=show residues## EDITOR_IGNORE ##
WAVE 2X=jmolApplet0Y=[PCA]1:A [TYR]2:A [SER]3:A... Long list of
residues (Your Stuff!)Z=1
WAVE 3X=jmolApplet0Y=Script completedZ=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 rothenbergero...@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