3
$\begingroup$

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,

InChI=1S/C20H14NO5/c22-17-12-7-9-2-1-8-3-6-13(21(24)25)10-4-5-11(15(9)\14(8)10)16(12)19-20(26-19)18(17)23/h1-7,17-20,22-23H,(H,24,25)/t17-,\18-,19-,20+/m0/s1

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

$\endgroup$
1
  • $\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.
    Apr 26, 2022 at 20:25

1 Answer 1

6
$\begingroup$

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

$\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.