Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
Rajarshi, I have a solution for you. Don't convert your files yet. I propose: jmolLoadInlineFiles(modelData,separator,target) target:optional applet extension separator: an explicit string of your choice indicating a new model modelData: your model data, with each model separated by that separator Sound OK? Bob - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
Timothy Driscoll answered to Rajarshi Guha: * Since Jmol cannot show multiple structures, I need to convert my SDF to PDB and concatenate it to the protein PDB. Is this correct? as far as I know, yes - you will need to concatenate the structures as independent MODEL (or perhaps FRAME) records. Wrong. Recent versions of Jmol CAN load multiple structures, so there is no need to concatenate files. Don't know if different formats will be trouble, but get a current prerelease version of Jmol and try. * The PHP page needs to write out a HTML page that contains the code for the applet. But ordinarily I cannot write a file to disk from my PHP page. I don't know any PHP, but at least javascript can write an html page on-the-fly without saving any temp files. * How do I specify that Jmol should load the structures - which are in a string. Do I need to write out a temporary file? you should be able to use php to write the Jmol applet and provide the structure(s) as an inline param; in other words, I don't think you need a tmp file anywhere. for example, if you assign your coordinates to a php var, like this: I'm quite sure that Jmol has inline loading abilities, but I haven't used them. Check the documentation. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
On Oct 26, 2006, at 1:38 PM, Angel Herraez wrote: Timothy Driscoll answered to Rajarshi Guha: * Since Jmol cannot show multiple structures, I need to convert my SDF to PDB and concatenate it to the protein PDB. Is this correct? as far as I know, yes - you will need to concatenate the structures as independent MODEL (or perhaps FRAME) records. Wrong. Recent versions of Jmol CAN load multiple structures, so there is no need to concatenate files. Don't know if different formats will be trouble, but get a current prerelease version of Jmol and try. and move them independently? that's news to me. * The PHP page needs to write out a HTML page that contains the code for the applet. But ordinarily I cannot write a file to disk from my PHP page. I don't know any PHP, but at least javascript can write an html page on-the-fly without saving any temp files. if you are using php anyway, to query your server-side database, then js is a needless complication IMO. you could use php to write the coordinates as a js variable, then use js to write your applet tag - but why bother? php works outright. * How do I specify that Jmol should load the structures - which are in a string. Do I need to write out a temporary file? you should be able to use php to write the Jmol applet and provide the structure(s) as an inline param; in other words, I don't think you need a tmp file anywhere. for example, if you assign your coordinates to a php var, like this: I'm quite sure that Jmol has inline loading abilities, but I haven't used them. Check the documentation. Jmol does, in fact; my example was actual working code. but I could find no documentation about loadinline. tim -- Timothy Driscollem: [EMAIL PROTECTED] molvisions - see. grasp. learn. ph: 919-368-2667 http://www.molvisions.com/im: molvisions usa:virginia:blacksburg tx: [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
On Thu, 2006-10-26 at 19:38 +0200, Angel Herraez wrote: Timothy Driscoll answered to Rajarshi Guha: * Since Jmol cannot show multiple structures, I need to convert my SDF to PDB and concatenate it to the protein PDB. Is this correct? as far as I know, yes - you will need to concatenate the structures as independent MODEL (or perhaps FRAME) records. Wrong. Recent versions of Jmol CAN load multiple structures, so there is no need to concatenate files. Don't know if different formats will be trouble, but get a current prerelease version of Jmol and try. How would this be done? Currently I do: var mol1 = ...; jmolAppletLoadInline(400, m1, spacefill on;); To load the next one would I do var m2 = ...; jmolLoadInline(m2); Or is there some other approach? --- Rajarshi Guha [EMAIL PROTECTED] GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- Every nonzero finite dimensional inner product space has an orthonormal basis. It makes sense, when you don't think about it. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
An (older) example of using jmolLoadInline() is at http://www.stolaf.edu/people/hansonr/jmol/inline/ Bob - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
On Thu, 2006-10-26 at 18:36 -0500, [EMAIL PROTECTED] wrote: Rajarshi, The question is: How important is it that you load the models one at a time? Not really. Basically I have a protein structure and multiple SD files of docked ligands. So at any one time I'd like to bring up Jmol with the protein and the ligand. If this is done by separate calls or in one call (by creating a single structure file) doesn't really matter 1) Provided these are SDF files, a line containing just separates different models. So you could: Hmm, one is a PDB. I could convert it to SDF but I figured that I'd loose information (such as secondary structure etc) - is that correct? If so, then it appears that converting the SDF to PDB and then concatenating would be the way to go (?) --- Rajarshi Guha [EMAIL PROTECTED] GPG Fingerprint: 0CCA 8EE2 2EEB 25E2 AB04 06F7 1BB9 E634 9B87 56EE --- Breadth-first search is the bulldozer of science. -- Randy Goebel - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users
Re: [Jmol-users] some advice regarding Jmol, Javascript PHP
OK, so the problem here is that we don't have a multiple-file-format loadInline function. I suggest something like: [some PDB data] ~~~JMOL~EOF~~~ [some other data] ~~~JMOL~EOF~~~ [some more data] What would be the appropriate thing for ~~~JMOL~EOF~~~ ? Bob - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642 ___ Jmol-users mailing list Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users