Skip to content
Snippets Groups Projects
Commit 75e541c7 authored by Marco Biasini's avatar Marco Biasini
Browse files

fix compilation with ENABLE_IMG=0

parent 2cd8c57e
No related branches found
No related tags found
No related merge requests found
...@@ -27,7 +27,9 @@ using namespace ost::mol::alg; ...@@ -27,7 +27,9 @@ using namespace ost::mol::alg;
void export_StructureAnalysis() void export_StructureAnalysis()
{ {
def("GetPosListFromView",&GetPosListFromView, (arg("view"))); def("GetPosListFromView",&GetPosListFromView, (arg("view")));
#if OST_IMG_ENABLED
def("CalculateAverageAgreementWithDensityMap",&CalculateAverageAgreementWithDensityMap,(arg("pos_list"),arg("density_map"))); def("CalculateAverageAgreementWithDensityMap",&CalculateAverageAgreementWithDensityMap,(arg("pos_list"),arg("density_map")));
def("CalculateAgreementWithDensityMap",&CalculateAgreementWithDensityMap,(arg("pos_list"),arg("density_map"))); def("CalculateAgreementWithDensityMap",&CalculateAgreementWithDensityMap,(arg("pos_list"),arg("density_map")));
#endif
def("WrapEntityInPeriodicCell",&WrapEntityInPeriodicCell,(arg("Entity"),arg("cell_center"),arg("nasis_vec"))); def("WrapEntityInPeriodicCell",&WrapEntityInPeriodicCell,(arg("Entity"),arg("cell_center"),arg("nasis_vec")));
} }
\ No newline at end of file
...@@ -38,7 +38,7 @@ geom::Vec3List GetPosListFromView(const EntityView& view){ ...@@ -38,7 +38,7 @@ geom::Vec3List GetPosListFromView(const EntityView& view){
} }
return vl; return vl;
} }
#if OST_IMG_ENABLED
std::vector<Real> CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map){ std::vector<Real> CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map){
CheckHandleValidity(density_map); CheckHandleValidity(density_map);
std::vector<Real> v; std::vector<Real> v;
...@@ -59,7 +59,8 @@ Real CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapH ...@@ -59,7 +59,8 @@ Real CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapH
} }
return sum/float(vl.size()); return sum/float(vl.size());
} }
#endif
void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 basis_vec){ void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 basis_vec){
mol::XCSEditor edi=eh.EditXCS(mol::BUFFERED_EDIT); mol::XCSEditor edi=eh.EditXCS(mol::BUFFERED_EDIT);
geom::Vec3 cm,wrapped_cm,shift; geom::Vec3 cm,wrapped_cm,shift;
......
...@@ -27,13 +27,16 @@ ...@@ -27,13 +27,16 @@
#include <ost/mol/entity_view.hh> #include <ost/mol/entity_view.hh>
#include <ost/mol/entity_handle.hh> #include <ost/mol/entity_handle.hh>
#include <ost/img/map.hh> #if OST_IMG_ENABLED
# include <ost/img/map.hh>
#endif
namespace ost { namespace mol { namespace alg { namespace ost { namespace mol { namespace alg {
geom::Vec3List DLLEXPORT_OST_MOL_ALG GetPosListFromView(const EntityView& view); geom::Vec3List DLLEXPORT_OST_MOL_ALG GetPosListFromView(const EntityView& view);
#if OST_IMG_ENABLED
std::vector<Real> DLLEXPORT_OST_MOL_ALG CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map); std::vector<Real> DLLEXPORT_OST_MOL_ALG CalculateAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map);
Real DLLEXPORT_OST_MOL_ALG CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map); Real DLLEXPORT_OST_MOL_ALG CalculateAverageAgreementWithDensityMap(const geom::Vec3List& vl, img::MapHandle& density_map);
#endif
void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 basis_vec); void DLLEXPORT_OST_MOL_ALG WrapEntityInPeriodicCell(EntityHandle eh, const geom::Vec3 cell_center, const geom::Vec3 basis_vec);
}}}//ns }}}//ns
#endif #endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment