1
$\begingroup$

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)"

$\endgroup$
1
  • $\begingroup$ IncludeHydrogens should only change the length of the results, not their value $\endgroup$
    – Jason B.
    Commented Mar 4, 2022 at 0:35

1 Answer 1

1
$\begingroup$

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} *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.