36 const std::string &scattererString) {
72 return std::dynamic_pointer_cast<CompositeBraggScatterer>(clone);
85 size_t count = scatterers->nScatterers();
87 for (
size_t i = 0; i <
count; ++i) {
107 for (
auto &reflectionCondition : reflectionConditions) {
108 if (reflectionCondition->getSymbol() ==
centering) {
118 throw std::runtime_error(
"Scatterer collection is a null pointer. Aborting.");
static CompositeBraggScatterer_sptr create()
Static method that creates a new instance of CompositeBraggScatterer and returns it (wrapped by a sma...
CompositeBraggScatterer_sptr getScatterers() const
Return a clone of the internal CompositeBraggScatterer instance.
ReflectionCondition_sptr m_centering
void setReflectionConditionFromSpaceGroup(const SpaceGroup_const_sptr &spaceGroup)
Tries to set the centering from the space group symbol or removes the current centering if creation f...
CrystalStructure(const UnitCell &unitCell, const SpaceGroup_const_sptr &spaceGroup, const CompositeBraggScatterer_sptr &scatterers)
SpaceGroup/Scatterers constructor.
void addScatterers(const CompositeBraggScatterer_sptr &scatterers)
Adds all scatterers in the supplied collection into the internal one (scatterers are copied).
CompositeBraggScatterer_sptr m_scatterers
void initializeScatterers()
Initializes the internal storage for scatterers.
void setScatterers(const CompositeBraggScatterer_sptr &scatterers)
Remove all scatterers and set the supplied ones as new scatterers.
UnitCell cell() const
Returns the unit cell of the structure.
ReflectionCondition_sptr centering() const
SpaceGroup_const_sptr spaceGroup() const
Returns the space group of the crystal structure.
void setSpaceGroup(const SpaceGroup_const_sptr &spaceGroup)
Assigns a new space group to the crystal structure.
void setCell(const UnitCell &cell)
Assigns a new unit cell.
void assignUnitCellToScatterers(const UnitCell &unitCell)
Assigns the cell to all scatterers.
SpaceGroup_const_sptr m_spaceGroup
Class to implement unit cell of crystals.
static T & Instance()
Return a reference to the Singleton instance, creating it if it does not already exist Creation is do...
MANTID_GEOMETRY_DLL UnitCell strToUnitCell(const std::string &unitCellString)
MANTID_GEOMETRY_DLL std::string unitCellToStr(const UnitCell &unitCell)
std::shared_ptr< const SpaceGroup > SpaceGroup_const_sptr
std::shared_ptr< BraggScatterer > BraggScatterer_sptr
MANTID_GEOMETRY_DLL const ReflectionConditions & getAllReflectionConditions()
std::shared_ptr< CompositeBraggScatterer > CompositeBraggScatterer_sptr