On Oct 26, 2006, at 11:15 AM, Rajarshi Guha wrote:
>
> So there are a number of issues:
>
> * 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.
> * 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.
>
> * How do I specify that Jmol should load the structures - which are
> in a
> string. Do I need to write out a temporary file?
>
> I have a feeling that Javascript comes in somewhere (!), but never
> having done this, it's not clear as to how I attack this problem (at
> least in an elegant/efficient manner)
>
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:
<?php
$inline_structure = stripslashes(preg_replace('/^/m','|', $mystr
['coordinates']));
?>
then in the applet tag, you can use php to write the coordinates,
like this:
<param name="loadinline" value="|<?php echo $inline_structure ?>" />
this has worked for me in the past. just be sure to append each line
with a bar (|) to fit the syntax for loadinline.
hope that helps,
tim
--
Timothy Driscoll em: [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=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users