1

The coordination number property of a molecule seems to ignore the IncludeHydrogens flag. Adjacency matrix, on the other hand, seems to respect it.

mol = Molecule["CCCCC", IncludeHydrogens -> False]
dV = MoleculeValue[mol, "CoordinationNumber", IncludeHydrogens -> "ExplicitOnly"]
Out: {4,4,4,4}
dV = MoleculeValue[mol, "CoordinationNumber", IncludeHydrogens -> None]
Out: {4,4,4,4} 

However, the adjacency matrix correctly interprets that there are no H atoms

aM = MoleculeValue[mol, "AdjacencyMatrix", IncludeHydrogens -> None]

The matrix form of that output is

{{0, 1, 0, 0, 0}, {1, 0, 1, 0, 0}, {0, 1, 0, 1, 0}, {0, 0, 1, 0, 
1}, {0, 0, 0, 1, 0}}

This does not include H atoms. Is there another way to get the coordination number of non-Hydrogen atoms in a molecule?

Thank you,

Version: "13.0.0 for Linux x86 (64-bit) (December 3, 2021)"

bhopshang
  • 739
  • 3
  • 11

1 Answers1

1

Is there another way to get the coordination number of non-Hydrogen atoms in a molecule?

The property you want is called "HeavyAtomCoordinationNumber"

mol = Molecule["CCCCC"];
mol["HeavyAtomCoordinationNumber"]
(* {1, 2, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1} *)

AtomList[mol, Except["H"], "HeavyAtomCoordinationNumber"] (* {1, 2, 2, 2, 1} *)

Jason B.
  • 68,381
  • 3
  • 139
  • 286