My dad made a startup a few years ago which works in the field of Chemistry. He was asking me and my older brother if we could make a program which would recognize drawings of chemical compounds and search for it in a database. I do not know much about Chemistry (always had been my least favorite subject) or image recognition so I thought I would start with being able to search by name/symbol and try to draw or at least find the bonds of compounds.

What it does

Currently you can find chemicals by name or symbol (Ex. Hydrogen or H or h) and find the bonds of some compounds (it is a bit buggy and only has the very basic bonding rules). The only elements in the database are H, C, and O.

How I built it

I used C# in Visual Studio for this program. It has a windows form for the user to interact with.

Challenges I ran into

I did not know how to bond the chemicals and what rules should go into this section. I attempted to do a sort of graph search but it ended up being a bit buggy in how it returns. While some compounds would work, others would not. I had to keep double-checking my thinking and considering -"is this how you find compound bonds?". Currently, it is definitely the searching algorithm which is being tricky. ...This is also the second "project" I worked on in this Hackathon. I didn't know to think of a project beforehand and I was working on a spin-off of FlappyBird originally, but I ran into many problems and decided to start another project. Definitely my indecision was another challenge I had to face.

Accomplishments that I'm proud of

I am just really proud that I got it to find connections. I realized how complicated Chemistry is and how many rules there are to follow.

What I learned

A certain amount of expertise is really required for things that are not purely CS based. One of the issues I kept on running into was the requirements in the sense of "should I account for upper/lower case" or "how would compound name be input". Another issue was not understanding the rules I needed to implement (for example, "how does a chemical bond to another").

What's next for ChemDraw

I need to work on adding in all of the different bonding rules/exceptions. I will then focus on drawing the structure rather than listing out the bonds in the structure. If I can do that then I will add things like "save compound to database" which will save the drawing and then allow for image searching.

Built With

Share this project: