Welcome, reader.
This is my 4th devlog on a project (primarily built in python), that takes a molecule with a single defined central atom and predicts the electron geometries, molecular geometries (bond hybridization as well) using VSEPR Theory, and other quantitative data like total valence electrons, lone pairs, etc., that were collected along the calculations. If you are interested in my motivations and overall more information about the project, you can read my previous devlogs as well. However, the near-following bulleted-list will hopefully provide decent context.
I would usually write a devlog earlier than this; however, I worked on my README.MD, yielding not a full 4h 37m on functional programming necessarily.
Functions of the Predictor
This project, at its state at the moment of writing:
- Counts Valence Electrons of the inputted molecule (mendeleev assist).
- Accounts for charges on molecules and taking that into consideration while calculating Valence Electrons.
- Error checks / parses the user’s input to only allow valid molecules. * NEW/ADDED
- Calculates electronegativities of constituent elements (using mendeleev) and determining the central atom of the molecule.
- Parses the molecule to find its elements and subscripts.
- Calculates electron groups / steric number.
- Calculates lone pairs around the central atom.
- Reforms the molecule in VSEPR form: AX_mE_n. * NEW
- Searches through a dictionary/table of all of the permutations of VSEPR form in order to fetch appropriate data. * NEW
New Changes
I rewrote some of the code in order to remove redundancy and to improve efficiency. I also created designated functions for some of the code I recently wrote. These parts were quite annoying, as it was frustrating to have to rewrite code to reach the same goal again; a lot of errors kept appearing. Nevertheless, I finished in the end. It takes a lot of patience to read through all your code line by line and go through the functions of each, and then seeing where efficiency could be improved. Nevertheless, it is satisfying to realize and improve on code, and to produce a more concise and readable product in the end. Since I can’t write extensively in this devlog, I will touch on topics like bond hybridization and more later. I also worked on my README.MD as aforementioned, which I encourage you to read or look at.
Future Plans
As you can see in the screenshot I included below (using H3O+/hydronium as the example), my project is simply printing out all of the data– though the calculations are arguably demanding. In essence, the output is underwhelming compared to the immense backend logic. I would certainly like to make this into a web or application, and at the same time I would be learning HTML, CSS, and JavaScript.
Conclusion / Goodbyes
Thank you for reading, reader. I imagine that you learned or found something in my devlog interesting. If you have any suggestions, comment below and I will be sure to ponder over them. By the way, I really don’t know which molecules to pick for my examples in my screenshots, so you can comment some that you might want me to use (make sure it has one central atom). My name is Lucky, and I thank you, once again, Goodbye.
for H3O+ (Hydronium) below
Comments 0
No comments yet. Be the first!
Sign in to join the conversation.