Skip to content
Snippets Groups Projects
Commit a855a571 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

mmcif writer: Getter for extracted entities in MMCifWriter

parent e300c56c
No related branches found
No related tags found
No related merge requests found
......@@ -1974,9 +1974,19 @@ To see it all in action:
:type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView`
:param mmcif_conform: Determines data extraction strategy as described above
:type mmcif_conform: :class:`bool`
:param entity_info: Predefine mmCIF entities - guarantees complete SEQRES
info. Starts from empty list if not given.
:param entity_info: Predefine mmCIF entities - useful to define complete
SEQRES. If given, the provided list serves as a
starting point, i.e. chains in *ent* are matched to
entities in *entity_info*. In case of no match, this
list gets extended. Starts from empty list if not given.
:type entity_info: :class:`list` of :class:`MMCifWriterEntity`
.. method:: GetEntities()
Returns :class:`list` of :class:`MMCifWriterEntity`. Useful to check after
:func:`SetStructure` has been called. Order in this list defines entity
ids in written mmCIF file with zero based indexing.
Biounits
--------------------------------------------------------------------------------
......
......@@ -170,6 +170,7 @@ void export_mmcif_io()
arg("entity_info")=std::vector<MMCifWriterEntity>()))
.def("SetStructure", &WrapSetStructureView, (arg("ent"), arg("mmcif_conform")=true,
arg("entity_info")=std::vector<MMCifWriterEntity>()))
.def("GetEntities", &MMCifWriter::GetEntities, return_value_policy<copy_const_reference>())
;
enum_<MMCifInfoCitation::MMCifInfoCType>("MMCifInfoCType")
......
......@@ -109,6 +109,8 @@ public:
void SetStructure(const ost::mol::EntityView& ent, bool mmcif_conform=true,
const std::vector<MMCifWriterEntity>& entity_info=std::vector<MMCifWriterEntity>());
const std::vector<MMCifWriterEntity>& GetEntities() const { return entity_info_; }
private:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment