36 const std::string &scattererString) {
41 setSpaceGroup(SpaceGroupFactory::Instance().createSpaceGroup(spaceGroupString));
72 return std::dynamic_pointer_cast<CompositeBraggScatterer>(clone);
85 m_scatterers->addScatterers(scatterers->getScatterers());
96 std::string centeringSymbol =
spaceGroup->hmSymbol().substr(0, 1);
98 if (centeringSymbol ==
"R") {
99 centeringSymbol =
"Robv";
103 for (
auto &reflectionCondition : reflectionConditions) {
104 if (reflectionCondition->getSymbol() == centeringSymbol) {
114 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.
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.
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