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 our twin 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.

pynbody 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.

Join Us!

We have openings for PhD students and a postdoc starting in around October 2021. Due to coronavirus, we are currently remote working. We expect in 2021 to return to campus, where we are based in UCL's Cosmoparticle Hub.

Our team abides by and contributes to development of the N-Body-Shop Code of Conduct, striving to provide an inclusive and safe environment for all collaborators.

PhD positions

You can read about two potential PhD projects on the official admissions website. These positions are not ERC funded, but instead will be supported by scholarships that UCL's astrophysics group can award. Consequently, applications must be made through the process administrated by the astrophysics group. Deadlines vary depending on your nationality, due to the different types of scholarship available.

Postdoctoral position

The postdoctoral position is ERC-funded for three years, with a nominal start date of 1 October 2021 (although an earlier start may be possible). The deadline for applications is 15 January 2021. For more information, download the job description, or visit the UCL applications website.

To apply, you will need to upload a CV (including a list of publications), a statement of research interests and plans (3 pages maximum), and the contact information for three references. Please arrange also for these three academic references to be sent to Andrew Pontzen ( by the closing date. A cover letter can optionally be included using the “Statement in Support of your Application” section of the online form.

If you have any queries regarding the application process, please contact Anita Maguire ( Informal enquiries regarding the vacancy can be made to Andrew Pontzen (