ObjCryst++  1.5CVS
Classes | Enumerations | Functions | Variables
ObjCryst Namespace Reference

The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++. More...

Classes

class  Atom
 The basic atom scatterer, in a crystal. More...
class  CIFData
 The CIFData class holds all the information from a single data_ block from a cif file. More...
class  CIF
 Main CIF class - parses the stream and separates data blocks, comments, items, loops. More...
class  Crystal
 Crystal class: Unit cell, spacegroup, scatterers. More...
class  DiffractionDataSingleCrystal
 DiffractionData object for Single Crystal analysis. More...
class  ObjCrystException
 Exception class for ObjCryst++ library. More...
class  SymmetricPairCompare
 Class to compare pairs of objects, with the two objects playing a symmetric role. More...
struct  CrystalPOVRayOptions
 Class to store POV-Ray output options. More...
class  RecUnitCell
 Lightweight class describing the reciprocal unit cell, for the fast computation of d*_hkl^2. More...
class  PeakList
 Class to store positions of observed reflections. More...
class  CellExplorer
 Algorithm class to find the correct indexing from observed peak positions. More...
struct  XYZ
 Structure holding 3 coordinates, or deriviatives with respect to each of these coordinates. More...
class  MolAtom
 MolAtom : atom inside a Molecule. More...
class  MolBond
 Bond between two atoms, also a restraint on the associated bond length. More...
class  MolBondAngle
 Bond angle restraint between 3 atoms. More...
class  MolDihedralAngle
 Dihedral angle restraint between 4 atoms. More...
class  MolRing
 Ring class. More...
class  Quaternion
 A quaternion class, used to represent the orientation of the molecule. More...
class  RigidGroup
 Rigid groups of atoms inside a molecule. More...
struct  StretchMode
 Abstract base Stretch Mode for Molecule objects. More...
struct  StretchModeBondLength
 Group of atoms for random moves changing a bond length. More...
struct  StretchModeBondAngle
 Atoms moved when changing a bond angle. More...
struct  StretchModeTorsion
 Atoms moved when rotated around a bond at0-at1-at2-at3. More...
struct  StretchModeTwist
 Atoms moved between two other atoms, using a "twist" *of their positions - only small twists of their positions are allowed to avoid breaking restraints too much. More...
struct  MDAtomGroup
 Groups of atoms that can be moved using molecular dynamics principles, taking a list of restraints as ptential. More...
struct  MolZAtom
 Light-weight representation of an atom in the molecule, as a part of a Z-matrix. More...
class  Molecule
 Molecule : class for complex scatterer descriptions using cartesian coordinates with bond length/angle restraints, and moves either of individual atoms or using torsion bonds. More...
class  PDF
 Main class for Pair distribution function calculations and comparison to observed one. More...
class  PDFPhase
 Contribution to a PDF. More...
class  PDFCrystal
 Class for Pair Distribution Function calculations for a single Crystal object. More...
class  PowderPatternComponent
 Generic class to compute components (eg the contribution of a given phase, or background) of a powder pattern. More...
class  PowderPatternBackground
 Phase to compute a background contribution to a powder pattern using an interpolation. More...
class  PowderPatternDiffraction
 Class to compute the contribution to a powder pattern from a crystalline phase. More...
class  PowderPattern
 Powder pattern class, with an observed pattern and several calculated components to modelize the pattern. More...
class  PowderPatternBackgroundBayesianMinimiser
 This object is used to estimate the background in a powder pattern, using a Bayesian approach (David & Sivia, Acta Cryst A50 (1994), 703) More...
class  ReflectionProfile
 Abstract base class for reflection profiles. More...
class  ReflectionProfilePseudoVoigt
 Pseudo-Voigt reflection profile. More...
class  ReflectionProfileDoubleExponentialPseudoVoigt
 Double-Exponential Pseudo-Voigt profile for TOF. More...
class  Scatterer
 Generic type of scatterer: can be an atom, or a more complex assembly of atoms. More...
class  ScatteringCorr
 Base class to compute all kind of corrections to intensities: Lorentz, Polar, absorption, texcture, extinction, etc... More...
class  LorentzCorr
 Lorentz Correction. More...
class  PolarizationCorr
 Polarization Correction. More...
class  PowderSlitApertureCorr
 Slit aperture correction (for powder) More...
struct  TexturePhaseMarchDollase
 One texture phase for the March-Dollase model. More...
class  TextureMarchDollase
 Texture correction using the March-Dollase model. More...
class  TOFCorr
 Time-Of-Flight Correction. More...
class  Radiation
 Class to define the radiation (type, monochromaticity, wavelength(s)) of an experiment. More...
class  ScatteringData
 Class to compute structure factors for a set of reflections and a Crystal. More...
class  ScatteringPower
 Abstract Base Class to describe the scattering power of any Scatterer component in a crystal. More...
class  ScatteringPowerAtom
 The Scattering Power for an Atom. More...
struct  ScatteringComponent
 A scattering position in a crystal, associated with the corresponding occupancy and a pointer to the ScatteringPower. More...
class  ScatteringComponentList
 list of scattering positions in a crystal, associated with the corresponding occupancy and a pointer to the ScatteringPower. More...
class  ScatteringPowerSphere
 \ brief ScatteringPower for a spherical particule More...
class  AsymmetricUnit
 The basic description of spacegroup asymmetric unit. More...
class  SpaceGroup
 The crystallographic space group, and the cell choice. More...
struct  SpeedTestReport
 Structure to hold the results of a speedtest (see ObjCryst::SpeedTest()) More...
class  UnitCell
 Unit Cell class: Unit cell with spacegroup information. More...
class  GlobalScatteringPower
 Global Scattering Power. More...
class  ZAtom
 Class for individual atoms in a ZScatterer Object. More...
class  ZMoveMinimizer
 Class to minimize conformation changes for random moves. More...
class  ZScatterer
 ZScatterer: the basic type of complex scatterers, where atom positions are defined using a standard "Z-Matrix" description. More...
class  ZPolyhedron
 ZPolyhedron: a Scatterer to describe polyhedras such as octahedron, tetrahedron, square plane, etc... More...
class  OptimizationObj
 Base object for Optimization methods. More...
class  MonteCarloObj
 Base object for Monte-Carlo Global Optimization methods. More...
class  XMLCrystTag
 class to input or output a well-formatted xml beginning or ending tag. More...
class  LSQNumObj
 (Quick & dirty) Least-Squares Refinement Object with Numerical derivatives More...
class  LSQRegularizationOperator
 Simple Regularization Operator for the Least-Squares Refinement. More...
class  RefParType
 class of refinable parameter types. More...
class  RefinableObjClock
 We need to record exactly when refinable objects have been modified for the last time (to avoid re-computation), and to do that we need a precise time. More...
class  Restraint
 Restraint: generic class for a restraint of a given model. More...
class  RefinablePar
 Generic class for parameters of refinable objects. More...
class  RefObjOpt
 Base class for options. More...
class  RefObjOption
 Class for options of RefinableObj, templated so that we can warn the object that something has been changed. More...
class  ObjRegistry
 Object Registry. More...
class  RefinableObj
 Generic Refinable Object. More...
class  SimplexObj
 Conjugate Gradient Algorithm object. More...
class  Tracker
 A class to track the variation of parameters as a function of a number of cycles/trials. More...
class  MainTracker
 A class to hold all trackers. More...
class  TrackerObject
 Tracker for objects (RefinableObj, Crystal, PowderPattern, RefPar,...) More...
class  WXAtom
 wxCryst class for Atoms More...
class  wxMultiChoiceDialog_ListBox
 Provides the same functionnality as wxMultiChoiceDialog, but always using a wxListBox, which is much easier when selecting a large number of successive choices (using shift-click). More...
class  WXCRYST_ID
 Class to automatically assign a unique wxID to each window. More...
class  WXCrystObjBasic
 Abstract base class for all objects in wxCryst. More...
class  WXCrystObjBasicList
 A List of WXCrystObjBasic. More...
class  WXCrystObj
 Base class for all displayed ObjCryst objects (with a title, and a sizer to stack objects). More...
class  WXField
 This is the abstract base class for all fields, wether they contain a floating-point parameter, or a string,... More...
class  WXFieldString
 A field which directly links to a string. More...
class  WXFieldName
 A field with the name of a WXCrystObj. More...
class  WXFieldParBase
 A field for a parameter. More...
class  WXFieldPar
 A field for a parameter. More...
class  WXFieldChoice
 Class to pick one choice... More...
class  WXCrystMenuBar
 Our own local menu bar, using buttons and Popup menus. More...
class  WXCrystal
 wxCryst class for Crystals More...
class  WXDiffractionSingleCrystal
 WX Class for DiffractionDataSingleCrystal objects. More...
class  WXOptimizationObj
 WX Class for a Global Optimization objects. More...
class  WXGlobalOptimRunThread
 Class for a GlobalOptimization thread. More...
class  WXMonteCarloObj
 Class for Graphical interface to Monte-Carlo objects (Simulated Annealing, Parallel Tempering) More...
class  WXMolAtom
 wx class for MolAtom objects More...
class  WXMolBond
 wx class for MolBond objects More...
class  WXMolBondAngle
 wx class for MolBondAngle objects More...
class  WXMolDihedralAngle
 wx class for MolDihedralAngle objects More...
class  WXMolecule
 wxCryst class for Molecule objects More...
class  WXPowderPattern
 WX Class for PowderPattern objects. More...
class  WXPowderPatternGraph
 Class to display a Powder Pattern (calc,obs) in a graphic window. More...
class  WXPowderPatternBackground
 Class to display a Powder Pattern Background. More...
class  WXTexturePhaseMarchDollase
 Class to display one Preferred Orientation phase using the March-Dollase parametrization. More...
class  WXTextureMarchDollase
 Class to display the Preferred Orientation Correction using the March-Dollase parametrization. More...
class  WXPowderPatternDiffraction
 Class to display a Powder Pattern for a crystalline phase. More...
class  WXProfilePseudoVoigt
 Class to display a Powder Pattern Pseudo-Voigt Profile. More...
class  WXProfileDoubleExponentialPseudoVoigt
 Class to display a Powder Pattern Pseudo-Voigt Profile. More...
class  WXRadiation
 WX Class for Radiation. More...
class  WXFieldRefPar
 A field for a RefinablePar. More...
class  WXFieldOption
 WX representation of a RefObj option. This displays the names of the different choices. More...
class  WXRegistry
 This displays all components of a ObjCryst++ Registry. More...
class  WXRefinableObj
 The base wxCryst class for all RefinableObj objects. More...
class  WXScatterer
 base wxCryst class for Scatterers More...
class  WXScatteringPowerAtom
 wxCryst class for ScatteringPowerAtom More...
class  WXScatteringPowerSphere
 wxCryst class for ScatteringPowerSphere More...
class  WXZScatterer
 wxCryst class for ZScatterer objects More...

Enumerations

enum  RadiationType { RAD_NEUTRON, RAD_XRAY, RAD_ELECTRON }
 Type of radiation used. More...
enum  SampleType { SAMPLE_SINGLE_CRYSTAL, SAMPLE_POWDER }
 Sample type (not used yet)
enum  WavelengthType {
  WAVELENGTH_MONOCHROMATIC, WAVELENGTH_ALPHA12, WAVELENGTH_TOF, WAVELENGTH_MAD,
  WAVELENGTH_DAFS, WAVELENGTH_LAUE
}
 Incident beam characteristics : monochromatic, X-Ray tube with Alpha1 and alpha2, MAD (a few wavelengths-UNUSED YET), DAFS (continuous wavelength range-UNUSED YET) LAUE (UNUSED YET), WAVELENGTH_TOF (neutron Time Of Flight)
enum  ReflectionProfileType {
  PROFILE_GAUSSIAN, PROFILE_LORENTZIAN, PROFILE_PSEUDO_VOIGT, PROFILE_PSEUDO_VOIGT_FINGER_COX_JEPHCOAT,
  PROFILE_PEARSON_VII
}
 Profile type for powder (could it be used fopr single crystals on 2D detectors ?)
enum  PowderBackgroundInterpType { POWDER_BACKGROUND_LINEAR, POWDER_BACKGROUND_CUBIC_SPLINE }
enum  CrystalSystem {
  TRICLINIC, MONOCLINIC, ORTHOROMBIC, HEXAGONAL,
  RHOMBOEDRAL, TETRAGONAL, CUBIC
}
 Different lattice types.
enum  CrystalCentering {
  LATTICE_P, LATTICE_I, LATTICE_A, LATTICE_B,
  LATTICE_C, LATTICE_F
}
enum  RegularPolyhedraType {
  TETRAHEDRON, OCTAHEDRON, SQUARE_PLANE, CUBE,
  ANTIPRISM_TETRAGONAL, PRISM_TETRAGONAL_MONOCAP, PRISM_TETRAGONAL_DICAP, PRISM_TRIGONAL,
  PRISM_TRIGONAL_TRICAPPED, ICOSAHEDRON, TRIANGLE_PLANE
}
enum  AnnealingSchedule {
  ANNEALING_CONSTANT, ANNEALING_BOLTZMANN, ANNEALING_CAUCHY, ANNEALING_EXPONENTIAL,
  ANNEALING_SMART, ANNEALING_GAMMA
}
 Annealing schedule type. More...
enum  GlobalOptimType {
  GLOBAL_OPTIM_SIMULATED_ANNEALING, GLOBAL_OPTIM_PARALLEL_TEMPERING, GLOBAL_OPTIM_GENETIC, GLOBAL_OPTIM_SIMULATED_ANNEALING_MULTI,
  GLOBAL_OPTIM_PARALLEL_TEMPERING_MULTI
}
 Global optimization type. More...
enum  RefParDerivStepModel { REFPAR_DERIV_STEP_ABSOLUTE, REFPAR_DERIV_STEP_RELATIVE }
 How do we compute steps h for numerical derivative calculation : d=f(x+h)-f(x-h)/h/2 either h is fixed (absolute), or relative h=x*derivFactor.

Functions

float CIFNumeric2Float (const std::string &s)
 Convert one CIF value to a floating-point value Return 0 if no value can be converted (e.g.
int CIFNumeric2Int (const std::string &s)
 Convert one CIF value to a floating-point value Return 0 if no value can be converted (e.g.
CrystalCreateCrystalFromCIF (CIF &cif, const bool verbose=true, const bool checkSymAsXYZ=true)
 Extract Crystal object(s) from a CIF, if possible.
PowderPatternCreatePowderPatternFromCIF (CIF &cif)
 Create PowderPattern object(s) from a CIF, if possible.
DiffractionDataSingleCrystalCreateSingleCrystalDataFromCIF (CIF &cif, Crystal *pryst=0)
 Create DiffractionDataSingleCrystal object(s) from a CIF, if possible.
void ObjCrystInformUserStdOut (const string &)
 Print some information for the user during long processes.
void RealGeomStructFactor (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_1 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_2 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67ba_c (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67cab (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67_cba (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67bca (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_67a_cb (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_97 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void RealGeomStructFactor_230 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor_centro (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &isf)
void ImagGeomStructFactor_1 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &isf)
void ImagGeomStructFactor_2 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &isf)
void ImagGeomStructFactor_67 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &isf)
void ImagGeomStructFactor_67ba_c (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor_67cab (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor_67_cba (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor_67bca (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor_67a_cb (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &rsf)
void ImagGeomStructFactor_97 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &isf)
void ImagGeomStructFactor_230 (const REAL x, const REAL y, const REAL z, const CrystVector_REAL &h, const CrystVector_REAL &k, const CrystVector_REAL &l, CrystVector_REAL &isf)
float EstimateCellVolume (const float dmin, const float dmax, const float nbrefl, const CrystalSystem system, const CrystalCentering centering, const float kappa=1)
 Estimate volume from number of peaks at a given dmin See J.
float Score (const PeakList &dhkl, const RecUnitCell &ruc, const unsigned int nbSpurious=0, const bool verbose=false, const bool storehkl=false, const bool storePredictedHKL=false)
 Compute score for a candidate RecUnitCell and a PeakList.
void XMLCrystFileSaveGlobal (const string &filename)
 Save all Objcryst++ objects.
void XMLCrystFileSaveGlobal (std::ostream &out)
 Save all Objcryst++ objects.
ObjRegistry< XMLCrystTagXMLCrystFileLoadObjectList (const string &filename)
 Get the list (tags) of ObjCryst objects in a file.
template<class T >
void XMLCrystFileLoadObject (const string &file, const string &tagName, const string &name, T *obj)
 Load an object from a file, identifying it from its tag.
void XMLCrystFileLoadAllObject (const string &file)
 Load all 'top' objects from a file (Crystal, PowderPattern, DiffDataSingleCrystal and GlobalOptimObj objects).
void XMLCrystFileLoadAllObject (std::istream &is)
 Load all 'top' objects from a file (Crystal, PowderPattern, DiffDataSingleCrystal and GlobalOptimObj objects).
REAL GetBondLength (const MolAtom &, const MolAtom &)
 Get The Bond Length between two atoms.
REAL GetBondAngle (const MolAtom &, const MolAtom &, const MolAtom &)
 Get The Bond Angle of 3 atoms.
REAL GetDihedralAngle (const MolAtom &, const MolAtom &, const MolAtom &, const MolAtom &)
 Get The dihedral angle defined by 4 atoms.
void ExpandAtomGroupRecursive (MolAtom *atom, const map< MolAtom *, set< MolAtom * > > &connect, set< MolAtom * > &atomlist, const MolAtom *finalAtom=0)
 Build recursively a list of atoms, starting from a one atom, and given a connectivity table.
MoleculeMakeTetrahedron (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakeOctahedron (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakeSquarePlane (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakeCube (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakeAntiPrismTetragonal (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakePrismTrigonal (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakeIcosahedron (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
MoleculeMakeTriangle (Crystal &cryst, const string &name, const ScatteringPower *centralAtom, const ScatteringPower *peripheralAtom, const REAL dist)
 normalized (ie integral is equal to 1)
as a function of theta and of
the FWHM The input is an array
of the theta values The
maximum of the function is in
negative tth values must be
first CrystVector_REAL 
PowderProfileGauss (const CrystVector_REAL theta, const REAL fwhm, const REAL asymmetryPar=1.)
as a function of theta and of
the FWHM The input is an array
of the theta values The
maximum of the function is in
negative tth values must be
first CrystVector_REAL 
PowderProfileLorentz (const CrystVector_REAL theta, const REAL fwhm, const REAL asymmetryPar=1.)
CrystVector_REAL PowderProfileGauss (const CrystVector_REAL theta, const REAL fwhm, const REAL center, const REAL asym=1.0)
 Gaussian, normalized (ie integral is equal to 1), as a function of theta and of the FWHM.
CrystVector_REAL PowderProfileLorentz (const CrystVector_REAL theta, const REAL fwhm, const REAL center, const REAL asym=1.0)
 Lorentzian, normalized (ie integral is equal to 1), as a function of theta and of the FWHM.
CrystVector_REAL AsymmetryBerarBaldinozzi (const CrystVector_REAL theta, const REAL fwhm, const REAL center, const REAL A0, const REAL A1, const REAL B0, const REAL B1)
 Asymmetry function [Ref J. Appl. Cryst 26 (1993), 128-129.
template<class T >
std::complex< T > ExponentialIntegral1 (const complex< T > z)
 Complex exponential integral E1(z) (Abramowitz & Stegun, chap.
template<class T >
std::complex< T > ExponentialIntegral1_ExpZ (const complex< T > z)
 E1(z)*exp(z)
void InitLibCrystTabulCosine ()
void DeleteLibCrystTabulCosine ()
void InitLibCrystTabulExp ()
void DeleteLibCrystTabulExp ()
SpeedTestReport SpeedTest (const unsigned int nbAtom, const int nbAtomType, const string spacegroup, const RadiationType radiation, const unsigned long nbReflections, const unsigned int dataType, const REAL time)
float InputFloat (istream &is, const char endchar=' ')
 Safely read a floating-point value from a stream.
bool ISNAN_OR_INF (REAL r)
 Test if the value is a NaN.
ostream & operator<< (ostream &, const XMLCrystTag &)
 Output an XMLCrystTag to a stream.
istream & operator>> (istream &, XMLCrystTag &)
 Input an XMLCrystTag from a stream.
void GetRefParListClockRecursive (ObjRegistry< RefinableObj > &reg, RefinableObjClock &clock)
 Get the last time any RefinablePar was added in a recursive list of objects.
template<class T >
void RefObjRegisterRecursive (T &obj, ObjRegistry< T > &reg)
 Register a new object in a registry, and recursively include all included (sub)objects.
void GetSubRefObjListClockRecursive (ObjRegistry< RefinableObj > &reg, RefinableObjClock &clock)
 Get the last time any object was added in the recursive list of objects.
void WXCrystValidateAllUserInput ()
 This function validates all user input (in a WXField) not yet taken into account, if needs be.
template<class T >
T * WXDialogChooseFromRegistry (ObjRegistry< T > &reg, wxWindow *parent, const string &message, int &)
 This function allows to pick up one object in a registry.
template<class T >
const T * WXDialogChooseFromRegistry (const ObjRegistry< T > &reg, wxWindow *parent, const string &message, int &)
 This function allows to pick up one object in a registry.

Variables

const RefParTypegpRefParTypeCrystal
static
NiftyStaticGlobalObjectsInitializer_Crystal 
NiftyStaticGlobalObjectsInitializer_Crystal_counter
ObjRegistry< CrystalgCrystalRegistry
 Global registry for all Crystal objects.
ObjRegistry
< DiffractionDataSingleCrystal
gDiffractionDataSingleCrystalRegistry
 Global registry for all PowderPattern objects.
void(* fpObjCrystInformUser )(const string &)
 Pointer to a function for passing info to the user during or after long/important processes (use scarcely!)
const RefParTypegpRefParTypePDF
ObjRegistry< PDFgPDFRegistry
 Global registry for all PDF objects.
ObjRegistry
< PowderPatternComponent
gPowderPatternComponentRegistry
 Global registry for all PowderPatternComponent objects.
Global registry for all
PowderPattern objects
ObjRegistry< PowderPattern
gPowderPatternRegistry
 Gaussian
as a function of theta and of
the FWHM The input is an array
of the theta values The
maximum of the function is in 
theta = 0. If asymmetry is used
 Lorentzian
ObjRegistry< ReflectionProfilegReflectionProfileRegistry
 Global registry for all ReflectionProfile objects.
const RefParTypegpRefParTypeScatt
const RefParTypegpRefParTypeScattTransl
const RefParTypegpRefParTypeScattTranslX
const RefParTypegpRefParTypeScattTranslY
const RefParTypegpRefParTypeScattTranslZ
const RefParTypegpRefParTypeScattOrient
const RefParTypegpRefParTypeScattConform
const RefParTypegpRefParTypeScattConformBondLength
const RefParTypegpRefParTypeScattConformBondAngle
const RefParTypegpRefParTypeScattConformDihedAngle
const RefParTypegpRefParTypeScattConformX
const RefParTypegpRefParTypeScattConformY
const RefParTypegpRefParTypeScattConformZ
const RefParTypegpRefParTypeScattOccup
static
NiftyStaticGlobalObjectsInitializer_Scatterer 
NiftyStaticGlobalObjectsInitializer_Scatterer_counter
ObjRegistry< ScatterergScattererRegistry
 Global registry for all Scatterer objects.
const RefParTypegpRefParTypeScattData
 Generic type for scattering data.
const RefParTypegpRefParTypeScattDataScale
 Type for scattering data scale factors.
const RefParTypegpRefParTypeScattDataProfile
 Type for reflection profile.
const RefParTypegpRefParTypeScattDataProfileType
 Type for reflection profiles type (e.g. gaussian/lorentzian mix)
const RefParTypegpRefParTypeScattDataProfileWidth
 Type for reflection profile width.
const RefParTypegpRefParTypeScattDataProfileAsym
 Type for reflection profile asymmetry.
const RefParTypegpRefParTypeScattDataCorr
 Generic type for scattering data correction parameter.
const RefParTypegpRefParTypeScattDataCorrInt
 Generic type for correction to calculated intensities.
const RefParTypegpRefParTypeScattDataCorrIntPO_Direction
 Parameter type for preferred orientation direction.
const RefParTypegpRefParTypeScattDataCorrIntPO_Fraction
 Parameter type for fraction of preferred orientation.
const RefParTypegpRefParTypeScattDataCorrIntPO_Amplitude
 Parameter type for the amplitude of preferred orientation.
const RefParTypegpRefParTypeScattDataCorrIntAbsorp
 Parameter type for absorption correction.
const RefParTypegpRefParTypeScattDataCorrIntPolar
 Parameter type for polarization correction.
const RefParTypegpRefParTypeScattDataCorrIntExtinc
 Parameter type for extinction correction.
const RefParTypegpRefParTypeScattDataCorrPos
 Parameter type for correction to peak positions.
const RefParTypegpRefParTypeScattDataBackground
 Parameter type for background intensity.
const RefParTypegpRefParTypeRadiation
const RefParTypegpRefParTypeRadiationWavelength
static
NiftyStaticGlobalObjectsInitializer_ScatteringData 
NiftyStaticGlobalObjectsInitializer_ScatteringData_counter
const RefParTypegpRefParTypeScattPow
const RefParTypegpRefParTypeScattPowResonant
const RefParTypegpRefParTypeScattPowTemperature
const RefParTypegpRefParTypeScattPowTemperatureIso
const RefParTypegpRefParTypeScattPowTemperatureAniso
static
NiftyStaticGlobalObjectsInitializer_ScatteringPower 
NiftyStaticGlobalObjectsInitializer_ScatteringPower_counter
ObjRegistry< ScatteringPowergScatteringPowerRegistry
 Global registry for all ScatteringPower objects.
ObjRegistry< ScatteringPowerAtomgScatteringPowerAtomRegistry
 Global registry for all ScatteringPowerAtom objects.
const RefParTypegpRefParTypeUnitCell
const RefParTypegpRefParTypeUnitCellLength
const RefParTypegpRefParTypeUnitCellAngle
static
NiftyStaticGlobalObjectsInitializer_UnitCell 
NiftyStaticGlobalObjectsInitializer_UnitCell_counter
ObjRegistry< OptimizationObjgOptimizationObjRegistry
 Global Registry for all OptimizationObj.
LSQRegularizationOperator EmptyLSQRegularizationOperatorObj
 An empty LSQ Regularization Operator Object.
const LSQRegularizationOperator EmptyLSQRegularizationOperatorObj_const
 Constant empty LSQ Regularization Operator Object.
ObjRegistry
< LSQRegularizationOperator
gLSQRegularizationOperatorRegistry
 Global Registry for all LSQRegularizationOperators.
const RefParTypegpRefParTypeObjCryst
 Top RefParType for the ObjCryst++ library.
static
NiftyStaticGlobalObjectsInitializer_RefinableObj 
NiftyStaticGlobalObjectsInitializer_RefinableObj_counter
ObjRegistry< RefinableObjgRefinableObjRegistry
 Global Registry for all RefinableObj.
ObjRegistry< RefinableObjgTopRefinableObjRegistry
 This is a special registry for 'top' object for an optimization.
const long ID_WXOBJ_ENABLE
const long ID_WXOBJ_DISABLE

Detailed Description

The namespace which includes all objects (crystallographic and algorithmic) in ObjCryst++.

Note:
It may be a good idea to separate in 3 namespaces for ObjCryst, WXObjCryst, and RefinableObj

Enumeration Type Documentation

Annealing schedule type.

Used to determine the variation of the temperature and the mutation amplitude

With A=Temperature or A=MutationAMplitude, and the corresponding , min and max values supplied (the latter is ignored for constant, Cauchy and Boltzmann), with 'step' being the current step, and NbStep the total number of steps. (In the Parallel Tempering algorithm, a 'step' denotes one of the parallel refinement).

\[ A_{constant} = A_{min}\]

\[ A_{Boltzmann} = A_{min} \frac{\ln(NbStep)}{\ln(step)} \]

\[ A_{Cauchy} = A_{min} \frac{NbStep}{step} \]

\[ A_{exponential} = A_{max} (\frac{T_{min}}{T_{max}})^{\frac{step}{NbStep}} \]

\[ A_{\gamma} = A_{max} +(A_{min}-A_{max}*(\frac{step}{NbStep})^{\gamma} \]

For the 'smart' schedule, it is only supported so far for the mutation amplitude: it is modulated so that for each temperature between 30 and 70% of trial configurations are accepted, within the limits for the mutation.

Global optimization type.

Eventually it would be better to build a base Global Optimization (or even Optimization) object, and to derive it in different classes for Simulated Annealing, Parallel Tempering, Genetic Algorithm,...

Type of radiation used.

Only neutrons and X-Rays are used so far, electrons would require a very different treatment.


Function Documentation

float ObjCryst::CIFNumeric2Float ( const std::string &  s)

Convert one CIF value to a floating-point value Return 0 if no value can be converted (e.g.

if '.' or '?' is encountered)

int ObjCryst::CIFNumeric2Int ( const std::string &  s)

Convert one CIF value to a floating-point value Return 0 if no value can be converted (e.g.

if '.' or '?' is encountered)

Crystal* ObjCryst::CreateCrystalFromCIF ( CIF &  cif,
const bool  verbose = true,
const bool  checkSymAsXYZ = true 
)

Extract Crystal object(s) from a CIF, if possible.

Returns a null pointer if no crystal structure could be extracted (the minimum data is the unit cell parameters).

Parameters:
checkSymAsXYZ,:if true, and the CIF file does not have a Hall symbol but has a list of symmetry_equiv_pos_as_xyz, check we have the correct setting by trying different ones using cctbx
PowderPattern* ObjCryst::CreatePowderPatternFromCIF ( CIF &  cif)

Create PowderPattern object(s) from a CIF, if possible.

Returns a null pointer if no pattern could be extracted. No components (background, crystal data) are created.

DiffractionDataSingleCrystal* ObjCryst::CreateSingleCrystalDataFromCIF ( CIF &  cif,
Crystal *  pryst = 0 
)

Create DiffractionDataSingleCrystal object(s) from a CIF, if possible.

Returns a null pointer if no data could be extracted. A Crystal object must be supplied - if none is given, the last Crystal object will be used. If no Cyrstal data exists, a new one will be created.

float ObjCryst::EstimateCellVolume ( const float  dmin,
const float  dmax,
const float  nbrefl,
const CrystalSystem  system,
const CrystalCentering  centering,
const float  kappa = 1 
)

Estimate volume from number of peaks at a given dmin See J.

Appl. Cryst. 20 (1987), 161

Parameters:
dmin,dmax,:1/d limits between which the number of reflections has been observed
nbrefl,:number of observed reflections
kappa,:estimated percentage of reflections actually observed (default=1.0)
void ObjCryst::ExpandAtomGroupRecursive ( MolAtom *  atom,
const map< MolAtom *, set< MolAtom * > > &  connect,
set< MolAtom * > &  atomlist,
const MolAtom *  finalAtom = 0 
)

Build recursively a list of atoms, starting from a one atom, and given a connectivity table.

Parameters:
atom,:the starting atom
connect,:the connectivity table
atomlist,:the list of atoms to which will be appended the atoms newly found.
finalAtom,:if specified, the list buildin will stop after finding this atom. This can be used to build the list of atoms between two given atoms. Otherwise, the list is expanded until the end of the chain(s), or until an atom already in the list is encountered (i.e. a ring has been found).
template<class T >
std::complex<T> ObjCryst::ExponentialIntegral1 ( const complex< T >  z)

Complex exponential integral E1(z) (Abramowitz & Stegun, chap.

5)

Using A&S 5.1.11 (series) and 5.1.51 (asymptotic) expansions

template<class T >
std::complex<T> ObjCryst::ExponentialIntegral1_ExpZ ( const complex< T >  z)

E1(z)*exp(z)

This can be computed for large z values to avoid floating-point exceptions.

void ObjCryst::ImagGeomStructFactor ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::ImagGeomStructFactor_1 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  isf 
)
void ObjCryst::ImagGeomStructFactor_2 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  isf 
)
void ObjCryst::ImagGeomStructFactor_230 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  isf 
)
void ObjCryst::ImagGeomStructFactor_67 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  isf 
)
void ObjCryst::ImagGeomStructFactor_67_cba ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::ImagGeomStructFactor_67a_cb ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::ImagGeomStructFactor_67ba_c ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::ImagGeomStructFactor_67bca ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::ImagGeomStructFactor_67cab ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::ImagGeomStructFactor_97 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  isf 
)
void ObjCryst::ImagGeomStructFactor_centro ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  isf 
)
float ObjCryst::InputFloat ( istream &  is,
const char  endchar = ' ' 
)

Safely read a floating-point value from a stream.

Parameters:
endchar,:the character ending the input. On return, the stream will be placed at this character (i.e. it will be the next to be read). Note that the input will stop when encoutering a space character, even if the endchar has not been found.
Returns:
: the value - NaN will be returned as NaN, but probably only if the value was written on the same platform
CrystVector_REAL ObjCryst::PowderProfileGauss ( const CrystVector_REAL  theta,
const REAL  fwhm,
const REAL  center,
const REAL  asym = 1.0 
)

Gaussian, normalized (ie integral is equal to 1), as a function of theta and of the FWHM.

The input is an array of the theta values. The maximum of the *function is in theta=center. If asymmetry is used, negative tth values must be first.

CrystVector_REAL ObjCryst::PowderProfileLorentz ( const CrystVector_REAL  theta,
const REAL  fwhm,
const REAL  center,
const REAL  asym = 1.0 
)

Lorentzian, normalized (ie integral is equal to 1), as a function of theta and of the FWHM.

The input is an array of the theta values. The maximum of the *function is in theta=center. If asymmetry is used, negative tth values must be first.

void ObjCryst::RealGeomStructFactor ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_1 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_2 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_230 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_67 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_67_cba ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_67a_cb ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_67ba_c ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_67bca ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_67cab ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
void ObjCryst::RealGeomStructFactor_97 ( const REAL  x,
const REAL  y,
const REAL  z,
const CrystVector_REAL &  h,
const CrystVector_REAL &  k,
const CrystVector_REAL &  l,
CrystVector_REAL &  rsf 
)
template<class T >
void ObjCryst::RefObjRegisterRecursive ( T &  obj,
ObjRegistry< T > &  reg 
)

Register a new object in a registry, and recursively include all included (sub)objects.

SpeedTestReport ObjCryst::SpeedTest ( const unsigned int  nbAtom,
const int  nbAtomType,
const string  spacegroup,
const RadiationType  radiation,
const unsigned long  nbReflections,
const unsigned int  dataType,
const REAL  time 
)
Parameters:
nbAtom,:total number of unique atoms.
nbAtomType,:total number of atom types. Must be smaller than nbAtom.
spacegroup,:the symbol or spacegroup number for the spacegroup to be tested.
radiation,:the type of radiation to do the test with (neutron, x-ray).
nbReflections,:total number of reflections to use.
time,:duration of the test (10s is usually enough).
dataType,:0= single crystal, 1= powder pattern (1 background + 1 crystal phase)
void ObjCryst::WXCrystValidateAllUserInput ( )

This function validates all user input (in a WXField) not yet taken into account, if needs be.

This should be called by ALL functions using data stored in fields (basically all functions !)

template<class T >
T* ObjCryst::WXDialogChooseFromRegistry ( ObjRegistry< T > &  reg,
wxWindow *  parent,
const string &  message,
int &   
)

This function allows to pick up one object in a registry.

Shows a modal dialog with a list of objects

template<class T >
const T* ObjCryst::WXDialogChooseFromRegistry ( const ObjRegistry< T > &  reg,
wxWindow *  parent,
const string &  message,
int &   
)

This function allows to pick up one object in a registry.

Shows a modal dialog with a list of objects. This is a const access.

void ObjCryst::XMLCrystFileLoadAllObject ( const string &  file)

Load all 'top' objects from a file (Crystal, PowderPattern, DiffDataSingleCrystal and GlobalOptimObj objects).

All objects are directly allocated, and can be accessed through their respective global registry (eg gCrystalRegistry fro a Crysta, etc...)

Parameters:
file,:the filename from which the objects will be loaded.
void ObjCryst::XMLCrystFileLoadAllObject ( std::istream &  is)

Load all 'top' objects from a file (Crystal, PowderPattern, DiffDataSingleCrystal and GlobalOptimObj objects).

All objects are directly allocated, and can be accessed through their respective global registry (eg gCrystalRegistry fro a Crysta, etc...)

Parameters:
file,:the filename from which the objects will be loaded.
template<class T >
void ObjCryst::XMLCrystFileLoadObject ( const string &  file,
const string &  tagName,
const string &  name,
T *  obj 
)

Load an object from a file, identifying it from its tag.

Parameters:
file,:the filename from which the object will be loaded.
tagName,:the name of the tag
name,:the name of the object to be found (in a 'Name' attribute)
obj,:the pointer to the object to be loaded. The allocation will be done by the function, and the pointer changed accordingly.

NOT TESTED YET !

ObjRegistry<XMLCrystTag> ObjCryst::XMLCrystFileLoadObjectList ( const string &  filename)

Get the list (tags) of ObjCryst objects in a file.

This will recognize only certain tags in the file (Crystal,PowderPattern, DiffDataSingleCrystal, GlobalOptimObj). Eventually it should include also the ZScatterer objects.

Note:
It will be the duty of the caller to destroy all the tags which have been allocated.

NOT TESTED YET !

void ObjCryst::XMLCrystFileSaveGlobal ( const string &  filename)

Save all Objcryst++ objects.

This saves all Crystal, PowderPattern, DiffDataSingleCrystal and GlobalOptimObj objects, using the global registries for these classes. All other objects (Scatterer, ScatteringPower, PowderPatternComponent are saved as well since they are sub-objects of Crystal or PowderPattern objects).

Saving is done in well-formed xml format.

void ObjCryst::XMLCrystFileSaveGlobal ( std::ostream &  out)

Save all Objcryst++ objects.

This saves all Crystal, PowderPattern, DiffDataSingleCrystal and GlobalOptimObj objects, using the global registries for these classes. All other objects (Scatterer, ScatteringPower, PowderPatternComponent are saved as well since they are sub-objects of Crystal or PowderPattern objects).

Saving is done in well-formed xml format.


Variable Documentation

void(* ObjCryst::fpObjCrystInformUser)(const string &)

Pointer to a function for passing info to the user during or after long/important processes (use scarcely!)

This function pointer is by default assigned to ObjCrystInformUserStdOut, which outputs the message to the standard output. If a user interface is used (eg in Fox), this pointer should be reassigned at the beginning of the application to a more user-suitable function.

ObjRegistry<RefinableObj> ObjCryst::gTopRefinableObjRegistry

This is a special registry for 'top' object for an optimization.

In the ObjCryst++ class, this currently includes Crystal, PowderPattern and DiffractionDataSingleCrystal.