FOX/ObjCryst++  1.10.X (development)
ObjCryst::UnitCell Class Reference

Unit Cell class: Unit cell with spacegroup information. More...

+ Inheritance diagram for ObjCryst::UnitCell:
+ Collaboration diagram for ObjCryst::UnitCell:

Public Member Functions

 UnitCell ()
 Default Constructor.
 
 UnitCell (const REAL a, const REAL b, const REAL c, const string &SpaceGroupId)
 UnitCell Constructor (orthorombic) More...
 
 UnitCell (const REAL a, const REAL b, const REAL c, const REAL alpha, const REAL beta, const REAL gamma, const string &SpaceGroupId)
 UnitCell Constructor (triclinic) More...
 
 UnitCell (const UnitCell &oldCryst)
 UnitCell copy constructor.
 
 ~UnitCell ()
 Destructor.
 
virtual const string & GetClassName () const
 Name for this class ("RefinableObj", "Crystal",...). More...
 
CrystVector_REAL GetLatticePar () const
 Lattice parameters (a,b,c,alpha,beta,gamma) as a 6-element vector in Angstroems and radians. More...
 
REAL GetLatticePar (const int whichPar) const
 Return one of the 6 Lattice parameters, 0<= whichPar <6 (a,b,c,alpha,beta,gamma), returned in Angstroems and radians. More...
 
const RefinableObjClockGetClockLatticePar () const
 last time the Lattice parameters were changed
 
const CrystMatrix_REAL & GetBMatrix () const
 Get the 'B' matrix (UnitCell::mBMatrix)for the UnitCell (orthogonalization matrix for the given lattice, in the reciprocal space) More...
 
const CrystMatrix_REAL & GetOrthMatrix () const
 Get the orthogonalization matrix (UnitCell::mOrthMatrix)for the UnitCell in real space. More...
 
const RefinableObjClockGetClockMetricMatrix () const
 last time the metric matrices were changed
 
CrystVector_REAL GetOrthonormalCoords (const REAL x, const REAL y, const REAL z) const
 Get orthonormal cartesian coordinates for a set of (x,y,z) fractional coordinates. More...
 
void FractionalToOrthonormalCoords (REAL &x, REAL &y, REAL &z) const
 Get orthonormal cartesian coordinates for a set of (x,y,z) fractional coordinates. More...
 
void OrthonormalToFractionalCoords (REAL &x, REAL &y, REAL &z) const
 Get fractional cartesian coordinates for a set of (x,y,z) orthonormal coordinates. More...
 
void MillerToOrthonormalCoords (REAL &x, REAL &y, REAL &z) const
 Get Miller H,K, L indices from orthonormal coordinates in reciprocal space. More...
 
void OrthonormalToMillerCoords (REAL &x, REAL &y, REAL &z) const
 Get orthonormal coordinates given a set of H,K, L indices in reciprocal space. More...
 
virtual void Print (ostream &os) const
 Prints some info about the UnitCell. More...
 
virtual void Print () const
 
const SpaceGroupGetSpaceGroup () const
 Access to the SpaceGroup object.
 
SpaceGroupGetSpaceGroup ()
 Access to the SpaceGroup object.
 
REAL GetVolume () const
 Volume of Unit Cell (in Angstroems)
 
- Public Member Functions inherited from ObjCryst::RefinableObj
 RefinableObj ()
 Constructor.
 
 RefinableObj (const bool internalUseOnly)
 Constructor. More...
 
 RefinableObj (const RefinableObj &old)
 Defined not implemented... More...
 
virtual ~RefinableObj ()
 Destructor.
 
virtual const string & GetName () const
 Name of the object.
 
virtual void SetName (const string &name)
 Name of the object.
 
void operator= (const RefinableObj &old)
 Defined not implemented... More...
 
void PrepareForRefinement () const
 Find which parameters are used and not fixed, for a refinement /optimization. More...
 
void FixAllPar ()
 Fix All parameters.
 
void UnFixAllPar ()
 UnFix All parameters.
 
void SetParIsFixed (const long parIndex, const bool fix)
 Fix/un-fix one parameter from its #.
 
void SetParIsFixed (const string &parName, const bool fix)
 Fix/un-fix one parameter from its name.
 
void SetParIsFixed (const RefParType *type, const bool fix)
 Fix/un-fix one family of parameters.
 
void SetParIsUsed (const string &parName, const bool use)
 Set whether a parameter is used.
 
void SetParIsUsed (const RefParType *type, const bool use)
 Set whether a family of parameters is used.
 
long GetNbPar () const
 Total number of refinable parameter in the object. More...
 
long GetNbParNotFixed () const
 Total number of non-fixed parameters. Is initialized by PrepareForRefinement()
 
RefinableParGetPar (const long i)
 Access all parameters in the order they were inputted.
 
const RefinableParGetPar (const long i) const
 Access all parameters in the order they were inputted.
 
RefinableParGetPar (const string &name)
 Access all parameters from their name.
 
const RefinableParGetPar (const string &name) const
 Access all parameters from their name.
 
RefinableParGetPar (const REAL *)
 Access parameter from its adress.
 
const RefinableParGetPar (const REAL *) const
 Access parameter from its adress.
 
RefinableParGetParNotFixed (const long i)
 Access all parameters in the order they were inputted, skipping fixed parameters. More...
 
const RefinableParGetParNotFixed (const long i) const
 Access all parameters in the order they were inputed, skipping fixed parameters. More...
 
void AddPar (const RefinablePar &newRefPar)
 Add a refinable parameter. More...
 
void AddPar (RefinablePar *newRefPar)
 Add a refinable parameter. More...
 
void AddPar (RefinableObj &newRefParList, const bool copyParam=false)
 Add all the parameters in another RefinableObj. More...
 
vector< RefinablePar * >::iterator RemovePar (RefinablePar *refPar)
 Remove a refinable parameter. More...
 
unsigned long CreateParamSet (const string name="") const
 Save the current set of refined values in a new set. More...
 
void ClearParamSet (const unsigned long id) const
 Erase the param set with the given id, releasing memory.
 
void SaveParamSet (const unsigned long id) const
 Save the current set of refined values over a previously-created set of saved values. More...
 
void RestoreParamSet (const unsigned long id)
 Restore a saved set of values. More...
 
const CrystVector_REAL & GetParamSet (const unsigned long setId) const
 Access one save refpar set. More...
 
CrystVector_REAL & GetParamSet (const unsigned long setId)
 Access one save refpar set. More...
 
REAL GetParamSet_ParNotFixedHumanValue (const unsigned long setId, const long parNumber) const
 Access the (human) value of one refined parameter in a saved set of parameters. More...
 
const void EraseAllParamSet ()
 Erase all saved refpar sets. More...
 
const string & GetParamSetName (const unsigned long setId) const
 Get the name associated to a refpar set. More...
 
void SetLimitsAbsolute (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, giving absolute new limits.
 
void SetLimitsAbsolute (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, giving absolute new limits.
 
void SetLimitsRelative (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, giving relative new limits (eg giving -.1 and +.1 will set new limits at the current value + min and current value + max) Thus min should logically be <0 and max >0. More...
 
void SetLimitsRelative (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, giving relative new limits (eg giving -.1 and +.1 will set new limits at the current value + min and current value + max). More...
 
void SetLimitsProportional (const string &parName, const REAL min, const REAL max)
 Change the limits for a given parameter, proportionnaly to the current value. More...
 
void SetLimitsProportional (const RefParType *type, const REAL min, const REAL max)
 Change the limits for a category of parameters, proportionnaly to their current value. More...
 
void SetGlobalOptimStep (const RefParType *type, const REAL step)
 Change the maximum step to use during Global Optimization algorithms.
 
ObjRegistry< RefinableObj > & GetSubObjRegistry ()
 Access to the registry of RefinableObj used by this object.
 
const ObjRegistry< RefinableObj > & GetSubObjRegistry () const
 Access to the registry of RefinableObj used by this object.
 
virtual void RegisterClient (RefinableObj &) const
 Register a new object using this object. More...
 
virtual void DeRegisterClient (RefinableObj &) const
 Deregister an object (which not any more) using this object.
 
virtual const ObjRegistry
< RefinableObj > & 
GetClientRegistry () const
 Get the list of clients.
 
virtual ObjRegistry
< RefinableObj > & 
GetClientRegistry ()
 Get the list of clients.
 
bool IsBeingRefined () const
 Is the object being refined ? (Can be refined by one algorithm at a time only.)
 
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. More...
 
virtual void EndOptimization ()
 This should be called by any optimization class at the end of an optimization. More...
 
virtual void SetApproximationFlag (const bool allow)
 Enable or disable numerical approximations. More...
 
virtual void RandomizeConfiguration ()
 Randomize Configuration (before a global optimization). More...
 
virtual void GlobalOptRandomMove (const REAL mutationAmplitude, const RefParType *type=gpRefParTypeObjCryst)
 Make a random move of the current configuration. More...
 
void BeginGlobalOptRandomMove ()
 Raise a flag, to be sure not to make a random change more than once in each RefinableObj. More...
 
virtual REAL GetLogLikelihood () const
 Get -log(likelihood) of the current configuration for the object. More...
 
virtual unsigned int GetNbLSQFunction () const
 Number of LSQ functions.
 
virtual const CrystVector_REAL & GetLSQCalc (const unsigned int) const
 Get the current calculated value for the LSQ function.
 
virtual const CrystVector_REAL & GetLSQObs (const unsigned int) const
 Get the observed values for the LSQ function.
 
virtual const CrystVector_REAL & GetLSQWeight (const unsigned int) const
 Get the weight values for the LSQ function.
 
virtual const CrystVector_REAL & GetLSQDeriv (const unsigned int, RefinablePar &)
 Get the first derivative values for the LSQ function, for a given parameter. More...
 
virtual std::map< RefinablePar
*, CrystVector_REAL > & 
GetLSQ_FullDeriv (const unsigned int, std::set< RefinablePar * > &vPar)
 Get the first derivative for the LSQ function for each parameter supplied in a list. More...
 
void ResetParList ()
 Re-init the list of refinable parameters, removing all parameters. More...
 
virtual void XMLOutput (ostream &os, int indent=0) const
 Output to stream in well-formed XML. More...
 
virtual void XMLInput (istream &is, const XMLCrystTag &tag)
 Input From stream. More...
 
virtual void UpdateDisplay () const
 If there is an interface, this should be automatically be called each time there is a 'new, significant' configuration to report. More...
 
unsigned int GetNbOption () const
 Number of Options for this object.
 
RefObjOptGetOption (const unsigned int i)
 Access to the options.
 
const RefObjOptGetOption (const unsigned int i) const
 const access to the options
 
virtual void GetGeneGroup (const RefinableObj &obj, CrystVector_uint &groupIndex, unsigned int &firstGroup) const
 Get the gene group assigned to each parameter. More...
 
void SetDeleteRefParInDestructor (const bool b)
 Set this object not to delete its list of parameters when destroyed. More...
 
const RefinableObjClockGetRefParListClock () const
 What was the last time a RefinablePar was added/removed ? More...
 
virtual REAL GetRestraintCost () const
 Get the restraint cost (overall penalty of all restraints) More...
 
void AddRestraint (Restraint *pNewRestraint)
 Add a new restraint. More...
 
vector< Restraint * >::iterator RemoveRestraint (Restraint *pRestraint)
 Remove a restraint from the list of known restraints. More...
 
virtual void TagNewBestConfig () const
 During a global optimization, tells the object that the current config is the latest "best" config. More...
 
const RefinableObjClockGetClockMaster () const
 This clocks records any change in the object. See refinableObj::mClockMaster.
 

Protected Member Functions

virtual 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 UnitCell parameters. More...
 
void InitRefParList ()
 Prepare the refinable parameters list. More...
 
- Protected Member Functions inherited from ObjCryst::RefinableObj
long FindPar (const string &name) const
 Find a refinable parameter with a given name.
 
long FindPar (const REAL *) const
 Find a refinable parameter from the adress of its value.
 
void AddSubRefObj (RefinableObj &)
 
void RemoveSubRefObj (RefinableObj &)
 
void AddOption (RefObjOpt *opt)
 
virtual void Prepare ()
 
map< unsigned long, pair
< CrystVector_REAL, string >
>::iterator 
FindParamSet (unsigned long id) const
 Find a parameter set with a given id (and check if it is there)
 

Private Member Functions

virtual void InitOptions ()
 Init options. More...
 
void InitMatrices () const
 
void UpdateLatticePar ()
 

Private Attributes

CrystVector_REAL mCellDim
 a,b and c in Angstroems, angles (stored) in radians For cubic, rhomboedric UnitCells, only the 'a' parameter is relevant. More...
 
SpaceGroup mSpaceGroup
 The space group of the UnitCell.
 
CrystMatrix_REAL mBMatrix
 B Matrix (Orthogonalization matrix for reciprocal space)

\[ B= \left[ \begin {array}{ccc} a^* & b^*\cos(\gamma^*) & c^*\cos(\beta^*) \\ 0 & b^*\sin(\gamma^*) & -c^*\sin(\beta^*)\cos(\alpha) \\ 0 & 0 & \frac{1}{c}\end{array} \right]\]

\[ \left[ \begin{array}{c} k_x \\ k_y \\ k_z \end{array} \right]_{orthonormal} = B \times \left[ \begin{array}{c} h \\ k \\ l \end{array}\right]_{integer} \]

. More...

 
CrystMatrix_REAL mBMatrixInvert
 inverse of B Matrix (i.e. inverse of orthogonalization matrix for direct space)
 
CrystMatrix_REAL mOrthMatrix
 Eucl Matrix (Orthogonalization matrix for direct space)

\[ M_{orth}= \left[ \begin {array}{ccc} a & b\cos(\gamma) & c\cos(\beta) \\ 0 & b\sin(\gamma) & -c\sin(\beta)\cos(\alpha^*) \\ 0 & 0 & \frac{1}{c^*}\end{array} \right]\]

\[ \left[ \begin{array}{c} x \\ y \\ z \end{array} \right]_{orthonormal} = M_{orth} \times \left[ \begin{array}{c} x \\ y \\ z \end{array} \right]_{fractional coords}\]

. More...

 
CrystMatrix_REAL mOrthMatrixInvert
 inverse of Eucl Matrix (i.e. inverse of de-orthogonalization matrix for direct space)
 
RefinableObjClock mClockLatticePar
 Last time lattice parameters were changed.
 
RefinableObjClock mClockMetricMatrix
 
RefinableObjClock mClockLatticeParUpdate
 
RefObjOpt mConstrainLatticeToSpaceGroup
 Option to override lattice parameters constraints from spacegroup choice. More...
 

Additional Inherited Members

- Protected Attributes inherited from ObjCryst::RefinableObj
string mName
 Name for this RefinableObject. Should be unique, at least in the same scope.+.
 
vector< RefinablePar * > mvpRefPar
 Vector of pointers to the refinable parameters.
 
vector< Restraint * > mvpRestraint
 Vector of pointers to the restraints for this object. More...
 
map< unsigned long, pair
< CrystVector_REAL, string > > 
mvpSavedValuesSet
 Map of (index,pointers to arrays) used to save sets of values for all parameters. More...
 
long mNbRefParNotFixed
 Total of not-fixed parameters.
 
CrystVector_long mRefparNotFixedIndex
 Index of not-fixed parameters.
 
int mOptimizationDepth
 Is the object being refined or optimized ? if mOptimizationDepth=0, no optimization is taking place. More...
 
ObjRegistry< RefinableObjmSubObjRegistry
 Registry of RefinableObject needed for this object (owned by this object or not)
 
ObjRegistry< RefinableObjmClientObjRegistry
 Registry of RefinableObject using this object. More...
 
ObjRegistry< RefObjOptmOptionRegistry
 List of options for this object. More...
 
bool mDeleteRefParInDestructor
 If true (the default), then all RefinablePar will be deleted when the the object is deleted. More...
 
RefinableObjClock mRefParListClock
 Last time the RefinableParList was modified (a parameter added or removed).
 
bool mRandomMoveIsDone
 
CrystVector_REAL mLSQDeriv
 Temporary array used to return derivative values of the LSQ function for given parameters. More...
 
std::map< unsigned int,
std::map< RefinablePar
*, CrystVector_REAL > > 
mLSQ_FullDeriv
 Temporary map to return the derivative of the LSQ function versus a list of parameters. More...
 
RefinableObjClock mClockMaster
 Master clock, which is changed whenever the object has been altered. More...
 

Detailed Description

Unit Cell class: Unit cell with spacegroup information.

Definition at line 71 of file UnitCell.h.

Constructor & Destructor Documentation

ObjCryst::UnitCell::UnitCell ( const REAL  a,
const REAL  b,
const REAL  c,
const string &  SpaceGroupId 
)

UnitCell Constructor (orthorombic)

Parameters
a,b,c: unit cell dimension, in angstroems
SpaceGroupIdspace group symbol or number

Definition at line 44 of file UnitCell.cpp.

ObjCryst::UnitCell::UnitCell ( const REAL  a,
const REAL  b,
const REAL  c,
const REAL  alpha,
const REAL  beta,
const REAL  gamma,
const string &  SpaceGroupId 
)

UnitCell Constructor (triclinic)

Parameters
a,b,c: unit cell dimension, in angstroems
alpha,beta,gamma: unit cell angles, in radians.
SpaceGroupIdspace group symbol or number

Definition at line 55 of file UnitCell.cpp.

Member Function Documentation

void ObjCryst::UnitCell::FractionalToOrthonormalCoords ( REAL &  x,
REAL &  y,
REAL &  z 
) const

Get orthonormal cartesian coordinates for a set of (x,y,z) fractional coordinates.

X,y and z input are changed to Amgstroems values The convention is taken following : e1 is chosen along a, e2 in the (a,b) plane, then e3 is along c*

Definition at line 261 of file UnitCell.cpp.

const CrystMatrix_REAL & ObjCryst::UnitCell::GetBMatrix ( ) const

Get the 'B' matrix (UnitCell::mBMatrix)for the UnitCell (orthogonalization matrix for the given lattice, in the reciprocal space)

The convention is taken following Giacovazzo, "Fundamentals of Crystallography", p.69 "e1 is chosen along a*, e2 in the (a*,b*) plane, then e3 is along c".

Definition at line 235 of file UnitCell.cpp.

const string & ObjCryst::UnitCell::GetClassName ( ) const
virtual

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::RefinableObj.

Reimplemented in ObjCryst::Crystal.

Definition at line 86 of file UnitCell.cpp.

CrystVector_REAL ObjCryst::UnitCell::GetLatticePar ( ) const

Lattice parameters (a,b,c,alpha,beta,gamma) as a 6-element vector in Angstroems and radians.

Definition at line 92 of file UnitCell.cpp.

REAL ObjCryst::UnitCell::GetLatticePar ( const int  whichPar) const

Return one of the 6 Lattice parameters, 0<= whichPar <6 (a,b,c,alpha,beta,gamma), returned in Angstroems and radians.

Definition at line 161 of file UnitCell.cpp.

const CrystMatrix_REAL & ObjCryst::UnitCell::GetOrthMatrix ( ) const

Get the orthogonalization matrix (UnitCell::mOrthMatrix)for the UnitCell in real space.

Definition at line 242 of file UnitCell.cpp.

CrystVector_REAL ObjCryst::UnitCell::GetOrthonormalCoords ( const REAL  x,
const REAL  y,
const REAL  z 
) const

Get orthonormal cartesian coordinates for a set of (x,y,z) fractional coordinates.

Results are given in Angstroems. The convention is taken following : e1 is chosen along a, e2 in the (a,b) plane, then e3 is along c*

Definition at line 249 of file UnitCell.cpp.

void ObjCryst::UnitCell::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 
)
protectedvirtual

Init all UnitCell parameters.

Parameters
a,b,c: unit cell dimension, in angstroems
alpha,beta,gamma: unit cell angles
SpcGroupspace group number (1..230)
namename for the UnitCell, : '(TaSe4)2I'

Reimplemented in ObjCryst::Crystal.

Definition at line 339 of file UnitCell.cpp.

void ObjCryst::UnitCell::InitMatrices ( ) const
private

.Init the (de)orthogonalization matrices. They are re-computed only if parameters have changed since last call.

Definition at line 388 of file UnitCell.cpp.

void ObjCryst::UnitCell::InitOptions ( )
privatevirtual

Init options.

Need only be done once per UnitCell.

Reimplemented in ObjCryst::Crystal.

Definition at line 365 of file UnitCell.cpp.

void ObjCryst::UnitCell::InitRefParList ( )
protected

Prepare the refinable parameters list.

This is called once when creating the UnitCell.

Definition at line 521 of file UnitCell.cpp.

void ObjCryst::UnitCell::MillerToOrthonormalCoords ( REAL &  x,
REAL &  y,
REAL &  z 
) const

Get Miller H,K, L indices from orthonormal coordinates in reciprocal space.

Result is stored into x,y and z

Definition at line 284 of file UnitCell.cpp.

void ObjCryst::UnitCell::OrthonormalToFractionalCoords ( REAL &  x,
REAL &  y,
REAL &  z 
) const

Get fractional cartesian coordinates for a set of (x,y,z) orthonormal coordinates.

Result is stored into x,y and z The convention is taken following : e1 is chosen along a, e2 in the (a,b) plane, then e3 is along c*

Definition at line 271 of file UnitCell.cpp.

void ObjCryst::UnitCell::OrthonormalToMillerCoords ( REAL &  x,
REAL &  y,
REAL &  z 
) const

Get orthonormal coordinates given a set of H,K, L indices in reciprocal space.

Result is stored into x,y and z

Definition at line 294 of file UnitCell.cpp.

void ObjCryst::UnitCell::Print ( ostream &  os) const
virtual

Prints some info about the UnitCell.

Parameters
osthe stream to which the information is outputed (default=cout)

Reimplemented in ObjCryst::Crystal.

Definition at line 304 of file UnitCell.cpp.

void ObjCryst::UnitCell::UpdateLatticePar ( )
private

Update cell parameters for tetragonal, trigonal, hexagonal, cubic lattices. Also set angular parameters for those group which need it. This is needed during Refinement, since for example in a quadratic spg, only a is refined and we need to have b=a...

Definition at line 443 of file UnitCell.cpp.

Member Data Documentation

CrystMatrix_REAL ObjCryst::UnitCell::mBMatrix
mutableprivate

B Matrix (Orthogonalization matrix for reciprocal space)

\[ B= \left[ \begin {array}{ccc} a^* & b^*\cos(\gamma^*) & c^*\cos(\beta^*) \\ 0 & b^*\sin(\gamma^*) & -c^*\sin(\beta^*)\cos(\alpha) \\ 0 & 0 & \frac{1}{c}\end{array} \right]\]

\[ \left[ \begin{array}{c} k_x \\ k_y \\ k_z \end{array} \right]_{orthonormal} = B \times \left[ \begin{array}{c} h \\ k \\ l \end{array}\right]_{integer} \]

.

Note
this matrix is and must remain upper triangular. this is assumed for some optimizations.

Definition at line 219 of file UnitCell.h.

CrystVector_REAL ObjCryst::UnitCell::mCellDim
private

a,b and c in Angstroems, angles (stored) in radians For cubic, rhomboedric UnitCells, only the 'a' parameter is relevant.

For quadratic and hexagonal UnitCells, only a and c parameters are relevant. The MUTABLE is temporary ! It should not be !

Definition at line 206 of file UnitCell.h.

RefinableObjClock ObjCryst::UnitCell::mClockLatticeParUpdate
mutableprivate

Last time the lattice parameters whre updated

Definition at line 241 of file UnitCell.h.

RefinableObjClock ObjCryst::UnitCell::mClockMetricMatrix
mutableprivate

Last time metric matrices were computed

Definition at line 239 of file UnitCell.h.

RefObjOpt ObjCryst::UnitCell::mConstrainLatticeToSpaceGroup
private

Option to override lattice parameters constraints from spacegroup choice.

Warning
EXPERIMENTAL

Normally lattice parameters are constrained by the space group choice (e.g. a=b=c and angles =90 for cubic spacegroups). Using this option allows you to override this, and choose any lattice parameter. THis works as long as symmetry operations are applied to fractionnal coordinates.

This is useful duting global optimization when searching the structure in a UnitCell which has (or is expected to have) a known pseudo-crystallographic symmetry, to reduce dramatically the number of parameters. Of course for final refinement the 'real' symmetry should be imposed.

Definition at line 257 of file UnitCell.h.

CrystMatrix_REAL ObjCryst::UnitCell::mOrthMatrix
mutableprivate

Eucl Matrix (Orthogonalization matrix for direct space)

\[ M_{orth}= \left[ \begin {array}{ccc} a & b\cos(\gamma) & c\cos(\beta) \\ 0 & b\sin(\gamma) & -c\sin(\beta)\cos(\alpha^*) \\ 0 & 0 & \frac{1}{c^*}\end{array} \right]\]

\[ \left[ \begin{array}{c} x \\ y \\ z \end{array} \right]_{orthonormal} = M_{orth} \times \left[ \begin{array}{c} x \\ y \\ z \end{array} \right]_{fractional coords}\]

.

Note
this matrix is and must remain upper triangular. this is assumed for some optimizations.

Definition at line 232 of file UnitCell.h.


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