I'm using the next Mathematica command in order to plot molecules:

ChemicalData["name", "MoleculePlot"]

But I'm not sure if the Mathematica database of molecules is complete.

I'm trying to plot lactic acid.

The problem is that it doesn't seem to exist a name of the molecule that makes the command work

ChemicalData["Lactic acid", "MoleculePlot"]

or

ChemicalData["2-Hydroxypropanoic acid", "MoleculePlot"]

So, I want to know if anyone has any suggestions about what to do in these cases.

  • No database of molecules is complete. – Loong Dec 9 at 9:14
  • Yes .. But that one is an important molecule – Delfin Dec 9 at 19:38
up vote 12 down vote accepted

I've struggled with How Mathematica expects the end-user to interact with knowledge databases for quite some time. While this solution is likely not universal, it has been reasonably successful for many of my searches.

Using CTRL= to perform a free-form Wolfram Language input followed by using CanonicalName typically provides the appropriate string to conduct additional property searches:

enter image description here

Jason B. notes in the comments that one can obtain the same information programmatically through Interpreter["Chemical"]["lactic acid"]. I've included it in the answer in case the comments get removed in the future.

  • 3
    For a programmatic way to get the entity, you can use Interpreter["Chemical"]["lactic acid"]. – Jason B. Dec 8 at 16:48
  • 2
    Thankfully, one is not forced to refer to citric acid as LemonAcid. – David Richerby Dec 8 at 22:24
  • @DavidRicherby Seriously! – bobthechemist Dec 8 at 22:53
  • Actually, in Swedish, lactic acid is called mjölksyra (milk acid). – Andreas Rejbrand Dec 8 at 23:33
  • @bobthechemist Totally off subject but I have seen it before and am clueless on how you make an animation to use in your answer. Can you guide me? – Jack LaVigne yesterday
ChemicalData[\!\(\*
TagBox[
StyleBox[
RowBox[{"Entity", "[", 
RowBox[{"\"\<Chemical\>\"", ",", "\"\<MilkAcid\>\""}], "]"}],
ShowSpecialCharacters->False,
ShowStringCharacters->True,
NumberMarks->True],
FullForm]\), "MoleculePlot"]

or

Entity["Chemical", "MilkAcid"];

ChemicalData[%,"MolecularPlot"]

enter image description here

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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