is an option for Molecule that specifies whether to fill open valences with hydrogen atoms.
ValenceFilling
is an option for Molecule that specifies whether to fill open valences with hydrogen atoms.
Details
- 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.
Examples
open all close allBasic Examples (2)
Oxygen atoms have a default valence of 2, so two hydrogen atoms are added:
Molecule[{Atom["O"]}, {}]//AtomListUse ValenceFillingNone to disable automatic hydrogen atoms:
Molecule[{Atom["O"]}, {}, ValenceFilling -> None]//AtomListValenceFilling has no effect when a molecule is created from an identifier such as an entity or chemical name, since these have no unmet valences:
Molecule["water", ValenceFilling -> #]& /@ {Automatic, None}SameQ@@%Possible Issues (2)
Molecule will interpret a string as the SMILES string. For example "N" is the SMILES string for ammonia:
Molecule["N"]Since this molecule has all valences met, ValenceFilling has no effect:
Molecule["N", ValenceFilling -> None]To create a molecule with a single nitrogen without hydrogens, pass in a list of atoms:
Molecule[{"N"}, {}, ValenceFilling -> None]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:
MoleculeValue[
Molecule["3-methoxybenzoic acid", ValenceFilling -> None], "AdjacencyMatrix"]Instead, give the option IncludeHydrogensNone to MoleculeValue to find the hydrogen-suppressed adjacency matrix:
MoleculeValue[
Molecule["3-methoxybenzoic acid"],
"AdjacencyMatrix", IncludeHydrogens -> None]See Also
History
Text
Wolfram Research (2020), ValenceFilling, Wolfram Language function, https://reference.wolfram.com/language/ref/ValenceFilling.html.
CMS
Wolfram Language. 2020. "ValenceFilling." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/ValenceFilling.html.
APA
Wolfram Language. (2020). ValenceFilling. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ValenceFilling.html
BibTeX
@misc{reference.wolfram_2026_valencefilling, author="Wolfram Research", title="{ValenceFilling}", year="2020", howpublished="\url{https://reference.wolfram.com/language/ref/ValenceFilling.html}", note=[Accessed: 13-June-2026]}
BibLaTeX
@online{reference.wolfram_2026_valencefilling, organization={Wolfram Research}, title={ValenceFilling}, year={2020}, url={https://reference.wolfram.com/language/ref/ValenceFilling.html}, note=[Accessed: 13-June-2026]}