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


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

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

  • $\begingroup$ No database of molecules is complete. $\endgroup$ – Loong Dec 9 '18 at 9:14
  • 2
    $\begingroup$ Yes .. But that one is an important molecule $\endgroup$ – Delfin Dec 9 '18 at 19:38

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.

  • 4
    $\begingroup$ For a programmatic way to get the entity, you can use Interpreter["Chemical"]["lactic acid"]. $\endgroup$ – Jason B. Dec 8 '18 at 16:48
  • 4
    $\begingroup$ Thankfully, one is not forced to refer to citric acid as LemonAcid. $\endgroup$ – David Richerby Dec 8 '18 at 22:24
  • $\begingroup$ @DavidRicherby Seriously! $\endgroup$ – bobthechemist Dec 8 '18 at 22:53
  • $\begingroup$ Actually, in Swedish, lactic acid is called mjölksyra (milk acid). $\endgroup$ – Andreas Rejbrand Dec 8 '18 at 23:33
  • $\begingroup$ @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? $\endgroup$ – Jack LaVigne Dec 12 '18 at 0:04
RowBox[{"Entity", "[", 
RowBox[{"\"\<Chemical\>\"", ",", "\"\<MilkAcid\>\""}], "]"}],
FullForm]\), "MoleculePlot"]


Entity["Chemical", "MilkAcid"];


enter image description here

  • 1
    $\begingroup$ But if you already know the correct name (in this case, "MilkAcid"), why not instead just use ChemicalData["MilkAcid", "MoleculePlot"]? $\endgroup$ – theorist Dec 19 '18 at 22:46

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.