# Is it possible to use chemical data in polymers?

I would like to plot the ABS polymer. It is made of Styrene, Acrylonitrile and 1,3 Butadine.

I can plot those components separately

But the command

chemicalData["ABS"]


Does not work and neither:

chemicalData["Acrylonitrile butadiene styrene"]


Is it possible to plot polymers? If not, Do you have any suggestions for plotting them? Thanks

I suspect you will encounter significant difficulties in finding a single chemical structure for ABS since the relative composition of the monomers is adjusted to tune the properties of the substance. See here, for example, which shows how the acrylonitrile influences chemical/thermal stability, butadiene influences physical stability (strength and impact resistance) and the styrene influences the glossy look.

Since you asked, I do have a suggestion on how you might visualize ABS polymers: make your own. Please note these points in the suggestions that follow:

• I've tried to keep the chemistry correct, but double check depending on the level of academic pursuit. For example, I make no effort to address polymer tacticity.
• I'm using as an example the National Cancer Institute's website which provides on-line access to chemical-notation conversion software. I don't know if automated queries are legitimate (they don't explicitly forbid them; however many sites require API keys for similar functionality). Be kind.
• I have a serious problem with HTTPRequest and family; namely, I still can't figure out how to use them. My solution (hack) below limits this solution to Linux-based systems (I used a Raspberry Pi).

First, we need some monomer designations. There are a number of places on the interweb where you can find the theory behind SMILES notation, but if you don't want to search start here.

a = "CC(C#N)";
b = "C(C)C(C)";
c = "CC(c1ccccc1)";
ar = "C(C#N)C";
cr = "C(c1ccccc1)C";


Next, we need the curl command. I spent way too long figuring this out, but I've submitted grades for the semester so it's not officially called procrastination.

cmd[smistring_String] := {
"curl", "https://cactus.nci.nih.gov/cgi-bin/translate.tcl",
"-H", "DNT: 1",
"-H", "Content-Type: multipart/form-data; \
boundary=----WebKitFormBoundaryCjMMeebiBzMG303W",
"--data-binary",
"------WebKitFormBoundaryCjMMeebiBzMG303W\r\nContent-Disposition: \
form-data; name=\"smiles\"\r\n\r\n" <> smistring <>
"\r\n------WebKitFormBoundaryCjMMeebiBzMG303W\r\n\
Content-Disposition: form-data; name=\"format\"\r\n\r\nmol\r\n\
------WebKitFormBoundaryCjMMeebiBzMG303W\r\nContent-Disposition: \
form-data; name=\"astyle\"\r\n\r\nkekule\r\n\
------WebKitFormBoundaryCjMMeebiBzMG303W\r\nContent-Disposition: \
form-data; name=\"dim\"\r\n\r\n3D\r\n\
------WebKitFormBoundaryCjMMeebiBzMG303W\r\nContent-Disposition: \
form-data; name=\"file\"; filename=\"\"\r\nContent-Type: \
application/octet-stream\r\n\r\n\r\n\
------WebKitFormBoundaryCjMMeebiBzMG303W--\r\n",
"--compressed"
};


Now we can use RunProcess to convert a custom polymer chain into a 3D mol visualization.

res = RunProcess[cmd[a <> b <> c <> ar <> b <> cr]];
Import["https://cactus.nci.nih.gov" <>


The logical next step is to develop some molecular dynamics code for Mathematica to get better optimal structure minimization and turn this into a neat polymer properties activity.

• some MD in Mathematica would be fun! – olliepower Dec 20 '18 at 21:30

I'm not a polymer chemist, and not an expert on Mathematica's ChemicalData database, but I believe the answer is no (by which I mean that Mathematica doesn't do this for you). There are two issues:

I. I've looked through ChemicalData (note that it's ChemicalData, not chemicalData) and, while it does list many polymers, it doesn't seem that Mathematica provides their structural formulas (or their corresponding MoleculePlots). Rather, when it does provide a structural formula (in many cases it doesn't), it provides the structural formula (and sometimes also the MoleculePlot) of the polymer's monomer precursor, rather than of the polymer itself. For instance, here I've searched for all ChemicalData entries that contain "Nylon":

nylon = Select[ChemicalData[#, "StandardName"] & /@ChemicalData[],
StringMatchQ[#, ___ ~~ "Nylon" ~~ ___, IgnoreCase ->     False] &]


{"Nylon6", "Nylon12", "Nylon11", "Nylon46", "Nylon66", "Nylon610", "Nylon612", "Nylon666"}

Now let's see what we get when we ask for their MoleculePlots:

{TableForm[
Take[{#, ChemicalData[#, "MoleculePlot"]} & /@nylon, 3]],
TableForm[
Take[{#, ChemicalData[#, "MoleculePlot"]} & /@ nylon, -5]]}


You can see we get MoleculePlots for the monomer precursors of nylon 6, 11, and 12 (not the polymers themselves); for the remaining nylons it gives only the structural formulas (not shown here) for their monomer precursors. [I'm not sure if the precursor shown for nylon 6 is correct.]

OTOH, if you ask for the "MolecularFormulaDisplay" (or, equivalently, "MolecularFormula" or "MolecularFormulaString"), the result does properly indicate the formula for the polymer form, rather than that of the monomer:

TableForm[{#, ChemicalData[#, "MolecularFormulaDisplay"]} & /@ nylon]


II. The second issue, for your particular inquiry, is that I don't believe there is a single structural formula for ABS, since ABS isn't a simple linear polymer with fixed composition (i.e., there is no "the ABS polymer"). Rather, it's a cross-linked polymer with variable composition. So, at best, one could draw an example of a structural formula and/or MoleculePlot for ABS.

Given the above, my recommendation for drawing 3D diagrams (i.e., something akin to MoleculePlots) for polymers would be to use a dedicated chemical drawing program.

Finally, if you are interested in general information on ABS plastics, you can search for "ABS plastic" in Wolfram Alpha, using the following syntax. It will return an extensive list.

=ABS plastic


{"BASF Terblend N G-02", "BASF Terblend N G-02", "BASF Terblend N G-04", "BASF Terblend N G-04", "BASF Terblend N G-06", "BASF Terblend N G-06", "BASF Terblend N M-11", "BASF Terblend N M-11", "BASF Terblend N M-12", "BASF Terblend N M-12", "BASF Terblend N M-13", "BASF Terblend N M-13", "BASF Terblend N M-19", "BASF Terblend N M-19", "BASF Terblend N MX04", "BASF Terblend N MX04", "Ineos ABS Triax 1120", "Ineos ABS Triax 1120", "Ineos ABS Triax 1180", "Ineos ABS Triax 1180", "Ineos ABS Triax 2-3050", "Ineos ABS Triax 2-3050", "Ineos ABS Triax 1220 S", "Ineos ABS Triax 1220 S", "Ineos ABS Triax 1120", "Ineos ABS Triax 1120", "Ineos ABS Triax 1220 S", "Ineos ABS Triax 1220 S", "Ineos ABS Triax 1408 GF", "Ineos ABS Triax 1408 GF", "Chase Plastics CP Pryme NNA100", "Ineos ABS Triax KU2-3154", "PlastxWorld, Inc. Cevian A1300", "PlastxWorld, Inc. Cevian A1300", "PlastxWorld, Inc. Cevian A1500", "PlastxWorld, Inc. Cevian A1500", "PlastxWorld, Inc. Cevian A1700", "PlastxWorld, Inc. Cevian A1700", "PlastxWorld, Inc. Cevian A2603", "PlastxWorld, Inc. Cevian A2603", "CevianA2604-20%GFPA/ABSAlloyDAM", "CevianA2604-20%GFPA/ABSAlloyConditioned", "CevianA2606-30%GFPA/ABSAlloyDAM", "CevianA2606-30%GFPA/ABSAlloyConditioned", "CevianA5622", "CevianA5624", "CevianA5626", "PolyramPVB101", "TerblendNNMX03"}

More broadly, if a polymer is not listed in ChemicalData, you can sometimes find information on its properties (but, again, no structural formula/MoleculePlot) using Wolfram Alpha; none of the above ABS plastics, for instance, are in ChemicalData.