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

Reply via email to