Backward compatibility

From Jmol
Jump to navigation Jump to search

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.

The fog effect

Changed between v. 12.0 and 12.2

Description: set zShade on enables a "fog" or "fade" effect, which shades objects based on the distance from the observer such that distant objects fade into the background.

Starting Jmol 12.2, the defualt effect is much more foggy. A similar rendering is achieved (approx.) by adding set zShadePower 1. For a description of the new features in 12.2, see the scripting documentation.

Hydrogen bonds: calculation and display

Changed between v. 11.8 and 12.0

Description:

hBonds calculate fails to calculate hydrogen bonds on some pdb files that contain H atoms. The newer command calculate hBonds behaves identically.

Effects:

Old scripts using hBonds calculate will no longer display any hydrogen bonds in some cases (pdb-format files that contain hydrogens).

Advice:

Where you had the hBonds calculate command for a molecule, replace it with select !_H; hBonds calculate; select all;. Alternatively, use calculate hBonds (!_H) (!_H);

The logic is this:
If you ask for calculate hBonds, now that Jmol has "real" hydrogen bond calculation capability (for all models, not just PDB files), Jmol will calculate H bonds for traditional PDB files (not containing hydrogen atoms) just as before, but if hydrogen atoms are included in the selected atom set, Jmol assumes you want actual hydrogen bonds, not "pseudo" hydrogen bonds between N and O atoms of a protein or nucleic acid.

Note: this will likely not affect most files. If the pdb file has no hydrogens, then there is no change. If the pdb file has all hydrogens, Jmol will now calculate H bonds counting on them (the result may be slightly different). The change has been detected in a few special files where H bonds were expected between heteroatoms that had no hydrogens, but the whole model had some H atoms (that were not involved in the H bonds).

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).

See Jmol_Applet#Testing_different_applet_versions

Contributors

AngelHerraez