From e56badeb89a98260c074149d7213a4d8d3ac6b52 Mon Sep 17 00:00:00 2001 From: Marco Biasini <marco.biasini@unibas.ch> Date: Mon, 11 Jun 2012 11:59:30 +0200 Subject: [PATCH] remove unused functions --- modules/conop/src/nonstandard.cc | 44 ------------------------- modules/mol/base/pymod/export_entity.cc | 14 ++------ 2 files changed, 3 insertions(+), 55 deletions(-) diff --git a/modules/conop/src/nonstandard.cc b/modules/conop/src/nonstandard.cc index 5effd8d90..b8f09f283 100644 --- a/modules/conop/src/nonstandard.cc +++ b/modules/conop/src/nonstandard.cc @@ -35,50 +35,6 @@ using namespace ost::conop; namespace ost { namespace conop { -namespace { - -bool CheckBackboneAtoms(ResidueHandle res) -{ - String atom_names[]={"N", "CA", "C", "O"}; - std::vector<String> missing; - for (int i =0; i<4; ++i) { - if (!res.FindAtom(atom_names[i])) { - missing.push_back(atom_names[i]); - } - } - if (!missing.empty()) { - std::stringstream ss; - ss << "residue " << res.GetQualifiedName() << " is missing atoms "; - for (std::vector<String>::const_iterator - i=missing.begin(), e=missing.end(); i!=e; ++i) { - if (i!=missing.begin()) { - ss << ", "; - } - ss << *i; - } - LOG_WARNING(ss.str()); - return false; - } - return true; -} - -bool CheckCalphaAtom(ResidueHandle res) -{ - String atom_names[]={"N", "CA", "C", "O"}; - std::vector<String> missing; - for (int i =0; i<4; ++i) { - if (!res.FindAtom(atom_names[i])) { - missing.push_back(atom_names[i]); - } - } - if (!res.FindAtom("CA")) { - LOG_WARNING("residue " << res.GetQualifiedName() << " is missing CA atom"); - return false; - } - return true; -} - -} bool CopyResidue(ResidueHandle src_res, ResidueHandle dst_res, XCSEditor& edi) { diff --git a/modules/mol/base/pymod/export_entity.cc b/modules/mol/base/pymod/export_entity.cc index 6fda49c79..e1e3ac409 100644 --- a/modules/mol/base/pymod/export_entity.cc +++ b/modules/mol/base/pymod/export_entity.cc @@ -63,15 +63,10 @@ ICSEditor depr_request_ics_editor(EntityHandle e, EditMode m) return e.EditICS(m); } -bool less_index(const mol::AtomHandle& a1, const mol::AtomHandle& a2) -{ - return a1.GetIndex()<a2.GetIndex(); -} - +#if OST_NUMPY_SUPPORT_ENABLED PyObject* get_pos2(EntityHandle& entity, bool id_sorted) { -#if OST_NUMPY_SUPPORT_ENABLED npy_intp dims[]={entity.GetAtomCount(),3}; PyObject* na = PyArray_SimpleNew(2,dims,NPY_FLOAT); npy_float* nad = reinterpret_cast<npy_float*>(PyArray_DATA(na)); @@ -93,17 +88,13 @@ PyObject* get_pos2(EntityHandle& entity, bool id_sorted) } } return na; -#else - throw std::runtime_error("GetPositions disabled, since numpy support is not compiled in"); - return 0; -#endif } PyObject* get_pos1(EntityHandle& entity) { return get_pos2(entity,true); } - +#endif } // ns void export_Entity() @@ -208,3 +199,4 @@ void export_Entity() .def(vector_indexing_suite<EntityHandleList>()) ; } + -- GitLab