Two galaxies: M83 and M87. Credit: NASA/ESA/Hubble Heritage Team (StScI/AURA)GMGalaxies is a research programme investigating the relationship between the history of cosmic structures and their properties which can be measured from images in telescopes. For example, what happened in the history of some galaxies to transform them into passive ellipticals while others, seemingly of the same mass and in the same environment, are star-forming spirals? Even such a basic question about the link between morphology and star formation has not yet been answered, revealing our theories of galaxy formation are inadequate. This is a major concern in an era where understanding the shapes of galaxies and how they relate to the underlying dark matter is essential for progress in precision cosmology.

Current research in this area rightly gives significant attention to the crucial problem of how feedback — energy input from supernovae, active galactic nuclei, and more — affect observable properties. But as well as investigating this avenue, the GMGalaxies team have pioneered and now continue to develop and apply a new technique (“genetic modification”) to investigate systematically the role of a galaxy’s merging and accretion history at high resolution, and to enhance our understanding of large scale structure in the Universe.

The genetic modification technique involves generating multiple, slightly different sets of early-Universe conditions from which a given galaxy, halo, or void will emerge. As each version of the Universe is evolved in its own computer simulation, the initial differences lead to contrasting evolutions – for instance, the galaxy might be formed earlier or later in the Universe's history, or undergo a different number of mergers with other galaxies. All this takes place in a fully cosmological setting, replicating the accretion of gas and dark matter along filaments.

The team has now published a large number of papers applying this technique, and the code has recently been made available to replicate and build on our studies.

Project supported by



Showing in reverse chronological order


genetIC code logoThe primary code output from the GMGalaxies project is our initial conditions generator, genetIC, which is designed to create initial conditions for N-body and hydrodynamical zoom simulations which can be tweaked or ‘genetically modified’. The purpose is to make fine custom adjustments to the history and environment of a galaxy, and so enable its dependence on these factors to be investigated systematically.

GenetIC accomplishes this by generating random initial conditions and then allowing the user to specify the required variations. Changes can be made in a large variety of linear variables including, for example, the average dark matter overdensity in specified regions or sub-regions of a galaxy's Lagrangian patch. By choosing the modifications carefully, a selection of galaxies with different accretion histories can be efficiently ‘scanned’ using a relatively small number of simulations.

Assuming that you are interested in applying this technique, note that the final changes to a halo accretion history cannot be perfectly predicted from a given modification to the initial conditions. There is an art to guessing the best set of modifications to achieve a particular effect. It is important to verify that the modifications imposed have had the desired effect (probably using a cheap dark-matter-only simulation, before spending CPU time on hydrodynamics!). To see what is possible in practice and how to achieve it, take a look at our publications.

Download the latest release of the code and manual from the github releases page. The manual also includes instructions for running genetIC as a docker container.

Members of the GMGalaxies collaboration also maintain and develop analysis codes, pynbody and tangos.

pynbody logoPynbody is an analysis package for astrophysical N-body and hydrodynamical simulations, supporting Python 3.5 and later. It enables users to analyse their simulations without worrying about file formats. The code has been used in a variety of astrophysical domains, ranging from cosmology to star and planet formation, for the last decade.

tangos logoTangos builds on the foundation of pynbody (or equivalent analysis packages such as yt) to create rich, interactive databases summarising the results of a cosmological simulation. It is particularly crucial for the GMGalaxies team because it allows us to link information about the development of galaxies over cosmic time and across simulations with different ‘genotypes’.

For more information about using these codes, please visit their github pages.

topsy logoRecently we have also added a real-time GPU-based visualization code, topsy. Topsy uses pynbody to load files, then performs SPH rendering on the GPU to enable rapid scientific exploration.