Difference between revisions of "Backward compatibility"

From Jmol
Jump to navigation Jump to search
(Hydrogen bonds: calculation and display)
(Testing different applet versions)
Line 1: Line 1:
 +
__TOC__
 
Jmol intentionally keeps a strong backward-compatibility, that is, new versions try to maintain operative all things that could be done in older versions, with the same command syntax, and to also keep defaults.
 
Jmol intentionally keeps a strong backward-compatibility, that is, new versions try to maintain operative all things that could be done in older versions, with the same command syntax, and to also keep defaults.
  
Line 5: Line 6:
 
This is a place to try and collect such discrepancies, for the benefit of the community of users and webpage/script programmers.
 
This is a place to try and collect such discrepancies, for the benefit of the community of users and webpage/script programmers.
  
 +
= Changes in behavior =
 
Please, add here any issues you have found when updating Jmol versions:
 
Please, add here any issues you have found when updating Jmol versions:
 
* Script commands that get broken when moved to a new version of Jmol.
 
* Script commands that get broken when moved to a new version of Jmol.
Line 25: Line 27:
  
 
Where you had the first <code>hBonds on</code> command for a molecule, replace it with <code>hBonds calculate</code>. Where <code>hBonds on</code> was only to restore display (e.g. after a <code>hBonds off</code>), you can leave it as it was.
 
Where you had the first <code>hBonds on</code> command for a molecule, replace it with <code>hBonds calculate</code>. Where <code>hBonds on</code> was only to restore display (e.g. after a <code>hBonds off</code>), you can leave it as it was.
 +
 +
= Testing different applet versions =
 +
''(This is an advanced feature)''
 +
 +
You can force the use of a certain version of Jmol applet in any web page (even if that page is not yours). The way to do so is:
 +
 +
On the URL line of the browser, add
 +
?JMOLJAR=
 +
followed by the url of the {{file|JmolApplet.jar}} or {{file|JmolAppletSigned.jar}} file your intend to use.
 +
If there is already a <code>?</code> in the URL, then use <code>&JMOLJAR=</code>, to preserve the logic of a url.
 +
 +
There will be a couple of warnings that you will have to accept, due to the potential security risk of replacing an applet with another coming from a totaly unrelated server. There may also be Java security issues still preventing the applet from loading files, unless you specify the signed applet.
 +
 +
For example:
 +
<nowiki>http://www.rcsb.org/pdb/explore/jmol.do?structureId=1CRN&bionumber=1</nowiki><font color=red><nowiki>&JMOLJAR=http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar</nowiki></font>
 +
lets you use Bob's latest version of Jmol at the RCSB site (which is currently using 11.8.4).
 +
[http://www.rcsb.org/pdb/explore/jmol.do?structureId=1CRN&bionumber=1&JMOLJAR=http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar Try it].

Revision as of 16:02, 30 November 2009

Jmol intentionally keeps a strong backward-compatibility, that is, new versions try to maintain operative all things that could be done in older versions, with the same command syntax, and to also keep defaults.

However, on a few occasions there are stronger reasons to decide upon a change in the default behaviour; this can break existing scripts if you update the Jmol version.

This is a place to try and collect such discrepancies, for the benefit of the community of users and webpage/script programmers.

Changes in behavior

Please, add here any issues you have found when updating Jmol versions:

  • Script commands that get broken when moved to a new version of Jmol.
  • Changes in default behavior.

Make sure to specify the old and new version numbers across which the behaviour was changed.

Hydrogen bonds: calculation and display

Changed between: v. 10.0 and 10.2.

Description:

hBonds on does not calculate hydrogen bonds anymore. Instead, the first time you want hydrogen bonds displayed you must use hBonds calculate. This enables the separation of H-bond data present in the pdb file (e.g. specified by the authors as calculated by a separate algorithm) and H-bond information as calculated by the Jmol algorithm.

Effects:

Old scripts using hBonds on will no longer display any hydrogen bonds in most cases, or will display just a few of them (few pdb files include H-bonds specification).

Advice:

Where you had the first hBonds on command for a molecule, replace it with hBonds calculate. Where hBonds on was only to restore display (e.g. after a hBonds off), you can leave it as it was.

Testing different applet versions

(This is an advanced feature)

You can force the use of a certain version of Jmol applet in any web page (even if that page is not yours). The way to do so is:

On the URL line of the browser, add

?JMOLJAR=

followed by the url of the File icon.gifJmolApplet.jar or File icon.gifJmolAppletSigned.jar file your intend to use. If there is already a ? in the URL, then use &JMOLJAR=, to preserve the logic of a url.

There will be a couple of warnings that you will have to accept, due to the potential security risk of replacing an applet with another coming from a totaly unrelated server. There may also be Java security issues still preventing the applet from loading files, unless you specify the signed applet.

For example:

http://www.rcsb.org/pdb/explore/jmol.do?structureId=1CRN&bionumber=1&JMOLJAR=http://chemapps.stolaf.edu/jmol/docs/examples-11/JmolAppletSigned.jar

lets you use Bob's latest version of Jmol at the RCSB site (which is currently using 11.8.4). Try it.

Contributors

AngelHerraez