Difference between revisions of "Support for bond orders"

From Jmol
Jump to navigation Jump to search
 
 
(14 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Jmol supports bond orders (i.e., different from single bonds).
+
Jmol supports bond orders (i.e., different from single bonds) and displays them as parallel, solid or dashed, cylinders.
 +
 
 +
Visualization of non-single bonds can be supressed (all will show as single) if
 +
<code>[http://chemapps.stolaf.edu/jmol/docs/#setbondstyles set showMultipleBonds off]</code> is issued at the console or from a script.
 +
 
 +
== Definition of bond order ==
  
 
File formats that specify bond order --and Jmol recognizes as such:
 
File formats that specify bond order --and Jmol recognizes as such:
* [[File_formats#.28MDL.29_MOL_and_SD|MOL]]
+
* [[File_formats/Coordinates#MOL_and_SD_.28Symyx_MDL.29|MOL]] specifies bond order natively, using certain numeric codes (see table below)
* [[File_formats#PDB|PDB]] can do it using a trick: specify twice each CONNECT record for a double bond.
+
* [[File_formats/Coordinates#MOL2_.28Sybyl.2C_Tripos.29|MOL2]] specifies bond order natively, using certain alphanumeric codes (see table below)
 +
* [[File_formats/Coordinates#PDB|PDB]] can do double bonds using a trick: specify '''twice''' each [http://www.wwpdb.org/documentation/format23/sect10.html CONECT record], or put the second atom twice in the same record.
 +
* CML specifies bond order natively, using XML tags; Jmol implements single, double, triple, aromatic and 'partial12'.
  
 
Jmol commands that assign bond order:
 
Jmol commands that assign bond order:
* <code>[http://chemapps.stolaf.edu/jmol/docs/#connect connect]</code> accepts parameters (see table below)
+
* <code>[http://chemapps.stolaf.edu/jmol/docs/#connect connect]</code> accepts a parameter specifying bond type (see table below)
* <code>[http://chemapps.stolaf.edu/jmol/docs/#bond bondOrder]</code> (new in Jmol 11.3.x) accepts parameters (see table below)
+
* <code>[http://chemapps.stolaf.edu/jmol/docs/#bond bondOrder]</code> (new in Jmol 11.3.x) accepts a parameter specifying bond type (see table below)
  
Visualization of non-single bonds can be supressed (all will show as single) if
 
<code>[http://chemapps.stolaf.edu/jmol/docs/#setbondstyles set showMultipleBonds off]</code> is issued.
 
  
 
{| border="1" cellpadding="5" cellspacing="0"
 
{| border="1" cellpadding="5" cellspacing="0"
 
|-align="center"
 
|-align="center"
! bond order !! Jmol syntax !! bond type in MOL file
+
! bond order !! Jmol syntax in <code>connect</code> and <code>bondOrder</code> !! Jmol syntax in <code>bondOrder</code> !! bond code in MOL file !! bond code in MOL2 file !! bond code in CML file <sup>e</sup>
 
|-align="center"
 
|-align="center"
| 0.5 || hBond || n/a
+
| || hBond <sup>a</sup> || -1 || n/a || n/a || hbond
 
|-align="center"
 
|-align="center"
| 0.5 || partial || 8
+
| 0.5 || partial <sup>a</sup> || 0.5 || 8 <sup>d</sup> || n/a || partial01 <sup>f</sup>
 
|-align="center"
 
|-align="center"
| 1 || single || 1
+
| 1 || single || 1 || 1 || 1 || 1 or S
 
|-align="center"
 
|-align="center"
| 1.5 || partialDouble || 5
+
| 1.5 || partialDouble <sup>b</sup> || -1.5 || 5 || n/a || partial12 <sup>f</sup>
 
|-align="center"
 
|-align="center"
| 1.5 || aromatic || 4
+
| 1.5 || aromatic <sup>b</sup> || 1.5 || 4 || ar || A
 
|-align="center"
 
|-align="center"
| 2 || double || 2
+
| 2 || double || 2 || 2 || 2 || 2 or D
 
|-align="center"
 
|-align="center"
| 2.5 || partialTriple &dagger; || n/a
+
| 2.5 || partialTriple ? <sup>c</sup> || 2.5 or -2.5 <sup>b,c</sup> || n/a || n/a || partial23 <sup>f</sup>
 
|-align="center"
 
|-align="center"
| 3 || triple || 3
+
| 3 || triple || 3 || 3 || 3 || 3 or T
 
|-align="center"
 
|-align="center"
| 4 || quadruple || n/a
+
| 4 || quadruple || 4 || n/a || n/a || n/a
 
|}
 
|}
  
Note &dagger;: starting Jmol 11.3.28
+
Notes:
 +
 
 +
(a) "hBond" and "partial" are both dashed, but they have different patterns, and newly created hydrogen bonds are only thin lines (wireframe style).
 +
 
 +
(b) "partialDouble" and "aromatic" are identical except for which side of the bond is represented by a dashed line. Same applies to "2.5" and "-2.5".
 +
 
 +
(c) starting Jmol 11.3.28
 +
 
 +
(d) type 8 is defined as "any" in MOL format; most versions of Jmol will render that as partial.
 +
 
 +
(e) as documented at http://eugen.leitl.org/nesc/jumbo4.3/schemas/cmlAll/htmldocs/orderType.html
 +
 
 +
(f) not fully implemented; starting Jmol 11.7.32 only partial12 is implemented
 +
 
 +
== Display style ==
 +
By default, Jmol displays double bonds as twin sticks (cylinders) contained in the viewer's plane, i.e. always visible as double sticks.
 +
 
 +
You may opt for double sticks that are in the plane of the atoms involved (particularly significant for bonds in rings), using a positive 'N' value in <code>set multipleBondSpacing N</code>
 +
 
 +
The default thickness and spacing of the sticks may be changed using <code>set multipleBondRadiusFactor N</code> and <code>set multipleBondSpacing N</code>
 +
 
 +
There is also an alternative style using curved sticks, available with <code>set multipleBondBananas on</code>
 +
 
 +
[{{ScriptingDoc}}#k875 Detailed documentation] for all these.
 +
 
 +
Rotate the model with your mouse in order to appreciate the differences:
 +
 
 +
<table style="width:100%;">
 +
<tr>
 +
<td>default<br> (set multipleBondSpacing -1)
 +
</td>
 +
<td>set multipleBondSpacing -0.3
 +
</td>
 +
<td>set multipleBondSpacing 0.4
 +
</td>
 +
<td>set multipleBondSpacing 0.3;<br>set multipleBondRadiusFactor -1
 +
</td>
 +
<td>set multipleBondBananas on
 +
</td>
 +
</tr>
 +
<tr>
 +
<td>
 +
<jmol>
 +
  <jmolApplet>
 +
    <size>240</size>
 +
    <urlContents>https://cactus.nci.nih.gov/chemical/structure/caffeine/sdf</urlContents>
 +
    <script>initialize;</script>
 +
  </jmolApplet>
 +
</jmol>
 +
</td>
 +
<td>
 +
<jmol>
 +
  <jmolApplet>
 +
    <size>240</size>
 +
    <urlContents>https://cactus.nci.nih.gov/chemical/structure/caffeine/sdf</urlContents>
 +
    <script>initialize;set multipleBondSpacing -0.5;</script>
 +
  </jmolApplet>
 +
</jmol>
 +
</td>
 +
<td>
 +
<jmol>
 +
  <jmolApplet>
 +
    <size>240</size>
 +
    <urlContents>https://cactus.nci.nih.gov/chemical/structure/caffeine/sdf</urlContents>
 +
    <script>initialize;set multipleBondSpacing 0.4;</script>
 +
  </jmolApplet>
 +
</jmol>
 +
</td>
 +
<td>
 +
<jmol>
 +
  <jmolApplet>
 +
    <size>240</size>
 +
    <urlContents>https://cactus.nci.nih.gov/chemical/structure/caffeine/sdf</urlContents>
 +
    <script>initialize;set multipleBondSpacing 0.3; set multipleBondRadiusFactor -1;</script>
 +
  </jmolApplet>
 +
</jmol>
 +
</td>
 +
<td>
 +
<jmol>
 +
  <jmolApplet>
 +
    <size>240</size>
 +
    <urlContents>https://cactus.nci.nih.gov/chemical/structure/caffeine/sdf</urlContents>
 +
    <script>initialize;set multipleBondBananas on;</script>
 +
  </jmolApplet>
 +
</jmol>
 +
</td>
 +
</tr>
 +
<tr>
 +
<td>
 +
Always seen as double sticks,<br> facing the viewer.
 +
</td>
 +
<td>Double sticks closer,<br> still facing the viewer.
 +
</td>
 +
<td>Double sticks in the plane of the ring.
 +
</td>
 +
<td>Double sticks perpendicular<br> to the plane of the ring.
 +
</td>
 +
<td>Double sticks curved, perpendicular<br> to the plane of the ring.
 +
</td>
 +
</tr>
 +
</table>

Latest revision as of 16:08, 5 October 2020

Jmol supports bond orders (i.e., different from single bonds) and displays them as parallel, solid or dashed, cylinders.

Visualization of non-single bonds can be supressed (all will show as single) if set showMultipleBonds off is issued at the console or from a script.

Definition of bond order

File formats that specify bond order --and Jmol recognizes as such:

  • MOL specifies bond order natively, using certain numeric codes (see table below)
  • MOL2 specifies bond order natively, using certain alphanumeric codes (see table below)
  • PDB can do double bonds using a trick: specify twice each CONECT record, or put the second atom twice in the same record.
  • CML specifies bond order natively, using XML tags; Jmol implements single, double, triple, aromatic and 'partial12'.

Jmol commands that assign bond order:

  • connect accepts a parameter specifying bond type (see table below)
  • bondOrder (new in Jmol 11.3.x) accepts a parameter specifying bond type (see table below)


bond order Jmol syntax in connect and bondOrder Jmol syntax in bondOrder bond code in MOL file bond code in MOL2 file bond code in CML file e
hBond a -1 n/a n/a hbond
0.5 partial a 0.5 8 d n/a partial01 f
1 single 1 1 1 1 or S
1.5 partialDouble b -1.5 5 n/a partial12 f
1.5 aromatic b 1.5 4 ar A
2 double 2 2 2 2 or D
2.5 partialTriple ? c 2.5 or -2.5 b,c n/a n/a partial23 f
3 triple 3 3 3 3 or T
4 quadruple 4 n/a n/a n/a

Notes:

(a) "hBond" and "partial" are both dashed, but they have different patterns, and newly created hydrogen bonds are only thin lines (wireframe style).

(b) "partialDouble" and "aromatic" are identical except for which side of the bond is represented by a dashed line. Same applies to "2.5" and "-2.5".

(c) starting Jmol 11.3.28

(d) type 8 is defined as "any" in MOL format; most versions of Jmol will render that as partial.

(e) as documented at http://eugen.leitl.org/nesc/jumbo4.3/schemas/cmlAll/htmldocs/orderType.html

(f) not fully implemented; starting Jmol 11.7.32 only partial12 is implemented

Display style

By default, Jmol displays double bonds as twin sticks (cylinders) contained in the viewer's plane, i.e. always visible as double sticks.

You may opt for double sticks that are in the plane of the atoms involved (particularly significant for bonds in rings), using a positive 'N' value in set multipleBondSpacing N

The default thickness and spacing of the sticks may be changed using set multipleBondRadiusFactor N and set multipleBondSpacing N

There is also an alternative style using curved sticks, available with set multipleBondBananas on

Detailed documentation for all these.

Rotate the model with your mouse in order to appreciate the differences:

default
(set multipleBondSpacing -1)
set multipleBondSpacing -0.3 set multipleBondSpacing 0.4 set multipleBondSpacing 0.3;
set multipleBondRadiusFactor -1
set multipleBondBananas on

Always seen as double sticks,
facing the viewer.

Double sticks closer,
still facing the viewer.
Double sticks in the plane of the ring. Double sticks perpendicular
to the plane of the ring.
Double sticks curved, perpendicular
to the plane of the ring.