diff --git a/modules/mol/base/doc/editors.rst b/modules/mol/base/doc/editors.rst index be0a1d3ca907f3764ab4030ad09066eae886bc60..d73972f5513d19906c740cfaa4e42a14605de3c2 100644 --- a/modules/mol/base/doc/editors.rst +++ b/modules/mol/base/doc/editors.rst @@ -96,6 +96,11 @@ The basic functionality of editors is implemented in the EditorBase class. :param type: Must be a value of enum ChainType (see :attr:`ChainHandle.chain_type`) + .. method:: SetChainDescription(chain, description) + + :param chain: Must be a valid chain + :param description: Description to be added + .. method:: InsertAtom(residue, atom_name, pos, element="", occupancy=1.0, b_factor=0.0, is_hetatm=False) diff --git a/modules/mol/base/doc/entity.rst b/modules/mol/base/doc/entity.rst index e2f1ab5713054daf5097abd6537d7859f58c4ac0..a68ae03714f92d1a300f85ab102d9a2515352f14 100644 --- a/modules/mol/base/doc/entity.rst +++ b/modules/mol/base/doc/entity.rst @@ -298,6 +298,10 @@ The Handle Classes Where ``CHAINTYPE_N_CHAINTYPES`` holds the number of different types available. + .. attribute:: description + + Details about the chain. Not categorised, just text. + .. attribute:: residues List of all residues of this chain. The residues are sorted from N- to @@ -411,6 +415,10 @@ The Handle Classes See :attr:`chain_type` + .. method:: GetChainDescription() + + See :attr:`description` + .. class:: ResidueHandle The residue is either used to represent complete molecules or building blocks diff --git a/modules/mol/base/pymod/export_chain.cc b/modules/mol/base/pymod/export_chain.cc index 117d1b2f64fb8d6ad44254cc55b212d66f94b168..f524d5d17c5458854ff540ad809d87d9ea593b72 100644 --- a/modules/mol/base/pymod/export_chain.cc +++ b/modules/mol/base/pymod/export_chain.cc @@ -52,6 +52,7 @@ void export_Chain() .add_property("valid", &ChainBase::IsValid) .def("IsValid", &ChainBase::IsValid) .def("GetChainType", &ChainBase::GetChainType) + .def("GetChainDescription", &ChainBase::GetChainDescription) ; generic_prop_def<ChainBase>(chain_base); class_<ChainHandle, bases<ChainBase> >("ChainHandle", init<>()) @@ -82,6 +83,7 @@ void export_Chain() .add_property("residue_count", &ChainHandle::GetResidueCount) .add_property("atom_count", &ChainHandle::GetAtomCount) .add_property("chain_type", &ChainHandle::GetChainType) + .add_property("description", &ChainHandle::GetChainDescription) .def("InSequence", &ChainHandle::InSequence) .def("Select", select_string, arg("flags")=0) .def("Select", select_query, arg("flags")=0) diff --git a/modules/mol/base/pymod/export_editors.cc b/modules/mol/base/pymod/export_editors.cc index 61ea42cebadeae960658336b13dd860a6b4d362d..4d3b42197fcc22a8d98a6d4e2e1b58e2d34bfdb7 100644 --- a/modules/mol/base/pymod/export_editors.cc +++ b/modules/mol/base/pymod/export_editors.cc @@ -213,6 +213,7 @@ void export_Editors() .def("Connect", connect_d) .def("RenameChain", &EditorBase::RenameChain) .def("SetChainType", &EditorBase::SetChainType) + .def("SetChainDescription", &EditorBase::SetChainDescription) .def("RenameResidue", &EditorBase::RenameResidue) .def("RenameAtom", &EditorBase::RenameAtom) .def("AddTorsion", &EditorBase::AddTorsion)