Re: [Jmol-users] SVG

2016-01-13 Thread David Leader
In reply to my query about SVG and preparing Jmol images for publication, Angel wrote: As I understand it, Jmol renders by generating a bitmap on screen and updates it continuously. So I don't thik it is possible to convert to a vector image. Ok. Apologies for my naivety. I guess I wasn’t think

Re: [Jmol-users] SVG

2016-01-13 Thread Rolf Huehne
On 01/13/2016 02:50 PM, David Leader wrote: > Bob wrote: > > >> You can create an image of whatever size you want in pixels using the WRITE >> command. Many consider these adequate for publication. And, as a bonus, if >> you use the PNGJ option: >> >> write PNGJ 2000 2000 "big.png" > > So you can

[Jmol-users] play_make_live icon

2016-01-13 Thread Geoffrey Rowland
Hi folks A minor 'cosmetic' suggestion. I'm increasingly using PNGJ files with the bundled image used as a cover image, deferring loading of JSmol 'til the user clicks the cover image. By default, the cover image is shown with the play_make_live.jpg icon which only really looks good with a white

Re: [Jmol-users] play_make_live icon

2016-01-13 Thread Pshemak Maslak
I second that request. An option to (easily) specify an alternative icon (residing in a directory outside of Jmol directories) would be great. Thanks, PM On 1/13/2016 11:29 AM, Geoffrey Rowland wrote: Hi folks A minor 'cosmetic' suggestion. I'm increasingly using PNGJ files with the bundle

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Eric Martz
Dear Angel (and everyone), For years I have wanted a way to find out (in javascript or in JSmol) the number of atoms (or molecular weight) of a PDB entry before attempting to load it into JSmol. But I have not known how to do this. If you know, please send me a sample of the code. When the siz

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Otis Rothenberger
Eric, alert(Jmol.evaluateVar(jmolApplet0, "{*}.size”)) should do the trick. Otis -- Otis Rothenberger o...@chemagic.org http://chemagic.org > On Jan 13, 2016, at 1:37 PM, Eric Martz wrote: > > Dear Angel (and everyone), > > For years I have wanted a way to find out (in javascript or in JSmol

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Otis Rothenberger
Oops! You want it before it loads. Hmmm... -- Otis Rothenberger o...@chemagic.org http://chemagic.org > On Jan 13, 2016, at 1:44 PM, Otis Rothenberger wrote: > > Eric, > > alert(Jmol.evaluateVar(jmolApplet0, "{*}.size”)) > > should do the trick. > > Otis > -- > Otis Rothenberger > o...@chem

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Eric Martz
Thanks, Otis, But I need to know BEFORE I load the model(s). I envision this as being a two-step process. Given a PDB code, first query to find out the weight or number of atoms and number of models. Then decide how to load: -all atoms, all models? -all atoms, model 1 only? -alpha carbons and nuc

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Otis Rothenberger
Having read the question more thoroughly, a thought, albeit specific to RCSB... You could use AJAX to read the following with a server side script : http://www.rcsb.org/pdb/download/downloadFile.do?fileFormat=pdb&compression=NO&structureId=1smd You can’t read RCSB files directly client side like

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Rolf Huehne
On 01/13/2016 07:37 PM, Eric Martz wrote: > Dear Angel (and everyone), > > For years I have wanted a way to find out (in javascript or in JSmol) > the number of atoms (or molecular weight) of a PDB entry before > attempting to load it into JSmol. But I have not known how to do this. > > If you know

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Rolf Huehne
On 01/13/2016 08:22 PM, Rolf Huehne wrote: > On 01/13/2016 07:37 PM, Eric Martz wrote: >> Dear Angel (and everyone), >> >> For years I have wanted a way to find out (in javascript or in JSmol) >> the number of atoms (or molecular weight) of a PDB entry before >> attempting to load it into JSmol. Bu

Re: [Jmol-users] SVG

2016-01-13 Thread Angel Herráez
David Leader wrote: > Ok. Apologies for my naivety. I guess I wasn't thinking about 3D graphics > properly. Just assuming > because the image was generated from vector-type commands that it could be > converted into 2D > vector commands. More or less that is what is done by the export modules

Re: [Jmol-users] play_make_live icon

2016-01-13 Thread Angel Herráez
This is undocumented (I will fix that in the Wiki), but I found it in the Export to Web templates, so it must work. Please give it a try Info.makeLiveImg = "whatever.png" -- Site24x7 APM Insight: Get Deep Visibility i

Re: [Jmol-users] play_make_live icon

2016-01-13 Thread Angel Herráez
(addition to my former message) Info.makeLiveImg = "path/to/myown.png" Make sure to include the path to your file (relative to location of JSmol.min.js as the other paths in Info) Now documented: http://wiki.jmol.org/index.php/Jmol_JavaScript_Object/Info#Startup_period -

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Eric Martz
That looks wonderful, Rolf. I'll let you know after I try it. Thanks so much!! -Eric On 1/13/16 2:28 PM, Rolf Huehne wrote: > On 01/13/2016 08:22 PM, Rolf Huehne wrote: >> On 01/13/2016 07:37 PM, Eric Martz wrote: >>> Dear Angel (and everyone), >>> >>> For years I have wanted a way to find out (in

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Robert Hanson
Here's another idea: Check the "divided" directory at RCSB for the file size: x = "1crn" print load("http://ftp.wwpdb.org/pub/pdb/data/structures/divided/pdb/ *"+x[2][3]+"*/").lines.find(x)[0].trim().split(" ")[0] The result will be something like "1.5M" or "33K" On Wed, Jan 13, 2016 at 5:00 P

Re: [Jmol-users] how to parse JSON data within Jmol

2016-01-13 Thread Paul PILLOT
Le 13-01-2016 à 20:58, Paul PILLOT a écrit : Hi Eric, rcsb implements a REST API that you can query through Ajax to get many answers to a lot of question. Here is an example of code I designed to get informations from a PDB, such as the number and names of chains, the ligands, the related pubm