Saturday 11 August 2007

Move over FORTRAN: Python makes inroads into computational chemistry

Old-school dyed-in-the-wool computational chemists like to use FORTRAN and C a lot, argue about which is better, and create programs whose names are written all in CAPITALS and will only compile on an SGI-IRIX. Although you gotta love them for trying, it's good to see that times are a-changing.

Looking at "Early View" for Wiley's Journal of Computational Chemistry, you will see two "Software News and Updates": pyVib and pyFrag. Yes, you've guessed it - they're both Python programs. And if that wasn't enough, I might as well announce here that a paper on the Python library cclib has just been accepted by the same journal.

It's likely that at least some of this interest in Python for computational chemistry is due to PyQuante, developed by Rick Muller. Who'd have believed that a scripting language could be used to carry out quantum chemical calculations? Of course, what people don't realise is that Python has an extension library for efficient numerical computation. Or maybe they're starting to realise it...

4 comments:

Egon Willighagen said...

Both just seem to be a wrapper around other code. This is important, sure, but it makes more difficult to get an overview of what is available in which programming language.

Noel O'Boyle said...

The PyVib2 website states that it's pure Python. It does however, read various matrices from the output file of Gaussian (for example) to use in calculations.

The description of PyFrag on its website implies that it's a driver of ADF, i.e. it sets the jobs up, and then extracts the results.

Jeff said...

The utility of Python in scientific computation, and more specifically, quantum chemistry, has long been recognized by the developers of NWChem, who integrated Python from the beginning.

It's important to distinguish the purpose of Python from C or Fortran. Python is not, by most standards, a high-performance language, but it is a high-productivity language. As scientific codes become more complex, one must pursue a multiparadigm language framework, whether it be Python & Fortran or C & C++, to maximize both productivity and performance.

Finally, Fortran does not require one to use all caps nor is it a language issue that a program only compiles on SGI-IRIX. That is the fault of the developer and his or her shortsightedness.

Noel O'Boyle said...

Of course I agree. I am just trying to shake computational chemists up a bit and get them to consider the benefits of languagues that are not traditionally associated with scientific computing.

Thanks for the pointer to NWChem.