Skip to content
Snippets Groups Projects
Commit c7622c5e authored by Rafal Gumienny's avatar Rafal Gumienny
Browse files

fix: SCHWED-3126 Successful compilation and pymod import

parent dab53b86
Branches
Tags
No related merge requests found
......@@ -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
)
......
......@@ -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();
}
......@@ -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)
......
......@@ -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
)
......
......@@ -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,
......
......@@ -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();
......
......@@ -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
......
#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);
}
}
}
......
......@@ -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
......@@ -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,
}}
}}}
......@@ -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
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)
......@@ -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);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment