aiida_quantumespresso.calculations.functions.create_magnetic_configuration

aiida_quantumespresso.calculations.functions.create_magnetic_configuration#

Create a new magnetic configuration from the given structure based on the desired magnetic moments.

Module Contents#

Functions#

create_magnetic_configuration(structure, ...[, atol, ztol])

Create a new magnetic configuration from the given structure based on a list of magnetic moments per site.

aiida_quantumespresso.calculations.functions.create_magnetic_configuration.create_magnetic_configuration(structure, magnetic_moment_per_site, atol=lambda : ..., ztol=lambda : ...)[source]#

Create a new magnetic configuration from the given structure based on a list of magnetic moments per site.

To create the new list of kinds, the algorithm loops over all the elements in the structure and makes a list of the sites with that element and their corresponding magnetic moment. Next, it splits this list in three lists:

  • Zero magnetic moments: Any site that has an absolute magnetic moment lower than ztol

  • Positive magnetic moments

  • Negative magnetic moments

The algorithm then sorts the positive and negative lists from large to small absolute value, and loops over each of list. New magnetic kinds will be created when the absolute difference between the magnetic moment of the current kind and the site exceeds atol.

The positive and negative magnetic moments are handled separately to avoid assigning two sites with opposite signs in their magnetic moment to the same kind and make sure that each kind has the correct magnetic moment, i.e. the largest magnetic moment in absolute value of the sites corresponding to that kind.

Important

the function currently does not support alloys.

Parameters:
  • structure – a StructureData instance.

  • magnetic_moment_per_site – list of magnetic moments for each site in the structure.

  • atol – the absolute tolerance on determining if two sites have the same magnetic moment.

  • ztol – threshold for considering a kind to have non-zero magnetic moment.