1 |
#ifndef __NANOBUILDER_H__ |
2 |
#define __NANOBUILDER_H__ |
3 |
|
4 |
#define DEFAULT 1 |
5 |
#define BUILD_CORE_SHELL 2 |
6 |
#define BUILD_CORE_SHELL_VACANCY 3 |
7 |
#define BUILD_RANDOM_PARTICLE 4 |
8 |
#define BUILD_NMOL_PARTICLE 5 |
9 |
|
10 |
|
11 |
namespace nano{ |
12 |
typedef struct Mols |
13 |
{ |
14 |
double pos[3]; // Center of Molecule position |
15 |
MoleculeStamp* myStamp; |
16 |
int isCore; |
17 |
int isShell; |
18 |
int isVacancy; |
19 |
}; |
20 |
} |
21 |
|
22 |
|
23 |
|
24 |
// returns 1 if successful, 0 otherwise |
25 |
class nanoBuilder{ |
26 |
|
27 |
public: |
28 |
nanoBuilder(int &hasError); |
29 |
~nanoBuilder(); |
30 |
|
31 |
int buildNanoParticle(void); |
32 |
|
33 |
|
34 |
private: |
35 |
|
36 |
//Support Fncs. |
37 |
int sanityCheck( void ); |
38 |
void buildVacancies(void); |
39 |
void orientationMunger(double A[3][3]); |
40 |
void placeRandom(int totalMol); |
41 |
// Builder Fncs |
42 |
void buildWithVacancies(double dist, double pos[3]); |
43 |
void buildRandomlyMixed(double dist, double pos[3]); |
44 |
void buildWithCoreShell(double dist,double pos[3]); |
45 |
void buildNmolParticle(double dist, double pos[3]); |
46 |
|
47 |
//Logicals |
48 |
int isRandom; |
49 |
int hasVacancies; |
50 |
int latticeType; |
51 |
int buildNmol; |
52 |
int buildType; |
53 |
int coreHasOrientation; |
54 |
int shellHasOrientation; |
55 |
|
56 |
// Int values |
57 |
int nVacancies; |
58 |
int nInterface; |
59 |
int nCells; |
60 |
int nMol; |
61 |
int nCoreModelAtoms; // Number of atoms in Core model |
62 |
int nShellModelAtoms; // Number of atoms in Shell model |
63 |
int moleculeCount; |
64 |
int coreAtomCount; // Count number of core atoms in system. |
65 |
int shellAtomCount; // Count number of shell atoms in system. |
66 |
int atomCount; |
67 |
int totalMolecules; // Total number of molecules |
68 |
int nCoreMolecules; // Total number of core molecules. |
69 |
int nShellMolecules; // Total number of shell molecules. |
70 |
int maxModelNatoms; |
71 |
double particleRadius; |
72 |
double coreRadius; |
73 |
double vacancyFraction; |
74 |
double vacancyRadius; |
75 |
double shellRadius; |
76 |
double latticeSpacing; |
77 |
double soluteX; //Mole fraction for randomly mixed nanoparticle. |
78 |
|
79 |
//Vector to store atoms while were building nanoparticle. |
80 |
std::vector<nano::Mols> moleculeVector; |
81 |
std::vector<int> vacancyInterface; |
82 |
|
83 |
|
84 |
nano::Mols myMol; |
85 |
|
86 |
MoleculeStamp* coreStamp; |
87 |
MoleculeStamp* shellStamp; |
88 |
|
89 |
|
90 |
|
91 |
|
92 |
}; |
93 |
|
94 |
|
95 |
|
96 |
#endif // __NANOBUILDER_H__ |