Package _global.tri.oxidationstates.ion
Class IonFactory.IonType
java.lang.Object
_global.tri.oxidationstates.ion.IonFactory.IonType
- Enclosing class:
- IonFactory
This class represents an ion type, which is an atom (or cluster of atoms)
that can be assigned an oxidation state.
-
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the atomic weight for this ion type.int[]Returns the counts of each element in this ion type, in the same order as the array returned bygetElements().matsci.Element[]Returns the distinct elements in this ion typegetIon(double oxidationState) Returns the ion of this type with the given oxidation state.Return a map in which the keys are ion symbols and the values are the known ions of this type.Return the symbol for this ion type.booleanReturns true if this ion type is an element, and false if otherwise (e.g.intSome ions are crystalline.
-
Method Details
-
getKnownIons
Return a map in which the keys are ion symbols and the values are the known ions of this type.- Returns:
- a map in which the keys are ion symbols and the values are the known ions of this type.
-
getElements
public matsci.Element[] getElements()Returns the distinct elements in this ion type- Returns:
- the distinct elements in this ion type
-
getCounts
public int[] getCounts()Returns the counts of each element in this ion type, in the same order as the array returned bygetElements().- Returns:
- the counts of each element in this ion type, in the same order as the
array returned by
getElements().
-
isElement
public boolean isElement()Returns true if this ion type is an element, and false if otherwise (e.g. for polyatomic ion types).- Returns:
- true if this ion type is an element, and false if otherwise (e.g. for polyatomic ion types).
-
getSymbol
Return the symbol for this ion type. It should be unique.- Returns:
- the symbol for this ion type. It should be unique.
-
numPeriodicDimensions
public int numPeriodicDimensions()Some ions are crystalline. This method returns the number of periodic vectors in the Bravais lattice for this ion type.- Returns:
- the number of periodic vectors in the Bravais lattice for this ion type.
-
getAtomicWeight
public double getAtomicWeight()Returns the atomic weight for this ion type. All returned values are per unit cell for periodic ions- Returns:
- the atomic weight for this ion type. All returned values are per unit cell for periodic ions
-
getIon
Returns the ion of this type with the given oxidation state. Returns an existing object if one exists, or creates (and stores) a new ion object if one does not. This ensures that there is one global object for each ion.- Parameters:
oxidationState- The given oxidation state.- Returns:
- the ion of this type with the given oxidation state. Returns an existing object if one exists, or creates (and stores) a new ion object if one does not. This ensures that there is one global object for each ion.
-