Siegel der Universität

Universität zu Köln
Mathematisch-Naturwissenschaftliche Fakultät
Fachgruppe Physik

Peter Schilke's Projects

old myXCLASS for CLASS public home page

Printer-friendly versionPDF version

old myXCLASS for CLASS


This version is no longer actively maintained, this includes the catalog.  It is recommended to use the CASA version of XCLASS instead, which is available from



Well, this release has a number of bug fixes and a number of new features.  The private catalog system is changed (see below) and also the dust opacity behavior.  Here's an excerpt from the help file:

          MOD\MODSOURCE [telescope_size sim_width] [/N_H N_H BETA_DUST KAPPA_1300]

    Produces a synthetic spectrum of a source, according to the parameters
    given in READMOLS, using the list of molecules produced by LINELIST -
    i.e. the masks defined by LIMITS apply. The telescope size is used to
    calculate the beam filling factor (using the source sizes in the input
    file), the default is 10.4m (CSO).  The default spectral resolution is 1
    MHz, it can be changed by provinding the sim_width parameter, units are
    MHz. The result is multiplied by exp(-tau_d) to emulate the Riccardo
    effect. Up to five components can be defined. Gaussian profiles are
    adopted by default, unless the option /LORENTZIAN is used.

    The tau_d is calculated using the following equation program segment:

    tau_d = kappa_1300*(freq/230000)**beta_dust * N_H

    with defaults of kappa_1300 = 0.3095 and beta_dust = 1.78 (corresponding to
    Ossenkopf & Henning grains without ice mantles)

    T_back etc. can also be given per component in the input file.  If /N_H is given
    with an argument, the command line value is used, otherwise the value in the
    file, same for /T_back.  The additional values are optional, but either they
    are all there, or none of them, otherwise there will be a read error.

    Arnaud: /old uses the old behavior and old calculation of tau_d.

    Format of the input file:

Molecule       N  
tag source    tag T_rot     tag N_tot     tag V width   tag V off  [tag t_back tag t_slope n_h beta_dust kappa_1300]   [E/A]
tag source    tag T_rot     tag N_tot     tag V width   tag V off  [tag t_back tag t_slope n_h beta_dust kappa_1300]   [E/A]
tag source    tag T_rot     tag N_tot     tag V width   tag V off  [tag t_back tag t_slope n_h beta_dust kappa_1300]   [E/A]
Molecule      N

What is myXCLASS?

myXCLASS is CLASS + access to the JPL+CDMS line catalogs.  Now (since 2004) it runs with a mySQL database.  You need to have a running mysql server somewhere, this should be straightforward to install on Linux or Macs. On this, unpack the catalog (separate distribution), and install a user that can read it - by default user "xclass" with passwd "xclass4ever", but you can customize this (see below). You also need a fairly recent GILDAS distribution.  Because this is FORTRAN77, the array sizes are fixed, and large - you need at least 1 GB of Memory, better 2 GB.  If you try to start myXCLASS and you get "killed", most likely your firefox or whatever is hogging too much memory, or you don't have enough to start with.  It's also a good idea to set your "stacksize" to "unlimited" - using the limit ([t]csh) or ulimit (bash) command.

How to install myXCLASS

First, you have to ask register with me.  There will be a registration form eventually, right now it's just email to You also need to acknowledge the use of myXCLASS and the associated data bases CDMS and JPL in any publication using this program like so (likely to be revised at some point - please check this web site before publication!).

This research made use of the myXCLASS program (, which accesses the CDMS ( and JPL ( molecular data bases.

You download the source and the catalog here - you will be provided with username and password upon registration. 

At present, this is supposed to compile with the jul10b version of GILDAS.  It is entirely possible that it does not work with any older (or newer) version.  I'll try to keep it up-to-date.

Since January 2011, they have stopped distributing CLASS77, so the dec2010 GILDAS version is the last version that works for XCLASS.  There are no plans to migrate to CLASS90, instead we are implementing the XCLASS functionality to CASA.  Stay tuned.

Unpack the source distribution, edit Makefile and compile. Editing means updating the paths.  As compiler, use the same one as used for  GILDAS.  ifort, gfortran and g95 should all work (with a caveat). Then type

make myXCLASS

The file mysql_connect_db.c has to be edited to reflect the connection data (host, user, passwd).  The host can be overwritten with the environmental variable XCLASS_DB_HOST - say, if you want to switch between some common server, and a local one on your laptop.

You need a running mySQL server somewhere, where the catalog is installed, and a user with password are as in mysql_connect_db.c must exist and have permission to the xclass catalogs - create permission as well, since a temporary data base will be created. See for details.

Put the myXCLASS and the catalog files where you want them to be and add the following lines, modified for your local needs, to your .gag.dico.local (which is in /your_gag/exe/bin/) or your ~/.gag.dico, if it is a private installation.

XCLASS_ISO    /home/schilke/Data/test/xclass.iso!
XCLASS_DEFMOL /soft/astro/gag/local/catalog/xclass.defmol
GAG_HELP_SPEC /users/schilke/software/xclass/src/spec.hlp
GAG_HELP_MEM /users/schilke/software/xclass/src/mem.hlp
GAG_HELP_MOD /users/schilke/software/xclass/src/mod.hlp

At least the files pointed to be XCLASS_ISO and XCLASS_DEFMOL must actually exist, examples are distributed with the source.

It might be a good idea to read the online help. I'm willing to add new molecules to it on request, but make sure they aren't in yet before you ask me. If there are problems, let me know about them, even if you solve them yourself - I'd like to squash as many bugs as possible.

Eventually, this page will contain also a kind of cookbook and some example

For reasons unknown to us, right now the deconvolution part needs to be compiled with ifort.  The rest of myXCLASS works fine if compiled with gfortran, for example.  Since deconvolution is now in CLASS90, with a few bugs removed, it is advised to use it there.


As of now (October 2009), myXCLASS has the possibility to use a private catalog.  In the near future, I will post instructions about how to create such a catalog out of JPL/CDMS files.  In the meantime, the officially distributed catalog consists (unlike earlier versions) only of published JPL and CDMS files.  We will try to keep it up-to-date, which will not be announced, so it's a good idea to check periodically. 

To use a private catalog, if you have one, you have to set

export XCLASS_PRIVATE_CATALOG=<name> (bash)

setenv XCLASS_PRIVATE_CATALOG <name> ([t]csh)

if you want to use it.  <name> corresponds to files called and  All these catalogs (including the default one) reside on the machine pointed to by XCLASS_DB_HOST (default: localhost).

the history of the current catalog can be found


The content of the current public catalog (line names) can be found here.

Installing private catalogs

Chances are you won't create your own private catalog (but if you do, see below), but rather get it from somebody.  They files are called

-rw-rw-r-- 1 mysql mysql     9210 2009-09-16 14:04 /var/lib/mysql/xclass/linecatpriv.frm
-rw-rw-r-- 1 mysql mysql 68186164 2011-02-09 17:31 /var/lib/mysql/xclass/linecatpriv.MYD
-rw-rw-r-- 1 mysql mysql 24795136 2011-02-09 17:31 /var/lib/mysql/xclass/linecatpriv.MYI
-rw-rw-r-- 1 mysql mysql     8872 2010-11-08 08:10 /var/lib/mysql/xclass/moleculespriv.frm
-rw-rw-r-- 1 mysql mysql     8245 2011-02-09 17:29 /var/lib/mysql/xclass/moleculespriv.MYD
-rw-rw-r-- 1 mysql mysql     1024 2011-02-09 17:29 /var/lib/mysql/xclass/moleculespriv.MYI

and should be copied into the same place where the public catalog resides, with the appropriate ownership (mysql:mysql for OpenSUSE, other distributions may be different).


Creating private catalogs

(contributed by Arnaud Belloche)

This assumes that the frequency files of the private catalog entries are stored in a directory named private/. In this directory, there is also a file called private.dir that contains the molecule tags and names, number of
frequencies, and partition functions.

1. Create private frequency table with the script (the
new table will be called linecatpriv):


2. Create private molecule table and load all molecules from the private
directory with the script (the new table will be
called moleculespriv). You need first to update the location of the
partition function file
(script line: my $privfile = 'private/private.dir';):


3. Load each private catalog entry with the script, e.g. for the entry with tag number 50301:

./ private/


Mac Special

This is outdated and should not be used for current Mac systems.  There, it should compile out of the box.

Sébastien Maret has created a page describing the Mac installation here.  It needs the file xclass_mac.patch available here.

Peter Schilke


There are also internal pages