Posts Tagged ‘Fortran’
Thursday, January 7th, 2016
This is the third and final study deriving from my Ph.D.[1]. The first two topics dealt with the mechanism of heteroaromatic electrophilic attack using either a diazonium cation or a proton as electrophile, followed by either proton abstraction or carbon dioxide loss from the resulting Wheland intermediate. This final study inverts this sequence by starting with the proton abstraction from an indolinone by a base to create/aromatize to a indole-2-enolate intermediate, which only then is followed by electrophilic attack (by iodine). Here I explore what light quantum chemical modelling might cast on the mechanism.

The concentration of I3– is used to follow the reaction, given by the expression: [I3–] = k1[B][indolinone]t – k-1/k2*ln[I3–] + const, where k2* = k2/715[I–] + k2' , the latter being the rate coefficient for the reaction between the enolate intermediate and I3–. With appropriate least squares analysis of this rate equation,‡ a value for k1 using either 1H or 2H (≡ D) isotopes can be extracted and this gives an isotope effect k1H/k1D of 6.3 ± 0.6. Note that this value does NOT depend on [B]. Here, I am going to try to see if I can construct a quantum mechanical model which reproduces this value.

-
Model 1 uses just three water molecules as a proton relay (B3LYP+D3/Def2-TZVP/SCRF=water).
-
Model 2 uses 2H2O.NaOH solvated by two extra passive water molecules. Since under these conditions, the NaOH is largely ionic, [B] ≡ [OH–]
|
Model
|
ΔG‡298 (ΔH‡298)
|
kH/kD (298K)
|
DataDOIs
|
|
1
|
28.0 (22.9)
|
10.3
|
[2],[3],[4]
|
|
2
|
2.5 (2.8)
|
4.4
|
[5],[6],[7]
|
The plot of rate vs [B] shows[1] that the uncatalysed (water) rate is very slow (intercept passes more or less through zero) and the calculated free energy barrier (28.0 kcal/mol) confirms a slow rate at ambient temperatures. Note in the final (aromatized) product, there is a noticeable hydrogen bond between the 3-carbon and a water molecule (2.14Å). The calculated kinetic isotope effect[8] is substantially larger than observed experimentally for the base catalysed contribution.

In the presence of NaOH (standard state = 1 atm = 0.044M), the enthalpy barrier drops very substantially to 2.8 kcal/mol and the free energy to 2.5 kcal/mol. Similar behaviour was noted previously on this blog for the hydrolysis of thalidomide. Although the magnitude of the reduction in barrier in fact implies an extremely fast reaction, recollect that [B]=[OH–] appears in the rate equation and since its value is very much less than 0.044M, the observed rate is relatively slow.

The calculated KIE for the hydroxide catalysed mechanism is much smaller that for the water route, but also smaller than is observed. This is a value uncorrected for tunnelling, which given the small barrier might be significant.
These calculations show how a model for ionization of indolinone can be constructed, and used to e.g. probe the sensitivity of KIE to perturbations induced by ring substituents, which may form the basis of a future post.
‡This is a non-linear equation with kinetics that straddle zero and first order behaviour. In 1972, it was not easily possible to graph such functions in a manner where the slope of a linear plot would yield the rate constant. It was only computers and languages such as Fortran which allowed such non-linear least squares analysis of the rate. In the event, it turned out that the presence of 50% methanol in the mixed aqueous solutions was the cause; in other solvents the kinetics approximated zero order behavour very well.
References
- B.C. Challis, and H.S. Rzepa, "Heteroaromatic hydrogen exchange reactions. Part VIII. The ionisation of 1,3-dimethylindolin-2-one", Journal of the Chemical Society, Perkin Transactions 2, pp. 1822, 1975. https://doi.org/10.1039/p29750001822
- H.S. Rzepa, "C 10 H 17 N 1 O 4", 2016. https://doi.org/10.14469/ch/191786
- H.S. Rzepa, "C 10 H 17 N 1 O 4", 2016. https://doi.org/10.14469/ch/191765
- H.S. Rzepa, "C10H17NO4", 2016. https://doi.org/10.14469/ch/191784
- H.S. Rzepa, "C 10 H 20 N 1 Na 1 O 6", 2016. https://doi.org/10.14469/ch/191787
- H.S. Rzepa, "C 10 H 20 N 1 Na 1 O 6", 2016. https://doi.org/10.14469/ch/191782
- H.S. Rzepa, "C10H20NNaO6", 2016. https://doi.org/10.14469/ch/191785
- H. Rzepa, "Mechanisms and kinetic isotope effects for the base catalysed ionisation of 1,3-dimethyl indolinone.", 2016. https://doi.org/10.14469/hpc/202
Tags:Arenium ion, Bases, diazo, Diazonium compound, Electrophile, Electrophilic aromatic substitution, Equilibrium chemistry, Fortran, Indole, light quantum chemical modelling, Metal ions in aqueous solution, Nuclear physics, Simple aromatic rings, Solutions
Posted in Historical, reaction mechanism | No Comments »
Saturday, November 1st, 2014
Egon Willighagen recently gave a presentation at the RSC entitled “The Web – what is the issue” where he laments how little uptake of web technologies as a “channel for communication of scientific knowledge and data” there is in chemistry after twenty years or more. It caused me to ponder what we were doing with the web twenty years ago. Our HTTP server started in August 1993, and to my knowledge very little content there has been deleted (it’s mostly now just hidden). So here are some ancient pages which whilst certainly not examples of how it should be done nowadays, give an interesting historical perspective. In truth, there is not much stuff that is older out there!
- This page was written in May 1994 as a journal article, although it did have to be then converted into a Word document to actually be submitted.[1] Because it introduced hyperlinks to a chemical audience, we wanted to illustrate these in the article itself! Hence permission was obtained from the RSC for an HTML version to be “self-archived” on our own servers where the hyperlinks were supposed to work (an early example of Open Access publishing!). I say supposed because quite a few of them have now “decayed”. We were aware of course that this might happen, but back in 1994, no-one knew how quickly this would happen. What is interesting is that the HTML itself (written by hand then) has survived pretty well! I will leave you to decide how much the message itself has decayed.
- This HTML actually predates the above; it was written around November 1993 and represented the very first lecture notes I converted into this form (on the topic of NMR spectroscopy). A noteworthy aspect is the scarce use of colour images. At the start of 1994, the bandwidth available on our campus was pretty limited (the switches were 10 Mbps only) and a request went out to reduce the bit-depth of any colour images to 4-bits to help conserve that bandwidth! I rather doubt anyone took much notice however, and the policy was forgotten just a few months later.
- In 1996, I had two visitors to the group, Guillaume Cottenceau, a french undergraduate student, and Darek Bogdal, a Polish researcher who wanted to learn some HTML. Together they produced this, which was an interactive tutorial to accompany the NMR lecture notes previously mentioned. These pages introduce the Java applet (yes, it was very new in 1996), which Guillaume had written and which Darek then made use of. And hey, what do you know, the applet still works (although you might have to coerce your browser into accepting an unsigned applet).
- Here is a programming course that I had been running with Bryan Levitt for a few years, now recast into HTML web pages some time in 1994-5. This particular project I still hold dear, since it expanded upon the NMR lectures by getting the students to synthesize a FID (free induction decay) using the program they wrote, and then perform a Fourier Transform on it. I even encouraged students to present their results in HTML (I cannot now remember how many did). This link is to the computing facilities we offered students in 1994 for this project, ah those were the times! In 1996, the programming course was replaced by one on chemical information technologies, and here students were most certainly expected to write HTML. Some of the best examples are still available. And to illustrate how things happen in cycles, that course itself is now gone to be replaced by, yes, a programming course (but using Python, and not the original Fortran).
- In tracking down the materials for the programming course described above, I re-discovered something far older. It is linked here and is (some of) the Fortran source code I wrote as a PhD student in
1974 1972. So I will indulge in a short digression. My Ph.D. involved measuring rate constants, and the accepted method for analysing the raw kinetic data was using graph paper. For first order rate behaviour, this required one to measure a value at time=∞, which is supposed to be measured after ten half-lives. I was too impatient to wait that long, and worked out that a non-linear least squares analysis did not require the time=∞ value; indeed this value could be predicted accurately from the earlier measurements. So in 1974, I wrote this code to do this; no graph paper for me! Also for good measure is a least squares analysis of the Eyring equation. And you get proper standard deviations for your errors. In retrospect I should have commercialised this work, but in 1974, almost no-one paid money for software! What a change since then. I must try recompiling this code to see if it still works! And for good measure, here is a Huckel MO program I wrote in 1984 or earlier (I did compile this recently and found it works) and here is a little program for visualising atomic orbitals.
- In January 1994, I was asked to create a web page for the WATOC organisation. This certainly predated the web sites for e.g. the RSC, the ACS, indeed famous sites such as the BBC and Tesco (a large supermarket chain) which only started up in mid 1994. The WATOC site itself moved a few years ago.
- This is one of those wonderfully naive things I started in 1994, and which did not last long (in my hands). Nowadays, the concept lives on as MOOCs. Note again the almost complete expiry of the hyperlinks.
- This is a project we also started in 1994, Virtual reality[2],[3]. The idea was that if HTML was text-markup, VRML was going to be 3D markup. VRML itself never quite caught on, but it is having a new life as a 3D printing language!
- And by 1995, I felt confident enough in my ability to (edit) HTML, that we started a virtual conference in organic chemistry (we did four of them in the end). I remember the first one involved contributors sending me a Word version of their poster, and I did all the work in converting it into HTML. Such virtual conferences still run, but in truth most participants still prefer to travel long distances to go drink a beer with their chums, rather than hack HTML.
I am going to stop now, since this is far too much wallowing in the past. But at least all this stuff is not (yet) lost to posterity.
References
- H.S. Rzepa, B.J. Whitaker, and M.J. Winter, "Chemical applications of the World-Wide-Web system", Journal of the Chemical Society, Chemical Communications, pp. 1907, 1994. https://doi.org/10.1039/c39940001907
- O. Casher, and H.S. Rzepa, "Chemical collaboratories using World-Wide Web servers and EyeChem-based viewers", Journal of Molecular Graphics, vol. 13, pp. 268-270, 1995. https://doi.org/10.1016/0263-7855(95)00053-4
- O. Casher, C. Leach, C.S. Page, and H.S. Rzepa, "Advanced VRML based chemistry applications: a 3D molecular hyperglossary", Journal of Molecular Structure: THEOCHEM, vol. 368, pp. 49-55, 1996. https://doi.org/10.1016/s0166-1280(96)90535-7
Tags:3D printing language, ACS, BBC, Bryan Levitt, chemical audience, chemical information technologies, Darek Bogdal, Fortran, Guillaume Cottenceau, HTML, http, Java, large supermarket chain, personal Web presence, Python, researcher, spectroscopy, Tesco, Virtual reality, WATOC, web technologies
Posted in Chemical IT, Historical | No Comments »
Thursday, July 7th, 2011
Computers and I go back a while (44 years to be precise), and it struck me (with some horror) that I have been around them for ~62% of the modern computing era (Babbage notwithstanding, ~1940 is normally taken as the start of the modern computing era). So indulge me whilst I record this perspective from the viewpoint of the computers I have used over this 62% of the computing era.
- 1967: I encountered (but that term has to be qualified) my first computer, suggested to me as an alternative to running quarter marathons on Wimbledon common at school by an obviously enlightened teacher! I wrote a program (in Algol) on paper tape, put the tape in an envelope, and sent it off to Imperial College (by van) to run, on an IBM 7094. A week later, printed output showed you had made a mistake on line 1 of the program. As I recollect, after about eight weeks of this, I got the program to run (and calculated π to 5 decimal places).
- 1970: By now I was a student (again at Imperial College), and was introduced to Fortran, then a radical new innovation to a chemistry degree. The delightfully named pufft compiler combined with the 7094 again, but this time with punched Holerith cards as input and line printer output. I cannot remember what we were asked to program. I do remember that the punched cards were produced by a pool of punch card operators, working from code pages written by the programmer. Some students (not me!) thought it great fun to give their Fortran variables naughty names (which the punch card operators then refused to punch, thus causing the student to fail the course!).
- 1971: I really liked this programming lark, so when instant-turnaround was introduced that year, I decided to do a proper program. It was called NLADAD (yes, I was no good at names, even then), which stood for non-linear-analysis of donor-acceptor complexes. The idea was to take recorded NMR chemical shifts, and fit them to an equilibrium A+B ⇔ AB+B ⇔ AB2 using non-linear regression analysis. It must have been all of 200 lines of code (OK, I did not write the matrix inversion routine myself)! Instant turnaround was also great, you got to punch your own cards this time, and had the great excitement of feeding them into a card reader yourself. You then walked about 5 yards to the line printer and waited agog. No waiting one week, this was less than a minute. Or it would have been if the line printer did not paper-wreck every two minutes! (I might add that I have a dim recollection of a member of the computer centre staff standing by to recover these paper wrecks. He, by the way, is now the director of the ICT division here!).
- 1972: I am now doing a PhD (yes, boringly, yet again at Imperial College). I had found the one and only teletypewriter in the chemistry department. The crystallographers had secreted it away in their empire, but were very dismayed to find me occupying it constantly. Instant was now even more instant. I was now connecting to a time-sharing CDC 6400 computer, at the dazzling speed of 110 baud (or bytes per second). These were small bytes by the way, since the CDC used 6 bits per byte. The result was that one did everything in UPPER CASE, since a 6-bit byte only allows 64 characters! My (still Fortran) programs reached probably 1000 lines of code now, and I was engrossed in deriving non-linear analyses of steady state chemical kinetics (about four different kinds of rate equation as I recollect). Ah, the joys of covariance analysis, and propagation of errors (I was in a kinetics lab, and all the other students plotted graphs on graph paper, and if pressed, plotted gradients of graphs, the so-called Guggenheim plots. I thought this the dark ages, but no-one volunteered to join me in this single teletypewriter room. Not even the attractive girls in the group. I was the geek of my time, no doubt about that. My kinetic analysis did however have one upside. Its how I meet my wife to be a few years later!).
- 1974: PhD completed, I was now ready to go to Texas, where everything is bigger (and in terms of computers, slightly better, a CDC 6600 now and a 300 baud teletypewriter!). I had been computing now for seven years, and finally I actually got to SEE the device for the very first time. My mentor, Michael Dewar, had a sort of special relationship with the university. His students (and possibly only his students) were allowed to go into the depths of the machine room, where behind plate glass you could see the CDC 6600. I soon learnt how to get even closer. It was not particularly exciting however. I was more entranced with the CALCOMP flatbed plotter, which was located next to the 6600. Pictures at last (you probably do not want to know that to convert my kinetics in 4 above to pictures, I got quite expert in using a french curve. Look it up before you jump to conclusions). Part of the pact I negotiated was that I was only allowed into the inner sanctum at 03:00 in the morning (sic!). Still a geek then! Oddly, I was one of the few students in Dewar’s group using the CALCOMP, but at least we now had pictures of the molecules I was now calculating (using MINDO/3). To put the computing power into context, in 1975, Paul Weiner, another group member, announced that he had completed a full geometry optimisation of LSD, this having taken about 4 days to do on that over-worked 6600. The entire group went out to celebrate. Many pitchers of beer were drunk that nite.

Computer graphics from 1976.
- 1977: Back to Imperial, where we might have also now had a CDC 6600. And a Tektronix terminal running at the dizzying (hardwired end-to-end) speed of 9600 baud. I learnt to Word process on this device (using a word processor, written in Fortran, although not by me) and I wrote three review articles by this means, using a fancy phototypesetter as the printer. My next program, STEK, probably ran to about 5000 lines of code, and it persuaded the Tektronix to plot all sorts of things, ball&stick diagrams, isometric potential surfaces, molecular orbitals, and the like (and jumping ahead, my experience with this program eventually led to CML, and Peter Murray-Rust, but that is indeed jumping ahead). I think I also managed to gain access to the Imperial machine room, that inner sanctum, yet again. But for reasons I will not go into, it was not as interesting as the Texan machine room.

Chemistry Computer graphics, circa 1977-85.
- 1979: I encountered a Cray 1 computer, and probably also 8-bit bytes (and yes, lower case printer outputs) for the first time at the University of London Computing Centre.
- 1980: Remember that teletypewriter, encountered earlier. Well these were now running at 2400 baud and I started to organise the deployment of a chemistry department computer network to sprinkle several such terminals around the department. The controller was a PAD, and in that year, we introduced STN ONLINE using this network. It was the first time we could search CAS online ourselves (previously, it was a service offered by the library). Literature searching has not been the same since.
- 1980: I finally again encountered a real computer, which one could happily listen to without creeping into machine rooms in the middle of the night. It was the data system on a Bruker Spectrospin 250 MHz superconducting NMR spectrometer. I had many adventures on this system. It was installed, by the way, on more or less the same day as the birth of my first daughter Joana. It had a hard drive (5 Mbytes as I recollect, and cost an absolute fortune, around £10,000 if I remember correctly).

Combining Quantum mechanics and NMR.

Computer graphics 1982, from NMR spectrometer.
- 1982: More networks, this time a curious computer known as the Corvus Concept, using a networked hard drive (possibly as big as 20 Mbytes by now), and a large screen.
- 1985: Enter the Mac (OK, the IBM PC came a little earlier, but it was not entrancing). Now one really had a tactile computer that made noises (not always nice), produced smoke signals occasionally, and ejected its floppy disk incessantly. Yet another revolution to cope with. As I type this, I look down on that Mac, which is still underneath my desk. Wonder if its worth anything on ebay?
Well, a second consecutive blog, with (almost) no pictures or molecules. And I have only gotten to the half way stage of my story. Better break off then.
Tags:chemical shifts, chemistry department computer network, controller, director, fancy phototypesetter, Fortran, GBP, Guggenheim, Historical, IBM, ICT, Imperial College, Joana, London Computing Centre, Michael Dewar, obviously enlightened teacher, Paul Weiner, Peter Murray-Rust, programmer, steady state chemical kinetics, Tektronix, Texas, University of London, University of London Computing Centre, Wimbledon, word processor
Posted in Chemical IT | 5 Comments »
Monday, August 31st, 2009
One of the many clever things that clever people can do with the Web is harvest it, aggregate it, classify it etc. Its not just Google that does this sort of thing! Egon Willighagen is one of those clever people. He runs the Chemical blogspace which does all sorts of amazing things with blogs.
He sent me a message recently, saying that unfortunately, he was not able to do any amazing things to my blog, since it was not failsafe any more. Apparently, deep down in the software he was using to harvest the details of my blog, an error along the lines of Bytes: 0xA0 0x0A 0x49 0x74 was causing grief. This is the sort of message that would make most people quake. In this instance, the excellent W3C comes to the rescue. By putting this blog feed into their RSS Validator , one can narrow down the error. It proved to be on a single line of an earlier blog posting. Remove this line, and all becomes well. In fact, if the line was displayed on a regular text editor, one eventually notices that the end of the line (which looks just like a space) might be the suspect. Remove just that one character, and the RSS Validator is (almost perfectly) happy. I hope that Egon will be too now!
But the lesson of this little exercise is that a single character can still bring the whole edifice crashing down (or at least my entire blog). Single characters of course have been notorious in the past. One that springs to mind was a single (white) space, inserted by accident into a line of Fortran code. That space subverted the meaning of the code, which in fact was being used to control the navigation of a spacecraft on its way to Jupiter. Result? The probe missed Jupiter by quite a margin, and the entire cost of the mission was lost (around 1$billion!).
It is also a lesson in how an individual might operate within the modern Web. During the period 1993 to around 2001, most of the content on the Web was in the form of static HTML pages. This was written either by hand, or using software tools to do so. This was scary stuff for most people. Then along came two social inventions; the Wiki and the Blog. Each of these hid (most of) the scary HTML from the user, and allowed pain-free (almost) creation of content. As time passed, everyone became accustomed to using such tools, and they started to trust them implicitly to produce valid HTML under the hood. In my case, I trusted the Blog software (WordPress) to both not produce faulty HTML, or at least to detect it if it got in by accident. In this instant, it is more subtle, with an error in the character encoding. But this is the lesson. As the skills of olden time (i.e. writing native HTML) are lost, we will be more and more at the mercy of the modern tools. Will we even notice the errors, which might propagate out with our name attached? Or will the software get even smarter and fix the errors before they cause problems? Will humans become almost entirely redundant?
Tags:Chemical IT, Fortran, Google, HTML, regular text editor, software tools, USD
Posted in Chemical IT | No Comments »