Package ffx.xray.refine
Class RefinedParameter
java.lang.Object
ffx.xray.refine.RefinedParameter
- Direct Known Subclasses:
RefinedBFactor,RefinedCoordinates,RefinedOccupancy
Represents a parameter that can be refined in an experimental refinement process.
Encapsulates a primary
Atom and a collection of constrained atoms that are
related to this primary atom based on the specific refinement requirement.
The concrete behavior and details of the refinement process are defined by subclasses.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRefinedParameter(Atom atom) Constructs a new RefinedParameters object for the specified primaryAtom. -
Method Summary
Modifier and TypeMethodDescriptionabstract voidaddConstrainedAtom(Atom atom) Adds an atom to the list of constrained atoms for the given primary atom.abstract voidAdds an atom to the list of constrained atoms that contribute to experimental scattering.abstract voidgetAcceleration(double[] acceleration) Retrieves the acceleration values associated with the refined parameters.abstract voidgetGradient(double[] gradient) Load the gradient for this RefinedParameter.intgetIndex()Retrieves the index value associated with this RefinedParameter instance.abstract voidgetMass(double[] mass, double defaultMass) Mass for extended Lagrangianabstract intRetrieves the number of parameters associated with this refineable.abstract voidgetParameters(double[] parameters) Get parameters from this RefinedParameter instance.abstract voidgetPreviousAcceleration(double[] acceleration) Retrieves the previous acceleration values associated with the refined parameters.abstract voidgetVelocity(double[] velocity) Retrieves the velocities associated with the refined parameters.abstract voidsetAcceleration(double[] acceleration) Sets the acceleration values for the refined parameters.voidsetIndex(int index) Sets the index for this RefinedParameter instance.abstract voidsetOptimizationScaling(double[] optimizationScaling) Sets the optimization scaling factors for this RefinedParameter instance.abstract voidsetParameters(double[] parameters) Set parameter values into this RefinedParameter instance.abstract voidsetPreviousAcceleration(double[] acceleration) Sets the previous acceleration values for the refined parameters.abstract voidsetVelocity(double[] velocity) Sets the velocities for the refined parameters.abstract voidZero out the gradient for this RefinedParameter.
-
Field Details
-
atom
The primaryAtomthat serves as the central reference in a refinement process. This atom is the focal point around which constrained atoms are defined or managed. -
index
protected int indexThe index of this parameter in the overall parameter array. If this parameter is described by more than one variable, the index is for the first variable. -
constrainedAtoms
A collection of atoms that are constrained in relation to a primaryAtom. These constrained atoms are defined as part of the experimental refinement process and are related to the primary atom based on specific refinement requirements.The refined parameter(s) will be applied to the constrained Atoms, but because these atoms do not contribute to experimental scattering, their partial derivatives do not need to be considered.
-
constrainedAtomsThatScatter
-
-
Constructor Details
-
RefinedParameter
Constructs a new RefinedParameters object for the specified primaryAtom. The primary atom is set to active, and initialized lists are created for constrained atoms and constrained atoms that contribute to scattering in the refinement process.- Parameters:
atom- the primaryAtomthat serves as the central reference in the refinement process.
-
-
Method Details
-
setIndex
public void setIndex(int index) Sets the index for this RefinedParameter instance.- Parameters:
index- the integer value to set as the index
-
getIndex
public int getIndex()Retrieves the index value associated with this RefinedParameter instance.- Returns:
- the integer index value of this RefinedParameter
-
addConstrainedAtom
Adds an atom to the list of constrained atoms for the given primary atom. This method defines the relationship between the primary atom and other atoms that are constrained or related as part of the refinement process.- Parameters:
atom- the atom to be added as a constrained atom associated with the primary atom.
-
addConstrainedAtomThatScatters
Adds an atom to the list of constrained atoms that contribute to experimental scattering.- Parameters:
atom- the atom to be added as a constrained atom that has scattering contributions.
-
getNumberOfParameters
public abstract int getNumberOfParameters()Retrieves the number of parameters associated with this refineable. Concrete implementations define how the parameters are determined and counted.- Returns:
- the number of parameters related to this refinement process.
-
getParameters
public abstract void getParameters(double[] parameters) Get parameters from this RefinedParameter instance. Concrete implementations define how the given parameter values are processed and associated with the refinement process.- Parameters:
parameters- an array of double values representing all refined parameters.
-
setParameters
public abstract void setParameters(double[] parameters) Set parameter values into this RefinedParameter instance.- Parameters:
parameters- an array of double values representing all refined parameters.
-
getVelocity
public abstract void getVelocity(double[] velocity) Retrieves the velocities associated with the refined parameters.- Parameters:
velocity- an array of double values where the velocities of the refined parameters will be stored.
-
setVelocity
public abstract void setVelocity(double[] velocity) Sets the velocities for the refined parameters.- Parameters:
velocity- an array of double values representing the velocities for each refined parameter
-
getAcceleration
public abstract void getAcceleration(double[] acceleration) Retrieves the acceleration values associated with the refined parameters. Concrete implementations define how the acceleration data is retrieved and processed.- Parameters:
acceleration- an array of double values where the accelerations of the refined parameters will be stored
-
setAcceleration
public abstract void setAcceleration(double[] acceleration) Sets the acceleration values for the refined parameters. This method updates the acceleration for each refined parameter based on the provided array.- Parameters:
acceleration- an array of double values representing the acceleration for each refined parameter
-
getPreviousAcceleration
public abstract void getPreviousAcceleration(double[] acceleration) Retrieves the previous acceleration values associated with the refined parameters. Concrete implementations define how the previous acceleration data is retrieved and processed.- Parameters:
acceleration- an array of double values where the previous accelerations of the refined parameters will be stored
-
setPreviousAcceleration
public abstract void setPreviousAcceleration(double[] acceleration) Sets the previous acceleration values for the refined parameters. This method updates the previous acceleration for each refined parameter based on the provided array.- Parameters:
acceleration- an array of double values representing the previous acceleration for each refined parameter
-
setOptimizationScaling
public abstract void setOptimizationScaling(double[] optimizationScaling) Sets the optimization scaling factors for this RefinedParameter instance. The scaling factors are typically used to adjust the magnitude of parameter updates during optimization processes, ensuring appropriate convergence behavior.- Parameters:
optimizationScaling- an array of double values representing the scaling factors for each optimization parameter.
-
zeroGradient
public abstract void zeroGradient()Zero out the gradient for this RefinedParameter. -
getGradient
public abstract void getGradient(double[] gradient) Load the gradient for this RefinedParameter. -
getMass
public abstract void getMass(double[] mass, double defaultMass) Mass for extended Lagrangian- Parameters:
mass- Store the mass to use for this parameter.defaultMass- The default mass to use for this parameter.
-