Re: [Jmol-users] Extract chain IDs into an array

2016-05-11 Thread Chris St Pourcain
Bob, Sorry for the delay in responding. Your suggestion worked perfectly. In the end though, I decided that I needed both ligands and ions, so I extracted the information from the pdb using getProperty auxiliaryinfo.models.hetNames Thanks again. Chris --

Re: [Jmol-users] Extract chain IDs into an array

2016-04-29 Thread Robert Hanson
On Fri, Apr 29, 2016 at 1:13 PM, Chris St Pourcain < chrisstpourc...@indigomolecularimages.com> wrote: > Angel, > > Thanks for the quick reply and for your solution, it worked great. I > managed to get it down to one line of javascript: > > var chains_list = Jmol.evaluateVar(jmolApplet4857_0, 'sc

Re: [Jmol-users] Extract chain IDs into an array

2016-04-29 Thread Chris St Pourcain
Angel, Thanks for the quick reply and for your solution, it worked great. I managed to get it down to one line of javascript: var chains_list = Jmol.evaluateVar(jmolApplet4857_0, 'script("show chain")'); Do you know if there is something similar ligands? I can see them in the menu, under Sele

Re: [Jmol-users] Extract chain IDs into an array

2016-04-28 Thread Angel Herráez
Hi Chris I had something similar recently. The hint I got was to use the script() function in Jmol. This seems to do what you need:   (in Jmol script) var c = script("show chain");   (in _javascript_) var chains_list = Jmol.evaluateVar( jmolApplet0, 'c'); alert(chains_list); That

[Jmol-users] Extract chain IDs into an array

2016-04-28 Thread Chris St Pourcain
Hi All, I have a webpage using JSmol and have been trying to use javascript to extract the chain IDs of a molecule into an array. I took a look at this thread (https://sourceforge.net/p/jmol/mailman/message/20018470/) and realised I need to use 'show chain'. I have tried the following javascript: