Skip to content
Snippets Groups Projects
Verified Commit 94ba93d6 authored by Xavier Robin's avatar Xavier Robin
Browse files

doc: SEQRES no longer needed.

Following fixes in cd701347, setting seqres=True is no longer required
for these things to work.
parent 4b21a29b
Branches
Tags
No related merge requests found
......@@ -250,8 +250,7 @@ def _LoadStructure(structure_path, format="auto", fault_tolerant=False):
# Load the structure
if format in ["mmcif", "cif"]:
entity, seqres = io.LoadMMCIF(structure_path, seqres=True,
fault_tolerant=fault_tolerant)
entity = io.LoadMMCIF(structure_path, fault_tolerant=fault_tolerant)
if len(entity.residues) == 0:
raise Exception(f"No residues found in file: {structure_path}")
elif format == "pdb":
......
......@@ -64,9 +64,8 @@ Notes:
It is added as string property named "pdb_auth_chain_name" to the
:class:`~ost.mol.ChainHandle`. The mapping is also stored in
:class:`MMCifInfo` as :meth:`~MMCifInfo.GetMMCifPDBChainTr` and
:meth:`~MMCifInfo.GetPDBMMCifChainTr` if SEQRES records are read in
:func:`~ost.io.LoadMMCIF` and a non-empty SEQRES record exists for that chain
(this should exclude ligands and water).
:meth:`~MMCifInfo.GetPDBMMCifChainTr` if a non-empty SEQRES record exists for
that chain (this should exclude ligands and water).
* Molecular entities in mmCIF are identified by an ``entity.id``, which is
extracted from ``atom_site.label_entity_id`` for the first atom of the chain.
It is added as string property named "entity_id" to the
......@@ -99,12 +98,6 @@ Information from mmCIF files that goes beyond structural data, is kept in a
special container, the :class:`MMCifInfo` class. Here is a detailed description
of the annotation available.
.. note::
Some fields of the ``MMCifInfo`` container are only populated if SEQRES
records are read in :func:`~ost.io.LoadMMCIF` and a compound library is
available (see :func:`~ost.conop.GetDefaultLib`)
.. class:: MMCifInfo
This is the container for all bits of non-molecular data pulled from a mmCIF
......@@ -278,9 +271,7 @@ of the annotation available.
.. method:: GetMMCifPDBChainTr(cif_chain_id)
Get the translation of a certain mmCIF chain name to the traditional PDB
chain name. Only works if SEQRES records are read in
:func:`~ost.io.LoadMMCIF` and a compound library is available (see
:func:`~ost.conop.GetDefaultLib`).
chain name.
:param cif_chain_id: atom_site.label_asym_id
:type cif_chain_id: :class:`str`
......@@ -298,8 +289,6 @@ of the annotation available.
.. method:: GetPDBMMCifChainTr(pdb_chain_id)
Get the translation of a certain PDB chain name to the mmCIF chain name.
Only works if SEQRES records are read in :func:`~ost.io.LoadMMCIF` and a
compound library is available (see :func:`~ost.conop.GetDefaultLib`).
:param pdb_chain_id: atom_site.auth_asym_id
:type pdb_chain_id: :class:`str`
......
......@@ -111,7 +111,7 @@ class LigandScorer:
# Ligand model as SDF file
model_ligand = io.LoadEntity("path_to_ligand.sdf", format="sdf")
# Target loaded from mmCIF, containing the ligand
target, _ = io.LoadMMCIF("path_to_target.cif", seqres=True)
target = io.LoadMMCIF("path_to_target.cif")
# Cleanup a copy of the structures
cleaned_model = model.Copy()
......
......@@ -22,7 +22,7 @@ def _GetTestfilePath(filename):
@lru_cache(maxsize=None)
def _LoadMMCIF(filename):
path = _GetTestfilePath(filename)
ent, seqres = io.LoadMMCIF(path, seqres=True)
ent = io.LoadMMCIF(path)
return ent
......
......@@ -741,11 +741,6 @@ The Handle Classes
.. attribute:: is_ligand
.. warning::
This property is meaningless on mmCIF files loaded with
:func:`ost.io.LoadMMCIF` with `seqres=False` (the default), or if no
default compound library is set.
Whether the residue is a ligand. When loading PDB structures, this property
is set based on the HET records. This also means, that this property will
most likely not be set properly for all except PDB files coming from
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment