Package ffx.xray

Class XRayFormFactor

java.lang.Object
ffx.xray.XRayFormFactor
All Implemented Interfaces:
FormFactor

public final class XRayFormFactor extends Object implements FormFactor
This implementation uses the coefficients from Su and Coppens and 3 coefficient parameters derived from CCTBX.
Since:
1.0
Author:
Timothy D. Fenn
See Also:
  • Constructor Details

    • XRayFormFactor

      public XRayFormFactor(Atom atom)
      Constructor for XRayFormFactor.
      Parameters:
      atom - a Atom object.
    • XRayFormFactor

      public XRayFormFactor(Atom atom, boolean use3G)
      Constructor for XRayFormFactor.
      Parameters:
      atom - a Atom object.
      use3G - a boolean.
    • XRayFormFactor

      public XRayFormFactor(Atom atom, boolean use3G, double badd)
      Constructor for XRayFormFactor.
      Parameters:
      atom - a Atom object.
      use3G - a boolean.
      badd - a double.
    • XRayFormFactor

      public XRayFormFactor(Atom atom, boolean use3G, double badd, double[] xyz)
      Constructor for XRayFormFactor.
      Parameters:
      atom - a Atom object.
      use3G - a boolean.
      badd - a double.
      xyz - an array of double.
  • Method Details

    • getFormFactorA

      public static double[] getFormFactorA(String atom)
      getFormFactorA
      Parameters:
      atom - a String object.
      Returns:
      an array of double.
    • getFormFactorB

      public static double[] getFormFactorB(String atom)
      getFormFactorB
      Parameters:
      atom - a String object.
      Returns:
      an array of double.
    • getFormFactorIndex

      public static int getFormFactorIndex(String atom)
      getFormFactorIndex
      Parameters:
      atom - a String object.
      Returns:
      a int.
    • f

      public double f(HKL hkl)
      f
      Parameters:
      hkl - a HKL object.
      Returns:
      a double.
    • fN

      public double fN(HKL hkl, int nGaussians)
      f_n
      Parameters:
      hkl - a HKL object.
      nGaussians - a int.
      Returns:
      a double.
    • rho

      public double rho(double f, double lambda, double[] xyz)
      Compute the real space density rho
      Specified by:
      rho in interface FormFactor
      Parameters:
      f - the current density to modify
      lambda - the state variable
      xyz - the requested point for evaluating density
      Returns:
      the real space density value at xyz
    • rhoGrad

      public void rhoGrad(double[] xyz, double dfc, RefinementMinimize.RefinementMode refinementMode)
      Compute the real space gradient
      Specified by:
      rhoGrad in interface FormFactor
      Parameters:
      xyz - the requested point for evaluating gradient
      dfc - the multiplier to apply to the gradient
      refinementMode - RefinementMinimize.RefinementMode determines which gradients will be computed
    • update

      public void update(double[] xyz)
      update the coordinates to the current position
      Specified by:
      update in interface FormFactor
      Parameters:
      xyz - an array of double.
    • update

      public void update(double[] xyz, double bAdd)
      update the coordinates to the current position and Badd
      Specified by:
      update in interface FormFactor
      Parameters:
      xyz - an array of double.
      bAdd - a double.