MoleculeEquivalentQ

MoleculeEquivalentQ[mol1,mol2]

gives True if mol1 and mol2 represent equivalent molecules and gives False otherwise.

Details

  • Two molecules are by default considered equivalent if there is a reordering of atom and bond lists that makes them the same, including any defined stereochemistry.
  • Atoms are considered equal if their atomic number, charge and mass number are the same. Bonds are considered equal if they have the same bond order.
  • For the purpose of equivalence testing, implicit and explicit hydrogen atoms are treated the same.
  • MoleculeEquivalentQ[mol1,mol2,] gives True if all of the moli are equivalent.

Examples

Basic Examples  (4)

Methane and the ammonium ion have identical connectivity but different atoms, so they are not equivalent:

When molecules are the same, apart from the ordering of their atoms and bonds, MoleculeEquivalentQ will return True:

If the stereochemistry is different, then the molecules are not considered equivalent:

Test molecules with isotopic substitutions:

Implicit and explicit hydrogen atoms are treated the same by MoleculeEquivalentQ:

Introduced in 2019
 (12.0)