QNANO
Atom_List.h
1 #ifndef QNANO_NEW_ATOM_LIST_DEFINED_H
2 #define QNANO_NEW_ATOM_LIST_DEFINED_H
3 
4 #include "structure/Atom.h"
5 #include "tools/List_Class.h"
6 #include "tools/Parameter_Map.h"
7 #include "structure/Lattice.h"
8 
9 class Atom_List: public List_Class<Atom> {
10 public:
11 
12  Vec3d bbox_min() const;
13  Vec3d bbox_max() const;
14  Vec3d bbox_center() const;
15  Vec3d bbox_width() const;
17  std::pair<Vec3d,Vec3d> bbox() const;
18 
20  void read(const std::string &filename);
22  void setup(Parameter_Map &param_map, bool *successful=NULL);
24  void print(const std::string &filename, const std::vector<std::string> &materials = std::vector<std::string>() ) const;
25  static std::vector<std::string> get_material_names_from_file(const std::string &filename);
26 
28  void generate_from_lattice(const Lattice &lat, int Nx, int Ny, int Nz);
29  void generate_from_material_file(const std::string &res_dir, const std::string &material, int Nx, int Ny, int Nz);
30  void replace_elements(int from, int to);
31 
32  //cutting and shaping
33  void cut_radius(double radius, const Vec3d &center);
34  void cut_plane(double a, double b, double c, double d, const Vec3d &center);
35  void cut_plane(const std::vector<double> &v, const Vec3d &center);
36  void cut_plane(const Vec3d &v, const Vec3d &center);
37 
38 
39  //constructors
40  Atom_List(){}
41  Atom_List(const std::string &filename){ read(filename);}
42  Atom_List(Parameter_Map &param_map, bool *successful=NULL){setup(param_map, successful);}
43 
44 };
45 
46 #endif
Definition: Parameter_Map.h:12
Class to store positions and to handle operations on 3d vectors.
Definition: Vec3d.h:9
Definition: Atom_List.h:9
Definition: List_Class.h:8
void print(const std::string &filename, const std::vector< std::string > &materials=std::vector< std::string >()) const
print position file
Definition: Atom_List.cc:93
void generate_from_lattice(const Lattice &lat, int Nx, int Ny, int Nz)
generate Nx*Ny*Nz unit cells from lattice:
Definition: Atom_List.cc:159
void setup(Parameter_Map &param_map, bool *successful=NULL)
generate or read depending on command line input
Definition: Atom_List.cc:114
Definition: Lattice.h:36
std::pair< Vec3d, Vec3d > bbox() const
Boundary box.
Definition: Atom_List.cc:30
void read(const std::string &filename)
read atoms from position file
Definition: Atom_List.cc:65