Class BondValenceCalculator
java.lang.Object
_global.tri.oxidationstates.calculator.BondValenceCalculator
This is a simplified bond valence calculator that should be easier to use for
this app than the one in the matsci oxidation analyzer. The basic code and
parameters are borrowed from that one.
-
Constructor Summary
ConstructorsConstructorDescriptionBondValenceCalculator(matsci.structure.Structure structure) Create a bond valence calculator for the given structure -
Method Summary
Modifier and TypeMethodDescriptiondouble[]Returns the calculated bond valence sums, with the array indices corresponding to the site indices in the provided structure.Returns the reason sums couldn't be calculated, if calculating sums failed.doubleReturns the global instability index, based on the oxidations states of the provided structure and the calculated bond valence sums.static booleanhasParametersForElement(matsci.Element element) Return true if this calculator has bond valence parameters or the given element, false otherwise.booleanReturns true if some the bond valence sum for at least one site is zero, false otherwise
-
Constructor Details
-
BondValenceCalculator
public BondValenceCalculator(matsci.structure.Structure structure) Create a bond valence calculator for the given structure- Parameters:
structure- The given structure
-
-
Method Details
-
hasZeroSums
public boolean hasZeroSums()Returns true if some the bond valence sum for at least one site is zero, false otherwise- Returns:
- true if some the bond valence sum for at least one site is zero, false otherwise
-
getGlobalInstabilityIndex
public double getGlobalInstabilityIndex()Returns the global instability index, based on the oxidations states of the provided structure and the calculated bond valence sums.- Returns:
- the global instability index, based on the oxidations states of the provided structure and the calculated bond valence sums.
-
getBondValenceSums
public double[] getBondValenceSums()Returns the calculated bond valence sums, with the array indices corresponding to the site indices in the provided structure. If bond valence sums could not be calculated, returns null.- Returns:
- the calculated bond valence sums, with the array indices corresponding to the site indices in the provided structure. If bond valence sums could not be calculated, returns null.
-
getFailureReason
Returns the reason sums couldn't be calculated, if calculating sums failed.- Returns:
- the reason sums couldn't be calculated, if calculating sums failed.
-
hasParametersForElement
public static boolean hasParametersForElement(matsci.Element element) Return true if this calculator has bond valence parameters or the given element, false otherwise.- Parameters:
element- The given element- Returns:
- true if this calculator has bond valence parameters or the given element, false otherwise.
-