I was looking into GraphDiameter for molecules and ended up on this [page][1], which gives examples in various modalities to calculate the graph diameter for this molecule.'CC(C)C(C(=O)NC(=O)C1CCCN1C(=O)C(C)NC(=O)C(C)NC(=O)CCC(=O)OC)NC2=CC=C(C=C2)N+[O-]', with PubChem CID 5487286. The reported graph diameter is 24.
However, when I try the same molecule in Mathematica, the graph diameter is reported as 25.
mx = Molecule[ExternalIdentifier["PubChemCompoundID", 5487286]];
GraphDiameter[MoleculeGraph[mx]]
%Out = 25
The same result is reported if SMILES string is used to create the molecule.
GraphDiameter[MoleculeGraph[Molecule["CC(C)C(C(=O)NC(=O)C1CCCN1C(=O)C(C)NC(=O)C(C)NC(=O)CCC(=O)OC)NC2=CC=C(C=C2)[N+](=O)[O-]"]]]
I wonder if this is a bug and if there's a workaround.
Thank you,
MoleculeGraph
does. Voting to close as "simple mistake". $\endgroup$