IncludeHydrogens

IncludeHydrogens

is an option for Molecule and related functions that specifies whether hydrogen atoms should be explicitly included in the results.

Details

  • The following settings can be given:
  • Trueinclude or add in all necessary hydrogens explicitly
    Falsedo not include or add in any hydrogens explicitly
    Automaticinclude only hydrogens that are explicitly listed
  • With the default setting of Automatic, hydrogens not listed in the molecule expression are treated as implicit.
  • Physical properties such as molecular mass and formula will account for implicit hydrogens.

Examples

open all close all

Basic Examples  (2)

Create a molecule from an entity:

In[1]:=
Click for copyable input
Out[1]=
In[2]:=
Click for copyable input
Out[2]=

Create the same molecule with implicit hydrogen atoms:

In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

Create a molecule only listing heavy atoms:

In[1]:=
Click for copyable input
Out[1]=

The hydrogens are not present in the expression, but influence properties such as mass and formula:

In[2]:=
Click for copyable input
Out[2]=
In[3]:=
Click for copyable input
Out[3]=
In[4]:=
Click for copyable input
Out[4]=

Three implicit hydrogens are bonded to the carbon atom, and one to the oxygen. These do not count toward structural operations such as AtomCount and AtomList:

In[5]:=
Click for copyable input
Out[5]=
In[6]:=
Click for copyable input
Out[6]=

Properties such as molecular mass and formula that reference the physical molecule will account for the hydrogens:

In[7]:=
Click for copyable input
Out[7]=
In[8]:=
Click for copyable input
Out[8]=
In[9]:=
Click for copyable input

Possible Issues  (1)

Introduced in 2019
(12.0)