Skip to content

Commit

Permalink
Pass list of strings to ChainPDBSelector
Browse files Browse the repository at this point in the history
  • Loading branch information
benmwebb committed Sep 29, 2023
1 parent 141c731 commit e250c3b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion pyext/src/mmcif.py
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def __init__(self, state, component, start, end, pdb_offset,
= component, start, end, pdb_offset, pdbname
self.state, self.chain, self.hier = state, chain, hier
sel = IMP.atom.NonWaterNonHydrogenPDBSelector() \
& IMP.atom.ChainPDBSelector(chain)
& IMP.atom.ChainPDBSelector([chain])
self.starting_hier = IMP.atom.read_pdb(pdbname, state.model, sel)

rigid = property(lambda self: _get_fragment_is_rigid(self),
Expand Down
7 changes: 3 additions & 4 deletions pyext/src/representation.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,8 @@ def autobuild_model(self, name, pdbname, chain,

# get the initial and end residues of the pdb
t = IMP.atom.read_pdb(pdbname, self.model,
IMP.atom.AndPDBSelector(IMP.atom.ChainPDBSelector(chain), IMP.atom.CAlphaPDBSelector()))
IMP.atom.ChainPDBSelector([chain])
& IMP.atom.CAlphaPDBSelector())

# find start and end indexes

Expand Down Expand Up @@ -440,9 +441,7 @@ def add_component_pdb(self, name, pdbname, chain, resolutions, color=None,
IMP.atom.CBetaPDBSelector())
sel = IMP.atom.AndPDBSelector(cacbsel, sel)
if type(chain) == str:
sel = IMP.atom.AndPDBSelector(
IMP.atom.ChainPDBSelector(chain),
sel)
sel = IMP.atom.ChainPDBSelector([chain]) & sel
t = IMP.atom.read_pdb(pdbname, self.model, sel)

# get the first and last residue
Expand Down

0 comments on commit e250c3b

Please sign in to comment.