Showing posts with label fun. Show all posts
Showing posts with label fun. Show all posts

Wednesday, October 12, 2011

Wordclouds of Chemistry Texts

After stumbling across a post on One R Tip A Day about building Wordclouds using R, I thought I would try it out myself.  I have been subjecting my undergrad chemistry students to R, so this seemed like a good opportunity to use R for a little fun.  I decided that it would be interesting to look at some old chemistry books.  I picked three works from Project Gutenberg:
  • The Sceptical Chymist (1661) by Robert Boyle
  • Elements of Chemistry (1789) by Antoine Lavoisier
  • An Elementary Study of Chemistry (1905)
    • by William McPherson and William Edwards Henderson

The Sceptical Chymist (1661) Robert Boyle
Elements of Chemistry (1789) Antoine Lavoisier
An Elementary Study of Chemistry (1905) McPherson and Henderson

It's no surprise that Boyle's wordcloud is so different from the other two.  The influence of Alchemy was still quite strong in 1661, and Boyle's vocabulary reflects this.  It is perhaps more interesting to see how similar Lavoisier is to McPherson and Henderson despite their being 116 years apart.

Robert Boyle and Antoine Lavoisier were both instrumental in developing modern Chemistry, William McPherson was a chemistry professor at Ohio State University and one of the chemistry buildings there is named for him.

I adapted Paolo's code from  Wordclouds using R. You will need the R packages tm, wordcloud and RColorBrewer. I downloaded the books as plain text from Project Gutenberg and saved them in a directory called chemtxt.


library(tm)
library(wordcloud)
library(RColorBrewer)

#reads all files in the directory chemtxt
chemtexts <- Corpus(DirSource("chemtxt/")) 



book <- Corpus(VectorSource(chemtexts[["boyle.txt"]])) 
book <- tm_map(book, removePunctuation) 
book <- tm_map(book, tolower) 
book <- tm_map(book, stripWhitespace) 
book <- tm_map(book, function(x) removeWords(x, stopwords("english"))) 


# format as a dataframe with words and their frequencies 
book.tdm <- TermDocumentMatrix(book) 
book.m <- as.matrix(book.tdm) 
book.v <- sort(rowSums(book.m),decreasing=TRUE) 
book.d <- data.frame(word = names(book.v),freq=book.v) 


#color scheme 
pal2 <- brewer.pal(8,"Dark2") 


# uncomment this line to save wordcloud as an image file #png("wordcloud_boyle.png", width=600,height=600) 


#I picked just the 60 most frequent words 
# to show ALL the words in the wordcloud use max.words=Inf wordcloud(book.d$word,book.d$freq, scale=c(8,.2),min.freq=3,max.words=60, random.order=FALSE, rot.per=.15, colors=pal2) 
dev.off()







Enhanced by Zemanta

Wednesday, September 7, 2011

What is a Bridgehead Carbon anyway?

It's the start of a new school year and I am going to try to post a little more regularly.  Since it has been a while since I posted on a regular basis, I thought it would be a good idea to re-introduce this blog.

What is a Bridgehead Carbon anyway?  I teach undergraduate chemistry and my main area of interest is Organic Chemistry.  I chose the name "Bridgehead Carbons" partly because I have always liked the look of bicyclic compounds like norbornane.  You can think of Norbornane as being a cyclohexane (in pink) with a CH2 unit (in black)that acts as a bridge connecting the top and the bottom of the pink ring.  The carbons that connect the "main ring" to the "bridge" are the Bridgehead Carbons.



Another reason for choosing this name is that Bridgehead Carbons serve to connect different rings within the same molecule, and I intend to write about a variety of topics that I none the less feel are connected to my experience with chemistry and teaching.

So, what is this blog all about?  Stuff that interests me as a chemistry teacher, especially organic and bio-organic chemistry, cheminformatics, things that might be helpful to college students in general, and anything else that strikes my fancy.

Enhanced by Zemanta

Science in the Library winner

Louise Peck posted this on the CHEMINF-L list serve
The Royal Society of Chemistry's RSC Publishing division recently ran an annual photograph competition with the theme 'Science in the Library'. 
The competition prize was that the winning photograph would be placed on the front cover of the 2012 RSC Publishing Catalogue and was voted for by over 115 RSC staff and the RSC Library Advisory Board.
image from RSCPublishing Blogs Home 
And the winner is Johns Hopkins University in Baltimore, MD,  home of the first PhD program in chemistry in the United States which was started by Ira Remsen if I recall correctly.

You can download a copy of the 2012 RSC Publishing Catalogue from their website.  All 17 libraries that were entered in the contest are shown on pages 2-5 of the catalogue.  See if you can guess which one I have visited.

Sunday, September 5, 2010

How to safely put your hand into really scary liquids - fun with the Leidenfrost effect

vector version of this imageImage via Wikipedia


Check out these two videos demonstrating the Leidenfrost effect.  If you have ever seen drops of water bounce around on a hot skillet, that's the Leidenfrost effect.



First Theo Gray puts his hand into liquid Nitrogen.  Liquid Nitrogen is really cold:  −196 °C, −321 °F.  You have probably seen demonstrations where something like a rubber ball or a rose is dipped in Liquid Nitrogen - on freezing at such a low temp most things will shatter if dropped or hit with a hammer.

Theo Gray dips his hand into a large container of liquid Nitrogen without developing a permanent case of frost bite by taking advantage of the Leidenfrost Effect.  Since his hand is much warmer than the liquid nitrogen, a very thin layer of gaseous nitrogen forms and acts as a protective barrier between the bulk liquid nitrogen and the surface of his hand.



Adam and Jamie demonstrated the same effect with molten lead on an episode of Mythbusters.  This is kind of the opposite of the liquid nitrogen case - instead of using an extremely cold liquid they are using a very hot liquid.  Lead melts at 621 °F, but they actually did the experiment at about 800 °F.

To be protected by the Leidenfrost effect they needed a thin layer of gas between their hands and the lead, so they dipped their hands in water and shook off the excess before putting their hands into the liquid lead.  The small amount of water on their hands vaporized to provide the thin, protective layer of gas between their skin and the liquid lead.  The fun starts about 2 minutes into the clip.



It goes without saying - making a mistake when doing this will have severe consequences. Don't try this at home.

You can safely stick your hand in liquid nitrogen...but you probably shouldn't | IO9.com

Sunday, August 1, 2010

The Chemistry of Cthulhu?


I write like
H. P. Lovecraft
I Write Like by Mémoires, Mac journal software. Analyze your writing!

Cover of the pulp magazine Weird Tales (Octobe...

I haven't posted in a while - is this the reason?  
Was I tottering on the brink of cosmic horrors beyond man's power to hear?  

I suppose that some people might say of Organic Chemistry that 
... there is no language for such abysms of shrieking and immemorial lunacy, such eldrich contradictions of all matter, force, and cosmic order.

Image via Wikipedia

Enhanced by Zemanta

Tuesday, May 4, 2010

Thinking about Simplicity

Harvard Organic Chemistry professor George Whitesides takes a stab at defining "simplicity." Here's a wonderful, thoughtful talk for the end of the school year.

Monday, February 8, 2010

Top 30 Science Blogs at Times Online - Eureka Zone

The Eureka Zone science blog at the NY Times has a list of their top 30 science blogs.  If you are looking for science reading this is a great place to start.  I only wish there was a Chemistry blog or two on their list.

Times Online - Eureka Zone: Eureka's Top 30 Science Blogs

Friday, February 5, 2010

George Whitesides Discusses Designing a "Lab on a Stamp"




This talk is listed at the Ted.com site as "A Lab the Size of a Postage Stamp," but it should really be "A ON a Postage Stamp."  He talks about the ingenious way his group has designed "devices" for medical diagnostics from paper.  This makes it very inexpensive as well as easily disposable - no sharps or bio-waste to worry about, you can just burn the device when you are done.

George Whitesides is an Organic Chemist from Harvard - I would love to hear him talk about his work on Self-Assembly, but this is pretty cool too.  To quote from his Bio at Ted:
He's co-founded a nonprofit called Diagnostics for All that aims to provide dirt-cheap diagnostic devices, to provide healthcare in a world where cost is everything.
While sharing some of his experience, he also has some interesting observations of the nature of our society, given that the cost of healthcare has been such a topic of discussion lately.

Friday, December 25, 2009

Thursday, December 24, 2009

Atomic Cookies

I've been away for a while.  Here's a little treat for the holidays:


Courtesy of Not So Humble Pie, a cooking blog that has been posting recipes for science themed treats recently.
Via Not So Humble Pie: Science Cookies: Atom

Sunday, November 1, 2009

Guitar Duet with only One Guitar



This looks a little awkward, but the amazing thing is that some times his left hand is fretting the strings that she is playing, and she is fretting the strings that he is playing.  When I play, both hands are working in synch - I would think it would be hard to NOT have both hands playing the same strings.

via Neatorama

Saturday, October 17, 2009

Drug Microscopy from the Wellcome Image Awards


Image: Annie Cavanagh and Dave McCarthy

Cool image of polymer-coated drug particles taken with an electron microscope. It looks like some sort of modern art piece.  Originally in black and white, the color was added later: the drug is orange and the polymer blue.  From this year's Wellcome Image Awards.

According to judging panel member Catherine Draycotte:
"One of the reasons this image stood out as extraordinary is because it doesn't look like a natural image. It doesn't look as though it could possibly come from a microscope - it looks as though it must be computer-generated.

"This is because the particles - and those within them - are so smooth: they are artificial and have virtually no texture. The image really shows what technology can do in targeting drugs to specific purposes. This system is designed to delay the release of the drug that is contained in the smaller particles until it reaches the large intestine, where it will treat inflammatory bowel disease."

Wellcome Image Awards 2009 | Winners' gallery | Scientific and medical images

Tuesday, September 29, 2009

Tabla Periodica de los Elementos

Ever wondered what the Periodic Table would look like in a language other than English? The Chemistry site at About.com has one in Spanish. Look for the link to the PDF version underneath if you want a nice copy to print. It even includes the newly named element 112 Copernicio (Cp)


Tabla Periodica de los Elementos

Thursday, September 17, 2009

Amazing Molecule Movie



Cool movie showing some of the things computational chemists do by Jan Jensen and posted on his blog, Molecular Modeling Basics.