Robert D. Cowan's Atomic Structure Code
This webpage serves as a repository for Robert D. Cowan's atomic structure codes.
These codes are described in detail in his text "The Theory of Atomic Structure and Spectra".
In the past his codes have been publicly available from the T-4 Atomic and Optical Theory group at LANL at this ftp address: ftp://aphysics.lanl.gov/pub/cowan/ where versions as recent as 2005 can be found.
I have been given permission by Robert Cowan to host his codes (and any updates he cares to send me) on this website as a service to the community. This is partly because he can no longer easily update the codes on the T-4 site due to security reasons.
If you want to download, install and compile the Cowan code then download this file which has everything on this page: Cowan.tgz
- last major update November 8th 2009
- last minor update December 30th 2009
Robert Cowan's atomic structure codes
The fortran source codes are as follows:
- A short description of the codes from the author
- readme - last updated November 2002
- RCN / RCN2 - Computation of Atomic Radial Wavefunctions
- RCG - Calculation of Atomic Energy Levels and Spectra
- RCG - Mod 11.5.4 - Dated: February 2007
- Documentation by the author - (Revised February 2005) - pdf - txt
- RCE - LEAST-SQUARES FITTING OF ATOMIC ENERGY LEVELS
The copyright owner of the codes obviously lies with the authors, primarily Robert Cowan.
Downloading the codes
For your convenience a single gzipped tar file with all of the source code (all versions), patches (see below) and original documentation from the author is CowanCode.tgz
Compiling the codes
- A compiler that can be used is the Intel fortran compiler which is freely available for non-commercial academic use on Linux, and the patches (see below) will allow for compilation with no warning errors.
- (Unfortunately g77 is no longer available on modern Linux distributions, and gfortran will not compile the code. Where g77 is available on older systems then g77 can be used also to compile the code.)
- Mostly the patches involve alignment of common blocks. Patches have been made for the latest versions addressing this issue to enable it to compile. These can be found in patches and are listed in this directory as "fixes".
- If you download the .tgz above then this can be unpacked on a Linux/unix machine by typing "tar zxvf CowanCode.tgz" and then:
- Edit the "makefile" and change the DISTDIR variable to where you want the program to be installed.
- Change the "FC" variable to either "g77", "ifort" or the name of your compiler.
- Type "make" to compile and "make install" to install to your selected directory if compilation is successful.
Other input files
- All other files are found locally here in the LANL directory and are the same as those on ftp://aphysics.lanl.gov/pub/cowan/ except where noted to the left.
- A copy of this directory is included in CowanCode.tgz
- It should be noted though that the most recent versions, February 2007, of rcg.f has never appeared on the aphysics.lanl.gov ftp site.
- An archive of all earlier versions of these codes available to me is also found here if you browse this directory.
- This archive of older versions may allow those people who have made their own modications to older versions to reintegrate those back into the more recent main version.
- If you have any earlier versions than these listed here then please pass them on.
For your convenience a single gzipped tar file with all of the source code (all versions) and documentation is CowanCode.tgz
- Some earlier versions of the documentation by the author can be found here if you browse this directory. The most recent versions are those listed to the left.
- Out of date LaTeX source versions of the 1993 manuals are available here and also as a gzipped tarred download.
- These LaTeX versions can produce .ps, .pdf files or html files for your convenience with most LaTeX installations.
- (Perhaps someone could update the LaTeX source to the current versions of the documentation from the author and I will update them here.)
- For your convenience a single gzipped tar file with all of the documentation is CowanDocumentation.tgz
- CowanCode.tgz - updated November 8th 2009 (fixed Makefiles)
- CowanDocumentation.tgz -updated Feb 8th 2008
- CowanScripts.tgz - updated
November 8th 2009 (fixed Makefiles)
- CowanUtilities.tgz - updated November 8th 2009 (fixed Makefiles)
- All of the above - bundled into one file: Cowan.tgz - updated November 8th 2009
- CAVEAT: Unfortunately, I no longer routinely use
these codes for my present research and cannot aid with complex
compilation issues or compilation errors.
- I am happy to try to answer other questions
Example atomic calculations
A number of example calculations are given here:
- K5+ (K VI) - optical spectrum - in36, in2, in2misc.
- Cl-, Br- and I-like 5p spectra of Ar, Kr, Xe and Cs - in36.
- Ga2+ (Ga III) - 3d absorption spectrum - ga3, ga3.in2.
- Iodine (I 1) - 4d9 5p6 2D3/2 autoionisation calculation - io1a_d32, io1a_d32.in2.
If you would like to provide an example calculation to be included here then please let me (Cormac McGuinness) know and I will be happy to include these here.
Unix scripts for running code
- Several convenient unix Bash shell scripts for running a batch calculation are given here mostly written in UCD between 1993-1999. They will work on Windows provide you install Cygwin.
- A description of how to use these shell scripts - in particular cowan.sh - is given here.
- CowanScripts.tgz - updated November 8th 2009 (fixed Makefiles)
Utilities for post-processing
- A number of utilities for post-processing the output of RCG to quickly generate plots by Unix/Linux utilities are available here mostly written in Fortran again in UCD between 1993 and 1999.
- These utilities
(and the shell scripts above) are described
here. Thanks to Paul
Kampen in particular for parts of the
- Some patches
to modify the output of the RCG code are necessary for these (in
shrink) to run. These patches are the ones named "mk-...ucd..."
- CowanUtilities.tgz - updated November 8th 2009 (fixed Makefiles)
Alternate versions of Cowans code:
Several adapted versions exist both for atomic structure and for atomic multiplet calculations in condensed matter physics.
If you know of any other adaptation or version which should be listed here then please let me (Cormac McGuinness) know.
Laboratory, University College Dublin - online manual RCN, RCG ,
files and local
guide - apart from the utilities (available and described at this
site) this code
is largely unchanged from that generally available.
at Weizmann Institute, Israel - a nice toy interface to allow the
calculation of some radial wavefunctions.
- Laboratory of Atomic Spectroscopy, Troitsk, Russia - PC (DOS) version of Cowan code by A. Kramida - This version of the code has undergone several changes including sparse matrices (since inorporated in main code) and enhanced level designations and autoionization output.
- University of HamburgCowan code and photoionisation code written by >Michael Martins - This version implements Fano and the extended Fano (Mies) theory utilising the Cowan code for complete interacting photoionisation cross section and dichroism calculations and incorporates several additional programs. The link at FU-Berlin no longer works.
- Theo Tholehelped adapt Cowan's RCN/RCG code in order to incorporate Butlers point group symmetry methods for ligand/crystal field multiplet calculations. Later additions by Akio Kotani, H. Ogasawara and K. Okada enabled charge transfer calculations. This is now the basis for the atomic multiplet method used to calculate x-ray absorption (XAS), x-ray photoemission (PES), x-ray magnetic circular dichroism (XMCD), resonant inelastic x-ray scattering (RIXS), and resonant photoemission (RPES) in solids/molecules.
- TT-Multiplets - Currently maintained by Frank deGroot, some reviews of the methods are given here and a short course as recently delivered at the Swiss Light Source is given here. A book on the "Core Level Spectroscopy of Solids" by Akio Kotani and Frank de Groot is due in 2007. This version appears to be based on Cowan's RCN mod 32 and RCG mod 10 (or early 11) dating from between 1984 and 1987.
- CTM4XAS - in essence this is Frank de Groots version of the T-Multiplets code above, where it has been packaged to run with a very convenient graphical front end to allow for the simulation of the transition metal 2p and 3p XAS, XPS and XMCD spectra using atomic multiplets.
- MISSING - Currently maintained by Claudia Dallera and Riccardo Gusmeroli. It is similar to the above but is a Windows only implementation of the same atomic multiplets package but with a nice interface and incorporating an advanced x-ray emission utility (TFLUOR) written and made available by T. Thole, C. M. Bertoni and P. Ferriani. The version available here appears to be based on a recent RCN mod 36 and RCG mod 11 dating after 1993.