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
16#include "MantidKernel/System.h"
17
18#include <memory>
19
20namespace Mantid {
21namespace Geometry {
22
23// Forward declaration
24class StructureFactorCalculator;
25
68class MANTID_GEOMETRY_DLL CrystalStructure {
69public:
70 CrystalStructure(const UnitCell &unitCell, const SpaceGroup_const_sptr &spaceGroup,
71 const CompositeBraggScatterer_sptr &scatterers);
72
73 CrystalStructure(const std::string &unitCellString, const std::string &spaceGroupString,
74 const std::string &scattererString);
75
76 UnitCell cell() const;
77 void setCell(const UnitCell &cell);
78
79 SpaceGroup_const_sptr spaceGroup() const;
80 void setSpaceGroup(const SpaceGroup_const_sptr &spaceGroup);
81
82 ReflectionCondition_sptr centering() const { return m_centering; }
83
84 CompositeBraggScatterer_sptr getScatterers() const;
85 void setScatterers(const CompositeBraggScatterer_sptr &scatterers);
86 void addScatterers(const CompositeBraggScatterer_sptr &scatterers);
87
88protected:
89 void assignUnitCellToScatterers(const UnitCell &unitCell);
90
91 void setReflectionConditionFromSpaceGroup(const SpaceGroup_const_sptr &spaceGroup);
92
93 void initializeScatterers();
94
99};
100
101using CrystalStructure_sptr = std::shared_ptr<CrystalStructure>;
102
103} // namespace Geometry
104} // namespace Mantid
Three components are required to describe a crystal structure:
ReflectionCondition_sptr m_centering
CompositeBraggScatterer_sptr m_scatterers
ReflectionCondition_sptr centering() const
SpaceGroup_const_sptr m_spaceGroup
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.