is an option for Molecule that specifies whether to fill open valences with hydrogen atoms.


  • ValenceFillingAutomatic adds the appropriate number of hydrogen atoms for a given atom type.
  • ValenceFillingNone adds no hydrogen atoms.
  • ValenceFilling is relevant for molecules created from lists of atoms and bonds, Molecule[{a1,a2,},], and does not apply to molecules created from SMILES strings or Entity objects.


open allclose all

Basic Examples  (1)

Oxygen atoms have a default valence of 2, so two hydrogen atoms are added:

These hydrogens are present in the atom list:

Create a molecule with a single disconnected oxygen atom:

The atom list will now indicate the number of unpaired electrons:

ValenceFilling has no effect when a molecule is created from an identifier such as an entity or chemical name, since these have no unmet valences:

Possible Issues  (2)

Molecule will interpret a string as the SMILES string. For example "N" is the SMILES string for ammonia:

Since this molecule has all valences met, ValenceFilling has no effect:

To create a molecule with a single nitrogen without hydrogens, pass in a list of atoms:

A molecule created from a chemical Entity or a chemical name represents a molecule with filled valences. ValenceFilling as an option to Molecule will not suppress hydrogen atoms:

Instead, give the option IncludeHydrogensNone to MoleculeValue to find the hydrogen-suppressed adjacency matrix:

Wolfram Research (2020), ValenceFilling, Wolfram Language function,


Wolfram Research (2020), ValenceFilling, Wolfram Language function,


Wolfram Language. 2020. "ValenceFilling." Wolfram Language & System Documentation Center. Wolfram Research.


Wolfram Language. (2020). ValenceFilling. Wolfram Language & System Documentation Center. Retrieved from


@misc{reference.wolfram_2022_valencefilling, author="Wolfram Research", title="{ValenceFilling}", year="2020", howpublished="\url{}", note=[Accessed: 03-July-2022 ]}


@online{reference.wolfram_2022_valencefilling, organization={Wolfram Research}, title={ValenceFilling}, year={2020}, url={}, note=[Accessed: 03-July-2022 ]}