Class OxidationStateSet

java.lang.Object
_global.tri.oxidationstates.calculator.OxidationStateSet
Direct Known Subclasses:
LikelihoodStateSet

public class OxidationStateSet extends Object
Contains a set of oxidation states assigned to ion types (i.e. a set of ions)
  • Constructor Details

    • OxidationStateSet

      public OxidationStateSet(Composition composition)
      Initialize the OxidationStateSet from a given composition containing the ions and weights
      Parameters:
      composition - The given composition
    • OxidationStateSet

      public OxidationStateSet(IonFactory.Ion[] ions, double[] weights)
      Create an OxidationStateSet from the given ions and weights
      Parameters:
      ions - The given ions
      weights - The amount of each of those ions, in the same order as the ions array.
  • Method Details

    • getIons

      public IonFactory.Ion[] getIons()
      Returns the set of ions
      Returns:
      the set of ions
    • getWeights

      public double[] getWeights()
      Returns the amounts of each of the ions, in the same order as the array returned by getIons()
      Returns:
      the amounts of each of the ions, in the same order as the array returned by getIons()
    • getWeight

      public double getWeight(IonFactory.Ion ion)
      Return the amount for the given ion
      Parameters:
      ion - THe given ion
      Returns:
      the amount for the given ion
    • isMixedValence

      public boolean isMixedValence()
      Returns true if the same ion type has more than one oxidation state in this set, false otherwise.
      Returns:
      true if the same ion type has more than one oxidation state in this set, false otherwise.
    • toString

      public String toString()
      Overrides:
      toString in class Object