FortranFormat is an open source Java library for parsing input and formatting output using Fortran Format specification. FortranFormat is written by Kevin Theisen and adheres to the coding standards and style of Java 1.5, complete with JavaDoc commenting. FortranFormat is very useful for those wishing to port Fortran code to Java, especially in academic environments, and also for parsing and generating files that conform to strict column widths.


We’ve been hard at work on ChemDoodle, and there are some really nice surprises for our customers in the next update. One addition is the support for a handful of new chemical file formats. During development, we realized that some chemical file formats actually required an old protocol called Fortran Format. Fortran Format is a set of rules for converting data to text and vice versa. Since I could not find a credible Java library for utilizing Fortran Format, I wrote one myself and aptly named it FortranFormat. It turns out that Fortran Format is very useful for parsing many chemical file formats that adhere to strict column lengths, and it is a very powerful addition to any Java parser’s library.

Since I completed a thorough Java Fortran Format library (with minor exclusions), I am happy to release the source freely under the Berkeley Software Distribution (BSD) license. The code is written to work with Java 1.5+ and it adheres to Java 1.5 coding standard and style (sans enums). It is fully commented with JavaDoc.

I’m sure many academic groups will quickly find use for this library, and I will also be putting up a story shortly to demonstrate how to use FortranFormat to read and write Standard Molecular Data (SMD) and Protein Data Bank (PDB) files.

To learn more about FortranFormat and to download the source, click the following link: FortranFormat

Please let us know if the library was useful to you!