Class StructureOptimizer
java.lang.Object
_global.tri.oxidationstates.structure.StructureOptimizer
- All Implemented Interfaces:
matsci.engine.IContinuousFunctionState
Finds a structure that is the average of a set of given structures, as
determined by the mean squared log ratio of the elements of the
minimum-distance matrices for the structures.
-
Constructor Summary
ConstructorsConstructorDescriptionStructureOptimizer(matsci.structure.Structure[] targetStructures) Initialize the structure optimizer from a set of target structures. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetDistanceError(matsci.structure.Structure structure1, matsci.structure.Structure structure2) Calculates the mean squared ratios of the entries in the distance matrices for two structures, assuming the sites in the two structures are in the same order (e.g.double[]getGradient(double[] template) matsci.structure.StructureReturns the optimized structuredouble[]getUnboundedParameters(double[] template) doublegetValue()intmatsci.engine.IContinuousFunctionStatesetUnboundedParameters(double[] parameters)
-
Constructor Details
-
StructureOptimizer
public StructureOptimizer(matsci.structure.Structure[] targetStructures) Initialize the structure optimizer from a set of target structures. These structures should all have the same lattice and sites listed in the same order. TODO make this call the lattice optimizer in the future.- Parameters:
targetStructures- The structure optimizer will try to optimize the sites of the structure to make the distance matrix between sites as close as possible to the distance matrices of the target structures, as determined by the mean square log ratio of corresponding elements in the distance matrices.
-
-
Method Details
-
numParameters
public int numParameters()- Specified by:
numParametersin interfacematsci.engine.IContinuousFunctionState
-
getUnboundedParameters
public double[] getUnboundedParameters(double[] template) - Specified by:
getUnboundedParametersin interfacematsci.engine.IContinuousFunctionState
-
getGradient
public double[] getGradient(double[] template) - Specified by:
getGradientin interfacematsci.engine.IContinuousFunctionState
-
setUnboundedParameters
public matsci.engine.IContinuousFunctionState setUnboundedParameters(double[] parameters) - Specified by:
setUnboundedParametersin interfacematsci.engine.IContinuousFunctionState
-
getDistanceError
public double getDistanceError(matsci.structure.Structure structure1, matsci.structure.Structure structure2) Calculates the mean squared ratios of the entries in the distance matrices for two structures, assuming the sites in the two structures are in the same order (e.g. site 1 in structure1 corresponds to site 1 in structure2, etc.)- Parameters:
structure1- One of the structures we are comparingstructure2- One of the structures we are comparing- Returns:
- the mean squared ratios of the entries in the distance matrices for two structures, assuming the sites in the two structures are in the same order (e.g. site 1 in structure1 corresponds to site 1 in structure2, etc.)
-
getValue
public double getValue()- Specified by:
getValuein interfacematsci.engine.IContinuousFunctionState
-
getStructure
public matsci.structure.Structure getStructure()Returns the optimized structure- Returns:
- the optimized structure
-