Class KnownIonFinder

java.lang.Object
_global.tri.oxidationstates.ion.KnownIonFinder
All Implemented Interfaces:
IIonFinder

public class KnownIonFinder extends Object implements IIonFinder
This class identifies known polyatomic ions in a given structure. If the known ion exists in a larger cluster containing the same atoms, it is not added to the list of found ions. If two known ions share share a common site (or sites), the larger is added to the list of found ions. If the two known ions are the same size, neither is added to the list of known ions.
  • Constructor Summary

    Constructors
    Constructor
    Description
    KnownIonFinder(matsci.structure.Structure structure, boolean findPolyatomicIons)
    Creates an ion finder and finds the ions.
  • Method Summary

    Modifier and Type
    Method
    Description
    _global.tri.structure.mapper.GeneralStructureMapper.Map
    getFoundIonMap(int index)
    Returns a map that connecting the sites in the representative structure for the ion to sites in the given structure for the index'th found polyatomic ion.
    getFoundIonType(int index)
    Returns the ion type of the index'th found polyatomic ion.
    matsci.structure.Structure
    Return the ionNum'th discovered polyatomic ion
    Returns the composition in terms of found ions.
    Returns the composition in terms of found ion types (i.e.
    matsci.structure.Structure
    Return the structure in which we are searching for ions.
    boolean
    isInPolyatomicIon(int siteIndex)
    Returns true if the atom at the given site is contained within a polyatomic ion, and false otherwise.
    int
    Returns the total number of found polyatomic ions.

    Methods inherited from class java.lang.Object

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

    • KnownIonFinder

      public KnownIonFinder(matsci.structure.Structure structure, boolean findPolyatomicIons)
      Creates an ion finder and finds the ions.
      Parameters:
      structure - The structure in which we are searching for ions.
      findPolyatomicIons - True if this finder should search for polyatomic ions, and false otherwise.
  • Method Details

    • isInPolyatomicIon

      public boolean isInPolyatomicIon(int siteIndex)
      Returns true if the atom at the given site is contained within a polyatomic ion, and false otherwise.
      Parameters:
      siteIndex - THe index of the given site
      Returns:
      true if the atom at the given site is contained within a polyatomic ion, and false otherwise.
    • numFoundPolyatomicIons

      public int numFoundPolyatomicIons()
      Description copied from interface: IIonFinder
      Returns the total number of found polyatomic ions. If more than one ion of the same type is found in a unit cell in different locations, they are all counted as separate found ions.
      Specified by:
      numFoundPolyatomicIons in interface IIonFinder
      Returns:
      the total number of found polyatomic ions. If more than one ion of the same type is found in a unit cell in different locations, they are all counted as separate found ions.
    • getFoundPolyatomicIon

      public matsci.structure.Structure getFoundPolyatomicIon(int index)
      Description copied from interface: IIonFinder
      Return the ionNum'th discovered polyatomic ion
      Specified by:
      getFoundPolyatomicIon in interface IIonFinder
      Parameters:
      index - The number of the polyatomic ion to return
      Returns:
      the ionNum'th discovered ion
    • getFoundIonType

      public String getFoundIonType(int index)
      Returns the ion type of the index'th found polyatomic ion.
      Parameters:
      index - The index of the found ion
      Returns:
      the ion type of the index'th found polyatomic ion.
    • getFoundIonMap

      public _global.tri.structure.mapper.GeneralStructureMapper.Map getFoundIonMap(int index)
      Returns a map that connecting the sites in the representative structure for the ion to sites in the given structure for the index'th found polyatomic ion.
      Parameters:
      index - The index of the polyatomic ion.
      Returns:
      a map that connecting the sites in the representative structure for the ion to sites in the given structure for the index'th found polyatomic ion.
    • getStructure

      public matsci.structure.Structure getStructure()
      Return the structure in which we are searching for ions.
      Returns:
      the structure in which we are searching for ions.
    • getIonComposition

      public Composition getIonComposition()
      Returns the composition in terms of found ions.
      Returns:
      the composition in terms of found ions.
    • getIonTypeComposition

      public Composition getIonTypeComposition()
      Returns the composition in terms of found ion types (i.e. without including oxidation states).
      Returns:
      the composition in terms of found ion types (i.e. without including oxidation states).