Design Features |
This section lists design features which may not be obvious when using the Protein Explorer.
For the RCSB, the URL to fetch a gzipped PDB file for 9dna is: www.rcsb.org/pdb/cgi/export.cgi/9dna.pdb?pdbId=9dna&format=PDB&compression=chime
Javascript also knows when Netscape is busy, namely, when a document in a frame has not completed loading (busy status is turned on by onUnload and turned off by onLoad). This avoids clicking on links or buttons before all the relevant forms and documents are in place.
The Explorer (one molecule at a time) has a Ready/Busy indicator below Chime. The Comparator does not have such indicators but internally obeys the same rules. This is because the Comparator would need three separate indicators (one for each Chime and one for Netscape) and this seemed not worth the effort for programming nor the screen space required nor the visual distraction from three indicators.
To see the unscrambling in action, issue the command "javascript top.db(true)", which turns on a debugging mode. All messages will now be reported to the message window, prefixed by S (for Scrambled) and then U (for Unscrambled).
Temporary disconnect for loops. The unscrambling function requires that out-of-order messages be stored until they can be passed out in order. The NMR [Auto] (automatic display of each model in sequence) uses a looped script which can easily generate thousands of messages. Unlike some non-looped scripts, there is no need in this case for javascript to "scrutinize" the text of each message. Therefore, a special mode was provided in unscramble() for looped scripts -- in this mode, message numbers only are unscrambled, without storing the messages themselves or passing them onto the message text processing function. When every message number is accounted for, and the interrupt has been processed, Chime has completed the script. However even this took too long (javascript being an interpreted language) and after a long period of viewing the [Auto] loop, and after Chime had processed the interrupt which stops the loop, it would take many minutes for unscramble() to process even just the message numbers. During these minutes the user must wait while nothing appears to be happening. (Actually unscramble() is going at top speed but nothing happens on the screen and the user is locked out by the "busy" condition.) Therefore a third mode was implemented, called disconnect mode, to make the [Auto] loop display recover quickly after an interrupt. In disconnect mode, message numbers as well as message texts are simply discarded. After sending the interrupt, a reconnect operation is initiated. In order to determine when Chime is idle/ready, this function checks at one-second intervals and turns off the "busy" flag only after a second in which no messages were sent by Chime. This may not be a bullet-proof method but is the best I've come up with. The worst consequence could be that left-over messages might come back unexpectedly after reconnect signals that Chime is "ready". This would likely generate an illegal condition in unscramble() which would then recommend closing the window (ending the session).
Stopping on a known model number. During automatic stepping through a series of NMR models, a desired function is to interrupt on any model and have the javascript report which model you chose. A Chime script command "javascript top.show_model(N)" is used to update the model number shown as each new model is displayed in Chime (see auto_model() in nmr.js). The problem is that when the delay between model stepping is short (< 0.25 sec on my Pentium 150 MHz) these commands execute in scrambled order, showing incorrect model numbers. The above strategy of disconnecting the unscrambling process during automatic model stepping complicates this problem. My solution is that even when unscrambling is disconnected, unscramble() watches for comments of the form #@NN, where NN is the current model number. By keeping track of the model number associated with the highest message number seen, the model number at interrupt is known. This is written into the form slot to ensure that the display is correct after the interrupt (see after_reconnect() in nmr.js, and reconnect in shared\unscramble.js), and more importantly the image is regenerated for this model number to guarantee that the model number shown in the form slot is the model number displayed in Chime. This seems to work satisfactorily.
Known Limitations |
Fixing the following limitations is not worth the time required, so these are expected to remain indefinitely.
Future Plans |
Version History |
script "http://www.umass.edu/microbio/chime/shared/cs_amphi.spt"