ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/group/trunk/OOPSE-1.0/utils/sysbuilder/nanoBuilder.hpp
Revision: 1334
Committed: Fri Jul 16 18:58:03 2004 UTC (19 years, 11 months ago) by gezelter
File size: 2117 byte(s)
Log Message:
Initial import of OOPSE-1.0 source tree

File Contents

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