Package ffx.xray

Class DiffractionRefinementData

java.lang.Object
ffx.xray.DiffractionRefinementData

public class DiffractionRefinementData extends Object
DiffractionRefinementData class.
Since:
1.0
Author:
Timothy D. Fenn
  • Field Details

    • n

      public final int n
      Number of reflections in the data set.
    • freeR

      public final int[] freeR
      Array of R free flags;
    • fc

      public final double[][] fc
      Calculated atomic structure factors.
    • fs

      public final double[][] fs
      Calculated bulk solvent structure factors.
    • fomPhi

      public final double[][] fomPhi
      Figure of merit and phase.
    • foFc1

      public final double[][] foFc1
      mFo - DFc coefficients.
    • fSigFCutoff

      public final double fSigFCutoff
    • spline

      public double[] spline
      Spine scaling coefficients.
    • sigmaA

      public double[] sigmaA
      SigmaA coefficient - s.
    • sigmaW

      public double[] sigmaW
      SigmaA coefficient - w.
    • rFreeFlag

      public int rFreeFlag
      Duplicated settings - these are also in DiffractionData, but duplicated here until settings are put in their own class.
  • Constructor Details

    • DiffractionRefinementData

      public DiffractionRefinementData(org.apache.commons.configuration2.CompositeConfiguration properties, ReflectionList reflectionList)
      allocate data given a ReflectionList
      Parameters:
      properties - configuration properties
      reflectionList - ReflectionList to use to allocate data
  • Method Details

    • FoFc2F

      public double FoFc2F(int i)
      FoFc2F
      Parameters:
      i - a int.
      Returns:
      a double.
    • FoFc2Phi

      public double FoFc2Phi(int i)
      FoFc2Phi
      Parameters:
      i - a int.
      Returns:
      a double.
    • fcF

      public double fcF(int i)
      get the amplitude of a complex Fc
      Parameters:
      i - reflection to get
      Returns:
      amplitude of Fc
    • fcPhi

      public double fcPhi(int i)
      get the phase of a complex Fc
      Parameters:
      i - reflection to get
      Returns:
      phase of Fc
    • fcTotF

      public double fcTotF(int i)
      fcTotF
      Parameters:
      i - a int.
      Returns:
      a double.
    • fcTotPhi

      public double fcTotPhi(int i)
      fcTotPhi
      Parameters:
      i - a int.
      Returns:
      a double.
    • foFc1F

      public double foFc1F(int i)
      foFc1F
      Parameters:
      i - a int.
      Returns:
      a double.
    • foFc1Phi

      public double foFc1Phi(int i)
      foFc1Phi
      Parameters:
      i - a int.
      Returns:
      a double.
    • fsF

      public double fsF(int i)
      fsF
      Parameters:
      i - a int.
      Returns:
      a double.
    • fsPhi

      public double fsPhi(int i)
      fsPhi
      Parameters:
      i - a int.
      Returns:
      a double.
    • generateFsigFfromAnomalousFsigF

      public void generateFsigFfromAnomalousFsigF(double[][] anomalousFsigF)
      Generate average F/sigF from anomalous F/sigF.
      Parameters:
      anomalousFsigF - an array of double.
    • generateRFree

      public void generateRFree()
      Mark 5% of reflections for cross validation (R free flags).
    • getF

      public double getF(int i)
      getF
      Parameters:
      i - a int.
      Returns:
      a double.
    • getFSigF

      public double[] getFSigF(int i)
      getFSigF
      Parameters:
      i - a int.
      Returns:
      an array of double.
    • getFcTot

      public ComplexNumber getFcTot(int i)
      getFcTot
      Parameters:
      i - a int.
      Returns:
      a ComplexNumber object.
    • getFoFc1

      public ComplexNumber getFoFc1(int i)
      getFoFc1
      Parameters:
      i - a int.
      Returns:
      a ComplexNumber object.
    • getFoFc1IP

      public void getFoFc1IP(int i, ComplexNumber c)
      getFoFc1IP
      Parameters:
      i - a int.
      c - a ComplexNumber object.
    • getFoFc2

      public ComplexNumber getFoFc2(int i)
      getFoFc2
      Parameters:
      i - a int.
      Returns:
      a ComplexNumber object.
    • getFoFc2IP

      public void getFoFc2IP(int i, ComplexNumber c)
      getFoFc2IP
      Parameters:
      i - a int.
      c - a ComplexNumber object.
    • getFreeR

      public int getFreeR(int i)
      getFreeR
      Parameters:
      i - a int.
      Returns:
      a int.
    • getFs

      public ComplexNumber getFs(int i)
      getFs
      Parameters:
      i - a int.
      Returns:
      a ComplexNumber object.
    • getSigF

      public double getSigF(int i)
      getSigF
      Parameters:
      i - a int.
      Returns:
      a double.
    • intensitiesToAmplitudes

      public void intensitiesToAmplitudes()
      Generate amplitudes from intensities.

      This does NOT use French and Wilson caling, but just a simple square root.

    • isFreeR

      public boolean isFreeR(int i, int f)
      isFreeR
      Parameters:
      i - a int.
      f - a int.
      Returns:
      a boolean.
    • likelihoodFree

      public double likelihoodFree()
      return the current likelihood
      Returns:
      the free likelihood (Rfree based)
    • likelihoodWork

      public double likelihoodWork()
      return the current likelihood
      Returns:
      the work likelihood (non-Rfree based)
    • setF

      public void setF(int i, double f)
      Set amplitude (F).
      Parameters:
      i - reflection to set
      f - value of F desired
    • setFSigF

      public void setFSigF(int i, double f, double sigf)
      Set amplitude and sigF.
      Parameters:
      i - reflection to set
      f - value of F desired
      sigf - value of sigF desired
    • setFc

      public void setFc(int i, ComplexNumber c)
      set complex Fc
      Parameters:
      i - reflection to set
      c - ComplexNumber to set reflection to
    • setFcTot

      public void setFcTot(int i, ComplexNumber c)
      setFcTot
      Parameters:
      i - a int.
      c - a ComplexNumber object.
    • setFoFc1

      public void setFoFc1(int i, ComplexNumber c)
      setFoFc1
      Parameters:
      i - a int.
      c - a ComplexNumber object.
    • setFoFc2

      public void setFoFc2(int i, ComplexNumber c)
      setFoFc2
      Parameters:
      i - a int.
      c - a ComplexNumber object.
    • setFreeR

      public void setFreeR(int i, int f)
      Set FreeR value flag of a reflection.
      Parameters:
      i - reflection to set
      f - FreeR value to set reflection to
    • setFreeRFlag

      public void setFreeRFlag(int i)
      Set FreeR value flag.
      Parameters:
      i - If FreeR value is i, it is marked for cross validation.
    • setFs

      public void setFs(int i, ComplexNumber c)
      setFs
      Parameters:
      i - a int.
      c - a ComplexNumber object.
    • setSigF

      public void setSigF(int i, double sigF)
      Set amplitude sigma (sigF).
      Parameters:
      i - reflection to set
      sigF - value of sigF desired