Hi Mickael,

I've careful read everything you've written.

It sounds to me as though my original suggestion - loading a molecule
inline - would solve your caching issues. You cannot modify a client's
Java VM settings from PHP, with the PHP being server-side.. it's
possible that you could generate some javascript with the PHP that
would use LiveConnect to make modifications, but it is obviously
undesirable to modify a client's browser-wide security policy from a
server.

You make a statement about performance issues with large molecules -
where's the extra drain in performance? If you simply retrieve the
filename as your code currently does, the client machine still has to
download the molecule, although that data transfer will occur via
Jmol. If you pass the actual file contents via PHP, there will be
negligible difference in speed, it's the same amount of data which
needs to be transferred, as you know. Plus, since you seem to be in a
niche position of only temporarily generating structures and tying
them to an IP, it makes sense to me to transmit the structure directly
to that user rather than use any server-side storage at all.

I'd give jmolLoadInline a try, and take note of Angel's comment
earlier about needing to handle newlines - strip them out when your
PHP generates a molecule string, and then just send that string
straight to the relevant user. That's my advice, anyway.


- N David Brown



2009/6/19 Mickael Krzeminski <[email protected]>:
> Hey there,
>
> Thanks a lot for all you comments and remarks. I'm gonna explain somme
> more details.
> Actually, I'm using AJAX to call the php file, which will generate the
> molecule and display it (More or less in the way you, David, described).
> In this script, I put a listbox from which the user can select different
> molecules. Once selected, the user can visualize it by clicking a button,
> which calls something like disp_mol.php?name=arginine. The php file will
> parse it to retrieve the name of the molecule, generate it, and call it
> molecule.pdb (no matter the name of the molecule). Then, it loads
> molecule.pdb into Jmol.
>
> As you probably understood, each molecule is not present on the server,
> but is generated only when the user presses the button (I'm not gonna give
> the reason for this because of too many details... ;) )
> At this time, a new directory is created on the server (This helps me
> keep some traces and is easier to handle). The name of the directory is
> unique for each user (It is based on the IP). When a molecule is
> generated, it is stored in this directory. Hence, if I manually delete
> this directory, no molecule is present anymore.
> So, on the webpage, I clicked the button to display the molecule A and it
> appeared correcly. Then, I deleted the directory that was created. I
> restarted the same webpage after erasing all Internet traces (I also
> thought about a cache problem). I selected another molecule (B) to display
> and... A appeared!!
> Nevertheless, when I asked for viewing the molecule, B appeared (I tried
> under PyMol and MDL). This means that Jmol loaded well the structure,
> right ? The problem could come, as you, Angel and Robert, suggested, from
> Java cache.
> But, do you have any clue about how to flush it from php (or something
> else, without making the user manually intervene) ?
>
> Besdies this, David, the method you propose is clever and easy to set, but
> this can become quite heavy, in particular with large molecule. In that
> sense, I'm not sure this approach would be the most efficient.
> I'm gonna try to add a random code after the name of the molecule to
> download to see the result and will let you know!
>
> Thanks again.
>
> Mickael
>
>
>
> On Thu, 18 Jun 2009, Mickael Krzeminski wrote:
>
>> Dear Jmol users,
>>
>> I recently met a problem when displaying a structure, which does not
>> correspond to the one I loaded.
>>
>> To be clearer... I created a webpage, which displays several buttons,
>> which correspond to different molecules.
>> Every time you click on a button, the information is sent to the
>> server, which generates the structure and creates the corresponding pdb
>> file. Then, a window opens and initialises Jmol before reading and
>> displaying the structure. The structure has always the same name, but the
>> contents of the file is obviously different.
>> The problem there is that the structure is always the same! But...
>>
>> 0. Let us call A the structure that is always displayed and B the one I
>> want to see.
>> 1. I checked out directly the file on the server and the generated pdb
>> structure is well B, even though the one which is displayed is A.
>> 2. The structure A does NOT exist at all on the server (Because it has
>> never been generated). How Jmol can still find it ?
>> 2. With the dropdown menu of Jmol, I asked for downloading the file. And
>> when I open this file locally (With PyMol for instance), I get the correct
>> structure, B.
>>
>> Any clue ? Thanks a lot for all your remarks and comments.
>>
>> Cheers,
>> Mickael
>>
>>
>> ------------------------------------------------------------------------------
>> Crystal Reports - New Free Runtime and 30 Day Trial
>> Check out the new simplified licensing option that enables unlimited
>> royalty-free distribution of the report engine for externally facing
>> server and web deployment.
>> http://p.sf.net/sfu/businessobjects
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
> ------------------------------------------------------------------------------
> Crystal Reports - New Free Runtime and 30 Day Trial
> Check out the new simplified licensing option that enables unlimited
> royalty-free distribution of the report engine for externally facing
> server and web deployment.
> http://p.sf.net/sfu/businessobjects
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables unlimited
royalty-free distribution of the report engine for externally facing 
server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to