Class RefinedParameter

java.lang.Object
ffx.xray.refine.RefinedParameter
Direct Known Subclasses:
RefinedBFactor, RefinedCoordinates, RefinedOccupancy

public abstract class RefinedParameter extends Object
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
    Modifier and Type
    Field
    Description
    protected final Atom
    The primary Atom that serves as the central reference in a refinement process.
    protected final List<Atom>
    A collection of atoms that are constrained in relation to a primary Atom.
    protected final List<Atom>
    A collection of Atom instances that are both constrained with respect to a primary Atom and directly contribute to experimental scattering.
    protected int
    The index of this parameter in the overall parameter array.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructs a new RefinedParameters object for the specified primary Atom.
  • Method Summary

    Modifier and Type
    Method
    Description
    abstract void
    Adds an atom to the list of constrained atoms for the given primary atom.
    abstract void
    Adds an atom to the list of constrained atoms that contribute to experimental scattering.
    abstract void
    getAcceleration(double[] acceleration)
    Retrieves the acceleration values associated with the refined parameters.
    abstract void
    getGradient(double[] gradient)
    Load the gradient for this RefinedParameter.
    int
    Retrieves the index value associated with this RefinedParameter instance.
    abstract void
    getMass(double[] mass, double defaultMass)
    Mass for extended Lagrangian
    abstract int
    Retrieves the number of parameters associated with this refineable.
    abstract void
    getParameters(double[] parameters)
    Get parameters from this RefinedParameter instance.
    abstract void
    getPreviousAcceleration(double[] acceleration)
    Retrieves the previous acceleration values associated with the refined parameters.
    abstract void
    getVelocity(double[] velocity)
    Retrieves the velocities associated with the refined parameters.
    abstract void
    setAcceleration(double[] acceleration)
    Sets the acceleration values for the refined parameters.
    void
    setIndex(int index)
    Sets the index for this RefinedParameter instance.
    abstract void
    setOptimizationScaling(double[] optimizationScaling)
    Sets the optimization scaling factors for this RefinedParameter instance.
    abstract void
    setParameters(double[] parameters)
    Set parameter values into this RefinedParameter instance.
    abstract void
    setPreviousAcceleration(double[] acceleration)
    Sets the previous acceleration values for the refined parameters.
    abstract void
    setVelocity(double[] velocity)
    Sets the velocities for the refined parameters.
    abstract void
    Zero out the gradient for this RefinedParameter.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • atom

      protected final Atom atom
      The primary Atom that 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 index
      The 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

      protected final List<Atom> constrainedAtoms
      A collection of atoms that are constrained in relation to a primary Atom. 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

      protected final List<Atom> constrainedAtomsThatScatter
      A collection of Atom instances that are both constrained with respect to a primary Atom and directly contribute to experimental scattering.

      The partial derivative of the experimental refinement target with respect to this parameter(s) is contributed to by each constrained atom that scatters.

  • Constructor Details

    • RefinedParameter

      public RefinedParameter(Atom atom)
      Constructs a new RefinedParameters object for the specified primary Atom. 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 primary Atom that 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

      public abstract void addConstrainedAtom(Atom atom)
      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

      public abstract void addConstrainedAtomThatScatters(Atom atom)
      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.