Class IonAssigner

java.lang.Object
_global.tri.oxidationstates.ion.IonAssigner

public class IonAssigner extends Object
This class assigns ions to sites in a way that minimizes the global instability index
  • Constructor Summary

    Constructors
    Constructor
    Description
    Given an ionFinder (which identifies polyatomic ions) and a set of oxidation states, assign the oxidation states to atoms in a way that minimizes the GII.
    IonAssigner(matsci.structure.Structure structure, OxidationStateSet stateSet)
    Assign the given oxidation states to atom in the structure in a way that minimizes the GII.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    getActiveAtomIndex(String polyatomicSymbol)
    This method is used to simplify the process of assigning oxidation states in a way that minimizes the GII for polyatomic ions.
    Returns the bond valence calculator used to calculate bond valence sums.
    matsci.structure.Structure
    Returns the structure provided in the constructor.
    double
    Returns the calculated global instability index for the assigned oxidation states.
    int[]
    getMappedIndices(_global.tri.structure.mapper.GeneralStructureMapper.Map map)
    Returns an array of site indices correponding to the sites to which a polyatomic ion has been mapped in the given map.
    matsci.structure.PartiallyOccupiedStructure
    Return the structure with assigned oxidation states
    static double[]
    normalizeWeights(double[] weights, int ionTypeCount)
    Normalizes the given weights to that the sum of all weights is equal to the given ionTypeCount.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • IonAssigner

      public IonAssigner(KnownIonFinder ionFinder, OxidationStateSet stateSet)
      Given an ionFinder (which identifies polyatomic ions) and a set of oxidation states, assign the oxidation states to atoms in a way that minimizes the GII. The atomic oxidation states for the polyatomic ions are read from the polyatomic ion structure files read by IonFactory. If multiple different assignments yield nearly identical global instability indices, this method will generate a partially-occupied structure with occupancies given by the averages of all of those assignments.
      Parameters:
      ionFinder - An ion finder that has identified polyatomic ions in the structure to which ions should be assigned.
      stateSet - The oxidation states to be assigned to the structure.
    • IonAssigner

      public IonAssigner(matsci.structure.Structure structure, OxidationStateSet stateSet)
      Assign the given oxidation states to atom in the structure in a way that minimizes the GII. If multiple different assignments yield nearly identical global instability indices, this method will generate a partially-occupied structure with occupancies given by the averages of all of those assignments. This constructor does not attempt to identify polyatomic ions, so the provided oxidation states should be for single-atom ions only.
      Parameters:
      structure - The structure to which oxidation states should be assigned.
      stateSet - The oxidation states to be assigned to the structure. The state set should not contain any polyatomic ion types when using this construction.
  • Method Details

    • getMappedIndices

      public int[] getMappedIndices(_global.tri.structure.mapper.GeneralStructureMapper.Map map)
      Returns an array of site indices correponding to the sites to which a polyatomic ion has been mapped in the given map. In other words, the site indices of the atoms in one of the polyatomic ions in the structure. The indices are returned in the same order as the sites in GeneralStructureMapper.Map.getMatchingHostSites().
      Parameters:
      map - The map containing the locations of the atoms in the polyatomic ions.
      Returns:
      an array of site indices correponding to the sites to which a polyatomic ion has been mapped in the given map. In other words, the site indices of the atoms in one of the polyatomic ions in the structure. The indices are returned in the same order as the sites in GeneralStructureMapper.Map.getMatchingHostSites().
    • getActiveAtomIndex

      public int getActiveAtomIndex(String polyatomicSymbol)
      This method is used to simplify the process of assigning oxidation states in a way that minimizes the GII for polyatomic ions. In the polyatomic ions considered for the manuscript and web site, when the ion changes oxidation state only one atom in the ion alsoc hanges oxidation states. All of the other atoms in the polyatomic ions always have the same oxidation state, regardless of what the oxidation state of the polyatomic ion is. The atom that changes oxidation states is called the "active atom", and here we return the index of that atom in the reptresentative structure of the given polyatomic ion. Note that another approach will need to be used if we extend the set of polyatomic ions to include ions that don't have a single "active atom".
      Parameters:
      polyatomicSymbol - The ion type symbol of the polyatomic ion for which we are trying to find the active atom.
      Returns:
      The index of the active atom in the representative structure for the given ion.
    • getStructure

      public matsci.structure.PartiallyOccupiedStructure getStructure()
      Return the structure with assigned oxidation states
      Returns:
      the structure with assigned oxidation states
    • getGivenStructure

      public matsci.structure.Structure getGivenStructure()
      Returns the structure provided in the constructor. Oxidation states are not assigned directly to this structure. If you want a structure with assigned oxidation states, call the getStructure() method.
      Returns:
      the structure provided in the constructor. Oxidation states are not assigned directly to this structure. If you want a structure with assigned oxidation states, call the getStructure() method.
    • getGlobalInstabilityIndex

      public double getGlobalInstabilityIndex()
      Returns the calculated global instability index for the assigned oxidation states.
      Returns:
      the calculated global instability index for the assigned oxidation states.
    • getBondValenceCalculator

      public BondValenceCalculator getBondValenceCalculator()
      Returns the bond valence calculator used to calculate bond valence sums.
      Returns:
      the bond valence calculator used to calculate bond valence sums.
    • normalizeWeights

      public static double[] normalizeWeights(double[] weights, int ionTypeCount)
      Normalizes the given weights to that the sum of all weights is equal to the given ionTypeCount.
      Parameters:
      weights - Weights corresponding to the relative number of atoms in the material with each oxidation state.
      ionTypeCount - The sum of the returned weights will be this value. Typically this would be the total number of ions of this type per unit cell, so the elements of the returned array given the total number of atoms per unit cell with the corresponding oxidation state.
      Returns:
      An array in which the weights are normalized so that they sum to the ionTypeCount.