set_custom_sigma

set_custom_sigma#

autoplex.fitting.common.regularization.set_custom_sigma(atoms, reg_minmax, isolated_atom_energies=None, scheme='linear-hull', energy_name='REF_energy', force_name='REF_forces', virial_name='REF_virial', element_order=None, max_energy=20.0, config_type_override=None, retain_existing_sigma=False)[source]#

Handle automatic regularisation based on distance to convex hull, amongst other things.

TODO: Need to make sure this works for full multi-stoichiometry systems.

Parameters:
  • atoms ((list of ase.Atoms)) – List of atoms objects to set reg. for. Usually fitting database

  • reg_minmax ((list of tuples)) – List of tuples of (min, max) values for energy, force, virial sigmas

  • scheme ((str)) – Method to use for regularization. Options are: linear_hull, volume-stoichiometry linear_hull: for single-composition system, use 2D convex hull (E, V) volume-stoichiometry: for multi-composition system, use 3D convex hull of (E, V, mole-fraction)

  • energy_name ((str)) – Name of energy key in atoms.info

  • force_name ((str)) – Name of force key in atoms.arrays

  • virial_name ((str)) – Name of virial key in atoms.info

  • isolated_atom_energies ((dict)) – Dictionary of isolated energies for each atomic number. Only needed for volume-x scheme e.g. {14: ‘-163.0’, 8:’-75.0’} for SiO2

  • element_order ((list)) – List of atomic numbers in order of choice (e.g. [42, 16] for MoS2)

  • max_energy ((float)) – Ignore any structures with energy above hull greater than this value (eV)

  • config_type_override ((dict)) – Give custom regularization for specific configuration types

  • retain_existing_sigma (bool) – Whether to keep the current sigma values for specific configuration types. If set to True, existing sigma values for specific configurations will remain unchanged.

  • [(0.1 (e.g. reg_minmax =)

  • 1)

  • (0.001

  • 0.1)

  • (0.0316

  • 0.316)

  • (0.0632

  • 0.632)]

  • [(emin

  • emax)

  • (semin

  • semax)

  • (sfmin

  • sfmax)

  • (ssvmin

  • svmax)]

Return type:

list[Atoms]