From ae8089654b231e169edee912446fd88b67f75f08 Mon Sep 17 00:00:00 2001
From: Gerardo Tauriello <gerardo.tauriello@unibas.ch>
Date: Thu, 23 Jun 2016 17:59:17 +0200
Subject: [PATCH] SCHWED-1087: removed inexistent restrict_chains parameter for
 LoadMMCIF.

The feature needs to be redesigned for mmCIF files since chain names can have
more than 1 character. This could be added at a later point in time to speed up
loading large mmCIF files, if only a part is needed.
---
 modules/io/pymod/__init__.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/modules/io/pymod/__init__.py b/modules/io/pymod/__init__.py
index 56ba034e6..302b8fb4f 100644
--- a/modules/io/pymod/__init__.py
+++ b/modules/io/pymod/__init__.py
@@ -256,7 +256,7 @@ def LoadCHARMMTraj(crd, dcd_file=None, profile='CHARMM',
       raise ValueError("No DCD filename given")
   return LoadCHARMMTraj_(crd, dcd_file, stride, lazy_load, detect_swap, swap_bytes)
 
-def LoadMMCIF(filename, restrict_chains="", fault_tolerant=None, calpha_only=None, profile='DEFAULT', remote=False, seqres=False, info=False):
+def LoadMMCIF(filename, fault_tolerant=None, calpha_only=None, profile='DEFAULT', remote=False, seqres=False, info=False):
   """
   Load MMCIF file from disk and return one or more entities. Several options 
   allow to customize the exact behaviour of the MMCIF import. For more
@@ -264,9 +264,6 @@ def LoadMMCIF(filename, restrict_chains="", fault_tolerant=None, calpha_only=Non
   
   Residues are flagged as ligand if they are mentioned in a HET record.
 
-  :param restrict_chains: If not an empty string, only chains listed in the
-     string will be imported.
-
   :param fault_tolerant: Enable/disable fault-tolerant import. If set, overrides
      the value of :attr:`IOProfile.fault_tolerant`.
 
@@ -307,6 +304,11 @@ def LoadMMCIF(filename, restrict_chains="", fault_tolerant=None, calpha_only=Non
     ent = mol.CreateEntity()
     reader = MMCifReader(filename, ent, prof)
     reader.read_seqres = seqres
+    
+    # NOTE: to speed up things, we could introduce a restrict_chains parameter
+    #       similar to the one in LoadPDB. Here, it would have to be a list/set
+    #       of chain-name-strings.
+
     #if reader.HasNext():
     reader.Parse()
     if prof.processor:
-- 
GitLab