diff --git a/modules/conop/pymod/CMakeLists.txt b/modules/conop/pymod/CMakeLists.txt index 9c09906222fb97e1c935590ec22e81b536c94891..23dff26a0022fa9c312c9bfd1acda033d1c304b7 100644 --- a/modules/conop/pymod/CMakeLists.txt +++ b/modules/conop/pymod/CMakeLists.txt @@ -8,7 +8,6 @@ set(OST_CONOP_PYMOD_SOURCES export_conop.cc export_diag.cc export_rule_based.cc - export_non_standard.cc export_ring_finder.cc ) diff --git a/modules/conop/pymod/wrap_conop.cc b/modules/conop/pymod/wrap_conop.cc index 119c86c325f3ce6fc48cf88298838f441cb04a36..04bcfce147b3ebf986cee454c2594e242ade7059 100644 --- a/modules/conop/pymod/wrap_conop.cc +++ b/modules/conop/pymod/wrap_conop.cc @@ -25,7 +25,6 @@ void export_Sanitizer(); void export_Conop(); void export_RingFinder(); void export_AminoAcids(); -void export_NonStandard(); void export_processor(); void export_rule_based(); void export_heuristic(); @@ -41,6 +40,5 @@ BOOST_PYTHON_MODULE(_ost_conop) export_Compound(); export_RingFinder(); export_AminoAcids(); - export_NonStandard(); export_diag(); } diff --git a/modules/conop/src/CMakeLists.txt b/modules/conop/src/CMakeLists.txt index 0185618ea4a9ebb02d917393670ce3f401ed494c..c2f1f4c6d0148c62461be5852bd33872ad39f903 100644 --- a/modules/conop/src/CMakeLists.txt +++ b/modules/conop/src/CMakeLists.txt @@ -9,7 +9,6 @@ compound.hh compound_lib.hh module_config.hh rule_based.hh -nonstandard.hh minimal_compound_lib.hh compound_lib_base.hh ring_finder.hh @@ -27,12 +26,11 @@ rule_based.cc model_check.cc compound.cc compound_lib.cc -nonstandard.cc ring_finder.cc ) module(NAME conop SOURCES ${OST_CONOP_SOURCES} - HEADERS ${OST_CONOP_HEADERS} DEPENDS_ON ost_mol ost_mol_alg ost_geom ost_db) + HEADERS ${OST_CONOP_HEADERS} DEPENDS_ON ost_mol ost_geom ost_db) if (WIN32) diff --git a/modules/mol/alg/pymod/CMakeLists.txt b/modules/mol/alg/pymod/CMakeLists.txt index 612caccfb615c70f8ffefeffd567040da1eef630..5519c6adf2741e213eba44cb82fbaf559f4c19e8 100644 --- a/modules/mol/alg/pymod/CMakeLists.txt +++ b/modules/mol/alg/pymod/CMakeLists.txt @@ -7,6 +7,7 @@ set(OST_MOL_ALG_PYMOD_SOURCES export_contact_overlap.cc export_accessibility.cc export_sec_structure.cc + export_non_standard.cc export_molck.cc ) diff --git a/modules/conop/pymod/export_non_standard.cc b/modules/mol/alg/pymod/export_non_standard.cc similarity index 96% rename from modules/conop/pymod/export_non_standard.cc rename to modules/mol/alg/pymod/export_non_standard.cc index 50b1fd2d6e169e31ff5e192e03b19b98541bf89d..8d485b169ecbd290483daf5f0ab5ca3e06e8da80 100644 --- a/modules/conop/pymod/export_non_standard.cc +++ b/modules/mol/alg/pymod/export_non_standard.cc @@ -18,11 +18,11 @@ //------------------------------------------------------------------------------ #include <boost/python.hpp> #include <ost/mol/mol.hh> -#include <ost/conop/nonstandard.hh> +#include <ost/mol/alg/nonstandard.hh> using namespace boost::python; -using namespace ost::conop; +using namespace ost::mol::alg; using namespace ost::mol; object copy_conserved_handle(ResidueHandle src_res, ResidueHandle dst_res, diff --git a/modules/mol/alg/pymod/wrap_mol_alg.cc b/modules/mol/alg/pymod/wrap_mol_alg.cc index b90ab2befa069e245c1c5f1c48027164c0117ef3..f32e3256f656586953ffa654c6617cb0377781cb 100644 --- a/modules/mol/alg/pymod/wrap_mol_alg.cc +++ b/modules/mol/alg/pymod/wrap_mol_alg.cc @@ -39,6 +39,7 @@ void export_svdSuperPose(); void export_TrajectoryAnalysis(); void export_StructureAnalysis(); void export_Clash(); +void export_NonStandard(); void export_Molck(); void export_contact_overlap(); void export_accessibility(); @@ -111,6 +112,7 @@ BOOST_PYTHON_MODULE(_ost_mol_alg) export_TrajectoryAnalysis(); export_StructureAnalysis(); export_Clash(); + export_NonStandard(); export_Molck(); export_contact_overlap(); export_accessibility(); diff --git a/modules/mol/alg/src/CMakeLists.txt b/modules/mol/alg/src/CMakeLists.txt index 8049b99a9ac43b5545e6f12bdbe3650602c2addc..ef2ae22ae10ccc9172285b7d79e96b298c7d6fec 100644 --- a/modules/mol/alg/src/CMakeLists.txt +++ b/modules/mol/alg/src/CMakeLists.txt @@ -20,6 +20,7 @@ set(OST_MOL_ALG_HEADERS similarity_matrix.hh accessibility.hh sec_struct.hh + nonstandard.hh molck.hh ) @@ -44,6 +45,7 @@ set(OST_MOL_ALG_SOURCES similarity_matrix.cc accessibility.cc sec_struct.cc + nonstandard.cc molck.cc ) @@ -60,7 +62,7 @@ if (ENABLE_IMG) entity_to_density.cc ) - set(MOL_ALG_DEPS ${MOL_ALG_DEPS} ost_img ost_img_alg ost_seq_alg) + set(MOL_ALG_DEPS ${MOL_ALG_DEPS} ost_img ost_img_alg ost_seq_alg ost_conop) endif() executable(NAME lddt SOURCES lddt.cc diff --git a/modules/mol/alg/src/molck.cc b/modules/mol/alg/src/molck.cc index df931f8ed6474e4530711ba5bfb49ea13366d9e8..0667275af4a20db3500d68caf5136bc0c57fbb86 100644 --- a/modules/mol/alg/src/molck.cc +++ b/modules/mol/alg/src/molck.cc @@ -1,7 +1,7 @@ #include <ost/mol/xcs_editor.hh> +#include <ost/mol/alg/nonstandard.hh> #include <ost/conop/model_check.hh> #include <ost/conop/amino_acids.hh> -#include <ost/conop/nonstandard.hh> #include <ost/mol/alg/molck.hh> using namespace ost::conop; @@ -36,7 +36,7 @@ EntityHandle ost::mol::alg::MapNonStandardResidues(EntityHandle& ent, CompoundLi continue; } ResidueHandle dest_res = new_edi.AppendResidue(new_chain,OneLetterCodeToResidueName(compound->GetOneLetterCode()),r->GetNumber()); - CopyResidue(*r,dest_res,new_edi,lib); + ost::mol::alg::CopyResidue(*r,dest_res,new_edi,lib); } } } diff --git a/modules/mol/alg/src/molck.hh b/modules/mol/alg/src/molck.hh index 1034602e7986498c0306a2577ef892cd688cab8c..d7e4b65d2975b8680c2f06ce44bd7b2f57fec5ee 100644 --- a/modules/mol/alg/src/molck.hh +++ b/modules/mol/alg/src/molck.hh @@ -27,7 +27,8 @@ struct MolckSettings{ }; -ost::mol::EntityHandle MapNonStandardResidues(ost::mol::EntityHandle& ent, ost::conop::CompoundLibPtr lib); +ost::mol::EntityHandle MapNonStandardResidues(ost::mol::EntityHandle& ent, + ost::conop::CompoundLibPtr lib); void RemoveAtoms(ost::mol::EntityHandle& ent, ost::conop::CompoundLibPtr lib, @@ -38,9 +39,12 @@ void RemoveAtoms(ost::mol::EntityHandle& ent, bool rm_zero_occ_atoms, bool colored=true); -void CleanUpElementColumn(ost::mol::EntityHandle& ent, ost::conop::CompoundLibPtr lib); +void CleanUpElementColumn(ost::mol::EntityHandle& ent, + ost::conop::CompoundLibPtr lib); -void Molck(ost::mol::EntityHandle& ent, ost::conop::CompoundLibPtr lib, const MolckSettings& settings); +void Molck(ost::mol::EntityHandle& ent, + ost::conop::CompoundLibPtr lib, + const MolckSettings& settings); }}} // namespace diff --git a/modules/mol/alg/src/nonstandard.cc b/modules/mol/alg/src/nonstandard.cc index eaf06680d087c05080f0e578828c7bad3fd68c66..b51c582adcdd81fb5b02cff834c18c218b7b317d 100644 --- a/modules/mol/alg/src/nonstandard.cc +++ b/modules/mol/alg/src/nonstandard.cc @@ -32,7 +32,7 @@ using namespace ost::mol; using namespace ost; using namespace ost::conop; -namespace ost { namespace conop { +namespace ost { namespace mol { namespace alg { bool CopyResidue(ResidueHandle src_res, ResidueHandle dst_res, XCSEditor& edi) @@ -234,4 +234,4 @@ bool CopyNonConserved(ResidueHandle src_res, ResidueHandle dst_res, -}} +}}} diff --git a/modules/mol/alg/src/nonstandard.hh b/modules/mol/alg/src/nonstandard.hh index a57022def8ef7436889491c7ae6714c6e9a69d6e..b37ffd52bb16e2f77b12b03d2b182c106c073901 100644 --- a/modules/mol/alg/src/nonstandard.hh +++ b/modules/mol/alg/src/nonstandard.hh @@ -23,11 +23,11 @@ Author: Marco Biasini, Juergen Haas */ #include "module_config.hh" -#include "compound_lib.hh" +#include <ost/conop/compound_lib.hh> -namespace ost { namespace conop { +namespace ost { namespace mol { namespace alg { /// \brief copies all atom of src_res to dst_res, gets compound lib from builder @@ -40,7 +40,8 @@ bool DLLEXPORT_OST_CONOP CopyResidue(ost::mol::ResidueHandle src_res, /// \brief copies all atom of src_res to dst_res, requires a compound lib bool DLLEXPORT_OST_CONOP CopyResidue(ost::mol::ResidueHandle src_res, ost::mol::ResidueHandle dst_res, - ost::mol::XCSEditor& edi, CompoundLibPtr lib); + ost::mol::XCSEditor& edi, + ost::conop::CompoundLibPtr lib); /// \brief copies all atom of src_res to dst_res @@ -66,7 +67,8 @@ bool DLLEXPORT_OST_CONOP CopyIdentical(ost::mol::ResidueHandle src_res, bool DLLEXPORT_OST_CONOP CopyConserved(ost::mol::ResidueHandle src_res, ost::mol::ResidueHandle dst_res, ost::mol::XCSEditor& edi, - bool& has_cbeta, CompoundLibPtr lib); + bool& has_cbeta, + ost::conop::CompoundLibPtr lib); /// \brief copies atoms of src_res to dst_res, requires compound lib /// @@ -107,10 +109,11 @@ bool DLLEXPORT_OST_CONOP CopyMSE(ost::mol::ResidueHandle src_res, bool DLLEXPORT_OST_CONOP CopyModified(ost::mol::ResidueHandle src_res, ost::mol::ResidueHandle dst_res, ost::mol::XCSEditor& edi, - bool& has_cbeta, CompoundLibPtr lib); + bool& has_cbeta, + ost::conop::CompoundLibPtr lib); -}} +}}} #endif diff --git a/tools/molck/CMakeLists.txt b/tools/molck/CMakeLists.txt index 4e1dc2fb79b73e90022dd2f546a5011c98eca118..c76f1fd71b4532bf32b2cfcfa5dc34a0b7fb00ff 100644 --- a/tools/molck/CMakeLists.txt +++ b/tools/molck/CMakeLists.txt @@ -1,4 +1,4 @@ if (NOT WIN32) executable(NAME molck SOURCES main.cc - DEPENDS_ON ost_io STATIC) + DEPENDS_ON ost_io ost_mol_alg STATIC) endif(NOT WIN32) diff --git a/tools/molck/main.cc b/tools/molck/main.cc index 610c074bfbd6a3e6578b9abd2989ff3fe24e355c..ef2d77c207213957a20d2d2d460da74fa0280b73 100644 --- a/tools/molck/main.cc +++ b/tools/molck/main.cc @@ -15,10 +15,8 @@ #include <mach-o/dyld.h> #endif using namespace ost; -using namespace ost::conop; using namespace ost::mol; using namespace ost::io; -using namespace ost::mol::alg; namespace po=boost::program_options; namespace fs=boost::filesystem; @@ -82,20 +80,20 @@ EntityHandle load_x(const String& file, const IOProfile& profile) } // load compound library, exiting if it could not be found... -CompoundLibPtr load_compound_lib(const String& custom_path) +ost::conop::CompoundLibPtr load_compound_lib(const String& custom_path) { if (custom_path!="") { if (fs::exists(custom_path)) { - return CompoundLib::Load(custom_path); + return ost::conop::CompoundLib::Load(custom_path); } else { std::cerr << "Could not find compounds.chemlib at the provided location, trying other options" << std::endl; } } if (fs::exists("compounds.chemlib")) { - return CompoundLib::Load("compounds.chemlib"); + return ost::conop::CompoundLib::Load("compounds.chemlib"); } char result[ 1024 ]; - CompoundLibPtr lib; + ost::conop::CompoundLibPtr lib; String exe_path; #if defined(__APPLE__) uint32_t size=1023; @@ -118,14 +116,14 @@ CompoundLibPtr load_compound_lib(const String& custom_path) String share_path_string=BFPathToString(share_path); if (fs::exists(share_path_string)) { - return CompoundLib::Load(share_path_string); + return ost::conop::CompoundLib::Load(share_path_string); } } if (!lib) { std::cerr << "Could not load compounds.chemlib" << std::endl; exit(-1); } - return CompoundLibPtr(); + return ost::conop::CompoundLibPtr(); } @@ -136,7 +134,7 @@ int main(int argc, char *argv[]) } IOProfile prof; prof.fault_tolerant=true; - MolckSettings settings; + ost::mol::alg::MolckSettings settings; String rm; String color; @@ -223,14 +221,14 @@ int main(int argc, char *argv[]) usage(); exit(-1); } - CompoundLibPtr lib=load_compound_lib(custom_path); + ost::conop::CompoundLibPtr lib=load_compound_lib(custom_path); for (unsigned int i = 0; i < files.size(); ++i) { EntityHandle ent=load_x(files[i], prof); if (!ent.IsValid()) { continue; } - Molck(ent, lib, settings); + ost::mol::alg::Molck(ent, lib, settings); if (write_to_stdout) { PDBWriter writer(std::cout, prof);