I am using the Pitt Quantum Repository and am trying to convert the format from Entity to Molecule, so that I can get the MoleculeValue Properties of the PQR chemicals in addition to the EntityValue Properties. The Molecule format of the chemicals is not the same as the PQR Entity format, this was checked using 2-D structure diagrams. Not all of the molecules in the repository had issues, some were fine. The 173rd molecule in the PQR was the first noticed to have this issue,


We used the InChI to call up the Molecule format. When calling up with SMILES string the same error occurred.

Is there a way to fix this error, or some work around method?

pqr = EntityList["PQRChemical"]; EntityValue[pqr[[173]], "InChI"] MoleculePlot@Molecule[EntityValue[pqr[[173]], "InChI"], ValenceFilling -> None] MoleculePlot@Molecule[EntityValue[pqr[[173]], "InChI"], ValenceFilling -> Automatic] EntityValue[pqr[[173]], "ColorStructureDiagram"]

2D structure diagram after converting 173rd PQR chemical to Molecule with no valence filling

2D structure diagram after converting 173rd PQR chemical to Molecule with automatic valence filling

Color Structure Diagram for the 173rd molecule in the Pitt Quantum Repository

  • $\begingroup$ Note that even though you get a valence error message, you can use the molecule object in any available function and it should work fine. $\endgroup$
    – Jason B.
    Commented Apr 26, 2022 at 20:25

1 Answer 1


The Pitt Quantum Repository resource object, derived from the original site, was submitted before the Molecule functionality was added to the Wolfram Language. This is why you see a difference between the "ColorStructureDiagram" property and the output from MoleculePlot.

The SMILES and InChI strings stored in the original data for this molecule both indicate a nitrogen atom with a high valence. For this entity, you can use the IUPAC name to create the molecule to avoid the valence error:

EntityRegister[ResourceData["Pitt Quantum Repository"]];
pqr = EntityList["PQRChemical"];
mol = Molecule[pqr[[173]]["IUPACName"]]

which gives this molecule

enter image description here


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.