selectTools
index
selectTools.py


 
tools for manipulating atom selections

 
Functions
       
IVM_breakDisulfides(ivm, sel=0)

 
for the ivm.IVM object, break disulfide bonds in given
selection (default: all disulfides)
IVM_breakProlines(ivm, sel=0)

 
for the ivm.IVM object, break proline rings between
the delta and gamma positions
IVM_breakRiboses(ivm, sel=0, breakSelStr="name O4' or name C1'")

 
for the ivm.IVM object, break ribose rings between the
O4' and C1' positions.
IVM_groupRigidBackbone(ivm, sel=())

 
for the ivm.IVM object, group omega angles in selection sel
IVM_groupRigidSidechain(ivm, sel=())

 
for the ivm.IVM object, group rigid sidechain regions in
selection sel.
Default protein and nucleic acid rigid regions are grouped, as
specified in rigidProteinSelections and rigidNucleicSelections
convertToAtom(arg, sim=0)

 
given an atomSel.AtomSel or a string convert to atom selection
and check that just a single atom.Atom is selected. Return that Atom.
If the argument is an Atom, just return it, if its simulation matches the
sim argument, otherwise, try to find an atom with the same segid, resid,
and name in simulation sim (or currentSimulation if sim is not specified).
convertToAtomSel(arg, sim=0)

 
convert arg to an atomSel.AtomSel, if it is not already one.
 
If sim is specified it is used instead of simulation.currentSimulation.
If sim is specified, arg is an AtomSel, and the simulations don't match,
a new AtomSel is created using the string from arg and the sim argument.
convertToSelectionIndices(sel, sim=0)

 
allowed input: string, atom.Atom, atomSel.AtomSel, single index,
    or list of indices
output: list of indices
correctSymmetricSidechains(sel=(), sim=0)

 
Step through a selection, looking for phe, tyr, asp, arg, and glu
residues.  Make sure that each of those sidechains has its chi2
(chi3 for glu and chi5 for arg) angle in the specified range.  If not,
exchange the positions of the atoms in symmetric positions to force that
angle to be in the correct range.  For ARG, ASP and GLU, the angle range
is taken from the IUPAC rules:  Biochemistry 9:3471-3479 (1970),
section 2.3.2. For PHE and TYR, this rule makes no sense as the most
populated rotamer is right at the edge of the range, so the range 0..180
degrees is used instead.
 
Note that protein topology/parameter sets before 2.0 have the wrong 
definition for ARG, such that it is treated as a special case.
getResids(sel=0)

 
return a list of unique residue ids. If an atom selection sel is
specified, return the unique residue ids in the selection.
getSegids(sel='tag')

 
return a list of unique segment ids. If an atom selection sel is
specified, return the unique segment ids in the selection.
getSegsResidues(sel='tag', sim=0)

 
given an atom selection return a dictionary whose keys are segment
names. The value of each dictionary entry is a list of tuples of
(resid, resName) for each residue contained therein.
groupRigidNucleicAcid(sel=(), sim=0)

 
return a list of groups atoms which are members of fixed
regions of nucleic acid bases.
The second argument is a selection in sim in which the groupings are
to be made.
groupRigidProtein(sel=(), sim=0)

 
return a list of groups atoms which are members of fixed
regions of protein backbone and sidechains.
The second argument is a selection in sim in which the groupings are
to be made.
groupRigidSel(rigidSelList, sel=(), sim=0)

 
return a list of groups atoms. The groups are formed by iterating
through all residues in the selection, and making groups from each
group selection string.
The last argument is a selection in sim in which the groupings are
to be made.
groupRigidSideChains(sel=(), sim=0)

 
return a list of groups atoms which are members of fixed
regions of protein sidechains.
The second argument is a selection in sim in which the groupings are
to be made.
groupStrictRigidNucleicAcid(sel=(), sim=0)

 
return a list of groups atoms which are members of fixed
regions of nucleic acid bases.
The second argument is a selection in sim in which the groupings are
to be made. Is this needed?
maxResid(sel=0, sim=0)

 
return the largest residue id
    
minResid(sel=0, sim=0)

 
return the smallest residue id
    
numResidues(sel='not PSEUDO')

 
return the number of residues in the specified atomSel.AtomSel
    

 
Data
        __package__ = None
chiRange = (-1.5707963267948966, 1.5707963267948966)
chiSels = ('cb', 'cg', 'cd', 'oe1')
pi = 3.1415926535897931
res = 'GLU'
rigidNucleicSelections = {'ADE': 'name n9 or name c4 or name n3 or name c2 or name...r name c8 or name n6\n or name h2 or name h8', 'CYT': 'name n1 or name c6 or name c5 or name c4 or name...\n NAME N4 or name h5 or name h6 or name o2', 'GUA': 'name n9 or name c4 or name n3 or name c2 or name...r name c8 or name o6\n or name h1 or name h8', 'TED': 'name n1 or name c6 or name c5 or name c4 or name n3 or name c2', 'THY': 'name n1 or name c6 or name c5 or name c4 or name...me c2 or name o4 or name o2 or name h3 or name h6', 'URI': 'name n1 or name c6 or name c5 or name c4 \n ...r name o2 or name h3 or name h5\n or name h6'}
rigidProteinSelections = {'ARG': 'name NE or name CZ or name NH*', 'ASN': 'name CG or name OD1 or name ND2', 'ASP': 'name CG or name OD*', 'GLN': 'name CD or name OE1 or name NE2', 'GLU': 'name CD or name OE*', 'HIS': 'name CG or name ND1 or name CD2 or name CE1 or name NE2', 'PHE': 'name CG or name CD1 or name CD2 or name CE1 or name CE2 or name CZ', 'TRP': 'name CG or name CD1 or name CD2 or name NE1 or n... name CE3 or name CZ2 or name CZ3 or name CH2', 'TYR': 'name CG or name CD1 or name CD2 or name CE1 or name CE2 or name CZ'}
sel = 'name n1 or name c6 or name c5 or name c4 \n or name n3 or name c2 or name o4 or name o2 '
strictRigidNucleicSelections = {'ADE': 'name n9 or name c4 or name n3 or name c2 or name...me c6 or name c5 or name n7 or name c8 OR NAME N6', 'CYT': 'name n1 or name c6 or name c5 or name c4 or name n3\n or name c2 OR NAME N4', 'GUA': 'name n9 or name c4 or name n3 or name c2 or name...me c6 or name c5 or name n7 or name c8 or name o6', 'TED': 'name n1 or name c6 or name c5 or name c4 or name n3 or name c2', 'THY': 'name n1 or name c6 or name c5 or name c4\n or name n3 or name c2 or name o4 or name o2', 'URI': 'name n1 or name c6 or name c5 or name c4 \n or name n3 or name c2 or name o4 or name o2 '}
symPairs = (('oe1', 'oe2'),)
symmetricSidechains = {'ARG': ((-1.5707963267948966, 1.5707963267948966), ('cd', 'ne', 'cz', 'nh1'), (('nh1', 'nh2'), ('hh11', 'hh21'), ('hh12', 'hh22'))), 'ASP': ((-1.5707963267948966, 1.5707963267948966), ('ca', 'cb', 'cg', 'od1'), (('od1', 'od2'),)), 'GLU': ((-1.5707963267948966, 1.5707963267948966), ('cb', 'cg', 'cd', 'oe1'), (('oe1', 'oe2'),)), 'PHE': ((0, 3.1415926535897931), ('ca', 'cb', 'cg', 'cd1'), (('cd1', 'cd2'), ('ce1', 'ce2'), ('hd1', 'hd2'), ('he1', 'he2'))), 'TYR': ((0, 3.1415926535897931), ('ca', 'cb', 'cg', 'cd1'), (('cd1', 'cd2'), ('ce1', 'ce2'), ('hd1', 'hd2'), ('he1', 'he2')))}