Skip to content

ParfenovS/lime

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LIME (Line Modeling Engine)

Copyright (C) 2006-2014 Christian Brinch.

Copyright (C) 2015 the LIME development team.

LIME was created by Christian Brinch, but is now maintained by several people. See the LIME repository on GitHub for further details.

About LIME

LIME is a 3D molecular excitation and radiation transfer code for far-infrared and (sub-)millimeter wavelength. LIME will calculate spectra of rotational transitions of atoms and molecules, given a user-supplied physical model. Details on the method can be found in C. Brinch and M. R. Hogerheijde, A&A 553, A25 (2010)

Any scientific publication making use of the LIME code should also reference this publication.

A comprehensive user manual is available online at the ReadTheDocs website.

Installation notes

The LIME code needs three library packages in order to compile: qhull, gsl, and cfitsio. If these are not already present on your system, you will need to install them.

Mac OS X

The easiest way is to install MacPorts. After MacPorts has been installed, type in a terminal (as root or sudo)

$ port install qhull
$ port install cfitsio
$ port install gsl

Alternatively, the library packages may be installed with Fink. After Fink has been installed, type:

$ fink install qhull6.3.1-dev cfitsio gsl

Linux / Unix / Mac OS X (alternative)

If one or more of these packages is not present on your system, you can download the sources from the following locations. Make sure to get the latest versions.

The GNU scientific library (GSL), is present on most modern Unix and Linux systems. Check for availability with gsl-config --libs. If this command returns a library path, there is no need to download and install it.

All three library packages are installed using the following

 $ configure --prefix=/path/to/LimePackage
 $ make
 $ make install

In some cases the qhull library will produce a segmentation fault unless it is compiled with the -fno-strict-aliasing flag. Note that the example here does not require root privileges. Some modifications to the Makefile may be required if another location is set for the installation.

Note for qhull2011.1 and later: This version of qhull will sometimes not compile unless the -Wno-sign-conversion flag is removed from the qhull Makefile. The naming of the qhull library has changed between version 2010.1 and 2011.1. Make sure to edit the qhull flag near the top of the LIME Makefile accordingly. Also, the newest versions of qhull does not include a configure script.

LIME is automatically compiled at runtime so there is no installation required and also no configure script. Do not try to make or make install LIME as this will produce an error.

Older versions of qhull or cfitsio

LIME needs to be able to find both shared-object libraries (files which usually reside in /usr/lib, have names starting with 'lib' and ending with '.so') and header files (usually or at least often in /usr/include, ending in '.h') for both qhull and cfitsio. Unfortunately, different versions of these packages use slightly different locations/names, as follows:

  • qhull

    • old: libqhull.so, qhull/qhull_a.h
    • new: libqhullstatic.so, libqhull/qhull_a.h
  • cfitsio

    • old: cfitsio/fitsio.h
    • new: /fitsio.h

If you have the older version of either qhull or cfitsio, set the respective environment variables OLD_QHULL and/or OLD_FITSIO to T.

Running the code

The path to the lime script needs to be in your PATH environment variable. If you are using bash, do:

 $ export PATH=/path/to/lime/:${PATH}

where /path/to/lime/ is the directory where the LIME source code is located. If you are using csh, do:

$ setenv PATH /path/to/lime/:${PATH}

To find out whether you use bash or csh, do

$ echo $SHELL

The code runs simply by typing

$ cd example/
$ lime model.c

The model file can have any name. The model file need not be written in C. Subroutines can also be written in Fortran (or other languages that can be linked with C, e.g., python) as long as the names comply with the standards of linking C and Fortran. See this page for information on how to link C and Fortran. If Fortran subroutines are used, the linking of LIME needs to be done with the Fortran compiler. Modify the Makefile accordingly.

Build Status Documentation Status

Packages

No packages published

Languages

  • C 97.2%
  • Makefile 1.5%
  • Shell 1.3%