Inheritance diagram for ObjCryst::Crystal:
Public Types | |
typedef std::map< pair< const ScatteringPower *, const ScatteringPower * >, Crystal::BumpMergePar > | VBumpMergePar |
Anti-bump parameters. | |
Public Member Functions | |
Crystal () | |
Default Constructor. | |
Crystal (const REAL a, const REAL b, const REAL c, const string &SpaceGroupId) | |
Crystal Constructor (orthorombic). | |
Crystal (const REAL a, const REAL b, const REAL c, const REAL alpha, const REAL beta, const REAL gamma, const string &SpaceGroupId) | |
Crystal Constructor (triclinic). | |
Crystal (const Crystal &oldCryst) | |
Crystal copy constructor. | |
~Crystal () | |
Crystal destructor. | |
virtual const string & | GetClassName () const |
Name for this class ("RefinableObj", "Crystal",...). | |
void | AddScatterer (Scatterer *scatt) |
Add a scatterer to the crystal. | |
void | RemoveScatterer (Scatterer *scatt) |
Remove a Scatterer. This also deletes the scatterer. | |
long | GetNbScatterer () const |
Number of scatterers in the crystal. | |
Scatterer & | GetScatt (const string &scattName) |
Provides an access to the scatterers. | |
const Scatterer & | GetScatt (const string &scattName) const |
Provides a const access to the scatterers. | |
Scatterer & | GetScatt (const long scattIndex) |
Provides an access to the scatterers. | |
const Scatterer & | GetScatt (const long scattIndex) const |
Provides a const access to the scatterers. | |
ObjRegistry< Scatterer > & | GetScattererRegistry () |
Get the registry of scatterers. | |
ObjRegistry< ScatteringPower > & | GetScatteringPowerRegistry () |
Get the registry of ScatteringPower included in this Crystal. | |
const ObjRegistry< ScatteringPower > & | GetScatteringPowerRegistry () const |
Get the registry of ScatteringPower included in this Crystal. | |
void | AddScatteringPower (ScatteringPower *scattPow) |
Add a ScatteringPower for this Crystal. | |
void | RemoveScatteringPower (ScatteringPower *scattPow) |
Remove a ScatteringPower for this Crystal. | |
ScatteringPower & | GetScatteringPower (const string &name) |
Find a ScatteringPower from its name. Names must be unique in a given Crystal. | |
const ScatteringPower & | GetScatteringPower (const string &name) const |
Find a ScatteringPower from its name. Names must be unique in a given Crystal. | |
const RefinableObjClock & | GetMasterClockScatteringPower () const |
Get the clock which reports all changes in ScatteringPowers. | |
virtual const ScatteringComponentList & | GetScatteringComponentList () const |
Get the list of all scattering components. | |
const RefinableObjClock & | GetClockScattCompList () const |
Get the list of all scattering components. | |
void | Print (ostream &os=cout) const |
Prints some info about the crystal. | |
CrystMatrix_REAL | GetMinDistanceTable (const REAL minDistance=0.1) const |
Minimum interatomic distance between all scattering components (atoms) in the crystal. | |
void | PrintMinDistanceTable (const REAL minDistance=0.1, ostream &os=cout) const |
Print the minimum distance table between all scattering centers (atoms) in the crystal. | |
ostream & | POVRayDescription (ostream &os, const CrystalPOVRayOptions &options) const |
XMLOutput POV-Ray Description for this Crystal. | |
virtual void | GLInitDisplayList (const bool onlyIndependentAtoms=false, const REAL xMin=-.1, const REAL xMax=1.1, const REAL yMin=-.1, const REAL yMax=1.1, const REAL zMin=-.1, const REAL zMax=1.1, const bool displayNames=false) const |
Create an OpenGL DisplayList of the crystal. | |
void | CalcDynPopCorr (const REAL overlapDist=1., const REAL mergeDist=.0) const |
Compute the 'Dynamical population correction for all atoms. Atoms which are considered "equivalent" (ie currently with the same Z number) and which are overlapping see their Dynamical occupancy changed so that when they fully overlap, they are equivalent to 1 atom. | |
void | ResetDynPopCorr () const |
Reset Dynamical Population Correction factors (ie set it to 1). | |
void | SetUseDynPopCorr (const int use) |
Set the use of dynamical population correction (Crystal::mUseDynPopCorr). | |
REAL | GetBumpMergeCost () const |
Get the Anti-bumping/pro-Merging cost function. | |
void | SetBumpMergeDistance (const ScatteringPower &scatt1, const ScatteringPower &scatt2, const REAL dist=1.5) |
Set the Anti-bumping distance between two scattering types. | |
void | SetBumpMergeDistance (const ScatteringPower &scatt1, const ScatteringPower &scatt2, const REAL dist, const bool allowMerge) |
Set the Anti-bumping distance between two scattering types. | |
void | RemoveBumpMergeDistance (const ScatteringPower &scatt1, const ScatteringPower &scatt2) |
Remove an Anti-bumping distance between two scattering types. | |
const VBumpMergePar & | GetBumpMergeParList () const |
VBumpMergePar & | GetBumpMergeParList () |
const RefinableObjClock & | GetClockScattererList () const |
When was the list of scatterers last changed ? | |
virtual void | XMLOutput (ostream &os, int indent=0) const |
Output to stream in well-formed XML. | |
virtual void | XMLInput (istream &is, const XMLCrystTag &tag) |
Input From stream. | |
virtual void | GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst) |
Make a random move of the current configuration. | |
virtual REAL | GetLogLikelihood () const |
Get -log(likelihood) of the current configuration for the object. | |
virtual void | CIFOutput (ostream &os) const |
output Crystal structure as a cif file (EXPERIMENTAL !) | |
virtual void | GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const |
Get the gene group assigned to each parameter. | |
virtual void | BeginOptimization (const bool allowApproximations=false, const bool enableRestraints=false) |
This should be called by any optimization class at the begining of an optimization. | |
void | AddBondValenceRo (const ScatteringPower &, const ScatteringPower &, const REAL ro) |
void | RemoveBondValenceRo (const ScatteringPower &, const ScatteringPower &) |
REAL | GetBondValenceCost () const |
Get the Bond-Valence cost function, which compares the expected valence to the one computed from Bond-Valence Ro parameters. | |
std::map< pair< const ScatteringPower *, const ScatteringPower * >, REAL > & | GetBondValenceRoList () |
const std::map< pair< const ScatteringPower *, const ScatteringPower * >, REAL > & | GetBondValenceRoList () const |
Private Member Functions | |
void | Init (const REAL a, const REAL b, const REAL c, const REAL alpha, const REAL beta, const REAL gamma, const string &SpaceGroupId, const string &name) |
Init all Crystal parameters. | |
void | InitOptions () |
Init options. | |
int | FindScatterer (const string &scattName) const |
Find a scatterer (its index # in mpScatterrer[]) with a given name. | |
void | CalcDistTable (const bool fast, const REAL asymUnitMargin=4) const |
Compute the distance Table (mDistTable) for all scattering components. | |
void | CalcBondValenceSum () const |
Calculate all Bond Valences. | |
Private Attributes | |
ObjRegistry< Scatterer > | mScattererRegistry |
The registry of scatterers for this UnitCell. | |
VBumpMergePar | mvBumpMergePar |
Anti-bump parameters map. | |
RefinableObjClock | mBumpMergeParClock |
Last Time Anti-bump parameters were changed. | |
RefinableObjClock | mBumpMergeCostClock |
Last Time Anti-bump parameters were changed. | |
REAL | mBumpMergeCost |
Current bump-merge cost. | |
REAL | mBumpMergeScale |
Bump-merge scale factor. | |
std::vector< NeighbourHood > | mvDistTableSq |
Interatomic distance table for all unique atoms. | |
RefinableObjClock | mDistTableClock |
The time when the distance table was last calculated. | |
ScatteringComponentList | mScattCompList |
The list of all scattering components in the crystal. | |
RefinableObjClock | mLatticeClock |
Clock for lattice paramaters. | |
RefObjOpt | mUseDynPopCorr |
Use Dynamical population correction (ScatteringComponent::mDynPopCorr) during Structure factor calculation ? | |
ObjRegistry< ScatteringPower > | mScatteringPowerRegistry |
The registry of ScatteringPower for this Crystal. | |
RefinableObjClock | mClockScattererList |
Last time the list of Scatterers was changed. | |
RefinableObjClock | mClockScattCompList |
Last time the ScatteringComponentList was generated. | |
RefinableObjClock | mClockNeighborTable |
Last time the Neighbor Table was generated. | |
RefinableObjClock | mClockDynPopCorr |
Last time the dynamical population correction was computed. | |
RefinableObjClock | mMasterClockScatteringPower |
master clock recording every change in Scattering Powers | |
RefObjOpt | mDisplayEnantiomer |
Display the enantiomeric (mirror along x) structure in 3D? This can be helpful for non-centrosymmetric structure which have been solved using powder diffraction (which only gives the relative configuration). | |
map< pair< const ScatteringPower *, const ScatteringPower * >, REAL > | mvBondValenceRo |
Map of Bond Valence "Ro" parameters for each couple of ScatteringPower. | |
RefinableObjClock | mBondValenceParClock |
Last Time Bond Valence parameters were changed. | |
RefinableObjClock | mBondValenceCalcClock |
Last time Bond Valences were calculated. | |
RefinableObjClock | mBondValenceCostClock |
Last time the Bond Valence cost was calculated. | |
REAL | mBondValenceCost |
Current Bond Valence cost. | |
REAL | mBondValenceCostScale |
Bond Valence cost scale factor. | |
std::map< long, REAL > | mvBondValenceCalc |
List of calculated bond valences, as a map, the key being the index of the atom in Crystal::mScattCompList. |
A Crystal object has several main characteristics : (1) a unit cell, (2) a Spacegroup and (3) a list of Scatterer. Also stored in the Crystal is a list of the ScttaringPower used by all the scatterers of this crystal.
The crystal is capable of giving a list of all scattering components (ie the list of all unique scattering 'points' (ScatteringComponent, ie atoms) in the unit cell, each associated to a ScatteringPower).
When those scattering components are on a special position or overlapping with another component of the same type, it is possible to correct dynamically the occupancy of this/these components to effectively have only one component instead of several due to the overlapping. This method is interesting for global optimization where atoms must not be "locked" on a special position. If this "Dynamical Occupancy Correction" is used then no occupancy should be corrected for special positions, since this will be done dynamically.
A crystal structure can be viewed in 3D using OpenGL.
|
Anti-bump parameters. Each atom type (ScatteringPower is referenced using a reference number) |
|
Default Constructor.
|
|
Crystal Constructor (orthorombic).
|
|
Crystal Constructor (triclinic).
|
|
Crystal copy constructor.
|
|
Crystal destructor.
|
|
|
|
Add a scatterer to the crystal.
|
|
Add a ScatteringPower for this Crystal. It must be allocated in the heap, and not used by any other Crystal. |
|
This should be called by any optimization class at the begining of an optimization. This will also check that everything is ready, eg call the RefinableObj::Prepare() function. This also affects all sub-objects.
Reimplemented from ObjCryst::RefinableObj. |
|
Calculate all Bond Valences.
|
|
Compute the distance Table (mDistTable) for all scattering components.
For internal use only.
|
|
Compute the 'Dynamical population correction for all atoms. Atoms which are considered "equivalent" (ie currently with the same Z number) and which are overlapping see their Dynamical occupancy changed so that when they fully overlap, they are equivalent to 1 atom.
For internal use only.
|
|
output Crystal structure as a cif file (EXPERIMENTAL !)
|
|
Find a scatterer (its index # in mpScatterrer[]) with a given name.
|
|
Get the Bond-Valence cost function, which compares the expected valence to the one computed from Bond-Valence Ro parameters.
|
|
|
|
|
|
Get the Anti-bumping/pro-Merging cost function. Only works (ie returnes a non-null value) if you have added antibump distances using Crystal::SetBumpMergeDistance(). |
|
|
|
|
|
Name for this class ("RefinableObj", "Crystal",...). This is only useful to distinguish different classes when picking up objects from the RefinableObj Global Registry Reimplemented from ObjCryst::UnitCell. |
|
Get the list of all scattering components.
|
|
When was the list of scatterers last changed ?
|
|
Get the gene group assigned to each parameter. Each parameter (a gene in terms of genetic algorithms) can be assigned to a gene group. Thus when mating two configurations, genes will be exchanged by groups. By default (in the base RefinabeObj class), each parameter is alone in its group. Derived classes can group genes for a better s** life. The number identifying a gene group only has a meaning in a given object. It can also change on subsequent calls, and thus is not unique.
Reimplemented from ObjCryst::RefinableObj. |
|
Get -log(likelihood) of the current configuration for the object. By default (no likelihood evaluation available), this is equal to 0. This call should not be recursive, it is the task of the algorithm to get the sum of likelihoods for all objects invlolved.
Reimplemented from ObjCryst::RefinableObj. |
|
Get the clock which reports all changes in ScatteringPowers.
|
|
Minimum interatomic distance between all scattering components (atoms) in the crystal. This will return a symmetrical matrix with NbComp rows and cols, where NbComp is the number of independent scattering components in the unit cell. All distances are given in Angstroems. Note that the distance of a given atom with 'itself' is not generally equal to 0 (except full special position), but equal to the min distance with its symmetrics.
|
|
Number of scatterers in the crystal.
|
|
Provides a const access to the scatterers.
|
|
Provides an access to the scatterers.
|
|
Provides a const access to the scatterers.
|
|
Provides an access to the scatterers.
|
|
Get the registry of scatterers.
|
|
Get the list of all scattering components.
|
|
Find a ScatteringPower from its name. Names must be unique in a given Crystal.
|
|
Find a ScatteringPower from its name. Names must be unique in a given Crystal.
|
|
Get the registry of ScatteringPower included in this Crystal.
|
|
Get the registry of ScatteringPower included in this Crystal.
|
|
Create an OpenGL DisplayList of the crystal.
|
|
Make a random move of the current configuration. This is for global optimization algorithms. the moves for each parameter are less than their global optimization step, multiplied by the mutation amplitude.
Reimplemented from ObjCryst::RefinableObj. |
|
Init all Crystal parameters.
Reimplemented from ObjCryst::UnitCell. |
|
Init options. Need only be done once per Crystal. Reimplemented from ObjCryst::UnitCell. |
|
XMLOutput POV-Ray Description for this Crystal.
|
|
Prints some info about the crystal.
Reimplemented from ObjCryst::UnitCell. |
|
Print the minimum distance table between all scattering centers (atoms) in the crystal.
|
|
|
|
Remove an Anti-bumping distance between two scattering types.
|
|
Remove a Scatterer. This also deletes the scatterer.
|
|
Remove a ScatteringPower for this Crystal. (the Scattering power is deleted). This function should check that it is not used any more before removing it. |
|
Reset Dynamical Population Correction factors (ie set it to 1).
|
|
Set the Anti-bumping distance between two scattering types.
|
|
Set the Anti-bumping distance between two scattering types.
|
|
Set the use of dynamical population correction (Crystal::mUseDynPopCorr). Atoms which are considered "equivalent" (ie currently with the same Z number) and which are overlapping see their Dynamical occupancy changed so that when they fully overlap, they are equivalent to 1 atom. The Dynamical Occupancy correction will be performed in Crystal::GetScatteringComponentList() automatically. This seriously affects the speed of the calculation, since computing interatomic distances is lenghty.
|
|
Input From stream.
Reimplemented from ObjCryst::RefinableObj. |
|
Output to stream in well-formed XML.
Reimplemented from ObjCryst::RefinableObj. |
|
Last time Bond Valences were calculated.
|
|
Current Bond Valence cost.
|
|
Last time the Bond Valence cost was calculated.
|
|
Bond Valence cost scale factor.
|
|
Last Time Bond Valence parameters were changed.
|
|
Current bump-merge cost.
|
|
Last Time Anti-bump parameters were changed.
|
|
Last Time Anti-bump parameters were changed.
|
|
Bump-merge scale factor.
|
|
Last time the dynamical population correction was computed.
|
|
Last time the Neighbor Table was generated.
|
|
Last time the ScatteringComponentList was generated.
|
|
Last time the list of Scatterers was changed.
|
|
Display the enantiomeric (mirror along x) structure in 3D? This can be helpful for non-centrosymmetric structure which have been solved using powder diffraction (which only gives the relative configuration).
|
|
The time when the distance table was last calculated.
|
|
Clock for lattice paramaters.
|
|
master clock recording every change in Scattering Powers
|
|
The list of all scattering components in the crystal.
|
|
The registry of scatterers for this UnitCell.
|
|
The registry of ScatteringPower for this Crystal.
|
|
Use Dynamical population correction (ScatteringComponent::mDynPopCorr) during Structure factor calculation ?
|
|
List of calculated bond valences, as a map, the key being the index of the atom in Crystal::mScattCompList.
|
|
Map of Bond Valence "Ro" parameters for each couple of ScatteringPower.
|
|
Anti-bump parameters map.
|
|
Interatomic distance table for all unique atoms.
|