The Notebook.

A bunch of possibly interesting things.

The Chemistry Project - now ChemSi.

ben@Eddie:~/Development/SI/ChemSi$ python
 Welcome to ChemKit (copyright 2015).
 > resultant KI + NaCl
 KI + NaCl -> KCl + NaI
 > set verbose
 Verbose mode on
 > resultant KI + NaCl
 KI + NaCl -> KCl + NaI
 KI: 166.003g/mol
 NaCl: 58.443g/mol
 KCl: 74.551g/mol; 33.21576375817387%
 NaI: 149.894g/mol; 66.78423624182614%
 > mass C8H18O

Recently I have been working on ChemSi, which is the chemical program I mentioned in my last post. I have since written quite a large amount of code for it to utilise an algorithm I came up with last night at about 1:00AM. It is not the smoothest algorithm, and it does get it wrong about 40% of the time. Regardless, it is relatively good for what is needed here.

In an effort for transparency I will explain how the algorithm works. It is based off of displacement reactions - so for addition and other forms it has some issues. It gets the lowest electronegativity (aka the most nucleophilic element) of the elements present in a structure. It works out how many valencies this has, and finds the highest electronegativity. It repeats this until all valencies are filled - but it does mean the original structures are destroyed (so covalent bonds are treated the same as ionic) - meaning a OH group may be split up, often with disastrous results. A better method might be to do a bunch of algorithms and rank their products on how few lone elements they have (for example with ChemSi entering 'C2H4 + H2O' will get you 'CH3OH + C + H2', when it should all be as a single ethanol molecule). It could then work out the most likely product.
Overall it feels like I am making good progress on it. I am hoping to have a fully working product by next friday (which can do percentage yields). Over the summer holidays I may attempt to add a GUI (sort of like IrYdium VLab, only open source, up to date, and with every reactant).

Talking about IrYdium, I have found that many programs which do these sorts of chemical reaction predictions (ie Chemist on Android/iOS, IrYdium) have a very limited range of chemicals and you feel as though they are preprogrammed results. IrYdium for instance seems to only have chemicals for neutralizations and working out how different things affect the rate. If ChemSi does get to the stage of having a GUI I can assure you it will allow for any chemical mixture, at any temperature (but I cannot say it will always be right ;)).

p53: The Gene that Cracked the Cancer Code


Recently I have been reading the book titled 'p53: The Gene that Cracked the Cancer Code' by Sue Armstrong. I am now reading 'General Chemistry' by Linus Pauling (do not expect a review on this one, it isn't really that sort of book - regardless, it is a very good textbook) and 'The Little Book of String Theory' Steven S. Gubser.

p53: The Gene that Cracked the Cancer Code


Price (as of writing): £16.99 on Amazon

Publisher Synopsis: 

All of us have lurking in our DNA a most remarkable gene, which has a crucial job - it protects us from cancer. Known simply as p53, this gene constantly scans our cells to ensure that they grow and divide without mishap, as part of the routine maintenance of our bodies. If a cell makes a mistake in copying its DNA during the process of division, p53 stops it in its tracks, summoning a repair team before allowing the cell to carry on dividing. If the mistake is irreparable and the rogue cell threatens to grow out of control, p53 commands the cell to commit suicide. Cancer cannot develop unless p53 itself is damaged or prevented from functioning normally.

Perhaps unsurprisingly, p53 is the most studied single gene in history.

This book tells the story of medical science's mission to unravel the mysteries of this crucial gene, and to get to the heart of what happens in our cells when they turn cancerous. Through the personal accounts of key researchers, p53: The Gene that Cracked the Cancer Code reveals the fascination of the quest for scientific understanding, as well as the huge excitement of the chase for new cures - the hype, the enthusiasm, the lost opportunities, the blind alleys, and the thrilling breakthroughs. And as the long-anticipated revolution in cancer treatment tailored to each individual patient's symptoms begins to take off at last, p53 remains at the cutting edge.

This timely tale of scientific discovery highlights the tremendous recent advances made in our understanding of cancer, a disease that affects more than one in three of us at some point in our lives.


This is a very interesting book, of which just the first few pages proposes new questions I had not thought of such as "Why so few?". Generally we assume that there are so many people with cancer that it is very common, but when you look into what actually causes cancer it is amazing how so few people get it in the first place. Billions of cell divisions go on in your body every day, and it is very rare that any of these will turn cancerous. This book explores this idea and the help that p53 provides in preventing cancers from spreading. To put it simply using an analogy this book uses a lot more proficiently than I can, p53 is a checkpoint in the synthesis stage of interphase in the mitotic cycle. It prevents damaged DNA to duplicate.

As well as explaining how p53 works and what it does, it also gives some insight into the researchers in this field and their struggles against large businesses, such as the Tobacco industry when research was published about smoking causing cancer. It almost turns into an espionage novel at that point! Overall this is a very good book, and one I would strongly recommend.