diff --git a/CHANGELOG.txt b/CHANGELOG.txt index c5ae5d2a49de307843bd31c986b7bab853c880dd..8891b9639dcdac2c2c38132c8028cd0836951e91 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,3 +1,29 @@ +Changes In Release 1.3.1 +-------------------------------------------------------------------------------- + + * Export missing default argument for AligmentHandle.ToString + * Automatically attach entity view in SequenceFromChain + * Export GetMatchingBackboneViews to Python + * Fix compilation with boost 1.33.1 + * Allow renumbering of single chain + +Changes In Release 1.3.0 +-------------------------------------------------------------------------------- + + * Scene background can now be set to a gradient or an image + * Better Handling of HSV colors + * Table: direct access to columns tab['x'] is also available as tab.x + * Table: Export to ConTeXt and HTML tables + * Table: Barplot interface + * The BLAST binding supports newer versions of BLAST + * Bindings for CAD score + * Update directory layout of OST to be more conformant with the site-package + system of Python: Instead of storing the modules in lib{64}/ost/ost, they + are now in lib{64}/python{{VERSION}}/site-packages/ost + * Added molck, the molecular checker. A small command-line tool to clean PDB + files, e.g. remove atoms with zero occupancy, "virtual atoms", hydrogens + etc. + Changes In Release 1.2.3 -------------------------------------------------------------------------------- diff --git a/CMakeLists.txt b/CMakeLists.txt index cfbd59e3ac4f1e437bd2ecc6abb889d45a6a7898..f4ce4d675a556308f5b1031c3f4446050d9a15eb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,7 +6,7 @@ cmake_minimum_required(VERSION 2.6.4 FATAL_ERROR) project(OpenStructure CXX C) set (OST_VERSION_MAJOR 1) set (OST_VERSION_MINOR 3) -set (OST_VERSION_PATCH 0) +set (OST_VERSION_PATCH 1) set (OST_VERSION_STRING ${OST_VERSION_MAJOR}.${OST_VERSION_MINOR}.${OST_VERSION_PATCH} ) set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${PROJECT_SOURCE_DIR}/cmake_support) include(OST) diff --git a/modules/base/src/boost_filesystem_helper.hh b/modules/base/src/boost_filesystem_helper.hh index 5418253fd7553f7f715e8259d1f6f08615080ca1..450ffa94deaef5b230c11cd0129e3a5422549fda 100644 --- a/modules/base/src/boost_filesystem_helper.hh +++ b/modules/base/src/boost_filesystem_helper.hh @@ -37,6 +37,16 @@ String BFPathToString(const boost::filesystem::path& path) #endif } +inline String BFPathStem(const boost::filesystem::path& path) { +#if BOOST_FILESYSTEM_VERSION<103400 + String name = BFPathToString(path); + size_t n = name.rfind('.'); + return name.substr(0, n); +#else + return path.stem(); +#endif +} + } diff --git a/modules/mol/base/pymod/export_editors.cc b/modules/mol/base/pymod/export_editors.cc index aae903f7d276721545a60af51cd1ed0dff227263..e204bbd2e7c190fc42b4d931a4e9a584577a4719 100644 --- a/modules/mol/base/pymod/export_editors.cc +++ b/modules/mol/base/pymod/export_editors.cc @@ -249,6 +249,7 @@ void export_Editors() .def("ReorderResidues",&EditorBase::ReorderResidues) .def("ReorderAllResidues",&EditorBase::ReorderAllResidues) .def("RenumberAllResidues",&EditorBase::RenumberAllResidues) + .def("RenumberChain",&EditorBase::RenumberChain) ; void (XCSEditor::*apply_transform1)(const geom::Mat4&) = &XCSEditor::ApplyTransform; diff --git a/modules/mol/base/pymod/export_entity_view.cc b/modules/mol/base/pymod/export_entity_view.cc index 0ae2b8a09c026a6c70bf28cc113467f4fc09589a..fd97572869e6f935b0a3ab7b7b6226f8d850dcd9 100644 --- a/modules/mol/base/pymod/export_entity_view.cc +++ b/modules/mol/base/pymod/export_entity_view.cc @@ -215,6 +215,6 @@ void export_EntityView() class_<EntityViewList>("EntityViewList", init<>()) .def(vector_indexing_suite<EntityViewList>()) ; - to_python_converter<std::pair<EntityView, EntityView>, + to_python_converter<std::pair<EntityView, EntityView>, PairToTupleConverter<EntityView, EntityView> >(); } diff --git a/modules/mol/base/src/editor_base.cc b/modules/mol/base/src/editor_base.cc index ff19cddff9f8aaab6cd5910db047f1a5cc4f8ef5..9e8729d9374391321f511f8e17e1bef79b81d327 100644 --- a/modules/mol/base/src/editor_base.cc +++ b/modules/mol/base/src/editor_base.cc @@ -208,6 +208,15 @@ void EditorBase::RenumberAllResidues(int start, bool keep_spacing) ent_.Impl()->RenumberAllResidues(start, keep_spacing); } +void EditorBase::RenumberChain(const ChainHandle& chain, int start, bool keep_spacing) +{ + CheckHandleValidity(chain); + if(chain.GetEntity()!=ent_){ + throw Error("Chain does not belong to the editors entity!"); + } + chain.Impl()->RenumberAllResidues(start, keep_spacing); +} + void EditorBase::RenameAtom(AtomHandle atom, const String& new_name) { CheckHandleValidity(atom); diff --git a/modules/mol/base/src/editor_base.hh b/modules/mol/base/src/editor_base.hh index 7d6f6d65a2e9761e1cebdd4b014589e5a0174cd0..05d82ddb0682e12737b629947f010947cb009842 100644 --- a/modules/mol/base/src/editor_base.hh +++ b/modules/mol/base/src/editor_base.hh @@ -277,6 +277,23 @@ public: /// If set to false, residues will continously be renumbered ongoing from start. /// Otherwise the spacings between the residues are kept. void RenumberAllResidues(int start, bool keep_spacing); + + + + /// \brief renumber residues of one chain + /// + /// \param name + /// All residues of this chain will be renumbered according to the + /// parameters start and keep_spacing + /// + /// \param start + /// Residues of given chain will be renumbered, whereas the first + /// residue gets the residue number start. + /// + /// \param keep_spacing + /// If set to false, residues will continously be renumbered ongoing from start. + /// Otherwise the spacings between the residues are kept. + void RenumberChain(const ChainHandle& chain, int start, bool keep_spacing); /// \brief Get edit mode of editor EditMode GetMode() const {return mode_;} diff --git a/modules/seq/base/pymod/export_sequence.cc b/modules/seq/base/pymod/export_sequence.cc index 75f289aaba84c7f15de01cbf2a11350770d36c23..6cdf081cd35740fa1f4a543ef341e37f3e0974f6 100644 --- a/modules/seq/base/pymod/export_sequence.cc +++ b/modules/seq/base/pymod/export_sequence.cc @@ -345,7 +345,7 @@ void export_sequence() .def("GetResidueIndex", &AlignmentHandle::GetResidueIndex) .def("GetResidue", &AlignmentHandle::GetResidue) .def("AddSequence", &AlignmentHandle::AddSequence) - .def("GetMatchingBackboneViews", &AlignmentHandle::GetMatchingBackboneViews, + .def("GetMatchingBackboneViews", &AlignmentHandle::GetMatchingBackboneViews, (arg("idx_a")=0, arg("idx_b")=1)) .def("FindSequence", &AlignmentHandle::FindSequence) .def("FindSequenceIndex", &AlignmentHandle::FindSequenceIndex) diff --git a/tools/molck/main.cc b/tools/molck/main.cc index dab69250c67ce2022bc66555b0179c8386ef577e..6b896ac68313eb65e8ed10c75040f6bdd2bfa3c2 100644 --- a/tools/molck/main.cc +++ b/tools/molck/main.cc @@ -370,7 +370,7 @@ int main(int argc, char *argv[]) } if (write_to_file) { fs::path input_file_path(files[i]); - fs::path input_filename = input_file_path.stem(); + fs::path input_filename = BFPathStem(input_file_path); String input_filename_string=BFPathToString(input_filename);