diff --git a/modules/io/doc/mmcif.rst b/modules/io/doc/mmcif.rst index 8877bbc35b1d9802415281ab97ffe7d0dd6db6b2..078a66667edb73a815b9e0577182f22cc5733e29 100644 --- a/modules/io/doc/mmcif.rst +++ b/modules/io/doc/mmcif.rst @@ -80,7 +80,7 @@ of the annotation available. .. attribute:: operations Stores the operations needed to transform a crystal structure into a - biounit. + bio unit. Also available as :meth:`GetOperations`. May also be modified by :meth:`AddOperation`. @@ -115,9 +115,9 @@ of the annotation available. .. method:: AddBioUnit(biounit) - Add a biounit to the biounit list of an info object. + Add a bio unit to the bio unit list of an info object. - :param biounit: Biounit to be added. + :param biounit: Bio unit to be added. :type biounit: :class:`MMCifInfoBioUnit` .. method:: GetBioUnits() @@ -340,7 +340,7 @@ of the annotation available. .. class:: MMCifInfoTransOperation This stores operations needed to transform an - :class:`entity <ost.mol.EntityHandle>` into a biounit. + :class:`entity <ost.mol.EntityHandle>` into a bio unit. .. attribute:: id @@ -403,7 +403,7 @@ of the annotation available. .. class:: MMCifInfoBioUnit This stores information how a structure is to be assembled to form the - biounit. + bio unit. .. attribute:: details @@ -415,14 +415,14 @@ of the annotation available. .. attribute:: chains - Chains involved in this biounit. If not provided, resembles an empty list. + Chains involved in this bio unit. If not provided, resembles an empty list. Also available as :meth:`GetChainList`. May also be modified by :meth:`AddChain`. .. attribute:: operations - Translations and rotations needed to create the biounit. Filled with + Translations and rotations needed to create the bio unit. Filled with objects of class :class:`MMCifInfoTransOperation`. Also available as :meth:`GetOperations`. May be modified by @@ -452,6 +452,39 @@ of the annotation available. See :attr:`operations` + .. method:: PDBize(asu, seqres=None, min_polymer_size=10) + + Returns the biological assembly (bio unit) for an entity. The new entity + created is well suited to be saved as a PDB file. Therefore the function + tries to meet the requirements of single-character chain names. The + following measures are taken. + + - All ligands are put into one chain (_) + - Water is put into one chain (-) + - Each polymer gets its own chain, named A-Z 0-9 a-z. + - The description of non-polymer chains will be put into a generic string + property called description on the residue level. + - ligands which resemble a polymer but have less than min_polymer_size + residues are assigned the same numeric residue number. The residues are + distinguished by insertion code. + + Since this function is at the moment mainly used to create biounits from + mmCIF files to be saved as PDBs, the function assumes that the + :ref:`ChainType` properties are set correctly. :func:`ost.conop.ConnectAll` + is used to derive connectivity. + + :param asu: Asymmetric unit to work on. Should be created from a mmCIF + file. + :type asu: :class:`~ost.mol.EntityHandle>` + :param seqres: If set to a valid sequence list, the length of the seqres + records will be used to determine if a certain chain has the minimally + required length. + :type seqres: :class:'~ost.seq.SequenceList' + :param min_polymer_size: The minimal number of residues a polymer needs to + get its own chain. Everything below that number will be sorted into the + ligand chain. + :type min_polymer_size: int + .. class:: MMCifInfoStructDetails Holds details about the structure. @@ -642,3 +675,7 @@ of the annotation available. .. method:: SetReplacedPDBID(descriptor) See :attr:`replace_pdb_id` + +.. LocalWords: autofunction ChainTypes exptl attr pdbx oper conf spr biounits +.. LocalWords: cas isbn pubmed asu seqres conop ConnectAll casp COMPND OBSLTE +.. LocalWords: SPRSDE pdb func diff --git a/modules/io/pymod/__init__.py b/modules/io/pymod/__init__.py index e902903ea09b832b3ef13f2214816ed6931935a7..e22106b51fc4aba65bb38950d0709c631e020621 100644 --- a/modules/io/pymod/__init__.py +++ b/modules/io/pymod/__init__.py @@ -347,37 +347,9 @@ def LoadMMCIF(filename, restrict_chains="", fault_tolerant=None, calpha_only=Non # which is totally C++, but we want the method in Python... so we define it # here (__init__) and add it as a member to the class. With this, the first # arguement is the usual 'self'. +# documentation for this function was moved to mmcif.rst, +# MMCifInfoBioUnit.PDBize, since this function is not included in SPHINX. def _PDBize(biounit, asu, seqres=None, min_polymer_size=10): - """ - Returns the biological assembly (biounit) for an entity. The new entity - created is well suited to be saved as a PDB file. Therefore the function - tries to meet the requirements of single-character chain names. The following - measures are taken. - - - All ligands are put into one chain (_) - - Water is put into one chain (-) - - Each polymer gets its own chain, named A-Z 0-9 a-z. - - The description of non-polymer chains will be put into a generic string - property called description on the residue level. - - ligands which resemble a polymer but have less than min_polymer_size - residues are assigned the same numeric residue number. The residues are - distinguished by insertion code. - - Since this function is at the moment mainly used to create biounits from - mmCIF files to be saved as PDBs, the function assumes that the ChainType - properties are set correctly. conop.ConnectAll is used to derive connectivity. - - :param asu: Asymmetric unit to work on. Should be created from a mmCIF file. - :type asu: :class:`~ost.mol.EntityHandle>` - :param seqres: If set to a valid sequence list, the length of the seqres - records will be used to determine if a certain chain has the minimally - required length. - :type seqres: :class:'~ost.seq.SequenceList' - :param min_polymer_size: The minimal number of residues a polymer needs to - get its own chain. Everything below that number will be sorted into the - ligand chain. - :type min_polymer_size: int - """ def _CopyAtoms(src_res, dst_res, edi, trans=geom.Mat4()): for atom in src_res.atoms: tmp_pos = geom.Vec4(atom.pos)