14using namespace Kernel;
45 std::vector<BraggScatterer_sptr> braggScatterers;
46 braggScatterers.reserve(scatterersInAsymmetricUnit->nScatterers() * spaceGroup->order());
48 for (
size_t i = 0; i < scatterersInAsymmetricUnit->nScatterers(); ++i) {
50 std::dynamic_pointer_cast<BraggScattererInCrystalStructure>(scatterersInAsymmetricUnit->getScatterer(i));
53 std::vector<V3D> positions = spaceGroup->getEquivalentPositions(current->getPosition());
59 braggScatterers.emplace_back(clone);
70 std::ostringstream posStream;
71 posStream << std::setprecision(17);
74 return posStream.str();
CompositeBraggScatterer accumulates scatterers, for easier calculation of structure factors.
Three components are required to describe a crystal structure:
CompositeBraggScatterer_sptr getScatterers() const
Return a clone of the internal CompositeBraggScatterer instance.
SpaceGroup_const_sptr spaceGroup() const
Returns the space group of the crystal structure.
void updateUnitCellScatterers(const CrystalStructure &crystalStructure)
Rebuilds the internal list of scatterers.
std::string getV3DasString(const Kernel::V3D &point) const
Return V3D as string without losing precision.
CompositeBraggScatterer_sptr m_unitCellScatterers
void crystalStructureSetHook(const CrystalStructure &crystalStructure) override
Calls updateUnitCellScatterers() to rebuild the complete list of scatterers.
StructureFactor getF(const Kernel::V3D &hkl) const override
Returns the structure factor obtained from the stored scatterers.
StructureFactorCalculatorSummation()
StructureFactorCalculator.
std::unique_ptr< T > create(const P &parent, const IndexArg &indexArg, const HistArg &histArg)
This is the create() method that all the other create() methods call.
std::shared_ptr< BraggScattererInCrystalStructure > BraggScattererInCrystalStructure_sptr
std::shared_ptr< const SpaceGroup > SpaceGroup_const_sptr
std::shared_ptr< BraggScatterer > BraggScatterer_sptr
std::shared_ptr< CompositeBraggScatterer > CompositeBraggScatterer_sptr
std::complex< double > StructureFactor