Package _global.tri.oxidationstates.ion
Class KnownIonFinder
java.lang.Object
_global.tri.oxidationstates.ion.KnownIonFinder
- All Implemented Interfaces:
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
ConstructorsConstructorDescriptionKnownIonFinder(matsci.structure.Structure structure, boolean findPolyatomicIons) Creates an ion finder and finds the ions. -
Method Summary
Modifier and TypeMethodDescription_global.tri.structure.mapper.GeneralStructureMapper.MapgetFoundIonMap(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.StructuregetFoundPolyatomicIon(int index) Return the ionNum'th discovered polyatomic ionReturns the composition in terms of found ions.Returns the composition in terms of found ion types (i.e.matsci.structure.StructureReturn the structure in which we are searching for ions.booleanisInPolyatomicIon(int siteIndex) Returns true if the atom at the given site is contained within a polyatomic ion, and false otherwise.intReturns the total number of found polyatomic ions.
-
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:IIonFinderReturns 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:
numFoundPolyatomicIonsin interfaceIIonFinder- 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:IIonFinderReturn the ionNum'th discovered polyatomic ion- Specified by:
getFoundPolyatomicIonin interfaceIIonFinder- Parameters:
index- The number of the polyatomic ion to return- Returns:
- the ionNum'th discovered ion
-
getFoundIonType
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
Returns the composition in terms of found ions.- Returns:
- the composition in terms of found ions.
-
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).
-