Difference between revisions of "Backward compatibility"

From Jmol
Jump to navigation Jump to search
(new result of "hbonds calculate" in 12.0)
m (Reverted edits by Reddyfox (talk) to last revision by AngelHerraez)
 
(5 intermediate revisions by 2 users not shown)
Line 11: Line 11:
 
* 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 ==
Line 16: Line 24:
 
'''Description:'''
 
'''Description:'''
  
<code>hBonds calculate</code> fails to calculate hydrogen bonds on files that contain any H atoms.
+
<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.
 
 
Seems to affect pdb-format files only. The new command <code>calculate hBonds</code> is also affected.
 
  
 
'''Effects:'''
 
'''Effects:'''
  
Old scripts using <code>hBonds calculate</code> will no longer display any hydrogen bonds in some cases.  
+
Old scripts using <code>hBonds calculate</code> will no longer display any hydrogen bonds in some cases (pdb-format files that contain hydrogens).  
  
 
'''Advice:'''
 
'''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>
 
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 ===
 
=== Changed between v. 10.0 and 10.2 ===
Line 44: Line 55:
 
''(This is an advanced feature)''
 
''(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:
+
You can force the use of a certain version of Jmol applet in any web page (even if that page is not yours).  
 
 
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:
+
See [[Jmol_Applet#Testing_different_applet_versions]]
<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].
 

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