# Chemical data of Lactic acid [duplicate]

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.

## marked as duplicate by J. M. is away♦ plotting StackExchange.ready(function() { if (StackExchange.options.isMobile) return; $('.dupe-hammer-message-hover:not(.hover-bound)').each(function() { var$hover = $(this).addClass('hover-bound'),$msg = $hover.siblings('.dupe-hammer-message');$hover.hover( function() { $hover.showInfoMessage('', { messageElement:$msg.clone().show(), transient: false, position: { my: 'bottom left', at: 'top center', offsetTop: -7 }, dismissable: false, relativeToBody: true }); }, function() { StackExchange.helpers.removeMessages(); } ); }); }); Mar 23 at 7:28

• No database of molecules is complete. – Loong Dec 9 '18 at 9:14
• Yes .. But that one is an important molecule – 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:

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.

• For a programmatic way to get the entity, you can use Interpreter["Chemical"]["lactic acid"]. – Jason B. Dec 8 '18 at 16:48
• Thankfully, one is not forced to refer to citric acid as LemonAcid. – David Richerby Dec 8 '18 at 22:24
• @DavidRicherby Seriously! – bobthechemist Dec 8 '18 at 22:53
• Actually, in Swedish, lactic acid is called mjölksyra (milk acid). – Andreas Rejbrand Dec 8 '18 at 23:33
• @JackLaVigne I use LiceCAP on Windows. I have not tried to do screen capture on Linux devices, although a google ssearch reveals a couple of free options. No clue about MacOS. – bobthechemist Dec 18 '18 at 13:22
ChemicalData[Entity["Chemical", "MilkAcid"], "MoleculePlot"]


or

Entity["Chemical", "MilkAcid"];

ChemicalData[%,"MolecularPlot"]


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

What has been missed in previous answers is that one should have tried entering the name of the chemical under consideration in camel case:

ChemicalData["LacticAcid"]
{Entity["Chemical", "MilkAcid"], Entity["Chemical", "LPlusLacticAcid"],
Entity["Chemical", "DLLacticAcid"], Entity["Chemical", "PolyDLLactide"],
Entity["Chemical", "PolyLLactide"]}


which returns a bunch of matches. Note that the first entry corresponds to the "milk acid" entity featured in bob's answer. The next two entries correspond to the natural enantiomer of lactic acid and the racemic form, which may also be of interest.

Similarly, evaluating ChemicalData["LacticAcid", "MoleculePlot"] will show the expected plots, at least for the first three entries:

ChemicalData["LacticAcid", "MoleculePlot"] // GraphicsRow


The OP almost got it by trying out the IUPAC name, what was not done was to write the name in the expected camel case:

ChemicalData["2HydroxypropanoicAcid"]
{Entity["Chemical", "MilkAcid"], Entity["Chemical", "DLLacticAcid"],
Entity["Chemical", "PolyDLLactide"]}

• As an instructor, I wonder if Mathematica 'students' would benefit from documentation that describes the use of camel case or if this is a situation where one has to simply learn it on her/his own. – bobthechemist Mar 17 at 12:25
• @bob, I personally think the docs could stand to be more explicit; unless you're already "used to" how Mathematica does things, you wouldn't readily think about trying camel case. – J. M. is away Mar 17 at 12:27