NEMO - A Stellar Dynamics Toolbox
NEMO is now managed with git and hosted on
For the regulars: keep reading the
What's New , the
What's Up , and the
What's Down memos in NEMO!
What is NEMO?
is an extendible Stellar Dynamics Toolbox, following an
Open-Source Software model.
It has various
programs to create, integrate, analyze and visualize N-body and SPH like
systems, following the pipe and filter architecture.
In addition there are various tools to operate on images,
tables and orbits, including FITS files to export/import to/from other
astronomical data reduction packages. A large growing fraction of NEMO
has been contributed by a growing list of
The source code consist of
a little over 4000 files and a little under 1,000,000
lines of code and documentation, mostly C, and some
C++ and Fortran.
We also advertise
other software packages , which work on similar problems. NEMO
development started in 1986 in Princeton (USA) by Barnes, Hut and Teuben.
NEMO is also in ASCL,
The following manuals and documents describe various aspect of NEMO.
The hypertext versions were compiled with automated tools, and may not
all be in great shape, however, for all of them fine looking postscript
files are available.
images which can be generated with NEMO
are shown here. Most
of them have clickable images, which may take some time loading, and
they may not be as pretty as they appear on the screen, but give you an
idea of the kind of environment NEMO offers.
In addition a
Snapshot Data Archive of interesting simulations
are now available.
Papers that discuss Stellar Dynamics Software can be found in:
If you acknowledge the use of NEMO, and want to refer to
a publication, this is the most current one:
- On Toolboxes and Telescopes , by
Hut and Sussman, (1986)
in: The Use of Supercomputers in Stellar Dynamics,
Springer Verlag, p 193-198.
- An Environment for Experiments in
Stellar Dynamics , by:
Barnes, Hernquist, Hut and Teuben (1988) BAAS, 20, 706.
- A Laboratory for Gravitational
Scattering Experiments by Hut, in: IAU colloq 109,
- NEMO: A Stellar Dynamics Toolbox ,
by Teuben (1994, PASJ, xxx, yyy) overviews the current state of
NEMO and introduces a proposal to use
FITS as a vehicle to interchange and archive NBODY data
(see also the QUESTIONNAIRE ).
A gzip compressed
of this paper is also available.
Sci.Data.Formats FAQ discussion may be relevant.
The example program mentioned in
an NBODY BINTABLE .
- ADASS (1994) paper ,
adass.org version. I also keep a
postscript version around.
- GRAPE User Workshop
- other miscellaneous papers
Teuben, P.J. The Stellar Dynamics Toolbox NEMO, in:
Astronomical Data Analysis Software and Systems IV,
ed. R. Shaw, H.E. Payne and J.J.E. Hayes. (1995),
PASP Conf Series 77, p398.
I appreciate if authors could send me a reference of any paper
in which NEMO has been used.
Difficulties during installation are most likely resolved by consulting
the $NEMO/README.install file.
- Here is the now recommended GIT based installation.
%1 wget https://teuben.github.io/nemo/install_nemo
%2 chmod +x install_nemo
%3 ./install_nemo nemo=$HOME/opt/nemo
%4 source $HOME/opt/nemo/nemo_start.csh
There are some assumptions in these 4 basic steps. For the 1st step,
if you don't have the wget program, get something
similar that can download this script, e.g. curl, or just your favorite browser.
You can of course pick the
location of NEMO to be anywhere, but we picked $HOME/opt/nemo in this example.
In the 4th step it also assumed you
were using the C-shell. If you are a bash user, source the nemo_start.sh script
- A tar file from our ftp server may also work.
Here is an example using
%1 wget ftp://ftp.astro.umd.edu/pub/nemo/nemo_git.tar.gz
%1 curl ftp://ftp.astro.umd.edu/pub/nemo/nemo_git.tar.gz | tar zxf -
%2 tar zxf nemo_git.tar.gz
# wget could need --active-ftp, since --passive-ftp is default
# curl has a similar option, --ftp-pasv
%3 cd nemo_git
%4 git pull # optional if you don't need any updates
%5 docs/install_nemo nemo=. reuse=1
and you should have a working NEMO with PGPLOT as the plotting
- There are a number of optional libraries you will need to install
if you want to use every possible program or option in NEMO. If this is you
first time using NEMO, we recommend you to skip this unless you need a specific
program that needs one of those optional libraries.
- pgplot or plplot (both will need X11, the default installation uses our builtin pgplot)
- rdl (readline)
- A versioned gzip
file, that contains the latest official release. Pick any nemo_4.x.y version
NEMO anonymous ftp directory.
If you plan to use a stable NEMO and probably won't upgrade for a while,
this would be one way of installing. We still recommend the git
based release, as you can always go back to an older release, for example
% git checkout nemo_4_0_2
would get you the equivalence of the 4.0.2 release.
Although old tags in the 3.x series exist when NEMO was maintained in CVS,
installation procedures and directory structures were different, which we
don't support anymore. You will be on your own here.
- Some old MacOSX related installation notes,
although the regular installation method should work fine as long
as you have compilers and various external libraries (notably X11) installed.
Aarseth's nbody0. Although the source code is
taken directly from NEMO, the Makefile contains
targets to create standalone versions, both in FORTRAN-77
(the exact copy from Binney & Tremaine, 1st Ed), and a C version.
A very popular item to download, hence also available
"standalone". See also
Sverre's anonymous ftp
for the more advanced versions. NEMO also contains nbody1 and
nbody2 with NEMO interfaces to make running from the unix commandline
a bit more painless. An example manual page of such a program for
NBODY1 is given here.
NEMO nbody fits proposal (This is now an outdated version,
please refer to the
1994 PASJ paper
automatic GUI builder and frontend to run shell scripts or programs.
It also comes included with NEMO, and is part of the default install.
- optional software that can be installed
to enrich NEMO (this is where you find links to PGPLOT, HDF, CFITSIO etc.)
Linux for Astronomy CD-ROM contains a release of NEMO. Also
check latest LFA comments.
If you download NEMO, we ask that you register the software, you can also
optionally be notified of new releases, but please:
Send us an email!
Other software, that we know of, that deal with particle simulations, are
(apologies if the URL appears outdated, that's a fact of life these days):
Some time ago a discussion took place on if to
choose an N-body Data Interchange Format, and if so, which.
An e-mail exploder was installed to act as a
discussion forum, and
are archived locally and elsewhere. Currently, this interest has shifted
Virtual Observatory (TVO) .
NEMO is maintained by
Peter Teuben .
He works in the
Laboratory for Millimeter-Wave Astronomy , part of
BIMA , now
Astronomy Department of the
University of Maryland in
MD (USA) -
- STARLAB ;
created by Piet Hut, Steve McMillan and Jun Makino, was loosely modeled
after NEMO, but deals more with collisional dynamics.
is NEMO's close relative; created by
(he also maintains an
anonymous ftp directory with updated versions
of the treecode in C as well as fortran, see also his
The Art of Computational Science,
A series of e-books on how to build a computational lab (Hut & Makino) -
alos has lots of code and examples available.
an interactive X-windows based display package maintained by
Neal Katz and Tom Quinn. Their
also maintains a
You should also read about their
N-Chilada visualization and analysis software SALSA
- partiview, a 4D (space and time) OpenGL-based
visualization tool that also understand starlab data.
(Gnedin's general purpose visualization utility)
a software framework for large-scale simulations of dense stellar systems,
in which existing codes for dynamics, stellar evolution, hydrodynamics
and radiative transfer can be easily coupled.
initialconditions.org, a blog on Astrophysical
Initial conditions (for the N-body problem).
- pynbody, a
framework for N-body and SPH astrophysical simulations, written in python.
A Multi Dimensional visualization and analysis toolkit for astrophysics.
Gravit, gravity simulator
with viewing of orbit histories. Uses OpenGL/SDL.
gravity and electromagnetism simulator
modelling planatary systems, including replicating the orbits of moons
around planets while those planets orbit a central sun.
a cross platform concurrent n-body modelling framework written in C++.
- John Salmon's home page,
which pointers and references to parallel treecodes.
- John Fregeau's
fewbody and glstarview
Bill Rankin's implementation of the Fast Multipole Algorithm.
(see also NAMD)
ENZO (Terascale application for cosmological hydrodynamics)
(Paul Bode's Tree-Particle-Mesh code)
Volker Springer's and Naoki Yoshida's tree-code for (cosmological) N-
body/SPH simulations. Related are GADGET2 (rewritten in C) and GADGET3
(not publically available).
StarCrash, an parallel SPH code.
MLAPM: Alexander Knebe's recursively refined Cartesian grid code.
A new version under the name
AMIGA is now available.
Rainer Spurzem's version of
NBODY6++ can be downloaded from this
Silk Road Project site. There's a
wiki page on it as well, though will migrate to its
new location later in 2012.
Also some interesting
glnemo is an interactive visualization 3D program, using Qt,
that comes with NEMO. This has now been superseded by
Xnbody: an online visualization tool for nbody6++
Walter Dehnen's new and Very Fast and Momentum-Conserving Tree Code.
It was first
introduced in NEMO as YancNemo, but later renamed to
(Numerical Algorithms for General Body Dynamics) , an N-body
code plus toolset by Mario Alberto Rodriguez-Meza
PMFAST particle-mesh N-body code (f90) with MPI/OpenMP.
HNBody Symplectic Integration Package (Rauch & Hamilton)
A solar system integration software package (Levison/Duncan).
Anatoly Klypin's PM code. See also their
home page. His adaptive P3M code (
A3PM) is also available with a
NEMO frontend in (pstart,
prun). See also
Manual also available from
- The XStar N-body Solver
Purveyors of fine N-body algorithms and simulation data,
UK mirror), provide public domain software and data for
N-body hydrodynamical simulations.
New pages (Spring 2000) are now at:
VIRGO, a consortium of a number of N-Body related
key projects, including a page with
Software, and now
Sverre Aarseth's collection of nbody codes.
Douglas Heggie's homepage
contains the material for
A collaborative experiment on star cluster evolution
- Sverre's new interactive movie website
Derek Richardson's web-page contains the
Box Tree Code as well as xa, an X11 animation tool.
Galactic Collider, interactive Toomre-type galaxy collisions.
plotting and manipulating 3D particle distributions with PGPLOT
- The N-Body Site,
Ben Moore's compilation (formerly www.nbody.net) with
lots of pictures and movies.
Galaxy Dynamics N-Body Simulations (Jakub Schwarzmeier's self-teaching project)
Leiden Dynamics Group is also maintaining a software page.
The Texas P3M Database, a database of COBE-Normalized CDM Simulations.
Send email to
firstname.lastname@example.org if you want any of their 68 models.
Their abbreviated paper is available on
ASTRO-PH, and there
are routines within NEMO to read the data.
Mark Bellon's N-body solver.
Mark Ridler's grav-sim simulator
FLASH (also incoorporates
poisson solvers). See also
COSMOS, a Fortran 90 code for parallel computers that solves the
evolution equations for gravitationally coupled gas and collisionless
matter in one, two, or three dimensions.
NBodyLab Stellar Dynamics Simulation Testbed
a particle based astrophysical simulation code using a tree structure
and SPH for gas dynamical effects.
(Orbit Reconstruction, Simulation and Analysis).
Java Applet for Gravitational Orbit Simulation (includes source code)
TRIP : a general computer algebra system dedicated to celestial mechanics.
(Laskar and Gastineau)
- IASG :
Kavan Ratnatunga's Galactic Structure
Analysis package. It contains a modified version of the
Bahcall-Soneira Galaxy model .
developed by John Dubinski and Konrad Kuijken,
for generating N-body realizations of axisymmetric
galaxy models consisting of disk, bulge and halo.
We keep a local copy within in NEMO in standard Fortran,
so it also compiles under Linux.
Chris Mihos' Models of Merging Galaxies.
Laboratory for Computational Astrophysics (LCA) maintains
an archive of their
codes and documentation .
Grand Challenge Cosmology Consortium (GC3) figures out
the origin of large scale structure in the universe. They have a
software archive , a
data archive , and lot's of other interesting pages and links.
- The GalMer database contains
many galaxy merger simulations.
COSMICS and Grafic (Cosmological Initial Conditions Codes) (Bertschinger)
- GRACOS, a parallel cosmological N-body code (Shirokov/Bertschinger)
Sirko's Cosmological Initial conditions
Multi-body Gravity Simulator(MGS), A java-3d based package
to perform realtime simulations, three dimensional visualizations,
design simulations in XML and with a GUI.
(Warsaw University Observatory)
Smooth Particle Hydrodynamics
list, part of the CFD codes list document,
which is regularly posted to the
sci.physics.computational.fluid-dynamics newsgroup .
current list is now maintained by Wayne Christopher. It
also included Greg Lindahl's
- astrophysical simulation codes
a toolkit for the simulation of the passage of particles through matter.
IDL Astronomy User's Library has some routines to aid in
plotting N-body systems.
Marc Davies' IDL resources)
Particula Numerica, a real-time Gravitational N-Body Simulator. (mac/windows)
- galaxy, a free
linux program which simulates the motion of stars under the influence of gravity.
- PC-Based programs
is a PC-based simulation of interacting galaxies
written by Christian Sturm.
Galaxy software (also has a cool interactive web based tool)
Astronomy Software from
Zephyr. They have several programs
with which N-body systems can be created and evolved, but expect
to pay some money.
- Animations (you probably need to have
and other pretty pictures:
- Some Related Fields
- Fast, Free and Flexible MD
and their wiki
Molecular Dynamics Vizualisation.
- MDBNCH ,
A molecular dynamics benchmark.
- AMBER, a molecular dynamics
LASSPTools is a collection of Unix utilities for numerical
analysis and graphics, built very much in the philosophy of NEMO,
and may be useful in NEMO shell scripts.
vizualization and selecting data from general multi-variate data.
(see also: ggobi, mirage)
- Some software information banks that may be relevant: