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 cell() const;
75 void setCell(const UnitCell &cell);
76
77 SpaceGroup_const_sptr spaceGroup() const;
78 void setSpaceGroup(const SpaceGroup_const_sptr &spaceGroup);
79
80 ReflectionCondition_sptr centering() const { return m_centering; }
81
82 CompositeBraggScatterer_sptr getScatterers() const;
83 void setScatterers(const CompositeBraggScatterer_sptr &scatterers);
84 void addScatterers(const CompositeBraggScatterer_sptr &scatterers);
85
86protected:
87 void assignUnitCellToScatterers(const UnitCell &unitCell);
88
89 void setReflectionConditionFromSpaceGroup(const SpaceGroup_const_sptr &spaceGroup);
90
91 void initializeScatterers();
92
97};
98
99using CrystalStructure_sptr = std::shared_ptr<CrystalStructure>;
100
101} // namespace Geometry
102} // namespace Mantid
Three components are required to describe a crystal structure:
ReflectionCondition_sptr m_centering
CompositeBraggScatterer_sptr m_scatterers
ReflectionCondition_sptr centering() 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.