Mantid
Loading...
Searching...
No Matches
CrystalStructure.h
Go to the documentation of this file.
1// Mantid Repository : https://github.com/mantidproject/mantid
2//
3// Copyright © 2014 ISIS Rutherford Appleton Laboratory UKRI,
4// NScD Oak Ridge National Laboratory, European Spallation Source,
5// Institut Laue - Langevin & CSNS, Institute of High Energy Physics, CAS
6// SPDX - License - Identifier: GPL - 3.0 +
7#pragma once
8
14#include "MantidGeometry/DllConfig.h"
15
16#include <memory>
17
18namespace Mantid {
19namespace Geometry {
20
21// Forward declaration
22class StructureFactorCalculator;
23
66class MANTID_GEOMETRY_DLL CrystalStructure {
67public:
68 CrystalStructure(const UnitCell &unitCell, const SpaceGroup_const_sptr &spaceGroup,
69 const CompositeBraggScatterer_sptr &scatterers);
70
71 CrystalStructure(const std::string &unitCellString, const std::string &spaceGroupString,
72 const std::string &scattererString);
73
74 UnitCell const &cell() const & { return m_cell; };
75 UnitCell cell() const && { return m_cell; }; // cppcheck-suppress returnByReference
76 void setCell(const UnitCell &cell);
77
78 SpaceGroup_const_sptr spaceGroup() const;
79 void setSpaceGroup(const SpaceGroup_const_sptr &spaceGroup);
80
81 ReflectionCondition_sptr centering() const { return m_centering; }
82
83 CompositeBraggScatterer_sptr getScatterers() const;
84 void setScatterers(const CompositeBraggScatterer_sptr &scatterers);
85 void addScatterers(const CompositeBraggScatterer_sptr &scatterers);
86
87protected:
88 void assignUnitCellToScatterers(const UnitCell &unitCell);
89
90 void setReflectionConditionFromSpaceGroup(const SpaceGroup_const_sptr &spaceGroup);
91
92 void initializeScatterers();
93
98};
99
100using CrystalStructure_sptr = std::shared_ptr<CrystalStructure>;
101
102} // namespace Geometry
103} // namespace Mantid
Three components are required to describe a crystal structure:
ReflectionCondition_sptr m_centering
CompositeBraggScatterer_sptr m_scatterers
ReflectionCondition_sptr centering() const
UnitCell const & cell() const &
Class to implement unit cell of crystals.
Definition UnitCell.h:44
std::shared_ptr< ReflectionCondition > ReflectionCondition_sptr
Shared pointer to a ReflectionCondition.
std::shared_ptr< const SpaceGroup > SpaceGroup_const_sptr
Definition SpaceGroup.h:82
std::shared_ptr< CrystalStructure > CrystalStructure_sptr
std::shared_ptr< CompositeBraggScatterer > CompositeBraggScatterer_sptr
Helper class which provides the Collimation Length for SANS instruments.