atomicrex  0.1
An advanced atomistic model building tool
LatticeStructures.h
1 //
3 // Copyright (C) 2017, Alexander Stukowski and Paul Erhart
4 //
5 // This file is part of atomicrex.
6 //
7 // Atomicrex is free software; you can redistribute it and/or modify
8 // it under the terms of the GNU General Public License as published by
9 // the Free Software Foundation; either version 3 of the License, or
10 // (at your option) any later version.
11 //
12 // Atomicrex is distributed in the hope that it will be useful,
13 // but WITHOUT ANY WARRANTY; without even the implied warranty of
14 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 // GNU General Public License for more details.
16 //
17 // You should have received a copy of the GNU General Public License
18 // along with this program. If not, see <http://www.gnu.org/licenses/>.
19 //
21 
22 #pragma once
23 
24 #include "AtomicStructure.h"
25 #include "../dof/DegreeOfFreedom.h"
26 #include "../properties/FitProperty.h"
27 
32 namespace atomicrex {
33 
40 {
41 protected:
42 
45 
46 public:
47 
49  virtual void parse(XML::Element structureElement) override;
50 
52  int atomType() const { return _atomType; }
53 
55  void setAtomType(double atomType) { _atomType = atomType; }
56 
58  const ScalarDOF& latticeParameter() const { return _latticeParameter; }
59 
61  CoupledFitProperty& latticeParameterProperty() { return _latticeParameterProperty; }
62 
63 private:
64 
66  int _atomType;
67 
69  ScalarDOF _latticeParameter;
70 
72  CoupledFitProperty _latticeParameterProperty;
73 };
74 
80 {
81 protected:
82 
85 
86 public:
87 
89  virtual void parse(XML::Element structureElement) override;
90 
92  int atomTypeA() const { return _atomTypeA; }
93 
95  void setAtomTypeA(double atomType) { _atomTypeA = atomType; }
96 
98  int atomTypeB() const { return _atomTypeB; }
99 
101  void setAtomTypeB(double atomType) { _atomTypeB = atomType; }
102 
104  const ScalarDOF& latticeParameter() const { return _latticeParameter; }
105 
107  CoupledFitProperty& latticeParameterProperty() { return _latticeParameterProperty; }
108 
109 private:
110 
112  int _atomTypeA, _atomTypeB;
113 
115  ScalarDOF _latticeParameter;
116 
118  CoupledFitProperty _latticeParameterProperty;
119 
120 };
121 
127 {
128 protected:
129 
132 
133 public:
134 
136  virtual void parse(XML::Element structureElement) override;
137 
139  int atomType() const { return _atomType; }
140 
142  void setAtomType(double atomType) { _atomType = atomType; }
143 
145  const ScalarDOF& latticeParameter() const { return _latticeParameter; }
146 
148  const ScalarDOF& CtoAratio() const { return _CtoAratio; }
149 
151  CoupledFitProperty& latticeParameterProperty() { return _latticeParameterProperty; }
152 
154  CoupledFitProperty& CtoAratioProperty() { return _CtoAratioProperty; }
155 
156 private:
157 
159  int _atomType;
160 
162  ScalarDOF _latticeParameter;
163 
165  ScalarDOF _CtoAratio;
166 
168  CoupledFitProperty _latticeParameterProperty;
169 
171  CoupledFitProperty _CtoAratioProperty;
172 };
173 
179 {
180 protected:
181 
184 
185 public:
186 
188  virtual void parse(XML::Element structureElement) override;
189 
191  int atomTypeA() const { return _atomTypeA; }
192 
194  void setAtomTypeA(double atomType) { _atomTypeA = atomType; }
195 
197  int atomTypeB() const { return _atomTypeB; }
198 
200  void setAtomTypeB(double atomType) { _atomTypeB = atomType; }
201 
203  const ScalarDOF& latticeParameter() const { return _latticeParameter; }
204 
206  const ScalarDOF& CtoAratio() const { return _CtoAratio; }
207 
209  CoupledFitProperty& latticeParameterProperty() { return _latticeParameterProperty; }
210 
212  CoupledFitProperty& CtoAratioProperty() { return _CtoAratioProperty; }
213 
214 private:
215 
217  int _atomTypeA, _atomTypeB;
218 
220  ScalarDOF _latticeParameter;
221 
223  ScalarDOF _CtoAratio;
224 
226  CoupledFitProperty _latticeParameterProperty;
227 
229  CoupledFitProperty _CtoAratioProperty;
230 };
231 
244 {
245 public:
246 
249 
251  virtual void updateStructure() override;
252 
253 };
254 
267 {
268 public:
269 
272 
274  virtual void updateStructure() override;
275 
276 };
277 
291 {
292 public:
293 
296 
298  virtual void updateStructure() override;
299 
300 };
301 
318 {
319 public:
320 
323 
325  virtual void updateStructure() override;
326 };
327 
342 {
343 public:
344 
347 
349  virtual void updateStructure() override;
350 
351 };
352 
365 {
366 public:
367 
370 
372  virtual void updateStructure() override;
373 
374 };
375 
388 {
389 public:
390 
393 
395  virtual void updateStructure() override;
396 
397 };
398 
413 {
414 public:
415 
418 
420  virtual void updateStructure() override;
421 
422 };
423 
437 {
438 public:
439 
442 
444  virtual void updateStructure() override;
445 
446 };
447 
461 {
462 public:
463 
466 
468  virtual void updateStructure() override;
469 
470 };
471 
485 {
486 public:
487 
490 
492  virtual void updateStructure() override;
493 
494 };
495 
512 {
513 public:
514 
516  B4LatticeStructure(const FPString& id, FitJob* job);
517 
519  virtual void updateStructure() override;
520 
522  virtual void parse(XML::Element structureElement) override;
523 
525  const ScalarDOF& internalParameterU() const { return _internalParameterU; }
526 
528  CoupledFitProperty& internalParameterUProperty() { return _internalParameterUProperty; }
529 
530 private:
531 
533  ScalarDOF _internalParameterU;
534 
536  CoupledFitProperty _internalParameterUProperty;
537 };
538 
554 {
555 public:
556 
559 
561  virtual void updateStructure() override;
562 
563 };
564 
578 {
579 public:
580 
583 
585  virtual void updateStructure() override;
586 
587 };
588 
603 {
604 public:
605 
608 
610  virtual void updateStructure() override;
611 
612 };
613 
629 {
630 public:
631 
634 
636  virtual void updateStructure() override;
637 
638 };
639 
655 {
656 public:
657 
660 
662  virtual void updateStructure() override;
663 
664 };
665 
681 {
682 public:
683 
686 
688  virtual void updateStructure() override;
689 
690 };
691 
706 {
707 public:
708 
711 
713  virtual void updateStructure() override;
714 
715 };
716 
730 {
731 public:
732 
735 
737  virtual void updateStructure() override;
738 
739 };
740 
755 {
756 public:
757 
760 
762  virtual void updateStructure() override;
763 
764 };
765 
766 } // End of namespace
D8aLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:710
Base class for maintaining structures.
Definition: AtomicStructure.h:42
const ScalarDOF & latticeParameter() const
Returns the lattice parameter of the structure.
Definition: LatticeStructures.h:104
void setAtomTypeA(double atomType)
Set the first atom type of the lattice.
Definition: LatticeStructures.h:194
int atomTypeA() const
Returns the first atom type of the lattice.
Definition: LatticeStructures.h:92
This class defines a Ni17Th2 lattice structure (e.g. Ni17Th2, alpha-Fe17Y2).
Definition: LatticeStructures.h:654
Base class for hexagonal, rhombohedral, and tetragonal lattice structures with two atom types (binary...
Definition: LatticeStructures.h:178
const ScalarDOF & latticeParameter() const
Returns the lattice parameter a of the structure.
Definition: LatticeStructures.h:145
This class defines a D2d lattice structure (e.g. CaCu5).
Definition: LatticeStructures.h:628
betaSnLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:346
Base class for hexagonal, rhombohedral, and tetragonal lattice structures with one atom type (unary)...
Definition: LatticeStructures.h:126
void setAtomTypeB(double atomType)
Set the first atom type of the lattice.
Definition: LatticeStructures.h:200
DIALatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:392
L12LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:734
CoupledFitProperty & internalParameterUProperty()
Returns the property for computing the relaxed lattice parameter c/a.
Definition: LatticeStructures.h:528
const ScalarDOF & latticeParameter() const
Returns the lattice parameter a of the structure.
Definition: LatticeStructures.h:203
B3LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:489
C1LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:582
Definition: FitProperty.h:184
void setAtomType(double atomType)
Set the atom type of the lattice.
Definition: LatticeStructures.h:142
const ScalarDOF & CtoAratio() const
Returns the lattice parameter c/a ratio of the structure.
Definition: LatticeStructures.h:206
int atomTypeB() const
Returns the second atom type of the lattice.
Definition: LatticeStructures.h:197
This class defines a body-centered cubic (BCC) lattice.
Definition: LatticeStructures.h:266
This class defines a L10 lattice structure (e.g., NiAl, CuAu).
Definition: LatticeStructures.h:754
int atomType() const
Returns the atom type of the lattice.
Definition: LatticeStructures.h:139
virtual void updateStructure()
Updates the structure, creates ghost atoms and builds neighbor lists.
Definition: AtomicStructure.cpp:200
Ni17Th2LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:659
This class defines a Th2Zn17 lattice structure (e.g. Th2Zn17, beta-Fe17Y2).
Definition: LatticeStructures.h:680
UnaryCubicLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.cpp:34
This class defines a face-centered cubic (FCC) lattice.
Definition: LatticeStructures.h:243
Base class for cubic lattice structures with one atom type (unary).
Definition: LatticeStructures.h:39
CoupledFitProperty & latticeParameterProperty()
Returns the property for computing the relaxed lattice parameter.
Definition: LatticeStructures.h:107
Base class for cubic lattice structures with two atom types (binary).
Definition: LatticeStructures.h:79
This class defines a zincblende lattice (ZnS, B3).
Definition: LatticeStructures.h:484
virtual void parse(XML::Element structureElement) override
Parses structure-specific parameters in the XML element in the job file.
Definition: LatticeStructures.cpp:45
This class defines diamond lattice.
Definition: LatticeStructures.h:387
This class defines a hexagonal close-packed lattice (HCP, 2H).
Definition: LatticeStructures.h:290
int atomTypeB() const
Returns the second atom type of the lattice.
Definition: LatticeStructures.h:98
BCCLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:271
This file collects the definition of classes that define various simple crystal structures.
Definition: Atomicrex.h:67
SCLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:369
A simple scalar degree of freedom that consists of a single value.
Definition: DegreeOfFreedom.h:169
This class defines a sodium chloride lattice (NaCl, B1).
Definition: LatticeStructures.h:436
int atomTypeA() const
Returns the first atom type of the lattice.
Definition: LatticeStructures.h:191
const ScalarDOF & latticeParameter() const
Returns the lattice parameter of the structure.
Definition: LatticeStructures.h:58
CoupledFitProperty & latticeParameterProperty()
Returns the property for computing the relaxed lattice parameter a.
Definition: LatticeStructures.h:151
HCPLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:295
CoupledFitProperty & latticeParameterProperty()
Returns the property for computing the relaxed lattice parameter a.
Definition: LatticeStructures.h:209
CoupledFitProperty & CtoAratioProperty()
Returns the property for computing the relaxed lattice parameter c/a.
Definition: LatticeStructures.h:154
std::string FPString
The default string type used throughout the code:
Definition: Atomicrex.h:70
This class defines a simple cubic lattice.
Definition: LatticeStructures.h:364
This class defines a D8a lattice structure (e.g., Mn23Th6, Fe23Y6).
Definition: LatticeStructures.h:705
Definition: XMLUtilities.h:69
This class defines a L12 lattice structure (e.g., Ni3Al, Cu3Au).
Definition: LatticeStructures.h:729
const ScalarDOF & internalParameterU() const
Returns the lattice parameter c/a ratio of the structure.
Definition: LatticeStructures.h:525
Definition: FitJob.h:37
BhLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:558
This class defines a wurtzite lattice structure (B4).
Definition: LatticeStructures.h:511
This class defines a omega-lattice structure.
Definition: LatticeStructures.h:412
CoupledFitProperty & CtoAratioProperty()
Returns the property for computing the relaxed lattice parameter c/a.
Definition: LatticeStructures.h:212
L10LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:759
FitJob * job() const
Returns a pointer to the job to which this object belongs.
Definition: FitObject.h:150
B2LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:465
void setAtomTypeB(double atomType)
Set the first atom type of the lattice.
Definition: LatticeStructures.h:101
This class defines a C15 lattice structure (e.g., Cu2Mg, Fe2Y).
Definition: LatticeStructures.h:602
This class defines a beta-tin lattice.
Definition: LatticeStructures.h:341
CoupledFitProperty & latticeParameterProperty()
Returns the property for computing the relaxed lattice parameter.
Definition: LatticeStructures.h:61
This class defines a double hexagonal close-packed lattice (DHCP, 4H).
Definition: LatticeStructures.h:317
This class defines a fluorite lattice (CaF2, C1).
Definition: LatticeStructures.h:577
void setAtomTypeA(double atomType)
Set the first atom type of the lattice.
Definition: LatticeStructures.h:95
This class defines a cesiumchloride lattice (CsCl, B2).
Definition: LatticeStructures.h:460
B1LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:441
OMGLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:417
void setAtomType(double atomType)
Set the atom type of the lattice.
Definition: LatticeStructures.h:55
Th2Zn17LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:685
const ScalarDOF & CtoAratio() const
Returns the lattice parameter c/a ratio of the structure.
Definition: LatticeStructures.h:148
DHCPLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:322
int atomType() const
Returns the atom type of the lattice.
Definition: LatticeStructures.h:52
C15LatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:607
This class defines a tungsten carbide (Bh) lattice structure.
Definition: LatticeStructures.h:553
FCCLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:248
D2dLatticeStructure(const FPString &id, FitJob *job)
Constructor.
Definition: LatticeStructures.h:633