diff --git a/modules/io/tests/test_mmcif_reader.cc b/modules/io/tests/test_mmcif_reader.cc index ad669bd7a5d9f7b51097b4903e64900f48058338..577b211fc849113bf4cd1eca53d23816389fc3db 100644 --- a/modules/io/tests/test_mmcif_reader.cc +++ b/modules/io/tests/test_mmcif_reader.cc @@ -276,13 +276,13 @@ BOOST_AUTO_TEST_CASE(mmcif_chaintype_setting) mmcif_p.Parse(); ch = eh.FindChain("A"); BOOST_CHECK(ch.IsValid()); - BOOST_CHECK(ch.GetChainType() == CHAINTYPE_POLY); + BOOST_CHECK(ch.GetType() == CHAINTYPE_POLY); ch = eh.FindChain("C"); BOOST_CHECK(ch.IsValid()); - BOOST_CHECK(ch.GetChainType() == CHAINTYPE_POLY); + BOOST_CHECK(ch.GetType() == CHAINTYPE_POLY); ch = eh.FindChain("O"); BOOST_CHECK(ch.IsValid()); - BOOST_CHECK(ch.GetChainType() == CHAINTYPE_WATER); + BOOST_CHECK(ch.GetType() == CHAINTYPE_WATER); } BOOST_MESSAGE(" done."); // negative: no entity description @@ -295,10 +295,10 @@ BOOST_AUTO_TEST_CASE(mmcif_chaintype_setting) mmcif_p.Parse(); ch = eh.FindChain("A"); BOOST_CHECK(ch.IsValid()); - BOOST_CHECK(ch.GetChainType() == CHAINTYPE_UNKNOWN); + BOOST_CHECK(ch.GetType() == CHAINTYPE_UNKNOWN); ch = eh.FindChain("B"); BOOST_CHECK(ch.IsValid()); - BOOST_CHECK(ch.GetChainType() == CHAINTYPE_UNKNOWN); + BOOST_CHECK(ch.GetType() == CHAINTYPE_UNKNOWN); } BOOST_MESSAGE(" done."); diff --git a/modules/mol/base/doc/entity.rst b/modules/mol/base/doc/entity.rst index a68ae03714f92d1a300f85ab102d9a2515352f14..a9f6db99ec9b57a14bdc9e2803365957c85485c8 100644 --- a/modules/mol/base/doc/entity.rst +++ b/modules/mol/base/doc/entity.rst @@ -280,12 +280,12 @@ The Handle Classes want to save them as PDB files This property is read-only. To change the name, use an :class:`XCSEditor`. - + Also available as :meth:`GetName` :type: str - .. attribute:: chain_type + .. attribute:: type Describes the type of the chain. Is one of enum ChainType: @@ -411,11 +411,11 @@ The Handle Classes See :attr:`name` - .. method:: GetChainType() + .. method:: GetType() - See :attr:`chain_type` + See :attr:`type` - .. method:: GetChainDescription() + .. method:: GetDescription() See :attr:`description` diff --git a/modules/mol/base/pymod/export_chain.cc b/modules/mol/base/pymod/export_chain.cc index f524d5d17c5458854ff540ad809d87d9ea593b72..5f8dcaa1cdbdb9816d5a3bfee31b6f80b13bd971 100644 --- a/modules/mol/base/pymod/export_chain.cc +++ b/modules/mol/base/pymod/export_chain.cc @@ -51,8 +51,8 @@ void export_Chain() .def(self_ns::str(self)) .add_property("valid", &ChainBase::IsValid) .def("IsValid", &ChainBase::IsValid) - .def("GetChainType", &ChainBase::GetChainType) - .def("GetChainDescription", &ChainBase::GetChainDescription) + .def("GetType", &ChainBase::GetType) + .def("GetDescription", &ChainBase::GetDescription) ; generic_prop_def<ChainBase>(chain_base); class_<ChainHandle, bases<ChainBase> >("ChainHandle", init<>()) @@ -82,8 +82,8 @@ void export_Chain() .def("GetBondCount", &ChainHandle::GetBondCount) .add_property("residue_count", &ChainHandle::GetResidueCount) .add_property("atom_count", &ChainHandle::GetAtomCount) - .add_property("chain_type", &ChainHandle::GetChainType) - .add_property("description", &ChainHandle::GetChainDescription) + .add_property("chain_type", &ChainHandle::GetType) + .add_property("description", &ChainHandle::GetDescription) .def("InSequence", &ChainHandle::InSequence) .def("Select", select_string, arg("flags")=0) .def("Select", select_query, arg("flags")=0) diff --git a/modules/mol/base/src/chain_base.cc b/modules/mol/base/src/chain_base.cc index 1f5b04cd0d573f45a0bf5fcb1928198648e77824..6e534a4dc529dcb7a653a677a6e8bb47df6369ac 100644 --- a/modules/mol/base/src/chain_base.cc +++ b/modules/mol/base/src/chain_base.cc @@ -44,12 +44,12 @@ String ChainBase::GetName() const { return impl_->GetName(); } -ChainType ChainBase::GetChainType() const { - return impl_->GetChainType(); +ChainType ChainBase::GetType() const { + return impl_->GetType(); } -String ChainBase::GetChainDescription() const { - return impl_->GetChainDescription(); +String ChainBase::GetDescription() const { + return impl_->GetDescription(); } void ChainBase::CheckValidity() const { diff --git a/modules/mol/base/src/chain_base.hh b/modules/mol/base/src/chain_base.hh index 5410ada9f457617f1ae9448e0599c57a8e188414..525ad36583e516250047bdb8d49db4abc15f411d 100644 --- a/modules/mol/base/src/chain_base.hh +++ b/modules/mol/base/src/chain_base.hh @@ -63,12 +63,12 @@ public: /// \brief Get the type of a chain. /// /// \return chain type of ChainType - ChainType GetChainType() const; + ChainType GetType() const; /// \brief Get information about a chain. /// /// \return description - String GetChainDescription() const; + String GetDescription() const; const impl::ChainImplPtr& Impl() const { return impl_; diff --git a/modules/mol/base/src/editor_base.cc b/modules/mol/base/src/editor_base.cc index c9fa92bd40ffbbdf6792cfc79df08f1050b65bee..d9f460994bcda9a2bc5223effadd4e9b5590ca00 100644 --- a/modules/mol/base/src/editor_base.cc +++ b/modules/mol/base/src/editor_base.cc @@ -85,13 +85,13 @@ void EditorBase::RenameChain(ChainHandle chain, const String& new_name) void EditorBase::SetChainType(ChainHandle chain, const ChainType type) { CheckHandleValidity(chain); - chain.Impl()->SetChainType(type); + chain.Impl()->SetType(type); } void EditorBase::SetChainDescription(ChainHandle chain, const String desc) { CheckHandleValidity(chain); - chain.Impl()->SetChainDescription(desc); + chain.Impl()->SetDescription(desc); } AtomHandle EditorBase::InsertAtom(ResidueHandle res, const String& name, diff --git a/modules/mol/base/src/impl/chain_impl.cc b/modules/mol/base/src/impl/chain_impl.cc index a96ce571cc4477f36589f98f2c310ec48ff05014..c04e1ed72b33e226ae3a9ce08295ca541b4c1848 100644 --- a/modules/mol/base/src/impl/chain_impl.cc +++ b/modules/mol/base/src/impl/chain_impl.cc @@ -37,7 +37,7 @@ ChainImpl::ChainImpl(const EntityImplPtr& e, const String& name): name_(name), residue_list_(), in_sequence_(true), - chain_type_(CHAINTYPE_UNKNOWN), + type_(CHAINTYPE_UNKNOWN), description_() {} diff --git a/modules/mol/base/src/impl/chain_impl.hh b/modules/mol/base/src/impl/chain_impl.hh index 31bd368796ac86a2be1a748501e3475f293a168d..546a2ae8d9977b423ec26237553b0fd8ddecb736 100644 --- a/modules/mol/base/src/impl/chain_impl.hh +++ b/modules/mol/base/src/impl/chain_impl.hh @@ -51,23 +51,23 @@ public: /// \brief Assign a type to a chain. /// /// \param type chain type of ChainType - void SetChainType(const ChainType type) + void SetType(const ChainType type) { - chain_type_ = type; + type_ = type; } /// \brief Get the type of a chain. /// /// \return chain type of ChainType - ChainType GetChainType() const + ChainType GetType() const { - return chain_type_; + return type_; } /// \brief Assign a description to a chain. /// /// \param desc description - void SetChainDescription(const String desc) + void SetDescription(const String desc) { description_ = desc; } @@ -75,7 +75,7 @@ public: /// \brief Get information about a chain /// /// \return description - String GetChainDescription() const + String GetDescription() const { return description_; } @@ -167,7 +167,7 @@ private: /// \brief whether the residue numbers are in ascending order or not. Used /// to optimize residue by number lookup. bool in_sequence_; - ChainType chain_type_; + ChainType type_; String description_; ///< special aspects of the chain }; diff --git a/modules/mol/base/tests/test_chain.cc b/modules/mol/base/tests/test_chain.cc index b866ecd00df2ee57b6f53fc9ecded48e7861f5ee..abca07aed861c249f47eff8dd2f42d71ac4bcb14 100644 --- a/modules/mol/base/tests/test_chain.cc +++ b/modules/mol/base/tests/test_chain.cc @@ -208,31 +208,31 @@ BOOST_AUTO_TEST_CASE(chain_type) XCSEditor e = eh.EditXCS(); ChainHandle ch1 = e.InsertChain("A"); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_UNKNOWN); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_UNKNOWN); e.SetChainType(ch1, CHAINTYPE_POLY); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY); e.SetChainType(ch1, CHAINTYPE_NON_POLY); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_NON_POLY); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_NON_POLY); e.SetChainType(ch1, CHAINTYPE_WATER); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_WATER); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_WATER); e.SetChainType(ch1, CHAINTYPE_POLY_PEPTIDE_D); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_PEPTIDE_D); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_PEPTIDE_D); e.SetChainType(ch1, CHAINTYPE_POLY_PEPTIDE_L); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_PEPTIDE_L); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_PEPTIDE_L); e.SetChainType(ch1, CHAINTYPE_POLY_DN); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_DN); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_DN); e.SetChainType(ch1, CHAINTYPE_POLY_RN); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_RN); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_RN); e.SetChainType(ch1, CHAINTYPE_POLY_SAC_D); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_SAC_D); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_SAC_D); e.SetChainType(ch1, CHAINTYPE_POLY_SAC_L); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_SAC_L); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_SAC_L); e.SetChainType(ch1, CHAINTYPE_POLY_DN_RN); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_POLY_DN_RN); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_POLY_DN_RN); e.SetChainType(ch1, CHAINTYPE_N_CHAINTYPES); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_N_CHAINTYPES); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_N_CHAINTYPES); e.SetChainType(ch1, CHAINTYPE_UNKNOWN); - BOOST_CHECK(ch1.GetChainType() == CHAINTYPE_UNKNOWN); + BOOST_CHECK(ch1.GetType() == CHAINTYPE_UNKNOWN); } BOOST_AUTO_TEST_CASE(chain_description) @@ -242,7 +242,7 @@ BOOST_AUTO_TEST_CASE(chain_description) ChainHandle ch1 = e.InsertChain("A"); String description = "Very important information"; e.SetChainDescription(ch1, description); - BOOST_CHECK(ch1.GetChainDescription() == description); + BOOST_CHECK(ch1.GetDescription() == description); } BOOST_AUTO_TEST_SUITE_END()