Mantid
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Mantid::Geometry::CrystalStructure Class Reference

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
 

Detailed Description

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.

Author
Michael Wedel, Paul Scherrer Institut - SINQ
Date
05/08/2014

Definition at line 68 of file CrystalStructure.h.

Constructor & Destructor Documentation

◆ CrystalStructure() [1/2]

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().

◆ CrystalStructure() [2/2]

Mantid::Geometry::CrystalStructure::CrystalStructure ( const std::string &  unitCellString,
const std::string &  spaceGroupString,
const std::string &  scattererString 
)

Member Function Documentation

◆ addScatterers()

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().

◆ assignUnitCellToScatterers()

void Mantid::Geometry::CrystalStructure::assignUnitCellToScatterers ( const UnitCell unitCell)
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().

◆ cell()

UnitCell Mantid::Geometry::CrystalStructure::cell ( ) const

◆ centering()

ReflectionCondition_sptr Mantid::Geometry::CrystalStructure::centering ( ) const
inline

◆ getScatterers()

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().

◆ initializeScatterers()

void Mantid::Geometry::CrystalStructure::initializeScatterers ( )
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().

◆ setCell()

void Mantid::Geometry::CrystalStructure::setCell ( const UnitCell cell)

◆ setReflectionConditionFromSpaceGroup()

void Mantid::Geometry::CrystalStructure::setReflectionConditionFromSpaceGroup ( const SpaceGroup_const_sptr spaceGroup)
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().

◆ setScatterers()

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.

◆ setSpaceGroup()

void Mantid::Geometry::CrystalStructure::setSpaceGroup ( const SpaceGroup_const_sptr spaceGroup)

Assigns a new space group to the crystal structure.

Parameters
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()

SpaceGroup_const_sptr Mantid::Geometry::CrystalStructure::spaceGroup ( ) const

Member Data Documentation

◆ m_cell

UnitCell Mantid::Geometry::CrystalStructure::m_cell
protected

Definition at line 95 of file CrystalStructure.h.

Referenced by addScatterers(), cell(), and setCell().

◆ m_centering

ReflectionCondition_sptr Mantid::Geometry::CrystalStructure::m_centering
protected

Definition at line 97 of file CrystalStructure.h.

Referenced by setReflectionConditionFromSpaceGroup().

◆ m_scatterers

CompositeBraggScatterer_sptr Mantid::Geometry::CrystalStructure::m_scatterers
protected

◆ m_spaceGroup

SpaceGroup_const_sptr Mantid::Geometry::CrystalStructure::m_spaceGroup
protected

Definition at line 96 of file CrystalStructure.h.

Referenced by setSpaceGroup(), and spaceGroup().


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