Difference between revisions of "Backward compatibility"

From Jmol
Jump to navigation Jump to search
(backward compatibility - change in Hbonds on)
m (Reverted edits by Reddyfox (talk) to last revision by AngelHerraez)
 
(8 intermediate revisions by 2 users not shown)
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.
 
* Changes in default behavior.
 
* Changes in default behavior.
 
Make sure to specify the old and new version numbers across which the behaviour was changed.
 
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:'''
 +
<code>set zShade on</code> 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 <code>set zShadePower 1</code>.
 +
For a description of the new features in 12.2, see the [{{ScriptingDoc}}#set_zshade scripting documentation].
  
 
== Hydrogen bonds: calculation and display ==
 
== Hydrogen bonds: calculation and display ==
'''Changed between:'''
+
=== Changed between v. 11.8 and 12.0 ===
v. 10.0 and 10.2.
+
'''Description:'''
 +
 
 +
<code>hBonds calculate</code> fails to calculate hydrogen bonds on some pdb files that contain H atoms. The newer command <code>calculate hBonds</code> behaves identically.
 +
 
 +
'''Effects:'''
 +
 
 +
Old scripts using <code>hBonds calculate</code> will no longer display any hydrogen bonds in some cases (pdb-format files that contain hydrogens).  
 +
 
 +
'''Advice:'''
 +
 
 +
Where you had the <code>hBonds calculate</code> command for a molecule, replace it with <code>select !_H; hBonds calculate; select all;</code>. Alternatively, use <code>calculate hBonds (!_H) (!_H);</code>
 +
 
 +
:The logic is this:
 +
:If you ask for <code>calculate hBonds</code>, 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:'''
 
'''Description:'''
  
<code>hBonds on</code> does not calculate hydrogen bonds anymore. Instead, you must use <code>hBonds calculate</code>. This enables the separation of H-bond data present in the pdb file (e.g. calculated by a separate algorithm) and H-bond information as calculated by the Jmol algorithm.
+
<code>hBonds on</code> does not calculate hydrogen bonds anymore. Instead, the first time you want hydrogen bonds displayed you must use <code>hBonds calculate</code>. 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:'''
 
'''Effects:'''
Line 25: Line 51:
  
 
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).
 +
 +
See [[Jmol_Applet#Testing_different_applet_versions]]

Latest revision as of 14:59, 20 July 2013

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