Sciencemadness Discussion Board

Chemistry Label Generator

Tatjam - 21-6-2021 at 05:25

It's known that labelling chemicals is very important in labs of any scale. It does not only help you find chemicals, but it can also be crucial in indicating the dangers and properties of the compounds stored.

Surprisingly, there are few tools online to generate chemical labels, and those that exist are fairly hard and inconvenient to use, so most amateur chemists (including me, up to now!) end up writing the chemical formulas on paper and taping them to the reagent bottle, alongside a "warning!" indication.

I decided to take matters into my own hands and code a chemical label generator that was easy to use (requiring little more work than typing the compound name) and produced good looking results. Another requirement is that the label size may be changed easily to represent the variety of reagent bottles that may be available.

Initially I designed the tool for my own use, but I decided to add an easily usable visual interface and then publish it for everybody to use, so I present my label generator:

Usage is very simple, you must input the chemical name, or the SMILES / CID if the name is not trivial and then choose a template. You may also customize all the settings and customize the compound name (for example, to indicate concentration). You can then download the generated label by right-clicking and saving to a desired location.

Here are some examples. They are blurry because I had to scale them down to fit in the forum, but the original images are crisp clear.

A few tips and tricks:

- To disable the image like in the last example, simply set the width and height to 0
- If your compound image is cropped, play around with the Image Scale and Image Size values
- For very long molecules, like stearates, you may be interested in greatly increasing the image width to allow them to fit neatly without reducing the Image Scale too much.

For the privacy minded, the whole tool is client-side and sends no data anywhere, except of course all requests to PubChem's services, which spawn in your computer. The image is generated by your browser, not in an external server.

I'm open to feature requests and also would love to hear any issues that you may encounter using the program!

Of course, you are free to use the generated images in any way you want.

[Edited on 21-6-2021 by Tatjam]

XeonTheMGPony - 21-6-2021 at 08:32

A suggestion is to make presets based off Avery templates as the sell a chemical resistant sticker for labelling bottles and a wide array of shipping stickers.

Amazing work, fast effective, just to let others know He used pixels to set dimensions

I use Avery Shipping labels so I used 384 pixels length and 194 pixels height

that's 4 inches by 2 inches

[Edited on 21-6-2021 by XeonTheMGPony]

Sodium Azide 4 by 3.png - 45kB

Prepic - 21-6-2021 at 09:50

Tatjam, super awesome work!

I always write my own labels but always felt they don't contain all the information I'd like or I'd draw the molecule/hazard symbols/ fire diamond and it looks just a little weird. I really love the idea of this Label generator and it could also be super useful if I or anyone felt inclined to sell excess chemicals.

If I can make one suggestion, would it be possible to include melting points and boiling points and, I realize this may be difficult, but potentially solubility data onto the label too?

Nevertheless, I'm a huge fan of what you have going here :) .

Tatjam - 21-6-2021 at 11:58

Thanks for the feedback!

I have updated the program with a few changes to the molecule renderer. Now hydrates should be usable, although they may take some "attempts" as the placement of the water molecules is basically random. Also, H-Cl now displays correctly (instead of Cl-H) and so does H-O-H (previously it showed up as OH2).

Also, I have added an option to customize which GHS symbols show up, useful when PubChem doesn't contain the information, and also added an option to increase the pixel density so images aren't blurred when zooming in or printing.

On XeonTheMGPony's suggestion, I have tried to implement it but have failed miserably due to my lack of web development knowledge! I will keep trying though, as having forced proportion labels is important for many uses.

I have also investigated Prepic's suggestion, and PubChem does give this data! The most difficult part is solubility as it comes from many sources, and can be given for different solvents, so maybe this is something that's more convenient to add manually using the "Custom Text" feature. Boiling points and similar are relatively easy to obtain, although when there are multiple sources one must be chosen.

Fyndium - 21-6-2021 at 12:18

I make my own labels. They contain GHS symbols, name of the substance and most common known names, known purity and most chemical properties (mp, bp, sol in water) and some main hazards like LD50 and if it reacts with something. I have left the C1H2O3 names, pics of molecules and endless hazard H:D-data off, because they give pretty much zero info but only fill up the space.

I make my labels manually. I have .odt files that contain 3 label templates per page, and I add necessary GHS and data manually and print them out to sticker paper, cut and stick to containers. It looks neat and makes life easier when I have one universal sticker for all my reagents not depending in what container they are stored in, and chemical properties are easy to check from the bottle if you don't happen to remember it.

Hoffit - 22-6-2021 at 09:55

That seems awsome. I'll sure give that a try for marking some of my items.

Chemgineer - 22-6-2021 at 15:16

This is brilliant, well done for making a great useful tool! I might even have to buy a printer now :)

Tatjam - 30-6-2021 at 07:19

Sadly obtaining chemical propertise is near impossible as PubChem only gives the data source via the API!
As an alternative I have included a "Custom Properties" input where you can write stuff like boiling point and similar so that it's placed in a convenient location in the label.

Also I added a toggle for the image, as setting the image size to 0 caused a few issues with the rendering engine.

I must that the text fields allow using HTML, so if you need a line break you must write "<br>", otherwise the line will keep going. I may change this in the future but this is convenient as it allows fine control over the structure of the text, and you can even add colors, bold text, subscripts...
This has also been added to the webpage.

I will keep trying to find a chemical API or similar that allows obtaining chemical properties, but I believe the next feature is going to be custom aspect ratio so you can have fixed size labels as XeonTheMGPony requested!

(The update will take around 10 minutes to show up in the server)