Skip to content

Make the GroundStateFinder applicable for systems with multiple active sublattices

Joakim Brorsson requested to merge ground-state-finder-mip-cleanup into master

Description

The GroundStateFinder has been update so that it can be used for systems that involve multiple binary sublattices.

Comments

It is important to check the tests of the new functionalities are sufficiently general.

Summary of changes

  • icet/tools/ground_state_finder.py
    • Rewrote the checks so that an error is only raised if there are more than two species on any sublatti ce.
    • Introduced the following properties:
      • _active_species; a list of lists containing the allowed chemical symbols for each active sublat tice
      • _all_active_species; a list containing the allowed chemical symbols on all of the active sublat tices
      • _active_index_to_sublattice_map; a list with integers representing the active sublattice for th e corresponding lattice site
    • Added species constraints for each of the active sublattices, which are first initialised by the _bu ild_model and then updated when calling get_ground_state.
  • tests/unittest/test_icet/tools/test_ground_state_finder.py:
    • The tests that an exception is raised when there are multiple active sublattices have been removed.
    • A test that considers a system with two active sublattices has been added.

Closes #449 (closed)

Edited by Joakim Brorsson

Merge request reports