Mantid
|
Three components are required to describe a crystal structure: More...
#include <CrystalStructure.h>
Public Member Functions | |
void | addScatterers (const CompositeBraggScatterer_sptr &scatterers) |
Adds all scatterers in the supplied collection into the internal one (scatterers are copied). More... | |
UnitCell | cell () const |
Returns the unit cell of the structure. More... | |
ReflectionCondition_sptr | centering () const |
CrystalStructure (const std::string &unitCellString, const std::string &spaceGroupString, const std::string &scattererString) | |
String-based constructor. More... | |
CrystalStructure (const UnitCell &unitCell, const SpaceGroup_const_sptr &spaceGroup, const CompositeBraggScatterer_sptr &scatterers) | |
SpaceGroup/Scatterers constructor. More... | |
CompositeBraggScatterer_sptr | getScatterers () const |
Return a clone of the internal CompositeBraggScatterer instance. More... | |
void | setCell (const UnitCell &cell) |
Assigns a new unit cell. More... | |
void | setScatterers (const CompositeBraggScatterer_sptr &scatterers) |
Remove all scatterers and set the supplied ones as new scatterers. More... | |
void | setSpaceGroup (const SpaceGroup_const_sptr &spaceGroup) |
Assigns a new space group to the crystal structure. More... | |
SpaceGroup_const_sptr | spaceGroup () const |
Returns the space group of the crystal structure. More... | |
Protected Member Functions | |
void | assignUnitCellToScatterers (const UnitCell &unitCell) |
Assigns the cell to all scatterers. More... | |
void | initializeScatterers () |
Initializes the internal storage for scatterers. More... | |
void | setReflectionConditionFromSpaceGroup (const SpaceGroup_const_sptr &spaceGroup) |
Tries to set the centering from the space group symbol or removes the current centering if creation fails. More... | |
Protected Attributes | |
UnitCell | m_cell |
ReflectionCondition_sptr | m_centering |
CompositeBraggScatterer_sptr | m_scatterers |
SpaceGroup_const_sptr | m_spaceGroup |
Three components are required to describe a crystal structure:
1. Unit cell metric 2. Space group 3. Scatterers in the asymmetric unit
Representations for all of these components exist in the MantidGeometry-library separately and this class combines them in order to provide some useful calculations that are common when working with crystal structures.
Besides construction from actual objects, a CrystalStructure object can be constructed from three strings that contain the corresponding information.
The unit cell string must consist of 3 or 6 floating point numbers, which are 3 lenghts in Angström and 3 angles in degree. If the angles are not supplied, they are assumed to be 90 degrees.
The space group string must be a valid space group that is registered into the factory. Lastly, specification of the atoms in the asymmetric unit is required. The format is as follows:
Element x y z Occupancy U_iso; Element x y z Occupancy U_iso; ...
Element has to be a valid NeutronAtom, x, y and z are fractional coordinates between 0 and 1 (other coordinates will be transformed to that range). It is allowed (and encouraged) to use proper fractions in the coordinates, for example:
Mg 1/3 2/3 1/4 1.0 0.05;
Occupancy must be given as values between 0 and 1 and U_iso is the isotropic thermal displacement parameter, given in Angrström^2.
Definition at line 68 of file CrystalStructure.h.
Mantid::Geometry::CrystalStructure::CrystalStructure | ( | const UnitCell & | unitCell, |
const SpaceGroup_const_sptr & | spaceGroup, | ||
const CompositeBraggScatterer_sptr & | scatterers | ||
) |
SpaceGroup/Scatterers constructor.
Definition at line 25 of file CrystalStructure.cpp.
References addScatterers(), initializeScatterers(), setCell(), setSpaceGroup(), and spaceGroup().
Mantid::Geometry::CrystalStructure::CrystalStructure | ( | const std::string & | unitCellString, |
const std::string & | spaceGroupString, | ||
const std::string & | scattererString | ||
) |
String-based constructor.
Definition at line 35 of file CrystalStructure.cpp.
References addScatterers(), Mantid::Geometry::CompositeBraggScatterer::create(), initializeScatterers(), Mantid::Kernel::SingletonHolder< T >::Instance(), setCell(), setSpaceGroup(), and Mantid::Geometry::strToUnitCell().
void Mantid::Geometry::CrystalStructure::addScatterers | ( | const CompositeBraggScatterer_sptr & | scatterers | ) |
Adds all scatterers in the supplied collection into the internal one (scatterers are copied).
Definition at line 84 of file CrystalStructure.cpp.
References assignUnitCellToScatterers(), count, m_cell, and m_scatterers.
Referenced by CrystalStructure(), and setScatterers().
|
protected |
Assigns the cell to all scatterers.
Definition at line 116 of file CrystalStructure.cpp.
References m_scatterers, and Mantid::Geometry::unitCellToStr().
Referenced by addScatterers(), and setCell().
UnitCell Mantid::Geometry::CrystalStructure::cell | ( | ) | const |
Returns the unit cell of the structure.
Definition at line 45 of file CrystalStructure.cpp.
References m_cell.
Referenced by export_CrystalStructure(), Mantid::Geometry::ReflectionGenerator::getDRangeFilter(), Mantid::Geometry::ReflectionGenerator::getDValues(), Mantid::Geometry::ReflectionGenerator::getHKLs(), Mantid::Geometry::ReflectionGenerator::getUniqueHKLs(), and setCell().
|
inline |
Definition at line 82 of file CrystalStructure.h.
Referenced by Mantid::Geometry::ReflectionGenerator::getReflectionConditionFilter(), and setReflectionConditionFromSpaceGroup().
CompositeBraggScatterer_sptr Mantid::Geometry::CrystalStructure::getScatterers | ( | ) | const |
Return a clone of the internal CompositeBraggScatterer instance.
Definition at line 69 of file CrystalStructure.cpp.
References m_scatterers.
Referenced by Mantid::Geometry::StructureFactorCalculatorSummation::updateUnitCellScatterers().
|
protected |
Initializes the internal storage for scatterers.
Definition at line 127 of file CrystalStructure.cpp.
References Mantid::Geometry::CompositeBraggScatterer::create(), and m_scatterers.
Referenced by CrystalStructure().
void Mantid::Geometry::CrystalStructure::setCell | ( | const UnitCell & | cell | ) |
Assigns a new unit cell.
Definition at line 48 of file CrystalStructure.cpp.
References assignUnitCellToScatterers(), cell(), and m_cell.
Referenced by CrystalStructure(), and Mantid::Crystal::PredictPeaks::setStructureFactorCalculatorFromSample().
|
protected |
Tries to set the centering from the space group symbol or removes the current centering if creation fails.
Definition at line 96 of file CrystalStructure.cpp.
References centering(), Mantid::Geometry::getAllReflectionConditions(), m_centering, and spaceGroup().
Referenced by setSpaceGroup().
void Mantid::Geometry::CrystalStructure::setScatterers | ( | const CompositeBraggScatterer_sptr & | scatterers | ) |
Remove all scatterers and set the supplied ones as new scatterers.
Definition at line 76 of file CrystalStructure.cpp.
References addScatterers(), and m_scatterers.
void Mantid::Geometry::CrystalStructure::setSpaceGroup | ( | const SpaceGroup_const_sptr & | spaceGroup | ) |
Assigns a new space group to the crystal structure.
spaceGroup | :: New space group of the crystal structure |
Definition at line 62 of file CrystalStructure.cpp.
References m_spaceGroup, setReflectionConditionFromSpaceGroup(), and spaceGroup().
Referenced by CrystalStructure().
SpaceGroup_const_sptr Mantid::Geometry::CrystalStructure::spaceGroup | ( | ) | const |
Returns the space group of the crystal structure.
Definition at line 55 of file CrystalStructure.cpp.
References m_spaceGroup.
Referenced by CrystalStructure(), Mantid::Geometry::ReflectionGenerator::getReflectionConditionFilter(), Mantid::Geometry::ReflectionGenerator::getUniqueHKLs(), setReflectionConditionFromSpaceGroup(), setSpaceGroup(), and Mantid::Geometry::StructureFactorCalculatorSummation::updateUnitCellScatterers().
|
protected |
Definition at line 95 of file CrystalStructure.h.
Referenced by addScatterers(), cell(), and setCell().
|
protected |
Definition at line 97 of file CrystalStructure.h.
Referenced by setReflectionConditionFromSpaceGroup().
|
protected |
Definition at line 98 of file CrystalStructure.h.
Referenced by addScatterers(), assignUnitCellToScatterers(), getScatterers(), initializeScatterers(), and setScatterers().
|
protected |
Definition at line 96 of file CrystalStructure.h.
Referenced by setSpaceGroup(), and spaceGroup().