Commit 26b4bf9a by John Chodera (MSKCC)

Bugfixes.

parent 06cca8af
......@@ -413,10 +413,11 @@ class PDBFixer(object):
chainIndices = list()
if chainIds != None:
# Convert chain ids to chain indices
which_model = 0
chain_id_to_chain_number = dict((c.chain_id, k) for k, c in enumerate(self.structure.models[which_model].chains))
for chainId in chainIds:
chainNumber = chain_id_to_chain_number[chainId]
chainIndices.append(chainNumber)
chainNumber = chain_id_to_chain_number[chainId]
chainIndices.append(chainNumber)
# Ensure only unique entries remain.
chainIndices = list(set(chainIndices))
......
......@@ -5,7 +5,7 @@ import tempfile
def remove_chainids_and_verify(pdbid, chain_ids_to_remove, expected_chain_ids_remaining):
# Create a PDBFixer instance for the given pdbid
fixer = PDBFixer(pdbid=pdbid)
fixer = pdbfixer.PDBFixer(pdbid=pdbid)
# Remove specified chains.
fixer.removeChains(chainIds=chain_ids_to_remove)
# Check to make sure asserted chains remain.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment