ProSHADE  0.7.6.6 (JUL 2022)
Protein Shape Detection
pyProSHADE_bindings.cpp
Go to the documentation of this file.
1 
21 //==================================================== Do not use the following flags for the included files - this causes a lot of warnings that have nothing to do with ProSHADE
22 #if defined ( __GNUC__ )
23  #pragma GCC diagnostic push
24  #pragma GCC diagnostic ignored "-Wpedantic"
25  #pragma GCC diagnostic ignored "-Wshadow"
26  #pragma GCC diagnostic ignored "-Wall"
27  #pragma GCC diagnostic ignored "-Wextra"
28  #pragma GCC diagnostic ignored "-Wdouble-promotion"
29  #pragma GCC diagnostic ignored "-Wconversion"
30 #endif
31 
32 //==================================================== Do not use the following flags for the included files - this causes a lot of warnings that have nothing to do with ProSHADE
33 #if defined ( __clang__ )
34  #pragma clang diagnostic push
35  #pragma clang diagnostic ignored "-Wpedantic"
36  #pragma clang diagnostic ignored "-Wshadow"
37  #pragma clang diagnostic ignored "-Wall"
38  #pragma clang diagnostic ignored "-Wextra"
39  #pragma clang diagnostic ignored "-Wdouble-promotion"
40  #pragma clang diagnostic ignored "-Weverything"
41 #endif
42 
43 //==================================================== Remove MSVC C4996 Warnings caused by Gemmi code
44 #if defined ( _MSC_VER )
45  #pragma warning ( disable:4996 )
46 #endif
47 
48 //==================================================== Include getopt_port for python
49 #include <getopt_port/getopt_port.h>
50 #include <getopt_port/getopt_port.c>
51 
52 //==================================================== Include ProSHADE
53 #include "ProSHADE.hpp"
54 
55 //==================================================== Include full ProSHADE - including cpp files looks horrible, but it is the only way I can find to stop PyBind11 from complaining on Windows10. I believe this has to do with windows not exporting symbols unless the __cdecl_dllexport is used, which for most functions is not yet there...
57 #include "ProSHADE_exceptions.cpp"
58 #include "ProSHADE_misc.cpp"
59 #include "ProSHADE_maths.cpp"
60 #include "ProSHADE_tasks.cpp"
61 #include "ProSHADE_io.cpp"
62 #include "ProSHADE_data.cpp"
63 #include "ProSHADE_symmetry.cpp"
64 #include "ProSHADE_overlay.cpp"
66 #include "ProSHADE_spheres.cpp"
67 #include "ProSHADE_mapManip.cpp"
68 #include "ProSHADE_messages.cpp"
69 #include "ProSHADE_distances.cpp"
70 #include "ProSHADE_peakSearch.cpp"
72 #include "ProSHADE.cpp"
73 
74 //==================================================== Include PyBind11 header
75 #include <pybind11/pybind11.h>
76 #include <pybind11/stl.h>
77 #include <pybind11/stl_bind.h>
78 #include <pybind11/numpy.h>
79 #include <pybind11/complex.h>
80 
81 //==================================================== Forward declarations of pyProSHADE functions
82 void add_settingsClass ( pybind11::module& pyProSHADE );
83 void add_dataClass ( pybind11::module& pyProSHADE );
84 void add_distancesClass ( pybind11::module& pyProSHADE );
85 void add_mathsNamespace ( pybind11::module& pyProSHADE );
86 void add_symmetryNamespace ( pybind11::module& pyProSHADE );
87 void add_mapManipNamespace ( pybind11::module& pyProSHADE );
88 
89 //==================================================== Remove the bindings that are not modifyable in python
90 PYBIND11_MAKE_OPAQUE ( std::vector < std::string > )
91 
92 //==================================================== Enable MSVC C4996 Warnings for the rest of the code
93 #if defined ( _MSC_VER )
94  #pragma warning ( default:4996 )
95 #endif
96 
97 //==================================================== Now the flags can be restored and used as per the CMakeLists.txt file.
98 #if defined ( __GNUC__ )
99  #pragma GCC diagnostic pop
100 #endif
101 
102 //==================================================== Now the flags can be restored and used as per the CMakeLists.txt file.
103 #if defined ( __clang__ )
104  #pragma clang diagnostic pop
105 #endif
106 
107 //==================================================== Include the other codes
108 #include "pyProSHADE.cpp"
109 #include "pyProSHADE_data.cpp"
110 #include "pyProSHADE_distances.cpp"
111 #include "pyProSHADE_maths.cpp"
112 #include "pyProSHADE_symmetry.cpp"
113 #include "pyProSHADE_mapManip.cpp"
114 
115 //==================================================== Declare the exported functions
116 PYBIND11_MODULE ( proshade, pyProSHADE )
117 {
118  //================================================ Create new, modifyable bindings
119  pybind11::bind_vector < std::vector < std::string > > ( pyProSHADE, "<VectorOfStrings class> (Use append to add entries and [] to access them)", pybind11::module_local ( true ) );
120 
121  //================================================ Set the module description
122  pyProSHADE.doc ( ) = "Protein Shape Description and Symmetry Detection (ProSHADE) python module"; // Module docstring
123 
124  //================================================ Set the module version
125  pyProSHADE.attr ( "__version__" ) = PROSHADE_VERSION;
126 
127  //================================================ Export the ProSHADE_Task enum
128  pybind11::enum_ < ProSHADE_Task > ( pyProSHADE, "ProSHADE_Task" )
129  .value ( "NA", NA )
130  .value ( "Distances", Distances )
131  .value ( "Symmetry", Symmetry )
132  .value ( "OverlayMap", OverlayMap )
133  .value ( "MapManip", MapManip )
134  .export_values ( );
135 
136  //================================================ Export the ProSHADE_Settings class
137  add_settingsClass ( pyProSHADE );
138  add_dataClass ( pyProSHADE );
139  add_distancesClass ( pyProSHADE );
140  add_mathsNamespace ( pyProSHADE );
141  add_symmetryNamespace ( pyProSHADE );
142  add_mapManipNamespace ( pyProSHADE );
143 }
ProSHADE_exceptions.cpp
This source file contains the ProSHADE_exception class functions..
ProSHADE_distances.cpp
This is the source file containing functions required for computation of shape distances.
pyProSHADE_data.cpp
This file contains the PyBind11 bindings for the ProSHADE_data class.
ProSHADE_maths.cpp
This source file contains all the mathematical functions not simply available from elsewhere or modif...
pyProSHADE_maths.cpp
This file contains the PyBind11 bindings for selected ProSHADE_internal_maths namespace functions.
ProSHADE_mapManip.cpp
This source file contains the functions required for internal map manipulation for various purposes.
ProSHADE_misc.cpp
This source file contains all miscellaneous functions.
ProSHADE_precomputedValues.cpp
This source file contains functions for the precomputed values classes.
ProSHADE_symmetry.cpp
This source file contains all the functions required to detect symmetry axes and types from the inver...
ProSHADE_io.cpp
This source file contains the functions required for specifc data format manipulations.
pyProSHADE_mapManip.cpp
This file contains the PyBind11 bindings for selected ProSHADE_internal_mapManip namespace functions.
pyProSHADE_distances.cpp
This file contains the PyBind11 bindings for the ProSHADE_internal_distances namespace.
ProSHADE_data.cpp
This is the source file containing internal data representation and manipulation structures and funct...
ProSHADE_overlay.cpp
This source file contains the functions required for structure overlay computations.
ProSHADE_messages.cpp
This source file contains all user message functions.
pyProSHADE_symmetry.cpp
This file contains the PyBind11 bindings for selected ProSHADE_internal_symmetry namespace functions.
ProSHADE_spheres.cpp
This source file contains function related to the ProSHADE_sphere class, which generally serve to pre...
ProSHADE.hpp
This is the main header file providing the main access class and its functions.
ProSHADE.cpp
This is the main source file providing the main access class and its functions.
ProSHADE_peakSearch.cpp
This source file declares functions required for peak searching and peak position optimisation.
ProSHADE_tasks.cpp
This source file contains the task functions, which drive the computation of a specific task.
pyProSHADE.cpp
This file contains the PyBind11 bindings for the ProSHADE_settings class.
ProSHADE_wignerMatrices.cpp
This source file contains all the functions required to compute the Wigner D matrices.
ProSHADE_sphericalHarmonics.cpp
This source file contains the function required to compute the spherical harmonics decompostion in Pr...