Package ffx.xray
Class NeutronFormFactor
java.lang.Object
ffx.xray.NeutronFormFactor
- All Implemented Interfaces:
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 Summary
ConstructorDescriptionNeutronFormFactor
(Atom atom) Constructor for NeutronFormFactor.NeutronFormFactor
(Atom atom, double badd) Constructor for NeutronFormFactor.NeutronFormFactor
(Atom atom, double badd, double[] xyz) Constructor for NeutronFormFactor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
fstatic double[]
getFormFactorA
(String atom) getFormFactorAstatic int
getFormFactorIndex
(String atom) getFormFactorIndexdouble
rho
(double f, double lambda, double[] xyz) Compute the real space density rhovoid
rhoGrad
(double[] xyz, double dfc, RefinementMinimize.RefinementMode refinementmode) Compute the real space gradientvoid
update
(double[] xyz) update the coordinates to the current positionvoid
update
(double[] xyz, double badd) update the coordinates to the current position and Badd
-
Constructor Details
-
NeutronFormFactor
Constructor for NeutronFormFactor.- Parameters:
atom
- aAtom
object.
-
NeutronFormFactor
Constructor for NeutronFormFactor.- Parameters:
atom
- aAtom
object.badd
- a double.
-
NeutronFormFactor
Constructor for NeutronFormFactor.- Parameters:
atom
- aAtom
object.badd
- a double.xyz
- an array of double.
-
-
Method Details
-
getFormFactorA
getFormFactorA- Parameters:
atom
- aString
object.- Returns:
- an array of double.
-
getFormFactorIndex
getFormFactorIndex- Parameters:
atom
- aString
object.- Returns:
- a int.
-
f
f- Parameters:
hkl
- aHKL
object.- Returns:
- a double.
-
rho
public double rho(double f, double lambda, double[] xyz) Compute the real space density rho- Specified by:
rho
in interfaceFormFactor
- Parameters:
f
- the current density to modifylambda
- the state variablexyz
- the requested point for evaluating density- Returns:
- the real space density value at xyz
-
rhoGrad
Compute the real space gradient- Specified by:
rhoGrad
in interfaceFormFactor
- Parameters:
xyz
- the requested point for evaluating gradientdfc
- the multiplier to apply to the gradientrefinementmode
-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 interfaceFormFactor
- 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 interfaceFormFactor
- Parameters:
xyz
- an array of double.badd
- a double.
-