Package ffx.xray

Class NeutronFormFactor

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

public final class NeutronFormFactor extends Object implements FormFactor
This implementation uses the coefficients from International Tables, Vol. C, chapter 4.4.4.
Since:
1.0
Author:
Timothy D. Fenn
See Also:
  • Constructor Details

    • NeutronFormFactor

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

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

      public NeutronFormFactor(Atom atom, double badd, double[] xyz)
      Constructor for NeutronFormFactor.
      Parameters:
      atom - a Atom object.
      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.
    • 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.
    • 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.