diff --git a/modules/conop/src/builder.cc b/modules/conop/src/builder.cc index 36fcf7bab5826bc8059cb185bb88711f9f696cae..0b71e97b8b0fb2bd88438bec0427117fecb182e2 100644 --- a/modules/conop/src/builder.cc +++ b/modules/conop/src/builder.cc @@ -63,7 +63,6 @@ bool Builder::DoesPeptideBondExist(const mol::AtomHandle& n, bool Builder::IsBondFeasible(const mol::AtomHandle& atom_a, const mol::AtomHandle& atom_b) { - Real len=geom::Length2(atom_a.GetPos()-atom_b.GetPos()); Real radii=0.0; if (atom_a.GetRadius()>0.0) { radii=atom_a.GetRadius(); @@ -75,9 +74,9 @@ bool Builder::IsBondFeasible(const mol::AtomHandle& atom_a, } else { return false; } - radii*=0.5; - Real upper_bound=1.5*radii*radii; - Real lower_bound=0.25*radii*radii; + Real len=geom::Length2(atom_a.GetPos()-atom_b.GetPos()); + Real lower_bound=radii*radii*0.0625; + Real upper_bound=lower_bound*6.0; return (len<=upper_bound && len>=lower_bound); } diff --git a/modules/io/src/mol/entity_io_mae_handler.cc b/modules/io/src/mol/entity_io_mae_handler.cc index 7cccf154a14aeb52a2779f3ed19d5330c0837bf3..643630f8abcc567466777a8a2becac8e14ed6445 100644 --- a/modules/io/src/mol/entity_io_mae_handler.cc +++ b/modules/io/src/mol/entity_io_mae_handler.cc @@ -330,14 +330,19 @@ bool EntityIOMAEHandler::ProvidesExport(const boost::filesystem::path& loc, mol::EntityHandle LoadMAE(const String& file_name) { - Profile profile_load("LoadMAE"); //conop::BuilderP builder = conop::Conopology::Instance().GetBuilder(); conop::BuilderP builder(new conop::HeuristicBuilder); MAEReader reader(file_name); mol::EntityHandle ent=mol::CreateEntity(); mol::XCSEditor editor=ent.EditXCS(mol::BUFFERED_EDIT); - reader.Import(ent); - conop::Conopology::Instance().ConnectAll(builder,ent); + { + Profile profile("import MAE"); + reader.Import(ent); + } + { + Profile profile("connect all"); + conop::Conopology::Instance().ConnectAll(builder,ent); + } return ent; } diff --git a/modules/io/tests/CMakeLists.txt b/modules/io/tests/CMakeLists.txt index 1cb26f5fd45b675c5038de4d6dcb9c1a0fc00b26..71c8ea0952373b678fd467267470db0b4dbe6e43 100644 --- a/modules/io/tests/CMakeLists.txt +++ b/modules/io/tests/CMakeLists.txt @@ -11,4 +11,8 @@ set(OST_IO_UNIT_TESTS # missing: test_star_parser.cc ost_unittest(io "${OST_IO_UNIT_TESTS}") target_link_libraries(io_tests ost_mol) -target_link_libraries(io_tests ost_seq) \ No newline at end of file +target_link_libraries(io_tests ost_seq) + +add_executable(test_mae_standalone test_mae_standalone.cc) +target_link_libraries(test_mae_standalone ost_mol) +target_link_libraries(test_mae_standalone ost_io) diff --git a/modules/io/tests/test_mae_standalone.cc b/modules/io/tests/test_mae_standalone.cc new file mode 100644 index 0000000000000000000000000000000000000000..10395fb69d479d11a80be64f53ac2832f30b90c7 --- /dev/null +++ b/modules/io/tests/test_mae_standalone.cc @@ -0,0 +1,14 @@ +#include <ost/log.hh> +#include <ost/conop/conop.hh> +#include <ost/io/entity_io_mae_handler.hh> + +using namespace ost; + +int main(int argc, char** argv) +{ + if(argc>1) { + mol::EntityHandle eh=io::LoadMAE(argv[1]); + } + + return 0; +}