NEMO
  • 1. Introduction
  • 2. User Interface
  • 3. Filestructure
  • 4. Graphics and Image Display
  • 5. Examples
  • 6. Using NEMO
  • 7. Installation
  • 8. Programmers Guide
  • 9. Potentials and Accelerations
  • 10. Units and Coordinate Systems
  • 11. Python
  • 12. Scripting
  • 13. Crosswalk
  • 14. Troubleshooting
  • 15. Benchmarking
  • 16. Related Codes
    • 16.1. AMUSE
      • 16.1.1. Differences
      • 16.1.2. Examples: Creating a Plummer sphere
      • 16.1.3. Installation
    • 16.2. Martini
    • 16.3. ClusterTools
    • 16.4. ZENO
      • 16.4.1. Installation
    • 16.5. STARLAB
      • 16.5.1. Installation
      • 16.5.2. Examples
    • 16.6. FALCON2
      • 16.6.1. Installation
      • 16.6.2. Command Line Interface
      • 16.6.3. Examples
      • 16.6.4. Programs
      • 16.6.5. Surprises
    • 16.7. REBOUND
      • 16.7.1. Example
      • 16.7.2. Install
    • 16.8. GALPY
      • 16.8.1. Rotation Curves
      • 16.8.2. Orbit integration
      • 16.8.3. Surface of Section
    • 16.9. AGAMA
      • 16.9.1. Installation
      • 16.9.2. Example
    • 16.10. Yt
    • 16.11. List of Related Codes
    • 16.12. Python
      • 16.12.1. Examples: unsio
      • 16.12.2. Examples: qtrun
    • 16.13. Categories
  • 17. Glossary
  • 18. Summary
  • 19. Research Software Engineering
  • 20. References
  • 21. Todo List
  • 22. RST reminders
NEMO
  • 16. Related Codes
  • View page source

16. Related Codes¶

Here we summarize some codes used in stellar dynamics that are similar to NEMO. We only list codes that are (publically) available. SPH/hydro codes are currently not included. See also ASCL to find more codes.

First we start off with some expanded examples on a few specific codes that have a tighter connection to NEMO:

16.1. AMUSE¶

AMUSE (Astrophysical MUltipurpose Software Environment) originates some ideas from its predecessors: ACS, StarLab and NEMO, but uses the python language. Another feature of AMUSE is that python is also the glue shell between legacy codes that can orchestrate simulations taking components from different codes, whereas in NEMO legacy codes have a NEMO CLI interface, at best.

For seasoned AMUSE users, here we highlight some differences between the two, and give some examples how to achieve the same task in NEMO and AMUSE.

16.1.1. Differences¶

  • Shell: NEMO uses a Unix shell, AMUSE uses python (ipython, jupyter, …), although commandline scripts do exist. A neat way to start an interative amuse is via: ipython –profile amuse

  • Community Code: Both packages maintain a tight connection to legacy software and community codes. You can find them in $AMUSE/src/amuse/community and $NEMO/usr resp., though the latter has some supporting script in $NEMO/src/scripts/mknemo.d

  • Units: NEMO uses dimensionless values, and units are implied. Most programs actually use virial units (a.k.a N-body units, or Henon units) where G=1, but there are a few programs (e.g. galaxy, nbodyX) that use other units. The units(1NEMO) tries to help you converting. AMUSE (optionally?) attaches units to numbers , using a python trick, e.g.

from amuse.units import units

mass   = 1.0 | units.MSun

astropy users might be a bit baffled, since this looks very different. But

m1 = mass.as_astropy_quantity()

will look more familiar. In pure astropy it might look as follows:

from astropy import units as u

m = 1.0 * u.solMass
m2 = m.to(u.kg).value

16.1.2. Examples: Creating a Plummer sphere¶

Here we create a Plummer sphere, in virial units, in NEMO, and display an X-VX projection on the sky in a shell session:

source /opt/nemo/nemo_start.sh

mkplummer p100 100
snapplot p100 xvar=x yvar=vx

or in the style of using pipes this can be a one liner. Here is that example, and a few followups with grey scale and contour plots:

mkplummer - 100 | snapplot - xvar=x yvar=vx
mkplummer - 10000 | snapgrid - - xvar=x yvar=vx   | ccdplot  -
mkplummer - 10000 | snapgrid - - xvar=x yvar=vx   | ccdplot  - 0.01,0.1,0.3,0.6,0.9
mkplummer - 10000 | snapgrid - - xvar=x yvar=vx   | ccdsmooth -  - | ccdplot  - 0.01,0.1,0.3,0.6,0.9

And in AMUSE the following python session can do something similar:

Todo

switch to using matplotlib

from amuse.units import units
from amuse.units import nbody_system
from amuse.ic.plummer import new_plummer_sphere

convert_nbody = nbody_system.nbody_to_si(100.0 | units.MSun, 1 | units.parsec)
plummer = new_plummer_sphere(1000, convert_nbody)

# gnuplot
plotter = Gnuplot.Gnuplot()
plotter.splot(plummer.position.value_in(units.parsec))

# matplotlib
x=p[:,0].value_in(units.pc)
y=p[:,1].value_in(units.pc)
plt.plot(x,y,'ok')

The AMUSE manual has some NEMO I/O examples.

16.1.3. Installation¶

AMUSE can usually be installed easily as follows (as a user):

pip install amuse

but this can take a while as it finds the right dependencies and needs to compile massive amounts of code. Some of these can easily fail if you don’t have the correct prerequisites (e.g. MPI).

A potentially faster way is to first install the AMUSE framework and then the selected module(s):

pip install amuse-framework
pip install amuse-bhtree amuse-hermite amuse-seba amuse-brutus

There are many more details in the AMUSE installation manual.

As a developer, it is easier to install the source code via github, and follow the following recipe somewhere in your workflow (skipping details where your python/virtual environment is)

git clone https://github.com/amusecode/amuse
cd amuse
./setup develop amuse-framework
./setup develop bhtree
./setup test    bhtree

this is the recommended way for NEMO users.

The directory $NEMO/usr/amuse has some example supporting code. A quick commandline script to generate a Plummer sphere and convert it back to NEMO is the following:

amuse_convert.py -o plummer.txt -n 1024
tabcols plummer.txt | tabtos - plummer.snap block1=mass,skip,vx,vy,vz,x,y,z nbody=1024

16.2. Martini¶

There is an expanded example in https://teuben.github.io/nemo/examples/eagle.html, and some supporting notes are in $NEMO/usr/martini.

It can also be installed with

pip install astromartini

16.3. ClusterTools¶

This python package can also read NEMO (gyrfalcON) files. Installation can be done as follows:

cd $NEMO/local
git clone https://github.com/webbjj/clustertools
pip install -e clustertools

For a few packages, we have a few existing examples in the $NEMO/usr tree (e.g. amuse, martini, unsio and uns_projects)

16.4. ZENO¶

ZENO is Josh Barnes’ version of an earlier version of NEMO that he continues to develop. We also keep a zeno manual page highlighting some differences.

Warning

Adding ZENO to NEMO will result in some programs that have duplicated names.

16.4.1. Installation¶

For the benefit of NEMO users, ZENO can usually be installed as follows:

cd $NEMO/usr/zeno
make zeno

This will currently download two repos: zeno_jeb and zeno_pjt. Pick one by using a symlink to become the official one for the install:

ln -s zeno_pjt zeno
source zeno_start.sh
cd zeno
make -f Zeno

Now various ZENO commands are available:

ls $ZENOPATH/bin

16.5. STARLAB¶

16.5.1. Installation¶

For the benefit of NEMO users, STARLAB can usually be installed as follows:

mknemo starlab

16.5.2. Examples¶

These examples were taken from http://www.sns.ias.edu/~starlab/examples/, but an up-to-date list may be found in the file EXAMPLES in the Starlab distribution. If installed within NEMO, this should be in $NEMO/local/starlab/EXAMPLES.

For details on a specific program, type

program --help
  • Create a linked list of 100 equal-mass nodes of unit total mass

makenode -n 100 -m 1
  • Create a system of 100 nodes with a Salpeter mass spectrum with masses in the range 0.5 to 10

makenode -n 100 | makemass -f 1 -x -2.35 -l 0.5 -u 10
  • Create a system of 100 nodes with a mass spectrum and evolve the stars without dynamics

makenode -n 100 | makemass -f 1 -x -2.35 -l 0.5 -u 10 \
                | ...(to come)...
  • Create a 500-particle Plummer model, with numbered stars, scaled to standard dynamical units

makeplummer -n 500 -i
  • Create a 500-particle W0 = 5 King model, with numbered stars, unscaled

makeking -n 500 -w 5 -i -u
  • Create a 500-particle W0 = 5 King model with a Miller-Scalo mass spectrum between 0.1 and 20 solar masses, then rescale to unit total mass, total energy -0.25, and virial ratio 0.5 and display the results graphically

makeking -n 500 -w 5 -i -u \
| makemass -F Miller_Scalo -l 0.1 -u 20 \
| scale -m 1 -e -0.25 -q 0.5 \
| xstarplot -l 5 -P .5
  • Create a 500-particle W0 = 5 King model with a Miller-Scalo mass spectrum between 0.1 and 20 solar masses, add in a 10 percent 1-10 kT binary population, then rescale to unit total mass, total energy (top-level nodes) -0.25, and virial ratio (top-level nodes) 0.5, and finally verify the results by analyzing the final snapshot

makeking -n 500 -w 5 -i -u \
| makemass -f 2 -l 0.1 -u 20 \
| makesecondary -f 0.1 -l 0.25 \
| scale -m 1 -e -0.25 -q 0.5 \
| makebinary -l 1 -u 10 \
| sys_stats -n
  • Evolve this model without stellar evolution for 100 dynamical times, with log output every dynamical time and snapshot output every 10 dynamical times, with a self-consistent tidal field, removing escapers when they are more than two Jacobi radii from the cluster center

makeking -n 500 -w 5 -i -u \
| makemass -f 2 -l 0.1 -u 20 \
| makesecondary -f 0.1 -l 0.25 \
| makebinary -l 1 -u 10 \
| scale -m 1 -e -0.25 -q 0.5 \
| kira -t 100 -d 1 -D 10 -Q -G 2
  • Create a King model with a power-law mass spectrum and a binary population, then evolve it with stellar and binary evolution

makeking -n 500 -w 5 -i -u \
| makemass -f 1 -x -2.0 -l 0.1 -u 20 \
| makesecondary -f 0.1 -l 0.1 \
| add_star -Q 0.5 -R 5 \
| scale -M 1 -E -0.25 -Q 0.5 \
| makebinary -f 1 -l 1 -u 1000 -o 2 \
| kira -t 100 -d 1 -D 10 -f 0.3 \
                  -n 10 -q 0.5 -Q -G 2 -B
  • Perform a series of 100 3-body scattering experiments involving an equal-mass circular binary and a double-mass incomer, with impact parameter equal to the binary semimajor axis, relative velocity at infinity half that needed for zero total energy, and all other parameters chosen randomly, and display the results as a movie

scatter3 -m 0.5 -e 0 -M 1 -r 1 -v 0.5 \
         -n 100 -C 5 -D 0.1 \
| xstarplot -l 4
  • Compute cross-sections for interactions between a circular binary with component masses 0.75 and 0.25 and an incoming star of mass 1 and velocity at infinity 0.1, all stars having radius 0.05 binary semimajor axes

sigma3 -d 100 -m 0.25 -e 0 -M 1 -v 0.1 \
       -x 0.05 -y 0.05 -z 0.05
  • Create a scattering configuration involving a head-on collision between a circular binary and a stable hierarchical triple, and verify the result

makescat -M 1.5 -r 0 -v 1 -t -a 1 -e 0 \
         -p -a 1 -e 0 -p1 -a 0.1 -e 0 \
| flatten | make_tree -D 1 | pretty_print_tree
  • Create a scattering configuration involving a head-on collision between a circular binary and a stable hierarchical triple, and integrate it forward in time

scatter -i "-M 1.5 -r 0 -v 1 -t -a 1 -e 0 \
        -p -a 1 -e 0 -p1 -a 0.1 -e 0" \
        -t 100 -d 1 -v

16.6. FALCON2¶

Tmem he falcon V2 package is still under development for a public release. The main integrator is now called griffin, replacing the older gyrfalcON from falcon V1. Although falcon V1 is distributed with NEMO, it is not maintained and may eventually succumb to software rot. Users should switch to using griffin.

A paper describing the griffin FMM code is in Dehnen (2014)

Warning

Adding FALCON2 to NEMO will result in some programs that have duplicated names, e.g. mkplummer. The sphinx program is another example of a python program to build documentation.

16.6.1. Installation¶

Hopefully soon we can use

mknemo falcON2

but unless you are a close collaborator, this will likely not be working.

This type of install would place the package in $NEMO/local/falcon2, the file INSTALL.md describes the installation procedure.

16.6.2. Command Line Interface¶

Although the CLI will look familiar to NEMO users, there are some salient differences. Some highlights:

  • the CLI is a set of key=val, like in NEMO. If given in order, the key= portion can be omitted, leaving just a series of values. This not recommended in scripts.

  • --help describes the keywords and some help, much like the help=h option in NEMO

  • help=1 shows hidden CLI options (NEMO doesn’t have hidden options)

  • debug=

16.6.3. Examples¶

For details on a specific program, type

program --help
  • Create a Plummer sphere with 100 particlces

mkplummer p100.in 100
  • View the contents of this HDF5 dataset

dump p100.in
  • Convert falcon2 HDF5 files to NEMO snapshot, and review like the dump program

s2a p100.in  | tabcomment - - delete=t | tabtos - p100.bsf block1=m,pos,vel,skip nbody=100
tsf p100.bsf
  • Comparing performance of griffin in parallel (oneTBB) mode:

rm -f p10k.*
mkplummer p10k.in 10000 time=0
/usr/bin/time griffin p10k.in p10k.out step=1 tstop=10 eps=0.05 tau=2^-4
threads=0    98.41user 19.02system 0:24.23elapsed 484%CPU
threads=1    21.19user  0.79system 0:22.03elapsed  99%CPU
threads=2    24.06user  2.90system 0:15.05elapsed 179%CPU
threads=4    33.37user  4.73system 0:13.77elapsed 276%CPU  40.70user 5.90system 0:16.47elapsed 282%CPU
threads=8    62.97user 11.25system 0:21.23elapsed 349%CPU
        12   82.25user 14.55system 0:24.61elapsed 393%CPU
        16   93.44user 16.78system 0:25.63elapsed 430%CPU
        20   97.90user 18.67system 0:23.95elapsed 486%CPU
  • Comparing falcon1 with falcon2

#  some parameters
nbody=10
eps=0.05
kmax=8
tstop=1
#
rm -f p1.*
mkplummer p1.in $nbody time=0
griffin p1.in p1.out step=1 tstop=$tstop eps=$eps tau=2^-$kmax
# 8.7sec

s2a p1.in | tabcomment - - delete=t | tabtos - p1.bsf block1=m,pos,vel,skip nbody=$nbody
gyrfalcON p1.bsf p1.out2  step=1 tstop=$tstop eps=$eps kmax=$kmax
# 0.6 sec

# comparing initials (notice p1.out does not contain times=0)
echo "=== Initial conditions ==="
s2a p1.in times=0 | tabcols - 2:7
snapprint p1.out2 times=0 format=%11.9e


# comparing final
echo "=== Final snapshot ==="
s2a p1.out times=$tstop | tabcols - 2:7
snapprint p1.out2 times=$tstop format=%11.9e

but griffin is more accurate and such a direct comparison may not be fair. In particular, is tau=2^-$kmax even fair?

16.6.4. Programs¶

By default there are currently 21 programs installed:

  • a2s – ascii to snapshot converter

  • calc – a simple calculator [name conflicts with a common linux program]

  • corerad – find core radius & density following Casertano & Hut (1985) and McMillan, Hut & Makino (1990)

  • dump – dump a hdf5 snapshot file to stdout [name conflicts with a common linux program]

  • gravity – add gravity to snapshot(s)

  • griffin – N-body code

  • join – join falcON snapshot files [name conflicts with a common linux program]

  • manipulate – use manipulators on falcON snapshots

  • mkdisc – make a simple circum-stellar gas disc

  • mkgrid – construct (possibly perturbed) fcc packing

  • mkparker – set up a parker wind

  • mkplummer – construct plummer sphere [name conflicts with a NEMO program]

  • mkpolytrope – construct a polytropic gas sphere

  • mksphere – initial conditions from an equilibrium distribution function

  • mkstar – make a single or binary star

  • s2a – snapshot to ascii converter

  • s2s – copy and manipulate falcON snapshots [name conflict with the falcON1 version]

  • setH – adapt SPH smoothing lengths

  • snapprop – evaluates bodies function over snapshot, reports to stdout

  • sphinx – SPH code [name conflicts with a common linux program]

  • symmetrize – symmetrizes snapshots; can also be used to reduce N

16.6.5. Surprises¶

to be resolved

  • dump –help

    does not show the help we usually see, but seems to think –help is a file

  • “griffin –help”

    says: “please provide ‘out’, ‘tau’, ‘eps’” why complain, we didn’t attempt to run.

  • mkplummer has a keyword ‘q-ran’, but itsn’t it better to use q_ran, since that’s a more common one used in all falcon programs. keep it consistent.

  • mkplummer has a default time=1 (e.g. mkdisc does the expected time=0)

16.7. REBOUND¶

Note

REBOUND Documentation on https://rebound.readthedocs.io

REBOUND is an N-body integrator, i.e. a software package that can integrate the motion of particles under the influence of gravity. The particles can represent stars, planets, moons, ring or dust particles. REBOUND is very flexible and can be customized to accurately and efficiently solve many problems in astrophysics.

REBOUND is primarely a library, with a mature API, but tools will need to be written (typically in C/C++) to create science applications. A python interface is also available.

NEMO has current 4 example programs that are linked with the REBOUND library:

Table of REBOUND programs in NEMO¶

program

description

reb2s

convert a REBOUND SimulationArchive to a NEMO SnapShot

s2reb

convert a NEMO SnapShot to a REBOUND SimulationArchive

reb_integrate

integrate a system and produce a REBOUND SimulationArchive

reb_viewer

view a REBOUND SimulationArchive

16.7.1. Example¶

With these tools a typical N-body simulation starting from a NEMO snapshot can be done as follows:

mkplummer - 128 seed=128 | s2reb - p128.in
reb_integrate p128.in p128.bin tstop=100 dt=1/32 dtout=1 eps=0.05 integrator=leapfrog
reb_viewer p128.bin
reb2s p128.bin - | snapplot - nxy=3,3

16.7.2. Install¶

Installation can be done via mknemo rebound, but the manual steps are as follows:

cd $NEMO/usr/hannorein
make install
cd nemo
make install

This will copy the library and header file into the $NEMO tree for each of compile path management.

16.8. GALPY¶

Note

See https://docs.galpy.org/en/stable/getting_started.html

With some examples we show how things done in galpy can be done in NEMO

16.8.1. Rotation Curves¶

The following code example shows how to initialize a Miyamoto-Nagai disk potential and plot its rotation curve

galpy prefers a normalization, which definese the value of the rotation curve at radius = 1

from galpy.potential import MiyamotoNagaiPotential
#
mp= MiyamotoNagaiPotential(a=0.5,b=0.0375,normalize=1.)
mp.plotRotcurve(Rrange=[0.01,10.],grid=1001)

NEMO normally defines the mass as the first non-pattern speed parameter that normalizes the rotation curve

rotcurves miyamoto 0,1,0.5,0.0375 radii=0.01:10:0.01

and an example of a combined potential

from galpy.potential import NFWPotential, HernquistPotential
#
mp= MiyamotoNagaiPotential(a=0.5,b=0.0375,normalize=.6)
np= NFWPotential(a=4.5,normalize=.35)
hp= HernquistPotential(a=0.6/8,normalize=0.05)
from galpy.potential import plotRotcurve
plotRotcurve(hp+mp+np,Rrange=[0.01,10.],grid=1001,yrange=[0.,1.2])
#
mp.plotRotcurve(Rrange=[0.01,10.],grid=1001,overplot=True)
hp.plotRotcurve(Rrange=[0.01,10.],grid=1001,overplot=True)
np.plotRotcurve(Rrange=[0.01,10.],grid=1001,overplot=True)

galpy’s rescale option is more complicated in NEMO. However, since speed scales with sqrt(mass), we can at least use the sqrt of galpy’s normalization, and at least get the relative weights correct.

rotcurves name1=miyamoto  pars1="0,sqrt(0.6),0.5,0.0375" \
          name2=hernquist pars2="0,sqrt(0.06),0.6/8"     \
          name3=nfw       pars3="0,1,1"                  \
          radii=0.05:10:0.05

16.8.2. Orbit integration¶

from galpy.potential import MiyamotoNagaiPotential
from galpy.orbit import Orbit
#
mp= MiyamotoNagaiPotential(a=0.5,b=0.0375,amp=1.,normalize=1.)
o= Orbit([1.,0.1,1.1,0.,0.1])
#
import numpy
ts= numpy.linspace(0,100,10000)
o.integrate(ts,mp,method='odeint')
#
o.plot()
# [R,vR,vT,z,vz] - not implemented
mkorbit r=1. vr=0.1 vt=1.1 z=0 vz=0.1   potname=miyamoto potpars=0,1,0.5,0.0375
orbint
orbplot

16.8.3. Surface of Section¶

https://galaxiesbook.org/chapters/III-02.-Orbits-in-Triaxial-Mass-Distributions.html

from galpy.potential import LogarithmicHaloPotential
from galpy.orbit import Orbit
ts= numpy.linspace(0.,30,601)
lp= LogarithmicHaloPotential(normalize=True,b=0.9,core=0.2)
o= Orbit([0.1,0.,lp.vcirc(0.1,phi=0.),0.])
o.integrate(ts,lp)
o.animate(staticPlot=True); # remove the ; to display the animation
       mkorbit  x=0.1 y=0 z=0 vx=0 vy=0       potname=log potpars=0,1,0.2,0.9


phi = v^2/2 log(x^2 + y^2/b^2 + a^2)
       v^2/2 = m/a

16.9. AGAMA¶

AGAMA (Action-based GAlaxy Modelling Architecture) is a software library intended for a broad range of tasks within the field of stellar dynamics. The library contains a powerful framework for dealing with arbitrary density/potential profiles and distribution functions (analytic, extracted from N-body models, or fitted to the data), a vast collection of general-purpose mathematical routines, and covers many aspects of galaxy dynamics up to the very high-level interface for constructing self-consistent galaxy models.

AGAMS’s NEMO plugin allows to use any Agama potential as an external potential in gyrfalcON and other NEMO programs (in a similar context as the AMUSE plugin). The potential may be specified either as a file with coefficients (for potential expansions), or more generally, as an INI file with parameters of possibly several components defined in groups [Potential1], [Potential whatever], …

16.9.1. Installation¶

AGAMA can usually be installed as follows (as a user):

pip install agama

As a developer, it may be easier to install the source code via github, and follow the following recipe somewhere in your workflow (skipping details where your python/virtual environment is)

git clone https://github.com/GalacticDynamics-Oxford/Agama
pip install -e Agama

note there are some requirements (e.g. GSL, Eigen, …) but by default they will be installed within Agama’s source tree. See also $NEMO/usr/agama for installing and testing AGAMA in a NEMO environment.

16.9.2. Example¶

This example is reproduced from the AGAMA manual. It considers the evolution of an N-body model of a Plummer sphere of mass m = 0.1 and radius a = 0.1 (satellite), which moves on a nearly-circular orbit inside a larger Plummer sphere of mass M = 1 and radius A = 1 (host galaxy), represented by a smooth external potential. First create the satellite, after which the model is shifted over into a near-circular orbit:

mkplum out=sat.nemo nbody=10000 r_s=0.1 mass=0.1
snapshift sat.nemo sat_shift.nemo rshift=-1,0,0 vshift=0,-0.6,0

Then create an INI file (pot.ini) describing the external potential:

[Potential]
type=Plummer
mass=1
scaleRadius=1

Finally run the simulation for a few orbital periods:

gyrfalcON sat_shift.nemo sat_out1.nemo eps=0.02 kmax=5 step=0.25 tstop=50 accname=agama accfile=pot.ini

this should take about 20 seconds on a typical year-2020 CPU. The satellite nicely orbits around the origin, leaving a small tidal tail.

Although this example is using the falcon tools (mkplum, gyrfalcON, agama), using original NEMO tools a simular simulation could be achieved using mkplummer, snapscale and hackcode3. We leave this for another version of this manual.

16.10. Yt¶

yt is a community-developed analysis and visualization toolkit for volumetric data, and handles SnapShot type data.

Warning

using yt will require python3.

More to come. There is a notebook in prep.

16.11. List of Related Codes¶

Todo

this list needs to be annotated and spiced up with links.

ACS¶

The Art of Computational Science - How to build a computational lab. In C++ and ruby. With ideas from NEMO and StarLab. | http://www.artcompsci.org/

agama¶

Action-based galaxy modeling framework. Also usable via $NEMO/usr/agama. | http://ascl.net/1805.008

AMIGA¶

Adaptive Mesh Investigations of Galaxy Assembly. | http://ascl.net/1007.006

AMUSE¶

Astrophysical Multipurpose Software Environment. Also usable via $NEMO/usr/amuse. | http://ascl.net/1107.007

arepo¶

Cosmological magnetohydrodynamical moving-mesh simulation code. | http://ascl.net/1909.010

AstrOmatic¶

A Tool Suite for Image Processing. | https://www.astromatic.net/software

bhint¶

High-precision integrator for stellar systems | https://ascl.net/1206.005

bonsai¶

N-body GPU tree-code, in AMUSE. | http://ascl.net/1212.001

brutus¶

See also AMUSE

Catena¶

Ensemble of stars orbit integration | https://ascl.net/1206.008

CGS¶

Collisionless Galactic Simulator. Also usable via NEMO with the runCGS interface. | http://ascl.net/1904.003

ChaNGa¶

Charm N-body GrAvity solver | http://ascl.net/1105.005

clustertools¶

A Python package with tools for analysing star clusters. | https://github.com/webbjj/clustertools

DICE¶

Disk Initial Conditions Environment | https://ascl.net/1607.002

Fewbody¶

Numerical toolkit for simulating small-N gravitational dynamics | http://ascl.net/1208.011

fractal¶

A parallel high resolution Poisson solver for an arbitrary distribution of particles. | https://github.com/jensvvillumsen/Fractal

gadgetX¶

A Code for Cosmological Simulations of Structure Formation. Several versions available, X=1,2,3,4. gadget2 also available via $NEMO/usr/gadget. | http://ascl.net/0003.001

Gala¶

Galactic astronomy and gravitational dynamics. | http://ascl.net/1707.006

galaxy¶

N-body simulation software for isolated, collisionless stellar systems. The older version still usable via NEMO with the rungalaxy interface. | http://ascl.net/1904.002

galpy¶

Galactic dynamics package (python) - also support NEMO’s potential format | http://ascl.net/1411.008

GalPot¶

Galaxy potential code | http://ascl.net/1611.006

GANDALF¶

Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids | http://ascl.net/1602.015

GENGA¶

Gravitational ENcounters with Gpu Acceleration | http://ascl.net/1812.014

Glnemo2¶

Interactive Visualization 3D Program | http://ascl.net/1110.008

gnuastro¶

GNU Astronomy Utilities | https://www.gnu.org/software/gnuastro/

GraviDy¶

Gravitational Dynamics. Also usable via NEMO with the rungravidy interface. | http://ascl.net/1902.004

griffin¶

based on falcON V2. This code is not public yet.

gsf¶

galactic structure finder | http://ascl.net/1806.008

gyrfalcON¶

Dehnen’s N-body code. Included in NEMO | http://ascl.net/1402.031

hermite¶

In AMUSE.

HiGPUs¶

Hermite’s N-body integrator running on Graphic Processing Units. Part of AMUSE. | https://ascl.net/1207.002

HUAYNO¶

Hierarchically split-Up AstrophYsical N-body sOlver N-body code. Part of AMUSE. | http://ascl.net/2102.019

Hydra¶

A Parallel Adaptive Grid Code | http://ascl.net/1103.010

hnbody¶

also | http://ascl.net/1201.010

ICICLE¶

Initial Conditions for Isolated CoLlisionless systems https://ascl.net/1703.012 | http://ascl.net/1703.012

identikit¶

1: A Modeling Tool for Interacting Disk Galaxies. | https://ascl.net/1011.001 2: An Algorithm for Reconstructing Galactic Collisions. | https://ascl.net/1102.011

InitialConditions¶

Website with a collection of programs for integrating the equations of motion for N objects, implemented in many languages, from Ada to Swift. | http://www.initialconditions.org/codes

JSPAM¶

Interacting galaxies modeller | http://ascl.net/1511.002

limepy¶

Lowered Isothermal Model Explorer in PYthon. | https://ascl.net/1710.023

MARTINI¶

Mock spatially resolved spectral line observations of simulated galaxies Also usable via $NEMO/usr/martini, see example. | http://ascl.net/1911.005

mcluster¶

Make a plummer. Also usable via NEMO | http://ascl.net/1107.015

McScatter¶

Three-Body Scattering with Stellar Evolution | http://ascl.net/1201.001

mercury¶

A software package for orbital dynamics. In AMUSE. | http://ascl.net/1209.010

montage¶

An Astronomical Image Mosaicking Toolkit. | https://github.com/Caltech-IPAC/Montage

MYRIAD¶

N-body code for simulations of star clusters | https://ascl.net/1203.009

nbodyX¶

Where X=0,1,2,3,4,5,6,6++,7 Also usable via NEMO with the runbodyX interface. | http://ascl.net/1904.027

nbody6tt¶

Tidal tensors in N-body simulations | http://ascl.net/1502.010

nbodykit¶

Massively parallel, large-scale structure toolkit | http://ascl.net/1904.027

nbody6xx¶

Alias for nbody6++ Also usable via NEMO | http://ascl.net/1502.010

N-BodyShop¶

Simulation codes of astrophysical phenomenon with particle methods. (tipsy, changa, gasoline) | https://github.com/N-BodyShop

nemesis¶

Another code to document. | http://ascl.net/1010.004

NEMO¶

Stellar Dynamics Toolbox. Our current version is 4. | http://ascl.net/1010.051

NIGO¶

Numerical Integrator of Galactic Orbits | https://ascl.net/1501.002

N-MODY¶

A code for Collisionless N-body Simulations in Modified Newtonian Dynamics | http://ascl.net/1102.001

octgrav¶

in AMUSE. | http://ascl.net/1010.048

partiview¶

Immersive 4D Interactive Visualization of Large-Scale Simulations | https://ascl.net/1010.073

PENTACLE¶

Large-scale particle simulations code for planet formation | http://ascl.net/1811.019

petar¶

Another code to document. | http://ascl.net/2007.005

plumix¶

another | http://ascl.net/1206.007

pNbody¶

A python parallelized N-body reduction toolbox https://ascl.net/1302.004

pycola¶

N-body COLA method code | http://ascl.net/1509.007

pyfalcon¶

Python interface for gyrfalcON | https://github.com/GalacticDynamics-Oxford/pyfalcon

pynbody¶

N-Body/SPH analysis for python. | http://ascl.net/1305.002

QYMSYM¶

A GPU-accelerated hybrid symplectic integrator | https://ascl.net/1210.028

RAMSES¶

A new N-body and hydrodynamical code | https://ascl.net/1011.007

Raga¶

Monte Carlo simulations of gravitational dynamics of non-spherical stellar systems | http://ascl.net/1411.010

rebound¶

Multi-purpose N-body code for collisional dynamics | https://ascl.net/1110.016 Also usable via NEMO

SecularMultiple¶

Hierarchical multiple system secular evolution model | http://ascl.net/1909.003

sidm-nbody¶

Monte Carlo N-body Simulation for Self-Interacting Dark Matter | http://ascl.net/1703.007

slimplectic¶

Discrete non-conservative numerical integrator | http://ascl.net/1507.005

smalln¶

in AMUSE. | http://ascl.net/1106.012

smile¶

orbits? | http://ascl.net/1308.001

SpaceHub¶

High precision few-body and large scale N-body simulations | http://ascl.net/2104.025

SpheCow¶

Galaxy and dark matter halo dynamical properties | http://ascl.net/2105.007

Starlab¶

Also usable via NEMO | https://ascl.net/1010.076

Swarm-NG¶

Parallel n-body Integrations | https://ascl.net/1208.012

Torch¶

Coupled gas and N-body dynamics simulator | http://ascl.net/2003.014

TPI¶

Test Particle Integrator | http://ascl.net/1909.004

UNSIO¶

Universal Nbody Snapshot I/O - See examples.

VINE¶

A numerical code for simulating astrophysical systems using particles | http://ascl.net/1010.058

yt¶

A Multi-Code Analysis Toolkit for Astrophysical Simulation Data | https://ascl.net/1011.022

ZENO¶

Barnes version that was derived from NEMO V1. | https://ascl.net/1102.027 Also usable via NEMO , but watch out for duplicate names of programs

A large number of these codes can also be found by searching on ASCL, for example: https://ascl.net/code/search/dynamics and https://ascl.net/code/search/hermite and https://ascl.net/code/search/orbit and https://ascl.net/code/search/nbody. The last time this list was cross-checked was … 16-jul-2021.

16.12. Python¶

Python support in NEMO itself is still rudimentary, though the common

cd $NEMO
pip3 install -e .

will add the nemopy module to your python environment. Currently only a simple getparam interface is available, to build NEMO style programs.

There are good import and export routines to other N-body formats, through which other toolkits can provide interesting ways to analyze NEMO data. We list a few

  • yt toolkit: https://yt-project.org/

  • nobodykit: https://nbodykit.readthedocs.io/en/latest

  • clustep, galstep: https://github.com/elvismello create initial conditions in gadget2 format. ($NEMO/usr/mello)

  • galanyl: https://hg.sr.ht/~ngoldbaum/galaxy_analysis pip install galanyl

  • galpy: https://github.com/jobovy/galpy

  • unsio: pip install python-unsio python-unsiotools ($NEMO/usr/jcl)

  • gala: https://github.com/adrn/gala

  • agama: https://github.com/GalacticDynamics-Oxford/Agama - pip install agama ($NEMO/usr/agama)

  • pynbody: https://github.com/pynbody/pynbody

  • martini: https://github.com/kyleaoman/martini ($NEMO/usr/martini)

  • galpak: http://galpak3d.univ-lyon1.fr/index.html - pip install galpak

  • amuse: https://github.com/amusecode - pip install amuse-framework

  • pygad: https://bitbucket.org/broett/pygad

  • SnapGadget: https://github.com/regmachado/SnapGadget

16.12.1. Examples: unsio¶

more to come here about unsio: no reminder needed on installing.

16.12.2. Examples: qtrun¶

qtrun is a powerful way to give an existing script a GUI interface. But it proabbly doesn’t belong here,, but in the scripting section.

Todo

more needed here

  1. 3rd party modules. Good examples are with unsio.

  2. qtrun is a GUI building app

  3. NEMO style apps that use the python version of getparam. Examples are tabplot with matplotlib, i.e. tabplot.py

16.13. Categories¶

Such a niche list of codes made me wonder what kind of meta-data we could use to categorize such dynamics codes, but then perhaps along the lines of the Unified Astronomy Thesaurus project.

dynamics - nbody, orbit, integrator, sph, hydro, analysis, integrator

Previous Next

© Copyright 2024, teuben.

Built with Sphinx using a theme provided by Read the Docs.