Class LatticeOptimizer

java.lang.Object
_global.tri.oxidationstates.structure.LatticeOptimizer
All Implemented Interfaces:
matsci.engine.IContinuousFunctionState

public class LatticeOptimizer extends Object implements matsci.engine.IContinuousFunctionState
This class is used to find an "average" lattice given a set of target lattices. The average lattice is found by minimizing the mean squared skew factor between the target lattices and the other lattices, where the skew factor is defined in the GeneralStructureMapper. The parameters are the coordinate of the lattice vectors.
  • Constructor Details

    • LatticeOptimizer

      public LatticeOptimizer(matsci.structure.BravaisLattice initialLattice, matsci.structure.BravaisLattice[] targetLattices)
      Initialize the lattice optimizer for a search starting from the initialLattice. The optimizer will try to find the lattice closest to the target lattices.
      Parameters:
      initialLattice - The lattice from which we should start the search.
      targetLattices - We are trying to find the lattice that is the best representation of these lattices.
  • Method Details

    • numParameters

      public int numParameters()
      Specified by:
      numParameters in interface matsci.engine.IContinuousFunctionState
    • getUnboundedParameters

      public double[] getUnboundedParameters(double[] template)
      Specified by:
      getUnboundedParameters in interface matsci.engine.IContinuousFunctionState
    • getGradient

      public double[] getGradient(double[] template)
      Specified by:
      getGradient in interface matsci.engine.IContinuousFunctionState
    • setUnboundedParameters

      public matsci.engine.IContinuousFunctionState setUnboundedParameters(double[] parameters)
      Specified by:
      setUnboundedParameters in interface matsci.engine.IContinuousFunctionState
    • getValue

      public double getValue()
      Specified by:
      getValue in interface matsci.engine.IContinuousFunctionState
    • getLattice

      public matsci.structure.BravaisLattice getLattice()
      Returns the optimized lattice
      Returns:
      the optimized lattice