From: Takanori N. <t.n...@ma...> - 2012-01-16 15:46:46
|
Dear Pymol users, I wrote a Pymol script to export a scene in Pymol to GLmol, a molecular viewer for Web browsers written in WebGL/Javascript. With this script, you can publish your Pymol scene for Web page. Visitors can rotate, zoom the molecule on the page. Compared to exporting polygon coordinates (VRML or Object3D), published pages contain only atomic coordinates so that the file size is much smaller and visitors can even change representation. Examples and script can be downloaded from my web page. http://webglmol.sourceforge.jp/pymol_exporter/index.html This script uses (undocumented?) "cmd.get_session" to extract which representation is enabled on each part of the molecule. I think this technique is useful for many purposes, for example, writing exporters, copying representations between aligned structures, etc. Comments and suggestions are welcome. If you think this script useful, I will put it on Pymol wiki. Best regards, Takanori Nakane |
From: Troels E. L. <tl...@gm...> - 2012-01-16 16:53:06
|
That looks very interesting. I needed to make my shortcut to chrome look like this: /opt/google/chrome/google-chrome --enable-webgl %U Your example page is extremely fast, and the View mode change is working perfectly and fast. This is the first version of PyMOL-to-webpage i have seen, which looks very easy. I normally have only seen Jmol application for this: http://www.proteopedia.org/wiki/index.php/4ins God work! Troels Emtekær Linnet Slotsvej 2 4300 Holbæk Mobil: +45 60210234 2012/1/16 Takanori Nakane <t.n...@ma...> > Dear Pymol users, > > I wrote a Pymol script to export a scene in Pymol to GLmol, > a molecular viewer for Web browsers written in WebGL/Javascript. > With this script, you can publish your Pymol scene for Web page. > Visitors can rotate, zoom the molecule on the page. > > Compared to exporting polygon coordinates (VRML or Object3D), > published pages contain only atomic coordinates so that > the file size is much smaller and visitors can even change > representation. > > Examples and script can be downloaded from my web page. > http://webglmol.sourceforge.jp/pymol_exporter/index.html > > This script uses (undocumented?) "cmd.get_session" to > extract which representation is enabled on each part of the molecule. > I think this technique is useful for many purposes, for example, > writing exporters, copying representations between aligned > structures, etc. > > Comments and suggestions are welcome. > If you think this script useful, I will put it on Pymol wiki. > > Best regards, > > Takanori Nakane > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > |
From: Troels E. L. <tl...@gm...> - 2012-01-16 21:14:02
|
There is now a description available at: http://pymolwiki.org/index.php/Pymol2glmol If you use a webpage for teaching, you should really try this plugin out. /Troels Linnet 2012/1/16 Takanori Nakane <t.n...@ma...> > Dear Pymol users, > > I wrote a Pymol script to export a scene in Pymol to GLmol, > a molecular viewer for Web browsers written in WebGL/Javascript. > With this script, you can publish your Pymol scene for Web page. > Visitors can rotate, zoom the molecule on the page. > > Compared to exporting polygon coordinates (VRML or Object3D), > published pages contain only atomic coordinates so that > the file size is much smaller and visitors can even change > representation. > > Examples and script can be downloaded from my web page. > http://webglmol.sourceforge.jp/pymol_exporter/index.html > > This script uses (undocumented?) "cmd.get_session" to > extract which representation is enabled on each part of the molecule. > I think this technique is useful for many purposes, for example, > writing exporters, copying representations between aligned > structures, etc. > > Comments and suggestions are welcome. > If you think this script useful, I will put it on Pymol wiki. > > Best regards, > > Takanori Nakane > > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... > |
From: Jason V. <jas...@sc...> - 2012-01-16 21:34:56
|
Nakane-san, Nice work! WebGL is certainly an interesting technology that will enable the creation of a whole new set of applications. Cheers, -- Jason On Mon, Jan 16, 2012 at 10:45 AM, Takanori Nakane <t.n...@ma...> wrote: > Dear Pymol users, > > I wrote a Pymol script to export a scene in Pymol to GLmol, > a molecular viewer for Web browsers written in WebGL/Javascript. > With this script, you can publish your Pymol scene for Web page. > Visitors can rotate, zoom the molecule on the page. > > Compared to exporting polygon coordinates (VRML or Object3D), > published pages contain only atomic coordinates so that > the file size is much smaller and visitors can even change > representation. > > Examples and script can be downloaded from my web page. > http://webglmol.sourceforge.jp/pymol_exporter/index.html > > This script uses (undocumented?) "cmd.get_session" to > extract which representation is enabled on each part of the molecule. > I think this technique is useful for many purposes, for example, > writing exporters, copying representations between aligned > structures, etc. > > Comments and suggestions are welcome. > If you think this script useful, I will put it on Pymol wiki. > > Best regards, > > Takanori Nakane > > ------------------------------------------------------------------------------ > RSA(R) Conference 2012 > Mar 27 - Feb 2 > Save $400 by Jan. 27 > Register now! > http://p.sf.net/sfu/rsa-sfdev2dev2 > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |
From: Martin H. <ma...@bl...> - 2012-01-17 08:44:30
|
Dear List I'm frequently loading a number of objects into PyMOL which formally have the same name, but are different in structure. Sometimes it can become a bit difficult to keep track of which object is what. Is there a way to display technical information about a loaded object? Say, the file path to the loaded PDB file? That would be great. Thanks for hints. Martin |
From: Jason V. <jas...@sc...> - 2012-01-17 15:01:32
|
Hi Martin, PyMOL does not keep track of which files the objects were loaded from. If you wanted, you could wrap the load command in with your own load command that keeps track of such information, for example in a dictionary. That could look something like this: def load_with_props(fileName, objName): # store whatever info you want, like the filename obj_info[objName] = fileName # ... do more recording of properties you choose # ask PyMOL to now load the file cmd.load(fileName,objName) Then you could just query obj_info based on object name: for obj in cmd.get_names(): print obj_info[obj] Cheers, -- Jason On Tue, Jan 17, 2012 at 3:44 AM, Martin Hediger <ma...@bl...> wrote: > Dear List > I'm frequently loading a number of objects into PyMOL which formally > have the same name, but are different in structure. Sometimes it can > become a bit difficult to keep track of which object is what. > Is there a way to display technical information about a loaded object? > Say, the file path to the loaded PDB file? That would be great. > > Thanks for hints. > Martin > > ------------------------------------------------------------------------------ > Keep Your Developer Skills Current with LearnDevNow! > The most comprehensive online learning library for Microsoft developers > is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, > Metro Style Apps, more. Free future releases when you subscribe now! > http://p.sf.net/sfu/learndevnow-d2d > _______________________________________________ > PyMOL-users mailing list (PyM...@li...) > Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users > Archives: http://www.mail-archive.com/pym...@li... -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |
From: Martin H. <ma...@bl...> - 2012-01-18 09:34:10
|
Most helpful, thats exactly the solution I was looking for. Thanks a lot Martin On 17.01.12 16:01, Jason Vertrees wrote: > Hi Martin, > > PyMOL does not keep track of which files the objects were loaded from. > If you wanted, you could wrap the load command in with your own load > command that keeps track of such information, for example in a > dictionary. That could look something like this: > > def load_with_props(fileName, objName): > > # store whatever info you want, like the filename > > obj_info[objName] = fileName > > # ... do more recording of properties you choose > > # ask PyMOL to now load the file > > cmd.load(fileName,objName) > > Then you could just query obj_info based on object name: > > for obj in cmd.get_names(): > print obj_info[obj] > > Cheers, > > -- Jason > > > > On Tue, Jan 17, 2012 at 3:44 AM, Martin Hediger<ma...@bl...> wrote: >> Dear List >> I'm frequently loading a number of objects into PyMOL which formally >> have the same name, but are different in structure. Sometimes it can >> become a bit difficult to keep track of which object is what. >> Is there a way to display technical information about a loaded object? >> Say, the file path to the loaded PDB file? That would be great. >> >> Thanks for hints. >> Martin >> >> ------------------------------------------------------------------------------ >> Keep Your Developer Skills Current with LearnDevNow! >> The most comprehensive online learning library for Microsoft developers >> is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3, >> Metro Style Apps, more. Free future releases when you subscribe now! >> http://p.sf.net/sfu/learndevnow-d2d >> _______________________________________________ >> PyMOL-users mailing list (PyM...@li...) >> Info Page: https://lists.sourceforge.net/lists/listinfo/pymol-users >> Archives: http://www.mail-archive.com/pym...@li... > > |
From: Takanori N. <t.n...@ma...> - 2012-01-17 15:20:00
|
Dear Troels, > There is now a description available at: > http://pymolwiki.org/index.php/Pymol2glmol Thank you very much for making a nice wiki page! I will keep updating the script. I also have plans to write exporters for Android (ESmol, NDKmol). Exporting Pymol scenes to tablet devices for presentation and discussion would be useful. Dear Jason, Yes, WebGL is very exciting technology. I hope WebGL be available on more platforms, including iOSs (currently disabled "officially" except for iAds). By the way, can you give me a wiki account? In addition to pymol2glmol, I think I can contribute by writing documentations for "undocumented" APIs and settings, such as cmd.dump, get_session, etc. Best regards, Takanori Nakane |
From: Jason V. <jas...@sc...> - 2012-01-17 15:52:05
|
Hi Takanori, > By the way, can you give me a wiki account? > In addition to pymol2glmol, I think I can contribute by > writing documentations for "undocumented" APIs and settings, > such as cmd.dump, get_session, etc. Your account has been created. You will soon receive instructions from the PyMOLWiki. Cheers, -- Jason -- Jason Vertrees, PhD PyMOL Product Manager Schrodinger, LLC (e) Jas...@sc... (o) +1 (603) 374-7120 |