Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions src/DockQ/parsers.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class MMCIFParser(Bio.PDB.MMCIFParser):
def get_structure(
self,
structure_id,
filename,
file,
chains=[],
parse_hetatms=False,
auth_chains=True,
Expand All @@ -24,15 +24,15 @@ def get_structure(

Arguments:
- structure_id - string, the id that will be used for the structure
- filename - name of mmCIF file, OR an open text mode file handle
- file - name of mmCIF file, OR an open text mode file handle

"""
self.auth_chains = auth_chains
self.auth_residues = True
with warnings.catch_warnings():
if self.QUIET:
warnings.filterwarnings("ignore", category=PDBConstructionWarning)
self._mmcif_dict = MMCIF2Dict(filename)
self._mmcif_dict = MMCIF2Dict(file)
sequences, is_het = self._build_structure(
structure_id, chains, parse_hetatms=parse_hetatms
)
Expand All @@ -43,6 +43,7 @@ def get_structure(
for chain in model:
chain.sequence = sequences[chain.id]
chain.is_het = is_het[chain.id]
file.close()
return model

def _build_structure(self, structure_id, chains, parse_hetatms):
Expand Down Expand Up @@ -295,6 +296,7 @@ def get_structure(self, id, file, chains, parse_hetatms, model_number=0):
for chain in model:
chain.sequence = sequences[chain.id]
chain.is_het = is_het[chain.id]
file.close()
return model

def _parse(self, header_coords_trailer, chains, parse_hetatms):
Expand Down