Inspiration

A while ago, my research involved using reductive amination and the Ugi reaction for organic synthesis. However, I didn't have much prior knowledge or experience with these types of reactions. Therefore, I asked Codex to help me build an interactive visual webpage. On this page, I could drag and drop molecules and atoms to complete the entire reaction process step-by-step, reinforcing my understanding of these two reaction mechanisms.

After completing this project, I thought: why not take it a step further? I recalled my experience studying organic chemistry as an undergraduate. Organic chemistry reaction mechanisms are a headache for chemistry students almost everywhere in the world—they are often just tedious equations drawn in textbooks. More often than not, you have to memorize a massive number of different reactions to survive final exams. Ever since then, I had been pondering a question: why not create a game that lets students experience the entire reaction process firsthand? Why couldn't students manipulate the molecules themselves to perform addition, elimination, and substitution reactions? Limited by my programming skills at the time, I never had a way to turn this idea into reality. Fortunately, with Codex now available, I can use simple prompts to have it help me realize this vision.

How we built it

It all started with a few basic prompts. I told Codex that I wanted to expand the previous mechanism visualization project into a universal tool, allowing users to create, share, and practice any organic mechanism. To achieve this, three major changes were needed:

  1. Expand the chemical components: Broaden the types of elements, chemical bonds, and the ways they can connect and disconnect.

  2. Generate a reaction-building canvas: Create a workspace where users can introduce the necessary molecules and design the reaction step by step.

  3. Develop a practice area: Once a reaction is built, it is saved locally in JSON format. Users can import their own custom reactions or share them with others. After importing a reaction into the practice area, the user must follow the original setup and complete the required actions step-by-step to finish the process.

Challenges we ran into

Building the website went smoothly with hardly any issues. Most of the time was spent fine-tuning various details, including designing the element symbols, determining the precise distance required to trigger chemical bond formation, and resolving logical contradictions within the reaction mechanisms. These issues required repeated testing by the developer to gather enough hands-on experience, allowing Codex to make targeted optimizations based on that feedback.

Accomplishments that we're proud of

Regardless, Codex is truly stunning. As a person with a background in biochemistry, I had almost zero professional computer science knowledge before this (unless printing "Hello World" in Python counts). But with Codex's help, I can seamlessly integrate my domain expertise with computer technology. I rarely have to worry about running into unfixable bugs; all I need to do is propose an idea, let Codex implement it, refresh the page to try it out, and submit feedback to help Codex optimize it.

What's next for Chem_Mechanism_Engine

This project is now uploaded to my GitHub; you can go to "https://github.com/Yicheng-Su/Chem_Mechanism_Engine" or my codex site to play it. Please leave a comment.

Built With

Share this project:

Updates