diff --git a/modules/io/doc/mmcif.rst b/modules/io/doc/mmcif.rst index fefd64b7bc2117150dbb414af7d3a91ceec7eccd..0a648960cdc83894b41016847d88b3ff26caaea9 100644 --- a/modules/io/doc/mmcif.rst +++ b/modules/io/doc/mmcif.rst @@ -1956,7 +1956,9 @@ To see it all in action: (:class:`ost.StringList`) Asym chain names that are assigned to this entity +.. class:: MMCifWriterEntityList + A list for :class:`MMCifWriterEntity` .. class:: MMCifWriter @@ -1979,11 +1981,11 @@ To see it all in action: 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` + :type entity_info: :class:`MMCifWriterEntityList` .. method:: GetEntities() - Returns :class:`list` of :class:`MMCifWriterEntity`. Useful to check after + Returns :class:`MMCifWriterEntityList`. Useful to check after :func:`SetStructure` has been called. Order in this list defines entity ids in written mmCIF file with zero based indexing. diff --git a/modules/io/pymod/__init__.py b/modules/io/pymod/__init__.py index caec78daeacfe9c11e1f6496c00c31e4817169a7..5f011e9975521469e8722d63d964527a55468689 100644 --- a/modules/io/pymod/__init__.py +++ b/modules/io/pymod/__init__.py @@ -457,7 +457,8 @@ def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None, raise -def SaveMMCIF(ent, filename, data_name="OST_structure", mmcif_conform = True): +def SaveMMCIF(ent, filename, data_name="OST_structure", mmcif_conform = True, + entity_info = MMCifWriterEntityList()): """ Save OpenStructure entity in mmCIF format @@ -477,12 +478,16 @@ def SaveMMCIF(ent, filename, data_name="OST_structure", mmcif_conform = True): to identify and separate mmCIF entities based on :class:`ost.mol.ChemClass` of the residues in a chain. :type ent: :class:`ost.mol.EntityHandle`/:class:`ost.mol.EntityView` + :param entity_info: Advanced usage - passed as *entity_info* parameter to + :func:`MMCifWriter.SetStructure` :type filename: :class:`str` :type data_name: :class:`str` :type mmcif_conform: :class:`bool` + :type entity_info: :class:`MMCifWriterEntityList` """ writer = MMCifWriter() - writer.SetStructure(ent, mmcif_conform = mmcif_conform) + writer.SetStructure(ent, mmcif_conform = mmcif_conform, + entity_info = entity_info) writer.Write(data_name, filename)