forked from lingtikong/latgen
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdriver.h
59 lines (45 loc) · 1.66 KB
/
driver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
#ifndef DRIVER_H
#define DRIVER_H
#include "lists.h"
#include "random.h"
#include "memory.h"
#include "elements.h"
#include <map>
class Driver{
public:
Driver();
~Driver();
void generate(); // method to generate the atomic configuration
void modify(); // to modify the resultant model
void write(int); // method to write the atomic configuration (xyz) and mapping info
void FormLayers();
void Interstitial();
#ifdef Poly
void PolyCrystal();
#endif
private:
int ShowMenu(int);
void MainMenu();
void ShowVersion();
lattice *latt;
char *name;
double alat;
int nx, ny, nz, nucell; // size in three dimension and # of atoms per unit cell
int natom, ntype; // otal number of atoms and atom types
int *attyp, *numtype, *typeID; // array to store the atomic types for all
int *xmap, *ymap, *zmap, *umap; // arrays to store the mapping info
double **atpos, latvec[3][3]; // arrays to store the atomic positions and lattice info
int flag_orient; // > 0, ask for orient; <= 0, not ask.
void typescan(); // to scan the total number of atomic types in system
int lookup(int); // to find the ID of an atomic type
RanPark *random; // class object to create random numbers
Memory *memory;
// private modification methods
void solidsol(void); // method to create subsutitutional solid solution
void ResetTypeID(void); // method to reset the atomic type ID
void MapElement(void); // method to map atomic type to real elements
ChemElements * element;
std::map<int,int> type2num;
int count_words(const char *);
};
#endif