GithubHelp home page GithubHelp logo

richteague / lime Goto Github PK

View Code? Open in Web Editor NEW

This project forked from lime-rt/lime

0.0 0.0 0.0 2.05 MB

Line Modeling Engine

Home Page: http://www.nbi.dk/~brinch/index.php?page=lime

License: Other

Makefile 1.48% C 97.22% Shell 1.30%

lime's Introduction

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

lime's People

Contributors

imckstewart avatar smaret avatar christianbrinch avatar mwestphal avatar parfenovs avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.