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

doc: warn about MMCifInfo dependency on seqres

parent c5a0089e
Branches
Tags
No related merge requests found
......@@ -98,6 +98,12 @@ 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
......@@ -291,6 +297,8 @@ 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`
......
......@@ -20,6 +20,7 @@ import os, tempfile, ftplib, http.client
from ._ost_io import *
from ost import mol, geom, conop, seq
from ost import LogWarning
class IOProfiles:
def __init__(self):
......@@ -446,6 +447,11 @@ def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None,
reader.info.ConnectBranchLinks()
#else:
# raise IOError("File doesn't contain any entities")
# Warn about info dependency on seqres
if info and not reader.seqres:
LogWarning("MMCifInfo is incomplete when seqres=False")
if seqres and info:
return ent, reader.seqres, reader.info
if seqres:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment