1 #include "global.py.h"
2 #include "atom.py.h"
3 #include "bond.py.h"
4 #include "data.py.h"
5 #include "configfile.py.h"
6 #include "fileio.py.h"
7 #include "parameters.py.h"
8 #include "plugin.py.h"
9 #include "presets.py.h"
10 #include "kpoints.py.h"
11 #include "molecule.py.h"
12 #include "periodictable.py.h"
13 #include "step.py.h"
14 #include "vec.py.h"
15
16 using namespace Vipster;
17
18 PYBIND11_MAKE_OPAQUE(std::map<std::string, std::string>);
19 PYBIND11_MAKE_OPAQUE(std::vector<std::string>);
20
setupVipster(py::module & m,ConfigState & state,bool enableWrite)21 void Vipster::Py::setupVipster(py::module &m, ConfigState &state, bool enableWrite)
22 {
23 m.doc() = "Vipster\n"
24 "=======\n\n"
25 "A molecular modeling framework with periodic structures in mind.\n"
26 "Use readFile() and writeFile() to handle files.\n"
27 "Please inspect Molecule and Step as the main data "
28 "containers for more information.";
29
30 /*
31 * Basic containers
32 */
33
34 py::bind_map<std::map<std::string,std::string>>(m, "__StrStrMap");
35 py::bind_vector<std::vector<std::string>>(m, "__StrVector");
36 bind_array<ColVec>(m, "ColVec");
37 bind_array<DiffVec>(m, "DiffVec");
38
39 /*
40 * Initialize library
41 */
42
43 Py::Vec(m);
44 Py::Atom(m);
45 Py::Bond(m);
46 Py::Table(m);
47 Py::Step(m);
48 Py::KPoints(m);
49 Py::Data(m);
50 // Read config state, init state-dependent API
51 Py::Molecule(m, state);
52 Py::FileIO(m, state, enableWrite);
53 Py::Plugins(m);
54 Py::Parameters(m);
55 Py::Presets(m);
56 // expose state
57 Py::config(m, state);
58 }
59