ASE‑GA: Genetic Algorithm#

Welcome to the ASE‑GA documentation!

ASE‑GA (Atomic Simulation Environment – Genetic Algorithm) was originally implemented within the ASE package for global optimization of atomic structures using genetic algorithms. It has since been spun off into a standalone package, enabling more modular development and focused growth while also enabling ASE to focus on core capabilities.

Overview#

Genetic algorithms (GAs) offer an effective alternative to Monte Carlo-style search methods for finding global minima. ASE‑GA implements a GA framework allowing users to define populations, pairing operators, mutations, and stopping conditions tailored to their optimization problem within materials and atomic configurations. The method is described in detail in the following publications, that also shows the large variability of systems it is able to handle:

For small clusters on/in support material in:

L. B. Vilhelmsen and B. Hammer
The Journal of chemical physics, Vol. 141 (2014), 044711

For medium sized alloy clusters in:

S. Lysgaard, D. D. Landis, T. Bligaard and T. Vegge
Topics in Catalysis, Vol 57, No. 1-4, pp. 33-39, (2014)

A search for mixed metal ammines for ammonia storage have been performed using the GA in:

P. B. Jensen, S. Lysgaard, U. J. Quaade and T. Vegge
Physical Chemistry Chemical Physics, Vol 16, No. 36, pp. 19732-19740, (2014)

Crystal structures searches was performed in:

M. Van den Bossche, H. Grönbeck, and B. Hammer
J. Chem. Theory Comput. 2018, 14, 2797−2807

Installation#

Install the ASE‑GA package via pip or from source:

pip install ase-ga

Or clone and install from GitHub:

git clone https://github.com/dtu-energy/ase-ga.git
cd ase-ga
pip install -e .

Tutorials#

Implementation and API Reference#

The GA implementation is diverse. It is structured such that it can be tailored to the specific problem investigated and to the computational resources available (single computer or a large computer cluster).

A genetic algorithm (GA) applies a Darwinian approach to optimization by maintaining a Population of solution Candidates (always represented with Atoms) to a given problem. Over successive iterations, the population evolves toward better solutions through Mating and Mutation of selected candidates, with the fittest resulting offspring added back into the population (as new candidates).

The raw score of a candidate is determined by a function that evaluates its quality - for example, by measuring the stability or performance of a structure. The fitness is calculated when the candidate enters the population, it is a measure of how well the candidate performs compared with the rest of the population. To keep the population size constant, the least fit candidates are removed.

Mating (or Crossover) combines multiple candidates to produce new offspring that inherit traits from their parents. When beneficial traits are passed on and combined, the population improves. However, relying only on crossover can reduce diversity: repeatedly mating very similar candidates tends to stagnate progress.

Mutation introduces diversity by making random alterations to candidates, preventing premature convergence and helping the algorithm explore a wider search space. Comparators prevent identical (or just too similar candidates) in being present in the population, thereby also enhancing diversity.

A GA run is at an end when no evolution is identified in the population for a certain period. See the Convergence for the available parameters.

See the API Reference for the full auto-generated API docs.

Examples#

Coming up

Changelog#

Notably, ASE version 3.9.0 (May 2015) first introduced the ase.ga module, and recent versions have extended support for crystal structure prediction operators.

Releases include:

  • v1.0.0 – Initial extraction from ASE

Contributing#

Contributions are welcome! Please follow the coding style, tests, and guidelines in Contributing.

Support#

If you have questions or encounter issues: