Posts Tagged ‘Skolnik’

Digital repositories. An update to the update.

Monday, August 13th, 2012

A third digital repository has been added to the two I described before. Chempound is a free open-source repository which (unlike DSpace and Figshare) was developed specifically for chemistry.

It carries more semantic information (in the form of an RDF triple declaration), which allows SPARQL queries on the entry to be performed.

Our original DSpace repository is also being tweaked to allow additional information to be added to existing entries; in particular if an entry is linked to in a journal publication, the DOI of that article is inserted into the DSpace descriptions. It is also relatively simply to duplicate the information in one repository by re-depositing it into another. Thus it becomes feasible to clone the information about the 600+ entries in our DSpace that have been subsequently published in peer-reviewed journal articles, thus adding a measure of confidence to their provenance.

To compare how the three repositories carry information about the same molecule, invoke any of the links below:

  1. DSpace
  2. Figshare
  3. Chempound 

QR codes and InChI strings.

Sunday, July 22nd, 2012

A month or so ago at a workshop I was attending, a speaker included in his introductory slide a QR (Quick Response) Code. It is a feature of most digital eco-systems that there is probably already “an app for it”. So I thought I would jump on the band wagon by coding an InChI string. Here it is below:

QRCode for an InChI string. Point your smart device at it, and see the InChI appear!

You then invoke an appropriate app (I used QR Reader for iPhone, but there are many), point it at the screen (a fair bit of wobble seems tolerated) and you get the InChI. Are there any hackers out there that could process the resulting InChI and display not so much it, but the molecule it corresponds to? A Quick mash-up I should imagine (its probably already been done!).

Here is another QR Code, this time for another post on this blog (more serious than this one!). 

QR URL code for using on a mobile device.

If you click on either QR image above, this will take you to one (of several) QR code generators. I found that selecting error correction code H seems to make recognition virtually instant. Suddenly an image popped into my mind, of a class of students in a lecture, pointing their device at my InChI codes on the projected screen, and twiddling with the molecules during my lecture (they probably never listen to me anyway 🙂 This may not be as unlikely as it seems. I am in fact compositing an iTunesU course at the moment. For a sneak β-style preview, open this page on an iPad and click on this link to load the course up (or use the QR code below). You probably need to also load up the iTunesU app first. 

QR Code for iTunesU course.

Comments welcome, QR code below!.

 

Digital repositories. An update.

Saturday, July 21st, 2012

I blogged about this two years ago and thought a brief update might be in order now. To support the discussions here, I often perform calculations, and most of these are then deposited into a DSpace digital repository, along with metadata. Anyone wishing to have the full details of any calculation can retrieve these from the repository. Now in 2012, such repositories are more important than ever. 

In the UK, the main funding organisations are increasingly requiring researchers to deposit their primary data in such open archives, and some disciplines are better than others at this (chemistry does not rank very highly in general however in terms of deposition of data). Our DSpace server is a local one running at Imperial College, but a few months back I became aware of Figshare, which aspires to operate on a much wider and more general scale.  So I have injected one of the calculations reported in another post (the IRC for the sodium tolyl thiolate reaction with dichlorobutenone) into Figshare, making use of the API which has recently been developed for this purpose and implemented by  Matt Harvey. As with DSspace, it issues a DOI, which can be then quoted wherever appropriate (and particularly in scientific articles). This particular deposition is 10.6084/m9.figshare.93096

This repository is still undergoing a lot of development, but already one can see many interesting features, such as export to Endnote or Mendeley, and a QR barcode for devices with cameras. I would encourage anyone who regularly generates e.g. computational chemistry data, or knows a group that does, to encourage them to make use of such facilities.

Postscript: If you have a look at this deposition in Figshare you may already notice some of the developments I note above.  Matt Harvey (who, with Mark Hahnel of Figshare, developed our publish script) has added to the entry:

* A data descriptor document URL

* Wikipedia and pubchem links (automatically resolved from Inchi/Key searches)

* Links to chemspider searches

* Links to all other objects in the  Spectra DSpace repository with a common Inchi/Key

Origins of the Regioselectivity of Cyclopropylcarbinyl Ring Opening Reactions.

Friday, July 20th, 2012

Twenty years are acknowledged to be a long time in Internet/Web terms. In the early days (in 1994), it was a taken that the passage of 1 Web day in the Internet time-warp was ~≡ 7 for the rest of the world (the same factor as applied to the lives of canines). This temporal warping can also be said to apply to computational chemistry. I previously revisited some computational work done in 1992, and here I rediscover another investigation from that year[1] and that era. The aim in this post is to compare not only how the presentation of the results has changed, but how the computational models have as well.

Experiment had shown that Sabinene undergoes a radical ring-opening of the cyclopropane when treated with CCl3 radicals. If BrCCl3 is used as solvent, the kinetic 5-exo product is immediately trapped. If instead the reaction is conducted in the less reactive trap CCl4, the thermodynamic 6-endo product is isolated. The objective was to investigate the origins of these effects. In 1992, computational modelling was limited by the speed and memory of the computers to the following:

  1. Semi-empirical methods such as PM3 (ab initio methods were used only sparingly).
  2. Larger groups (in this case, the CCl3 and isopropyl groups) were trimmed off
  3. Simulations were often for the gas phase only (although the self-consistent-reaction-field was starting to be used to simulate solution).
  4. The properties of transition states were analysed via their molecular orbitals alone, and these were often disconcertingly complex:

The conclusion in 1992 using these techniques found that the transition state for 5-exo ring formation was 3.1 kcal/mol higher than for 6-endo, contrary to the experimental result. With no support from mere activation energies, perhaps slightly desperate recourse was made to an orbital correlation diagram, and the discussion included, inter alia, an arcane feature involving an avoided orbital crossing unique to the 5-exo transition state. Perhaps, in retrospect, rather too arcane for the intended audience, since this is unfortunately not a well cited article.

How might one do things differently (better?) twenty years on?

  1. Here, I start with presenting a (3D) model of each transition state. This was not done in 1992 for reasons of space (the journal format limited the page length very strictly) and of course the journal was only available in printed form (no e-journals then!).
  2. The model itself can be greatly improved (ωB97XD/6-311G(d,p)/CPCM=CCl4).  We now have a DFT calculation, including proper dispersion terms (which PM3 lacks by the way) and good triple-ζ basis set (PM3 is single-ζ), with inclusion of solvation (even though this is a radical, the dipole moments are nevertheless in the range 3-4D, and hence a gas phase model may not be entirely appropriate) and with no trimming off of groups. Crucially (in retrospect), my decision to delete the CCl3 group in 1992 was not a sound one! We have no archive from those days however, so cannot double-check this point. The modern calculation is indeed archived here (although of course whether this archive will itself still be available in 20 years time remains to be established!). 
  3. With modern computers, these new models took about 2.25 hours each to compute (the entire project was done in one working day). The 5-exo transition state is shown below:
  4. The presentation of this model can also be improved from that available 20 years ago. As usual, just click on the image above to see it.
  5. The free energy of activation, ΔG298 = 10.6 kcal/mol, is an entirely reasonable value for radical ring opening of a cyclopropyl (this value is mysteriously not reported in the 1992 version, for which I also take complete blame).
  6. The isomeric 6-endo transition state (which is observed to be kinetically slower) indeed now has the higher calculated barrier (ΔG298 = 11.5 kcal/mol) and this value corresponds to a process about 5 times slower than 5-exo. Recollect, PM3 obtained the opposite result, but possibly that was because the CCl3 group was not present in the model.
  7. We can learn a little about the dynamics of the reaction path; note how the isopropyl group rotates near the end of the ring-opening, due to some form of σ-conjugation no doubt.
  8. Instead of delocalised molecular orbitals, we are going to present localized NBOs, and in particular look at the localised effect to the C-CCl3 bond. The orbitals for the 5-exo transition state are shown first. The red-blue is the C-CCl3 σ* NBO orbital, the purple-orange is the highest energy doubly occupied NBO orbital (these two are selected because they represent a pair with a small energy gap, which means a larger interaction energy). Where blue and purple, or orange and red overlap, we have a stabilizing influence.
  9. The equivalent pair of NBOs for the 6-endo transition state overlaps much less well (click on image to get a rotatable 3D model to see for yourself). 
  10. Nevertheless, the 6-endo transition state manages an overlap between the highest singly occupied NBO and the C-Cl σ*, but because it involves only one, and not a pair of electrons, the stabilizing effect is smaller.
  11. What we conclude is that at the transition state, the 5-exo isomer has the more stabilizing orbital overlaps, but that beyond the transition state, the greater thermodynamic stability of the 6-endo isomer takes over.

Well, here we have a refresh of some chemistry analysed 20 years ago, and done with the help of software and hardware tools that have advanced considerably during this period. One may only speculate what another refresh in 20 years time might bring! 

References

  1. R.A. Batey, P. Grice, J.D. Harling, W.B. Motherwell, and H.S. Rzepa, "Origins of the regioselectivity of cyclopropylcarbinyl ring opening reactions in bicyclo [n.1.0] systems", Journal of the Chemical Society, Chemical Communications, pp. 942, 1992. https://doi.org/10.1039/c39920000942

More joining up of pieces. Stereocontrol in the ring opening of cyclopropenes.

Thursday, July 12th, 2012

Years ago, I was travelling from Cambridge to London on a train. I found myself sitting next to a chemist, and (as chemists do), he scribbled the following on a piece of paper. When I got to work the next day Vera (my student) was unleashed on the problem, and our thoughts were published[1]. That was then.

This is now. I have just finished a post on ring-opening reactions of oxirene, a 4n electron anti-aromatic ring. I was casting around for an example of a calculation done just before the modern Internet era, and happened upon the above. Although this was a mere 20 years ago, much of the detail had faded; I had not thought much about it in the intervening years, but I did recollect that although we had attributed the high stereoselectivity shown above to a stereoelectronic orbital alignment, I was not entirely happy with the interpretation. Put simply, we had relied on a molecular orbital diagram, and this diagram (in resplendent colour in the journal, one of the few being so published at that time, and for no colour charge to boot) was just too complicated. Arguably it was the fixated complexity (I remember at the time that it looked complicated no matter what the viewing angle was) that set me on the road to the use of the Web, and ultimately here to this blog. So I thought a re-analysis using modern algorithms and presentation might help simplify. The newly recalculated transition state (ωB97XD/6-311G(d,p) looks like:

Transition state for ring opening of a cyclopropene. Click for 3D.

  1. The reaction is a 4n (n=1) electron electrocyclic ring opening, and so according to the rules, should proceed with the formation/cleavage of an antarafacial bond. You might think that there are not quite enough substituents to reveal this stereochemistry, but there are if the carbene lone pair is included. So how to add the lone pair?
  2. Well, its coordinates can be computed using the ELF (electron localisation function). The relevant lone pair is ringed in red below. Using (old technology, i.e. a static figure) you may choose to believe me when I argue that this lone pair is above the plane of the forming ring from the perspective shown, whilst the terminus of the bond it forms is to the bottom. This defines an antarafacial component. Well, I might have carefully manipulated the viewing angle to show this. Now, in 2012 rather than 1992, you can load the 3D coordinates by clicking below, and check for yourself!

    Lone pair centroid for the transition state. Click for 3D

  3. What about the stereo-control? Take a look at the angle between the axis of the C-Cl bond (atoms ringed in blue) and the centroid of the carbene lone pair (red). It is about 162°, or almost anti-periplanar. A magic orientation in organic chemistry. Time to attack the orbitals again. Our published diagram looked as below. It shows the HOMO aligning with the LUMO+2 (if your eyes are not distracted by all the other detail).
    But we can now simplify such a complex molecular orbital by using instead a localized version, an NBO. A little explanation is needed. The NBO orbital shown with red/blue phases is antibonding for the C-Cl bond. That with orange/purple is the carbene lone pair. Where orange overlaps with red, we have a positive overlap that stabilises the system. The NBO E2 perturbation energy is around 4.6 kcal/mol. Although this may seem small, it is actually quite large for a through-space interaction of this type. It is this stabilisation (amounting to ~ 1.6 kcal/mol in free energy) that accounts for the high selectivity for the stereoisomer shown above.

    NBO for transition state. Click for 3D.

Well, I think that the passage of 20 years has enabled us to tidy up the origins of the stereoelectronic effect responsible for controlling this reaction, and to produce clearer diagrams which the reader can interactively explore for themselves. It did take 20 years to join things up though!

References

  1. M.S. Baird, J.R. Al Dulayymi, H.S. Rzepa, and V. Thoss, "An unusual example of stereoelectronic control in the ring opening of 3,3-disubstituted 1,2-dichlorocyclopropenes", Journal of the Chemical Society, Chemical Communications, pp. 1323, 1992. https://doi.org/10.1039/c39920001323

Connections in chemistry. Anti-malaria drug ↔ organocatalysis.

Thursday, July 5th, 2012

Back in 1994, we published the crystal structure of the molecule below (X=H), a putative anti-malarial drug called halofantrine. Little did we realise that a whole area of organo catalysis based on a thiourea catalyst with a similar motif would emerge a little later. Here is how the two are connected.

In our original article we described how our interest was sparked by observing the following chiral HPLC behaviour. The two enantiomers of compound 2 (X=Y=Cl) separated nicely on the column. So did the compound where X=Cl, Y=H (4). However, when X=H,Y=Cl specifically (3), all chiral recognition on the column vanished! What was the reason?

As it happens, we had recently acquired our stereoscopic CAChe system, and the structure was loaded into this. After a little while, we noticed that the compound formed a complementary dimer, glued together by C-H…O hydrogen bonds (magenta arrows below). When the H is replaced by Cl, this edge-on dimeric structure is completely destroyed, and is replaced by π-π stacking instead. 

The dimeric structure of Halofantrine. Click for 3D

The significance is that the hydrogen atom specifically antiperiplanar to the electron withdrawing CF3 group was the one forming the C-H…O hydrogen bond (quite a short one as it happens, see 3D above). This despite 7-bonds separating the H-C from the CF3 group. In the article,we speculated on how this effect of acidifying the hydrogen to encourage it to form a hydrogen bond might even be augmented. On historical note, we had made the article available using the then newly accessible World-Wide Web, providing MPEG diagrams corresponding to the structure above. It would be reasonable to claim that this is the very first article in chemistry to have been made so available, dating from mid 1994! If anyone can find an earlier example, do let me know! You might also note the difference between the MPEG movie and the presentation now available above. 

In another part of the world a few years later, Peter Schreiner and his group were exploring organocatalysts based on thiourea (see 10.1021/jo201864e for a recent article) and in 2003 they had discovered remarkable catalytic properties for the system below.

As with us, they speculated that in addition to hydrogen bonds formed to substrates from the N-H groups, these could be augmented by rather weaker secondary interactions to the adjacent C-H bonds; certainly the presence of the CF3 groups was the secret of these catalysts (now quite a family). It is tempting to conclude that both sets of observations are related by the same phenomenon!

I end here by showing a QTAIM analysis of our halofantrine system (see similar analysis for the Pirkle reagent). The key region indicated with magenta arrows above does indeed contain bond critical points (BCPs), with values of ρ(r) ~ 0.045, which is near the top of the range experienced for hydrogen bonds of this type.

QTAIM analysis, showing three bond critical points. Click for 3D.

Connections like this probably permeate chemistry, and all too few of them are actually spotted.

“Text” Books in a (higher) education environment.

Friday, May 18th, 2012

Text books (is this a misnomer, much like “papers” are in journals?) in a higher-educational chemistry environment, I feel, are at a cross-roads. What happens next?

Faced with the ever-increasing costs of course texts, the department where I teach introduced a book-bundle about five years ago. The bundle included all the recommended texts for an appreciable discount over individual purchase. In their first week at Uni, students were encouraged to acquire the bundle. As it happened, I met them for a tutorial shortly after this acquisition. The bundle weighed some 9 kg, and came shrink-wrapped into a strapless plastic sheath, posing a rather slippery and weighty challenge for the student to get back to their residency. A few months later, I asked the students how they were getting on reading their newly acquired texts. You must appreciate that it does take a few months for students to start getting “street-wise” about their uni experience. One savvy student recounted they had learnt that if one did not remove the plastic outer layer from the bundle, it would retain much of its resale value to the next generation of incoming students.

Now, I will not mention the publisher of this particular bundle, but its cost is in the region of £50 per text. And for some students, the 1500 or so pages of each volume remain largely unread. Rarely if ever do I see these texts brought into tutorials, and I expect the margins remain blank, un-annotated with any questions or notes (it affects the resale value if you do that). Which is a stark contrast to how the students nowadays annotate their lecture note hand-outs often (but not invariably) issued to them at the start of a lecture. I also observe that increasingly my tutorials are effectively annotated by the students attending (2-4 pages of notes can be taken during a 50 minute discussion. The unit can be declared as pages, since this is also done on paper).

Despite these trends, pedagogic usage of tablet devices such as Kindles and iPads remains relatively low. It is a chicken-and-egg situation. The aforementioned book bundle is not available for these devices, and if it were, then in the current business model, it would be DRM (digital-rights-management) protected to prevent resale, and would also probably retain (if not exceed) the cost of the printed version. Hardly attractive to a student. The lecture notes we distribute (as printed handouts) do indeed come as PDF versions which can be placed on a mobile tablet, but this advantage alone has not sufficed to promote rapid uptake of tablet here. Few materials are specifically optimised to take advantage of the unique features of a tablet, and so the printed lecture notes are considered acceptable. Perhaps this comes to the core of what such tablets are supposed to be. Are they devices for “content consumption”, or should we also expect them to be capable of “content creation”? Lecture (and tutorial) annotation is of course content creation (or perhaps augmentation). 

I might also take a look at the situation from the point of view of the textbook author. Unless you are a big name, you might expect to redeem about 10% royalties from one of the traditional publishers of academic texts. It might take you a year or so to write it, and you would expect to issue a further edition five years down the line if the book is successful. Two generations ago, every academic might be expected to write at least one book. I suspect that aspect has reduced nowadays; authors can hardly be encouraged to write if they think there is a prospect that the shrink-wrapping might not even be removed! If you are intending to write a text about, lets say stereochemistry, you also have to accept the 2D limitations of a printed book, or the inability to say animate a reaction path.

Where are these thoughts leading? Well, I do have to give an explicit example; Steve Jobs’ vision of the educational text-book, re-invented along the lines of what he famously introduced for music distribution. There, he recognised that the (presumed illegal) sharing of music via download sites that preceded the iTunes store was not a sustainable model. The $.99 download was conspicuously cheaper than the price of a physical music CD (excepting classical music, which did become absurdly cheap in this form), and a compromise on sharing stipulated only on devices owned by you rather than more widely amongst your friends. The same model was introduced for the iBook store. Here, the author of an eBook (I am no longer calling it a textbook) can if they wish retain 70% of whatever income it generates (it can also be free of course). The unit price was a fraction of the traditional paper-based book, low enough that the DRM-imposed inability to resell it was less of an issue.

What are the downsides of moving on from paper?

  1. Well, unlike a paper book which is instantly useable, the reader has to purchase a device. This device can cost more than the book bundle referred to above, although at its cheapest, the device is actually only about half the cost of the book bundle. And one might expect that device to last only 2-4 years before it becomes obsolete.
  2. It can be lost or damaged, although unlike a paper book, the online content can be readily restored at zero cost .
  3. If you purchase an eBook for one (proprietary) device, you cannot transfer it to another such device (say Kindle to iPad or vice versa), although if the content is free, that would not matter.
  4. Authors of such texts will have to retrain themselves to produce ebooks; it is not just a matter of using a standard word processor any more. I suspect writing/imaging/styling/scripting/widgeting (a verb for this collective process is needed; how about to flow?) an ebook takes a lot longer than word processing a text-book.
  5. You might have to consider the ongoing cost of using an ebook. By this I mean the data-plan that you might need in place to download components which are not actually part of the book (see below).

The upsides? Well, rather than my producing a list at this point, you might want to take a look at the first two examples below, both created by Bob Hanson, and think about how such inclusion in an ebook might enhance it:

  1. A device-sensitive page for display (try this out on an iPad or Android tablet; the Kindle might be more of a challenge).
  2. A page for building and minimising a molecular model
  3. This example is included, since it belongs to a chemistry text book, but actually would exist on a mobile device in functional form, if not actually a component of an ebook.

So an ebook becomes an environment where you can download a model from public databases, and annotate it with properties etc. Or you could use your ebook to build a model from scratch, then minimise its (molecular mechanics) energy, to say explore conformational analysis in the context of a chapter on the topic.

Well, at the start I posed the question what happens next? The two above examples give possible answers. An equally interesting question might then be who makes it happen? Will that be the evolutionary role of the traditional publishing houses? Will a new generation of skilful author capable of “flowing” an ebook emerge? Will students instead favour retaining their dependency on paper? Watch this space.

"Text" Books in a (higher) education environment.

Friday, May 18th, 2012

Text books (is this a misnomer, much like “papers” are in journals?) in a higher-educational chemistry environment, I feel, are at a cross-roads. What happens next?

Faced with the ever-increasing costs of course texts, the department where I teach introduced a book-bundle about five years ago. The bundle included all the recommended texts for an appreciable discount over individual purchase. In their first week at Uni, students were encouraged to acquire the bundle. As it happened, I met them for a tutorial shortly after this acquisition. The bundle weighed some 9 kg, and came shrink-wrapped into a strapless plastic sheath, posing a rather slippery and weighty challenge for the student to get back to their residency. A few months later, I asked the students how they were getting on reading their newly acquired texts. You must appreciate that it does take a few months for students to start getting “street-wise” about their uni experience. One savvy student recounted they had learnt that if one did not remove the plastic outer layer from the bundle, it would retain much of its resale value to the next generation of incoming students.

Now, I will not mention the publisher of this particular bundle, but its cost is in the region of £50 per text. And for some students, the 1500 or so pages of each volume remain largely unread. Rarely if ever do I see these texts brought into tutorials, and I expect the margins remain blank, un-annotated with any questions or notes (it affects the resale value if you do that). Which is a stark contrast to how the students nowadays annotate their lecture note hand-outs often (but not invariably) issued to them at the start of a lecture. I also observe that increasingly my tutorials are effectively annotated by the students attending (2-4 pages of notes can be taken during a 50 minute discussion. The unit can be declared as pages, since this is also done on paper).

Despite these trends, pedagogic usage of tablet devices such as Kindles and iPads remains relatively low. It is a chicken-and-egg situation. The aforementioned book bundle is not available for these devices, and if it were, then in the current business model, it would be DRM (digital-rights-management) protected to prevent resale, and would also probably retain (if not exceed) the cost of the printed version. Hardly attractive to a student. The lecture notes we distribute (as printed handouts) do indeed come as PDF versions which can be placed on a mobile tablet, but this advantage alone has not sufficed to promote rapid uptake of tablet here. Few materials are specifically optimised to take advantage of the unique features of a tablet, and so the printed lecture notes are considered acceptable. Perhaps this comes to the core of what such tablets are supposed to be. Are they devices for “content consumption”, or should we also expect them to be capable of “content creation”? Lecture (and tutorial) annotation is of course content creation (or perhaps augmentation). 

I might also take a look at the situation from the point of view of the textbook author. Unless you are a big name, you might expect to redeem about 10% royalties from one of the traditional publishers of academic texts. It might take you a year or so to write it, and you would expect to issue a further edition five years down the line if the book is successful. Two generations ago, every academic might be expected to write at least one book. I suspect that aspect has reduced nowadays; authors can hardly be encouraged to write if they think there is a prospect that the shrink-wrapping might not even be removed! If you are intending to write a text about, lets say stereochemistry, you also have to accept the 2D limitations of a printed book, or the inability to say animate a reaction path.

Where are these thoughts leading? Well, I do have to give an explicit example; Steve Jobs’ vision of the educational text-book, re-invented along the lines of what he famously introduced for music distribution. There, he recognised that the (presumed illegal) sharing of music via download sites that preceded the iTunes store was not a sustainable model. The $.99 download was conspicuously cheaper than the price of a physical music CD (excepting classical music, which did become absurdly cheap in this form), and a compromise on sharing stipulated only on devices owned by you rather than more widely amongst your friends. The same model was introduced for the iBook store. Here, the author of an eBook (I am no longer calling it a textbook) can if they wish retain 70% of whatever income it generates (it can also be free of course). The unit price was a fraction of the traditional paper-based book, low enough that the DRM-imposed inability to resell it was less of an issue.

What are the downsides of moving on from paper?

  1. Well, unlike a paper book which is instantly useable, the reader has to purchase a device. This device can cost more than the book bundle referred to above, although at its cheapest, the device is actually only about half the cost of the book bundle. And one might expect that device to last only 2-4 years before it becomes obsolete.
  2. It can be lost or damaged, although unlike a paper book, the online content can be readily restored at zero cost .
  3. If you purchase an eBook for one (proprietary) device, you cannot transfer it to another such device (say Kindle to iPad or vice versa), although if the content is free, that would not matter.
  4. Authors of such texts will have to retrain themselves to produce ebooks; it is not just a matter of using a standard word processor any more. I suspect writing/imaging/styling/scripting/widgeting (a verb for this collective process is needed; how about to flow?) an ebook takes a lot longer than word processing a text-book.
  5. You might have to consider the ongoing cost of using an ebook. By this I mean the data-plan that you might need in place to download components which are not actually part of the book (see below).

The upsides? Well, rather than my producing a list at this point, you might want to take a look at the first two examples below, both created by Bob Hanson, and think about how such inclusion in an ebook might enhance it:

  1. A device-sensitive page for display (try this out on an iPad or Android tablet; the Kindle might be more of a challenge).
  2. A page for building and minimising a molecular model
  3. This example is included, since it belongs to a chemistry text book, but actually would exist on a mobile device in functional form, if not actually a component of an ebook.

So an ebook becomes an environment where you can download a model from public databases, and annotate it with properties etc. Or you could use your ebook to build a model from scratch, then minimise its (molecular mechanics) energy, to say explore conformational analysis in the context of a chapter on the topic.

Well, at the start I posed the question what happens next? The two above examples give possible answers. An equally interesting question might then be who makes it happen? Will that be the evolutionary role of the traditional publishing houses? Will a new generation of skilful author capable of “flowing” an ebook emerge? Will students instead favour retaining their dependency on paper? Watch this space.

The blog post as a scientific article: citation management

Monday, February 27th, 2012

Sometimes, as a break from describing chemistry, I take to describing the (chemical/scientific) creations behind the (WordPress) blog system. It is fascinating how there do seem increasing signs of convergence between the blog post and the journal article. Perhaps prompted by transclusion of tools such as Jmol and LaTex into Wikis and blogs, I list the following interesting developments in both genres.

  1. Improved equation display for Chemistry Central articles using MathJax  This is a way of rendering equations in the pages of both a Blog  and a journal article. This blog is now so empowered, although in fact I employ few equations on these pages.
  2. Citation management and meta-data gathering. This blog plugin takes the form of a numbered citation[1] as here, and which converts the specified DOI to a listing at the bottom of the post in the manner of a conventional scientific article (conventional document citation managers such as EndNote do this as well). It is actually much more than that, since the plugin automatically uses the CrossRef API to retrieve metadata for the quoted Digital Object Identifier (DOI), thus enhancing the metadata associated with the post and its discoverability. Dublin-Core is already present in the post as well as FOAF output, and I occasionally trawl using the Calais archive tagger (although this is not very good at finding chemistry tags).
  3. I installed Chemicalize a year or so ago. This scans the blog text for chemical terms, and adds a hover/popup image of structures it identifies (it is also responsible for the occasional doubled Gravatar image you may see here! Apologies!).
  4. I noted the addition of ChemDoodle to this blog previously. There may be newcomers which I need to track down to this type of non-Java based molecular rendering.

So you can see that building a chemical/science-savvy blog can be great fun! It is also significant that science/chemistry publishers are starting to do this. I bring only one example to your attention, although this introduces a host of other issues that perhaps I should leave for another post.

References

  1. H.S. Rzepa, "The past, present and future of Scientific discourse", Journal of Cheminformatics, vol. 3, 2011. https://doi.org/10.1186/1758-2946-3-46

Mobile-friendly solutions for viewing (WordPress) Blogs with embedded 3D molecular coordinates.

Sunday, December 11th, 2011

My very first post on this blog, in 2008, was to describe how Jmol could be used to illustrate chemical themes by adding 3D models to posts. Many of my subsequent efforts have indeed invoked Jmol. I thought I might review progress since then, with a particular focus on using the new generations of mobile device that have subsequently emerged.

  1. Jmol is based on Java, which has been adopted by Google’s Android mobile operating system, but not by Apple’s IOS.
    • An Android version of Jmol was recently released, to rave reviews! I do not know however whether the Jmol on these posts can be viewed via Android. Perhaps someone can post a comment here on that aspect?
    • HP has just announced it will open source WebOS, but it seems Java will not be supported so probably no Jmol there then.
    • Windows 8 Mobile (Metro) also seems unlikely to support it either.
  2. Apple has been prominent in touting HTML5 as a Java replacement. In practice, this means that any molecular viewer would be based on a combination of Javascript and WebGL technologies.  Whereas Java is a compiled language, Javascript is interpreted on-the-fly by the browser. Its viability has been greatly increased by very large improvements in the speeds that browsers interpret Javascript nowadays, but this speed is unlikely to ever match that of Java. The real issue is whether that matters. The other difference is that whereas a signed Java applet allows data to escape from the security Sandbox (and into eg a file system), Javascript is likely to be much more restrictive. These two properties mean that Javascript/HTML5 implementations make a lot of use of server-side functionality; in other words a lot of bytes may have to flow between server and mobile device to achieve a desired effect (and the user may have to pay for these bytes via their data plan).
    • One early adopter of the Javascript/WebGL HTML5 model has been ChemDoodle, which I illustrated on this blog about a year ago. I have tidied up the recipe for invoking it since then, and this is given below for anyone interested in implementing it. As of this moment, one essential component, WebGL, is only available to developers of Apple’s IOS system, but I expect this to become generally available soon. When that happens, ChemDoodle components on this blog will start working.
    • A new entrant is GLmol, an open source molecular viewer for Apple’s IOS. A version is also available for Android. I may give a try at embedding this into the blog.
It seems that the 3D molecular viewing options are certainly increasing, but at the moment there is some uncertainty in performance, compatibility and the ability to extract molecular data from the “sandboxes“. This last comment relates to the re-usability of data, which I particularly value.

Although this post has focussed on embedding and rendering molecular data into a blog post, the same principle in fact applies to other expressions. Perhaps the most interesting is the epub3 e-book format, which also supports Javascript/HTML5, and which seems likely to be adopted for future interactive e-books. Indeed, it should be possible to fully convert an interactive blog created using this technology to a e-book with relatively little effort. I have also illustrated here how lecture notes can be so converted.

If you get the impression that the task of a modern communicator of science and chemistry is not merely that of penning well chosen words to describe their topic, but of having to program their effort, then you may not be mistaken.


Procedure for creating a 3D model in a WordPress blog post using ChemDoodle.

  1. As administrator, go to
    wp-content/themes/default

    (or whatever theme you use) and in the file header.php, paste the following

    <link rel="stylesheet" href="../ChemDoodle/ChemDoodleWeb.css" type="text/css">
      <script type="text/javascript" src="../ChemDoodle/ChemDoodleWeb-libs.js"></script>
      <script type="text/javascript" src="../ChemDoodle/ChemDoodleWeb.js"></script>
       <script type="text/javascript" language="JavaScript">
      function httpGet(theUrl)
       {var xmlHttp = null;
       xmlHttp = new XMLHttpRequest();
       xmlHttp.open( "GET", theUrl, false );
       xmlHttp.send( );
       return xmlHttp.responseText;}
       </script>
  2. From here, get the ChemDoodle components and put them into the directory immediately above the WordPress installation. They are there referenced by the path ../ChemDoodle as in the script above. You can put the folder elsewhere if you modify the path in the script accordingly.
  3. Invoke an instance of a molecule thus;
    <script type="text/javascript">// <![CDATA[
    var transformBallAndStick2 = new ChemDoodle.TransformCanvas3D('transformBallAndStick2', 190, 190);transformBallAndStick2.specs.set3DRepresentation('Ball and Stick');         transformBallAndStick2.specs.backgroundColor = 'white';var molFile = httpGet( 'wp-content/uploads/2011/12/85-trans.mol' );var molecule = ChemDoodle.readMOL(molFile, 2);         transformBallAndStick2.loadMolecule(molecule);
    // ]]></script>
  4. The key requirement is that the body of the script (starting with var) must not contain any line breaks; it must be a single wide line. So that you can see the whole line here, I show it in wrapped form (which you must not use);
    var transformBallAndStick2 = new
    ChemDoodle.TransformCanvas3D('
    transformBallAndStick2', 190,
    190);transformBallAndStick2.specs.
    set3DRepresentation('Ball and Stick');
    transformBallAndStick2.specs.
    backgroundColor = 'white';var molFile =
    httpGet('wp-content/uploads/2011/12/85-trans.mol');
    var molecule =ChemDoodle.readMOL(molFile, 2);
    transformBallAndStick2.loadMolecule(molecule);
  5. The key data will be located in the path wp-content/uploads/2011/12/85-trans.mol which you should upload. Note that only the MDL molfile is supported in this mode (which makes no server-side requests). One can use eg CML, but this must be as a server request.
  6. If you want multiple instances, then you must change each occurrence of the name of the variable, e.g. transformBallAndStick2 to be unique for each.
  7. If you want to annotate the resulting display, server-side requests are again needed. I do not illustrate these here, but there is an excellent tutorial.