## To-ing and fro-ing in Linux-land

August 24th, 2007

I work in a mixed operating system environment: Linux, Windows, Solaris, Mac-OS X… you name it, we’ve got it and I am expected to be able to at least get by in all of them. This helps make life interesting but occasionally weird things can happen.

Some time ago I was helping a student who was using a commercial quantum chemistry package called Gaussian. She had created some input scripts on her windows machine and needed to transfer them over to a linux Beowulf cluster in order to crunch the numbers. They worked on her windows machine but as soon as we did the transfer to the linux machine, the program complained about the input file – saying that there were syntax errors.

The solution to her woes was very simple – a linux command called dos2unix. Quoting from the dos2unix manpage – “DOS text files traditionally have CR/LF (carriage return/line feed) pairs as their new line delimiters while Unix text files traditionally have LFs (line feeds) to terminate each line.”

Obviously the linux version of the Gaussian code did not like all of those carriage returns so all we needed to do was type

dos2unix filename.inp

on the linux machine and we were good to go. Just recently I found myself needing this command again but it was not installed on my Ubuntu machine and the obvious ‘apt-get install dos2unix‘ did not work. It turns out that the package you need is tofrodos so run ‘apt-get install tofrodos‘ and you should be good to too and fro as much as you please.

## Wolfram Demonstrations Project

August 21st, 2007

Wolfram’s Mathematica – some people love it, some people loath it – I am definitely one of the former. I have used the package since 2000 when it was at version 4.1 (it’s now at version 6.01) and found it invaluable in the early stages of my PhD. The first time I used it I reproduced around 5 days worth of hand-written symbolic calculations in about 10 minutes – and that included the time it took me to learn how to get Mathematica to do symbolic calculus.

Version 6 of Mathematica came out recently and it was a piece of software I was very excited about (and I don’t often get overly excited about software that isn’t open-source). I had been part of the beta testing program for several months and there was a feature that I had fallen in love with – the ability to make simple but powerful little ‘applets’ using a single command called Manipulate.

## Mimetex

August 20th, 2007

Just as every walk (including random ones) must begin with a first step – every blog must have a first post. For my first post I thought I would mention the rather wonderful program that will allow me to use Latex to write equations on here – Mimetex.

The first solution that my web guru and I attempted to use was something called LatexRenderer but you need to have Latex installed on your web server to use it and for various reasons this was not possible for us. Mimetex, however, does not require Latex to be installed on your server so we gave that a go.

Once you have installed and activated the Mimetex plugin for wordpress all you need to do is put your Latex code between the two tags [ tex][ /tex] (without spaces) and it will be automatically rendered as an image. This makes it very easy to write equations such as

The output from Mimetex is not quite as nice as that of LatexRenderer and it only supports a subset of Latex but the ease of installation more than makes up for this.