Clipper
Public Types | Public Member Functions | List of all members
clipper::AtomShapeFn Class Reference

Atomic shape function object. More...

#include <atomsf.h>

Inheritance diagram for clipper::AtomShapeFn:
clipper::AtomSF

Public Types

enum  TYPE {
  X, Y, Z, Uiso,
  Occ, U11, U22, U33,
  U12, U13, U23
}
 

Public Member Functions

 AtomShapeFn ()
 null constructor
 
 AtomShapeFn (const Atom &atom)
 constructor: from atom object More...
 
 AtomShapeFn (const Coord_orth &xyz, const String &element, const ftype u_iso=0.0, const ftype occ=1.0)
 constructor: from coord, element, isotropic U, occupancy More...
 
 AtomShapeFn (const Coord_orth &xyz, const String &element, const U_aniso_orth &u_aniso, const ftype occ=1.0)
 constructor: from coord, element, anisotropic U, occupancy More...
 
void init (const Atom &atom)
 initialiser: from atom object More...
 
void init (const Coord_orth &xyz, const String &element, const ftype u_iso=0.0, const ftype occ=1.0)
 initialiser: from coord, element, isotropic U, occupancy More...
 
void init (const Coord_orth &xyz, const String &element, const U_aniso_orth &u_aniso, const ftype occ=1.0)
 initialiser: from coord, element, anisotropic U, occupancy More...
 
ftype f (const Coord_reci_orth &rfl) const
 return scattering factor as a function of reflection posn More...
 
ftype rho (const Coord_orth &xyz) const
 return electron density as a function of coordinate More...
 
bool rho_grad (const Coord_orth &xyz, ftype &rho, std::vector< ftype > &grad) const
 return Agarwal density gradients as a function of coordinate More...
 
bool rho_curv (const Coord_orth &xyz, ftype &rho, std::vector< ftype > &grad, Matrix< ftype > &curv) const
 return Agarwal density gradient/curvature as a function of coordinate More...
 
bool rho_grad (const Coord_orth &xyz, std::vector< ftype > &grad) const
 
ftype f (const ftype &invresolsq) const
 return (isotropic) scattering factor as a function of resolution More...
 
ftype rho (const ftype &rsq) const
 return (isotropic) electron density as a function of radius More...
 
std::vector< TYPE > & agarwal_params ()
 define parameters for Agarwal gradient/curvature calcs
 

Detailed Description

Atomic shape function object.

The atomic scattering factor object is instantiated for each atom in turn, giving the atom parameters: position, element, occupancy and the isotropic or anisotropic U-value. (See clipper::Util for conversion from B-factors.). The methods of the class may then be called to return the scattering in reciprocal space or density in real space using either isotropic or anistropic models as required.

If the atom only has an isotropic U, the faster isotropic methods will be used where available.

This implementation uses the coefficients from Waasmaier & Kirfel (1995), Acta Cryst. A51, 416-431. The source data can be found at: ftp://wrzx02.rz.uni-wuerzburg.de/pub/local/Crystallography/sfac.dat

Constructor & Destructor Documentation

clipper::AtomShapeFn::AtomShapeFn ( const Atom atom)

constructor: from atom object

If the atom has an anisotropic U (even if the values are isotropic), then it is initialised as anisotropic, otherwise it is isotropic.

Parameters
atomThe atom object.
clipper::AtomShapeFn::AtomShapeFn ( const Coord_orth xyz,
const String element,
const ftype  u_iso = 0.0,
const ftype  occ = 1.0 
)

constructor: from coord, element, isotropic U, occupancy

The atom is initialised as isotropic.

Parameters
xyzThe atom coordinate.
elementThe atom element.
u_isoThe isotropic U-value.
occThe occupancy.
clipper::AtomShapeFn::AtomShapeFn ( const Coord_orth xyz,
const String element,
const U_aniso_orth u_aniso,
const ftype  occ = 1.0 
)

constructor: from coord, element, anisotropic U, occupancy

The atom is initialised as anisotropic.

Parameters
xyzThe atom coordinate.
elementThe atom element.
u_anisoThe anisotropic U-value.
occThe occupancy.

Member Function Documentation

void clipper::AtomShapeFn::init ( const Atom atom)

initialiser: from atom object

If the atom has an anisotropic U (even if the values are isotropic), then it is initialised as anisotropic, otherwise it is isotropic.

Parameters
atomThe atom object.
void clipper::AtomShapeFn::init ( const Coord_orth xyz,
const String element,
const ftype  u_iso = 0.0,
const ftype  occ = 1.0 
)

initialiser: from coord, element, isotropic U, occupancy

The atom is initialised as isotropic.

Parameters
xyzThe atom coordinate.
elementThe atom element.
u_isoThe isotropic U-value.
occThe occupancy.
void clipper::AtomShapeFn::init ( const Coord_orth xyz,
const String element,
const U_aniso_orth u_aniso,
const ftype  occ = 1.0 
)

initialiser: from coord, element, anisotropic U, occupancy

The atom is initialised as anisotropic.

Parameters
xyzThe atom coordinate.
elementThe atom element.
u_anisoThe anisotropic U-value.
occThe occupancy.
ftype clipper::AtomShapeFn::f ( const Coord_reci_orth rfl) const

return scattering factor as a function of reflection posn

Return the scattering factor as a function of position in reciprocal space in electrons.

Parameters
rflPosition in reciprocal space.
Returns
The scattering factor in electrons.
ftype clipper::AtomShapeFn::rho ( const Coord_orth xyz) const

return electron density as a function of coordinate

Return the density as a function of position in real space in electrons.

Parameters
xyzPosition in real space.
Thedensity in electrons.
bool clipper::AtomShapeFn::rho_grad ( const Coord_orth xyz,
ftype rho,
std::vector< ftype > &  grad 
) const

return Agarwal density gradients as a function of coordinate

Return the Agarwal gradients of the density with respect to tha atomic parameters as a function of position in real space in electrons. The parameter list is defined by assignment to agarwal_params().

Parameters
xyzPosition in real space. rho The density in electrons.
gradVector gradient in electrons (pre-size for best performance).
bool clipper::AtomShapeFn::rho_curv ( const Coord_orth xyz,
ftype rho,
std::vector< ftype > &  grad,
Matrix< ftype > &  curv 
) const

return Agarwal density gradient/curvature as a function of coordinate

Return the Agarwal gradients of the density with respect to tha atomic parameters as a function of position in real space in electrons. The parameter list is defined by assignment to agarwal_params().

Parameters
xyzPosition in real space. rho The density in electrons.
gradVector gradient in electrons (pre-size for best performance).
curvMatrix curvature in electrons (pre-size for best performance).
bool clipper::AtomShapeFn::rho_grad ( const Coord_orth xyz,
std::vector< ftype > &  grad 
) const
Deprecated:
return Agarwal density gradients as a function of coordinate
ftype clipper::AtomShapeFn::f ( const ftype invresolsq) const

return (isotropic) scattering factor as a function of resolution

Return the scattering factor as a function of position in reciprocal space in electrons.

Parameters
invresolsqInverse resolution squared in inverse Angstroms squared.
Returns
The scattering factor in electrons.
ftype clipper::AtomShapeFn::rho ( const ftype rsq) const

return (isotropic) electron density as a function of radius

Return the density as a function of position in real space in electrons.

Parameters
invresolsqRadius squared in Angstroms squared.
Thedensity in electrons.

The documentation for this class was generated from the following files: