[También, digame de dónde está. Estoy en Villadolid.]
On Wed, Aug 24, 2011 at 11:54 AM, Robert Hanson <[email protected]> wrote:
> Daniel, please send me a link to some test pages.
>
>
> On Wed, Aug 24, 2011 at 10:38 AM, Daniel Carbajo <[email protected]
> > wrote:
>
>> Hello everyone,
>> I am sorry to re-open this thread, but just got back from holidays trying
>> to make this work with all the feedback I got (thanks Paul, Rolf and Bob),
>> but I am not succeeding...
>> My aim is the following:
>> -I have 2 php pages, each with a Jmol window where I can load
>> different protein structures and I give the possibility to change the
>> display of such proteins (cartoon, spacefill, trace, backbone), to highlight
>> (in sticks) different residues and give them a label.
>> -I want to save the state information of the Jmol window in the first
>> page (which I have already done) and pass it to the second, where I can
>> restore it (where I have the problem).
>>
>>
>> I already have the following:
>>
>> FIRST PHP:
>>
>> $cont0 .= "<form name=\"PASARCOLORS\" action=\"MODshowCOLORS.php\"
>> method=\"POST\" onSubmit='var state=jmolGetPropertyAsString(\"stateInfo\");
>> document.PASARCOLORS.ESTADO.value=state;'>";
>> $cont0 .= "<input type=\"hidden\" name=\"ESTADO\"></form>";
>>
>>
>>
>> SECOND PHP:
>>
>> $ESTADO=$_POST["ESTADO"];
>> echo "<!-- /***** Jmol Embedded Script ****
>> ?php echo $ESTADO; ?
>> **/ -->";
>> $JMOL = "<script type=\"text/javascript\">
>> jmolInitialize(\"Jmol-12new\", true);
>> jmolSetAppletColor(\"white\");
>> var jmolcmds = [
>> \"load $ZIPtoUSE|$PREFIX-Models_$code/$PREFIX-$code.pdb\",
>> \"set frank off; select all; hbonds off; spin off; wireframe off;
>> spacefill off; trace off; set ambient 40; set specpower 40; slab off;
>> ribbons off; cartoons off; label off; monitor off\",
>> \"set isosurfacePropertySmoothing TRUE\",
>> \"set showAxes true\",
>> \"set appendNew true\",
>> \"frame all\",
>> \"display all\",
>> \"select 1.1; cartoon; set propertyColorScheme 'bwr'; color atoms
>> property temperature ABSOLUTE $range\",
>> \"script Jmol-12new/myJMOLfunctions.spt\"
>> ];
>> jmolApplet([580,500], jmolcmds.join(\"; \"));
>> </script>";
>>
>> $JMOL .= "<form><script>jmolButton(\"reset\", \"Original orientation\");
>> jmolButton(\"move 360 0 0 0 0 0 0 0 20\", \"Rotate X axis\");
>> jmolButton(\"move 0 360 0 0 0 0 0 0 20\", \"Rotate Y axis\");
>> jmolButton(\"write image.png\", \"Create image\");
>> </script>";
>> $JMOL .= '<script>function
>> restoreState(){jmolScript(document.body.innerHTML)};
>> jmolButton([restoreState], "RESTORE");</script></form>';
>>
>>
>>
>> The last line is not working, but I don't know why, since the information
>> is correctly passed to $ESTADO (any idea Bob?). Besides, I would like that
>> the state is restored by default, so I guess I don't need "var jmolcmds" at
>> all, just restoring at the beginning with jmolScript... how should it be?
>> Thanks again to everyone!
>> Daniel
>>
>>
>>
>> ------------------------------------------------------------------------------
>> EMC VNX: the world's simplest storage, starting under $10K
>> The only unified storage solution that offers unified management
>> Up to 160% more powerful than alternatives and 25% more efficient.
>> Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
EMC VNX: the world's simplest storage, starting under $10K
The only unified storage solution that offers unified management
Up to 160% more powerful than alternatives and 25% more efficient.
Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users