Re: [PyMOL] embeding pymol in a web page

2004-03-30 Thread Jonathan Barber
On Mon, Mar 29, 2004 at 11:37:22AM +0100, Jonathan Barber wrote:
 On Thu, Mar 25, 2004 at 10:13:42AM +, Einat Sitbon wrote:
  
  Hello PyMolers,
  
  I'm wondering if there is a possibility to embed a pymol script in a web 
  site.
  What I have in mind is something equivalent to the chime plug-in, using 
  pymol.
  Any suggestions?
 
 One way I've tried to achieve this is to have a CGI on the webserver
 that sends a Pymol script to the client.
 
 If the client's browser has Pymol set up to recognise Pymol scripts,
 then it'll execute the script. This requires the CGI to set the MIME
 type type and to set the filename of the script to have the correct
 suffix (to make Explorer on Windows work properly).
 
 The downloaded script is then executed by Pymol, which can uses Python's
 socket abilities to download PDB files and run Pymol commands on them.
 
 Et volia! A little convoluted, and by no means as elegent as having a
 browser plugin, but it does allow you to use Pymol for visulation over
 the web.
 
 I've got the code for this kicking around somewhere, if anyone is
 interested then contact me and I'll look for it and stick it on the web.

A few people have expressed interest in the code, so I've put it up at
the following URL:

http://www.compbio.dundee.ac.uk/~jon/pymol.cgi
-- 
Jon



Re: [PyMOL] embeding pymol in a web page

2004-03-29 Thread Jonathan Barber
On Thu, Mar 25, 2004 at 10:13:42AM +, Einat Sitbon wrote:
 
 Hello PyMolers,
 
 I'm wondering if there is a possibility to embed a pymol script in a web 
 site.
 What I have in mind is something equivalent to the chime plug-in, using 
 pymol.
 Any suggestions?

One way I've tried to achieve this is to have a CGI on the webserver
that sends a Pymol script to the client.

If the client's browser has Pymol set up to recognise Pymol scripts,
then it'll execute the script. This requires the CGI to set the MIME
type type and to set the filename of the script to have the correct
suffix (to make Explorer on Windows work properly).

The downloaded script is then executed by Pymol, which can uses Python's
socket abilities to download PDB files and run Pymol commands on them.

Et volia! A little convoluted, and by no means as elegent as having a
browser plugin, but it does allow you to use Pymol for visulation over
the web.

I've got the code for this kicking around somewhere, if anyone is
interested then contact me and I'll look for it and stick it on the web.

Taking the idea further, and musing idly, a server-client could be set
up between the web server and the client to allow further communication.
Of course all of this is completly insecure, although the Python code
could be sandboxed.

 Thanks, Einat.
 
 
 Einat Sitbon
 Department of Molecular Genetics
 Weizmann Institute of Science
 Tel: 972-8-9344911
 
 To reply, please change the mmm in the reply-to address to hotmail
 
 _
 Protect your PC - get McAfee.com VirusScan Online 
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users

-- 
Jon



Re: [PyMOL] embeding pymol in a web page

2004-03-29 Thread Nat Echols
 The downloaded script is then executed by Pymol, which can uses Python's
 socket abilities to download PDB files and run Pymol commands on them.

H, I like this idea.  Can PyMOL open files directly over the web?  It
would be nice to simply type

PyMOL load http://server/1cll.pdb, calmodulin



Re: [PyMOL] embeding pymol in a web page

2004-03-29 Thread Michael George Lerner
On Mon, 29 Mar 2004, Nat Echols wrote:

  The downloaded script is then executed by Pymol, which can uses Python's
  socket abilities to download PDB files and run Pymol commands on them.

 H, I like this idea.  Can PyMOL open files directly over the web?  It
 would be nice to simply type

 PyMOL load http://server/1cll.pdb, calmodulin



Kristian Rother's rTools (http://www.rubor.de/bioinf/pymol_rubor.html)
comes with a pdb command that's similar:

pdb (pdb-id)  - get PDB structure (pdb-id) from the local disk,
or from the PDB server.

which does everything that I want, but it might be nice to have PyMOL
parse urls like that.  Shouldn't be hard, especially with read_pdbstr.
Hmmn .. in fact, if you feel like playing around a bit, you can go into
cmd.py and change the definition of _load.  At the top, right after it
says 'r = 1', add this:

  #print oname,oname,finfo,finfo,ftype,ftype
  if ftype == loadable.pdb and finfo.startswith('http://'):
 import urllib
 from importing import read_pdbstr
 print requesting file,finfo
 pdbstr = urllib.urlopen(finfo).read()
 r = read_pdbstr(pdbstr,oname,state,finish,discrete)

And change the 'if' on the next line to an 'elif'.  That will make this
work with simple urls.  For example, you can type something like

load http://www.umich.edu/~mlerner/1rx1.pdb
or
load http://www.umich.edu/~mlerner/1rx1.pdb, nifty

and it'll work.  More complicated urls seem to break PyMOL's parser.  If
you uncomment the print statement in my little code snippet above, you can
see what goes wrong with, e.g. a url from the PDB like this

http://www.rcsb.org/pdb/cgi/explore.cgi?job=download;pdbId=1RX1;page=opt=showformat=PDBpre=1

but I haven't played around with the parser at all.

-michael

--
This isn't a democracy;|_  |Michael Lerner
 it's a cheer-ocracy.  | ASCII ribbon campaign ( ) |   Michigan
-Torrence,  Bring It On|  - against HTML email  X  |  Biophysics
   |   / \ | mler...@umich




RE: [PyMOL] embeding pymol in a web page

2004-03-28 Thread Marc Saric

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

| An ActiveX verson of PyMOL is partially developed, but it won't be release
| before PyMOL 1.0 -- so we're talking months to years.  However, once
we have
| one plugin built, it shouldn't be too hard to create others (Netscape,
Java,
| etc.).

Although I understand, that the most widespread browser on the most
widespread OS should be supported first (especially if you want to
attack Chime), I really think, that an Active X plugin (Windows-only, MS
IE-only) is a bad sollution.

Those people allready have Chime, whereas Linux and Mac users and the
happy few using Mozilla can't use this tool.

Therefore an alternative to Chime, which would support Mozilla and the
other OS-platforms should be preferred.

Keep up the good work!

- --
Bye,
Marc Saric  http://www.marcsaric.de
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.2.2 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFAZ9UqvKxJUF29wRIRAp3BAJ9EPSNgGuDWFFoiJ+n4VqczmksrngCfQag3
fT5WtQwDexwbQBJlFJWmZXw=
=ISTM
-END PGP SIGNATURE-



RE: [PyMOL] embeding pymol in a web page

2004-03-26 Thread Gareth Stockwell
Einat,

On Thu, 2004-03-25 at 18:50, Warren DeLano wrote:
 For web-page embeddable molecular graphics today, look to Jmol:
 http://jmol.sourceforge.net

Another alternative is the AstexViewer Java applet - free, but
unfortunately closed source.
  http://www.astex-technology.com/AstexViewer/visualisation/index.html

The MSD at EBI have developed an extended version, in use here:
  http://www.ebi.ac.uk/msd-srv/apps/Viewer/ViewerServlet?id=1atp
It has some nice features, like showing the sequence of the protein and
allowing you to zoom in on a residue when clicked in the sequence.  

I'm not sure about the licence position on the EBI version though; if
you're interested, I'm sure someone from the MSD group could help out.

Gareth

-- 
---
 Gareth Stockwell
 EMBL - European Bioinformatics Institute
 Wellcome Trust Genome Campus
 Hinxton
 Cambridge CB10 1SD gar...@ebi.ac.uk
 Tel 01223 492548   http://www.ebi.ac.uk/~gareth




[PyMOL] embeding pymol in a web page

2004-03-25 Thread Einat Sitbon

Hello PyMolers,

I'm wondering if there is a possibility to embed a pymol script in a web 
site.
What I have in mind is something equivalent to the chime plug-in, using 
pymol.

Any suggestions?

Thanks, Einat.


Einat Sitbon
Department of Molecular Genetics
Weizmann Institute of Science
Tel: 972-8-9344911

To reply, please change the mmm in the reply-to address to hotmail

_
Protect your PC - get McAfee.com VirusScan Online 
http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963





RE: [PyMOL] embeding pymol in a web page

2004-03-25 Thread Warren DeLano
Einat,

That is a longstanding goal of the PyMOL project, but there are various
hurdles to be surmounted, including creating an API for embedding PyMOL and
a secure API/language-subset for controlling it via the network.  Another
problem is that each platform has a different optimal technology for
building plugins.

An ActiveX verson of PyMOL is partially developed, but it won't be release
before PyMOL 1.0 -- so we're talking months to years.  However, once we have
one plugin built, it shouldn't be too hard to create others (Netscape, Java,
etc.).  

For web-page embeddable molecular graphics today, look to Jmol:

http://jmol.sourceforge.net

I think it is the best open-source option if migrating away from Chime.

Cheers,
Warren

 -Original Message-
 From: pymol-users-ad...@lists.sourceforge.net 
 [mailto:pymol-users-ad...@lists.sourceforge.net] On Behalf Of 
 Einat Sitbon
 Sent: Thursday, March 25, 2004 2:14 AM
 To: pymol-users@lists.sourceforge.net
 Subject: [PyMOL] embeding pymol in a web page
 
 
 Hello PyMolers,
 
 I'm wondering if there is a possibility to embed a pymol 
 script in a web site.
 What I have in mind is something equivalent to the chime 
 plug-in, using pymol.
 Any suggestions?
 
 Thanks, Einat.
 
 
 Einat Sitbon
 Department of Molecular Genetics
 Weizmann Institute of Science
 Tel: 972-8-9344911
 
 To reply, please change the mmm in the reply-to address to hotmail
 
 _
 Protect your PC - get McAfee.com VirusScan Online
 http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
 
 
 
 ---
 This SF.Net email is sponsored by: IBM Linux Tutorials
 Free Linux tutorial presented by Daniel Robbins, President and CEO of
 GenToo technologies. Learn everything from fundamentals to system
 administration.http://ads.osdn.com/?ad_id=1470alloc_id=3638op=click
 ___
 PyMOL-users mailing list
 PyMOL-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/pymol-users