14. 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:
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.
Shell: NEMO uses a Unix shell, AMUSE uses python (ipython, jupyter, …).
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.
Units: NEMO uses dimensionless values, and units are implied. Most programs actually use virial 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
14.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_starts.sh mkplummer p100 100 snapplot p100 xvar=x yvar=vx
or in the style of using pipes this can be a one liner
mkplummer - 100 | snapplot - xvar=x yvar=vx
And in AMUSE the following python session can do something similar:
figure out the right py-gnuplot
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) plotter = Gnuplot.Gnuplot() plotter.splot(plummer.position.value_in(units.parsec))
The AMUSE manual has some NEMO I/O examples.
For the benefit of NEMO users, AMUSE can usually be installed easily as follows:
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 frame work and then the selected module(s):
pip install amuse-framework pip install amuse-seba amuse-brutus
There are many more details in the AMUSE installation manual.
There is an expanded example in https://teuben.github.io/nemo/examples/eagle.html,
and some supporting notes are in
It can also be installed with
pip install astromartini
14.3. ClusterTools (*)¶
This python package can also read NEMO (gyrfalcON) files. More on this later.
Adding ZENO to NEMO will result in some programs that have duplicated names.
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:
14.5. List of Related Codes¶
this list needs to be annotated and spiced up with links.
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/
Action-based galaxy modeling framework. Also usable via
$NEMO/usr/agama. | http://ascl.net/1805.008
Adaptive Mesh Investigations of Galaxy Assembly. | http://ascl.net/1007.006
Astrophysical Multipurpose Software Environment. Also usable via
$NEMO/usr/amuse. | http://ascl.net/1107.007
Cosmological magnetohydrodynamical moving-mesh simulation code. | http://ascl.net/1909.010
High-precision integrator for stellar systems | https://ascl.net/1206.005
See also AMUSE
Ensemble of stars orbit integration | https://ascl.net/1206.008
Charm N-body GrAvity solver | http://ascl.net/1105.005
A Python package with tools for analysing star clusters. | https://github.com/webbjj/clustertools
Disk Initial Conditions Environment | https://ascl.net/1607.002
Numerical toolkit for simulating small-N gravitational dynamics | http://ascl.net/1208.011
A parallel high resolution Poisson solver for an arbitrary distribution of particles. | https://github.com/jensvvillumsen/Fractal
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
Galactic astronomy and gravitational dynamics. | http://ascl.net/1302.011
Galactic dynamics package (python) | http://ascl.net/1411.008
Galaxy potential code | http://ascl.net/1611.006
Graphical Astrophysics code for N-body Dynamics And Lagrangian Fluids | http://ascl.net/1602.015
Gravitational ENcounters with Gpu Acceleration | http://ascl.net/1812.014
Interactive Visualization 3D Program | http://ascl.net/1110.008
galactic structure finder | http://ascl.net/1806.008
A Parallel Adaptive Grid Code | http://ascl.net/1103.010
also | http://ascl.net/1201.010
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
Interacting galaxies modeller | http://ascl.net/1511.002
Lowered Isothermal Model Explorer in PYthon. | https://ascl.net/1710.023
Three-Body Scattering with Stellar Evolution | http://ascl.net/1201.001
N-body code for simulations of star clusters | https://ascl.net/1203.009
Tidal tensors in N-body simulations | http://ascl.net/1502.010
Massively parallel, large-scale structure toolkit | http://ascl.net/1904.027
Another code to document. | http://ascl.net/1010.004
Stellar Dynamics Toolbox. Our current version is 4. | http://ascl.net/1010.051
Numerical Integrator of Galactic Orbits | https://ascl.net/1501.002
A code for Collisionless N-body Simulations in Modified Newtonian Dynamics | http://ascl.net/1102.001
Immersive 4D Interactive Visualization of Large-Scale Simulations | https://ascl.net/1010.073
Large-scale particle simulations code for planet formation | http://ascl.net/1811.019
Another code to document. | http://ascl.net/2007.005
another | http://ascl.net/1206.007
A python parallelized N-body reduction toolbox https://ascl.net/1302.004
N-body COLA method code | http://ascl.net/1509.007
N-Body/SPH analysis for python. | http://ascl.net/1305.002
A GPU-accelerated hybrid symplectic integrator | https://ascl.net/1210.028
A new N-body and hydrodynamical code | https://ascl.net/1011.007
Monte Carlo simulations of gravitational dynamics of non-spherical stellar systems | http://ascl.net/1411.010
Hierarchical multiple system secular evolution model | http://ascl.net/1909.003
Monte Carlo N-body Simulation for Self-Interacting Dark Matter | http://ascl.net/1703.007
Discrete non-conservative numerical integrator | http://ascl.net/1507.005
orbits? | http://ascl.net/1308.001
High precision few-body and large scale N-body simulations | http://ascl.net/2104.025
Galaxy and dark matter halo dynamical properties | http://ascl.net/2105.007
Parallel n-body Integrations | https://ascl.net/1208.012
Coupled gas and N-body dynamics simulator | http://ascl.net/2003.014
Test Particle Integrator | http://ascl.net/1909.004
Universal Nbody Snapshot I/O - See examples.
A numerical code for simulating astrophysical systems using particles | http://ascl.net/1010.058
A Multi-Code Analysis Toolkit for Astrophysical Simulation Data | https://ascl.net/1011.022
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.