Python: module torsionDBTools
 
torsionDBTools
index


 
Module for extracting torsion angle information from a structure database.
 
Additional functionality is provided to estimate probability density using the
histogram approach.
 
 
When using this module, please cite:
 
Bermejo, G.A., Clore, G.M., and Schwieters, C.D. (2012). Smooth statistical
torsion angle potential derived from a large conformational database via
adaptive kernel density estimation improves the quality of NMR protein
structures. Protein Sci. 21, 1824-1836.

 
Classes
       
builtins.object
ResidueTorsionConfig
Torsion

 
class ResidueTorsionConfig(builtins.object)
    ResidueTorsionConfig(pdbid=None, segid=None, resid=None, resname=None, prevresname=None, postresname=None, torsions={})
 
A residue's point in torsion-angle configuration (sub)space.
 
The torsion-angle space associated with a particular residue is given by
all the torsion-angle dimensions that define the residue configuration,
namely omega, phi, psi, chi1, etc.  A residue can be specified by a point
in such space or any of the possible subspaces (e.g., Ramachandran
subspace).
 
  Methods defined here:
__eq__(self, other)
Return self==value.
__init__(self, pdbid=None, segid=None, resid=None, resname=None, prevresname=None, postresname=None, torsions={})
Initialize self.  See help(type(self)) for accurate signature.
__repr__(self)
Return repr(self).

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

Data and other attributes defined here:
__hash__ = None

 
class Torsion(builtins.object)
    Torsion(name=None, value=None, anglerange=[], maxB=None, minoccupancy=None)
 
Represents a torsion angle.
 
  Methods defined here:
__init__(self, name=None, value=None, anglerange=[], maxB=None, minoccupancy=None)
Initialize self.  See help(type(self)) for accurate signature.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
Functions
       
accepted_torsion(torsion_name, segid, resid, resname, sim, bfactors, occupancies, bfactorcutoff, occupancycutoff)
Return a Torsion instance if B-factor and occupancy criteria are met.
 
Raises an exception if any atom that defines the torsion_name torsion angle
in input residue (specified via its segid, resid, and resname) is missing,
has a B-factor larger than bfactorcutoff, or an occupancy less than
occupancycutoff.  bfactors and occupancies are the corresponding attributes
of an InitCoordsResult instance.  sim is a simulation.Simulation instance.
bin_data(data, ranges, binwidths, pdf=False, logpdf=False, usebinnumbers=False)
Return a dictionary with coordinates-bin_value key-value pairs.
 
If pdf=False and logpdf=False, the returned dictionary represents an
n-dimensional contingency table, where the key is a tuple of numbers that
specifies the bin coordinates and the value is an integer with the bin
count.  If pdf=True, the returned dictionary is a probability density
function (pdf) estimate, with bin counts divided by the total counts and the
bin volume, giving the densities.  If logpdf=True, the negative of the
natural log of the densities is calculated; an arbitrary small value is
assigned for zero densities.  An exception is raised if both pdf=True and
logpdf=True.
data is a sequence of n-dimensional data points to be binned.  Each point is
a sequence of values representing the coordinates of the point; the length
of the sequence determines the dimensionality of the contingency table.
binwidths is a sequence of the required bin width in each dimension.
ranges is a sequence with the min and max values that define the domain of
each dimension.  Data points, bin widths, and ranges are matched by
positional offset: the order is important!  Output bin coordinates can be
expressed in terms of bin numbers (if usebinnumbers=True) or the value at
center of bin (default).
bin_torsions(configs, resolutions={}, binwidth=5.0, pdf=False, logpdf=False, usebinnumbers=False)
Return a dictionary with coordinates-bin_value key-value pairs.
 
If pdf=False and logpdf=False, the returned dictionary represents an
n-dimensional contingency table, where the key is a tuple of numbers that
specifies the bin coordinates and the value is an integer with the bin
count.  If pdf=True, the returned dictionary is a probability density
function (pdf) estimate, with bin counts divided by the total counts and the
bin volume, giving the densities.  If logpdf=True, the negative of the
natural log of the densities is calculated; an arbitrary small value is
assigned for zero densities.  An exception is raised if both pdf=True and
logpdf=True.
configs is a sequence of ResidueTorsionConfig instances whose associated
torsion angle values are to be binned.  The size of the torsions attribute
determines the dimensionality of the contigency table.  The coordinates of
each bin are ordered by the alphabetical order of the associated torsion
angle names: 'chi1', 'chi2', 'chi3', 'chi4', 'phi', 'psi', 'omega'.
resolutions is a dictionary with the bin widths for each torsion dimension,
e.g., {'phi': 5, 'psi': 10}.  For any torsion angle not specified in
resolutions, the bin width is set to binwidth (degrees).  Output bin
coordinates can be expressed in terms of bin numbers (if usebinnumbers=True)
or the value at center of bin (default).
complement_resnames(resnames)
Return a list of all residue names (strings), except for those in input.
 
resnames is either a residue name or a sequence of residue names, each
being a 3-letter code residue name string.
count_correct_chis(resname, model, reference, accuracy=40.0, excluderesid=[], radialexclude=[], bcutoff=40.0, occupancycutoff=1.0, applyboth=False, wantall=False, verbose=False)
Get number of correct sidechain chi angles in model relative to a reference.
 
'resname' (string) is the residue name (3-letter code) whose side chain
torsion (chi) angles will be checked against the reference.  Side chains are
extracted from 'model' (string), a PDB filename, and compared to those of
'reference' (another PDB file name).  Alternatively, more than one model can
be specified by making 'model' a sequence of PDB filenames.  For example,
the models may be NMR structures compared to an X-ray reference.  Two side
chains are compared only if they share the same residue number and segment
id (segid) in the model and reference, respectively (WARNING: care must be
taken when one structure uses the chain id field and the other segid to
label chains).
 
A torsion angle in a model is considered correct if it lies within
'accuracy' degrees from that in the reference.  A specific residue can be
explicitly omitted from consideration if its number is included in the
sequence 'excluderesid' (e.g., we may know a side chain is involved in
clashes in the reference, and therefore cannot be trusted).  Furthermore, a
side chain is disregarded if any of its atoms has a B-factor > 'bcutoff' or
an occupancy < 'occupancycutoff' in the reference structure.
'radialexclude' is another way of excluding side chains from consideration,
in this case if they are within angular exclusion zones in the reference
structure (e.g., badly fit leucines; see docstring of get_residue_torsions
function for details).  If the B-factor, occupancy, and radial exclusion
filters need to be additionally applied to the models, 'applyboth' should be
True.   
 
This function returns a tuple.  Assuming a side chain with four chi angles
(e.g., resname="lys") the returned tuple can be expressed as (assuming
wantall=True; see below):
 
(nchi1, nchi2, nchi3, nchi4, nchi12, nchi123, nchi1234, n)
 
where nchix is the number of side chains with accurate chix angles, nchixy
the number of side chains with both chix and chiy correct, etc., and n is
the total number of side chains compared.
 
If argument wantall is False the function returns:
 
(nchi1, nchi12, nchi123, nchi1234, n)
 
If no acceptable side chain is found in the reference structure (e.g., all
have B-factors > bcutoff), an empty tuple is returned.
 
If argument verbose is True, detailed information on the torsion-angle
accuracy of individual side chains is printed.
 
The returned numbers can be used to implement a scoring scheme such as that
described by [Shapovalov et. al (2011) Structure, 19:844].
get_binvalue(binnumber, binwidth, bounds)
Return bin value given bin number, bin width and overall value bounds.
get_residue_torsions(pdbid='', torsion_names=[], radialexclude=[], radialinclude=[], ressel='tag', prevresnames=['*'], postresnames=['*'], bfactors=None, occupancies=None, bfactorcutoff=30.0, occupancycutoff=1.0, sim=<simulation.Simulation; proxy of <Swig Object of type 'Simulation *' at 0x7f49461c0c60> >)
Return a list of ResidueTorsionConfig instances from current coordinates.
 
torsion_names is a sequence of one or more torsion angle names (for
available names see function get_torsion_names; Exception is raised if
torsion_names is not provided) queried from residue selection ressel (in
XPLOR format) in the protein optionally labeled by its pdbid.  Optional
lists of previous and posterior residue names (prevresnames and
postresnames, respectively) can be specified; for example, ressel=
'segid A and resname ALA' with postresnames=['PRO'] selects all pre-Proline
Alanines in segment A.  If not specified, all previous and posterior residue
names are considered.  bfactors and occupancies are the corresponding
attributes of the protocol.InitCoordsResult instance generated upon
coordinate initialization with protocol.initCoords; if not provided all
atoms are given a bfactor of 0.0 and an occupancy of 1.0.  Torsion angles
involving atoms with B-factors larger than bfactorcutoff and/or occupancies
smaller than occupancycutoff are not output.  Similarly, torsion angles are
not output if within a user-specified radial exclusion zone.  One or more
exclusion zones are specified via the optional radialexclude argument, a
sequence containing one or more sequences with the center coordinates and
the radius of each zone.  For example, two exclusion zones in a
two-dimensional case would be specified as:
 
    radialexclude = [((x1i, x2i), radiusi), ((x1j, x2j), radiusj)]
 
Similarly, an optional radial inclusion zone can be specified via the
argument radialinclude (with format identical to radialexclude); if not
specified the entire space is assumed wanted.
 
IMPORTANT: before running this function remove atoms with arbitrary
coordinates (i.e., "unknown atoms" in XPLOR jargon) from the input
structure, e.g., by setting argument deleteUnknownAtoms=True in
protocol.initCoords() function.
get_residue_torsions_from_files(pdbfiles='', pdbfiledir='.', torsion_names=None, radialexclude=[], radialinclude=[], ressel='tag', prevresnames=['*'], postresnames=['*'], bfactorcutoff=30.0, occupancycutoff=1.0)
Return a list of ResidueTorsionConfig instances from input pdb files.
 
pdbfiles is a string with pdb file names, one per line, from which to get
the returned ResidueTorsionConfig instances.  pdbfiledir is a string with
the directory path where the files are found.  The remaining arguments are
those needed to run function get_residue_torsions, at the heart of this
function (see get_residue_torsions for more information).
get_resnames()
Return a list of residue names whose torsions are defined in this module.
get_smallangle(angle1, angle2, domain)
Return the shortest distance between two vectors in angle space.
 
The vectors are specified by their multidimensional angular coordinates
given by sequences angle1 and angle2.  The domain in each dimension is
given by the domain sequence.  Alternatively, in a one-dimensional case,
each argument may be a single number.
get_torsion_names(resname)
Return a list of names of torsion angles in residue name resname.
 
The argument resname, and the contents of the returned list are strings.
The order of torsion names in the returned list are subjected to the
following hierarchy:
 
'phi', 'psi', 'omega', 'chi1', 'chi2', 'chi3', 'chi4', 'chi5'
(proteins)
 
'alpha', 'beta', 'gamma', 'delta', 'epsilon', 'zeta', 'chi', 'nu0', 'nu1',
'nu2', 'nu3', 'nu4', 'eta', 'theta'
(nucleic acids)
get_torsion_range(resname, torsion)
Return a tuple with the min and max possible values (float) of torsion.
 
The argument resname (string) is a residue name and torsion (string) is the
name of a torsion angle within the residue (for available names see function
get_torsion_names).  Alternatively, torsion can be a sequence of torsion
angle names, in which case a tuple of (min, max) tuples is returned (for all
torsion angles in the residue simply set torsion to the string "all").  For
example, torsion = (torsion_i, torsion_j) would return
 
    ((min_i, max_i), (min_j, max_j))
    
where the elements of torsion tuple are appropriate torsion names.  As
hinted in the above example, the order in the returned tuple obeys to that
of the input torsion sequence; when torsion="all" the order is that given by
get_torsion_names function.
get_torsion_selections(resname, torsion, resid=None, segid='')
Return a tuple of 4 atom selections defining torsion in resname.
 
The argument resname (string) is a residue name and torsion (string) is the
name of a torsion angle within the residue (for available names see function
get_torsion_names).  Alternatively, torsion can be a sequence of torsion
angle names, in which case a tuple of 4-atom-selection tuples is returned
(for all torsion angles in the residue simply set torsion to the string
"all").  For example, torsion = (torsion_i, torsion_j) would return
 
    ((sel_i1, sel_i2, sel_i3, sel_i4), (sel_j1, sel_j2, sel_j3, sel_j4))
    
where the elements of torsion tuple are appropriate torsion names, and each
sel_xy is an atom selection string that selects a single atom.  As hinted
in the above example, the order in the returned tuple obeys to that of the
input torsion sequence; when torsion="all" the order is that given by
get_torsion_names function.
Arguments resid and segid are optional residue number (integer) and segment
(string) to incorporate into each XPLOR-style atom selection (string); if
not provided the corresponding fields in each selection are empty (e.g.,
'segid "%s" and resid %d and name n').
neighborresname(segid, resid, targetresnames_selstring, shift, sim)
Return name of residue neighboring (segid, resid) if in targetresnames_selstring
 
The residue number of the neighboring residue is resid+shift.
targetresnames_selstring is an XPLOR resname selection string of the type
'(resname ALA or resname VAL)'.  The name of the neighbor residue is
returned if it is in targetresnames_selstring or targetresnames_selstring=
'(resname *)'.  An exception of the latter case is when the neighboring
residue number doesn't have any atoms (e.g, falls outside the sequence),
where '   ' is returned.  Otherwise, returns None.  (Note that if
targetresnames_selstring is different from '(resname *)' and resid+shift
falls outside the sequence, it returns None.)
resname_selstring(resnameseq)
Return an XPLOR resname selection string.
 
Returns '(resname a or resname b or resname c)', given the input sequence
of strings 'a', 'b', and 'c'.
separate_torsion_outliers(residues, radius, percent)
Return a tuple with (list of non-outlier residues, list of outliers).
 
residues is a sequence of ResidueTorsionConfig instances.  For each
d-dimensional torsion angle in the sequence, the number of torsion angles
within the specified radius is computed; if such number represents less than
the specified percent of the data, the torsion angle is considered an
"outlier".  The returned tuple contains as first and second elements a list
of non-outlier and outlier ResidueTorsionConfig instances, respectively.
set_table(ranges, binwidths, usebinnumbers=False)
Return a dictionary with coordinates-0 key-value pairs.
 
The returned dictionary represents an n-dimensional contingency table,
where the key is a tuple of numbers that specifies the bin coordinates and
the value is an integer with the bin count (count=0 in this case, i.e.,
empty contingency table).  binwidths is a sequence of the required bin width
in each dimension.  ranges is a sequence with the min and max values that
define the domain of each dimension.  The dimensionality is given by
len(binwidths) (=len(ranges)).  Bin widths and ranges are matched by
positional offset: the order is important!  Output bin coordinates can be
expressed in terms of bin numbers (if usebinnumbers=True) or the value at
center of bin (default).

 
Data
        nucleic_resnames = ['GUA', 'ADE', 'CYT', 'THY', 'URI']
protein_resnames = ['ALA', 'GLY', 'SER', 'THR', 'VAL', 'ASN', 'ASP', 'HIS', 'ILE', 'LEU', 'PHE', 'TRP', 'TYR', 'GLU', 'GLN', 'MET', 'ARG', 'LYS', 'PRO', 'CYS']
resname = 'URI'
torsion_info = {'ADE': {'alpha': (('(name O3\' and bondedto (segid "%s" and resid %d and name P))', '(segid "%s" and resid %d and name P)', '(segid "%s" and resid %d and name O5\')', '(segid "%s" and resid %d and name C5\')'), (-180.0, 180.0)), 'beta': (('(segid "%s" and resid %d and name P)', '(segid "%s" and resid %d and name O5\')', '(segid "%s" and resid %d and name C5\')', '(segid "%s" and resid %d and name C4\')'), (-180.0, 180.0)), 'chi': (('(segid "%s" and resid %d and name O4\')', '(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and (((resn ADE or resn...ame N9) or ((resn CYT or resn URI) and name N1)))', '(segid "%s" and resid %d and (((resn ADE or resn...ame C4) or ((resn CYT or resn URI) and name C2)))'), (-180.0, 180.0)), 'delta': (('(segid "%s" and resid %d and name C5\')', '(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name C3\')', '(segid "%s" and resid %d and name O3\')'), (-180.0, 180.0)), 'epsilon': (('(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name C3\')', '(segid "%s" and resid %d and name O3\')', '(name P and bondedto (segid "%s" and resid %d and name O3\'))'), (-180.0, 180.0)), 'eta': (('(name C4\' and bondedto (name C3\' and bondedto (n... bondedto (segid "%s" and resid %d and name P))))', '(segid "%s" and resid %d and name P)', '(segid "%s" and resid %d and name C4\')', '(name P and bondedto (name O3\' and bondedto (nam...ondedto (segid "%s" and resid %d and name C4\'))))'), (-180.0, 180.0)), 'gamma': (('(segid "%s" and resid %d and name O5\')', '(segid "%s" and resid %d and name C5\')', '(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name C3\')'), (-180.0, 180.0)), 'nu0': (('(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name O4\')', '(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and name C2\')'), (-180.0, 180.0)), 'nu1': (('(segid "%s" and resid %d and name O4\')', '(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and name C2\')', '(segid "%s" and resid %d and name C3\')'), (-180.0, 180.0)), 'nu2': (('(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and name C2\')', '(segid "%s" and resid %d and name C3\')', '(segid "%s" and resid %d and name C4\')'), (-180.0, 180.0)), ...}, 'ALA': {'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'ARG': {'chi1': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)'), (-180.0, 180.0)), 'chi2': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)'), (-180.0, 180.0)), 'chi3': (('(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)', '(segid "%s" and resid %d and name ne)'), (-180.0, 180.0)), 'chi4': (('(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)', '(segid "%s" and resid %d and name ne)', '(segid "%s" and resid %d and name cz)'), (-180.0, 180.0)), 'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'ASN': {'chi1': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)'), (-180.0, 180.0)), 'chi2': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name od1)'), (-180.0, 180.0)), 'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'ASP': {'chi1': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)'), (-180.0, 180.0)), 'chi2': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name od1)'), (-90.0, 90.0)), 'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'CYS': {'chi1': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name sg)'), (-180.0, 180.0)), 'chi2': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name sg)', '(name sg and bondedto (segid "%s" and resid %d and name sg))'), (-180.0, 180.0)), 'chi3': (('(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name sg)', '(name sg and bondedto (segid "%s" and resid %d and name sg))', '(name cb and bondedto (name sg and bondedto (segid "%s" and resid %d and name sg)))'), (-180.0, 180.0)), 'chi4': (('(segid "%s" and resid %d and name sg)', '(name sg and bondedto (segid "%s" and resid %d and name sg))', '(name cb and bondedto (name sg and bondedto (segid "%s" and resid %d and name sg)))', '(name ca and bondedto (name cb and bondedto (nam...bondedto (segid "%s" and resid %d and name sg))))'), (-180.0, 180.0)), 'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'CYT': {'alpha': (('(name O3\' and bondedto (segid "%s" and resid %d and name P))', '(segid "%s" and resid %d and name P)', '(segid "%s" and resid %d and name O5\')', '(segid "%s" and resid %d and name C5\')'), (-180.0, 180.0)), 'beta': (('(segid "%s" and resid %d and name P)', '(segid "%s" and resid %d and name O5\')', '(segid "%s" and resid %d and name C5\')', '(segid "%s" and resid %d and name C4\')'), (-180.0, 180.0)), 'chi': (('(segid "%s" and resid %d and name O4\')', '(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and (((resn ADE or resn...ame N9) or ((resn CYT or resn URI) and name N1)))', '(segid "%s" and resid %d and (((resn ADE or resn...ame C4) or ((resn CYT or resn URI) and name C2)))'), (-180.0, 180.0)), 'delta': (('(segid "%s" and resid %d and name C5\')', '(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name C3\')', '(segid "%s" and resid %d and name O3\')'), (-180.0, 180.0)), 'epsilon': (('(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name C3\')', '(segid "%s" and resid %d and name O3\')', '(name P and bondedto (segid "%s" and resid %d and name O3\'))'), (-180.0, 180.0)), 'eta': (('(name C4\' and bondedto (name C3\' and bondedto (n... bondedto (segid "%s" and resid %d and name P))))', '(segid "%s" and resid %d and name P)', '(segid "%s" and resid %d and name C4\')', '(name P and bondedto (name O3\' and bondedto (nam...ondedto (segid "%s" and resid %d and name C4\'))))'), (-180.0, 180.0)), 'gamma': (('(segid "%s" and resid %d and name O5\')', '(segid "%s" and resid %d and name C5\')', '(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name C3\')'), (-180.0, 180.0)), 'nu0': (('(segid "%s" and resid %d and name C4\')', '(segid "%s" and resid %d and name O4\')', '(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and name C2\')'), (-180.0, 180.0)), 'nu1': (('(segid "%s" and resid %d and name O4\')', '(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and name C2\')', '(segid "%s" and resid %d and name C3\')'), (-180.0, 180.0)), 'nu2': (('(segid "%s" and resid %d and name C1\')', '(segid "%s" and resid %d and name C2\')', '(segid "%s" and resid %d and name C3\')', '(segid "%s" and resid %d and name C4\')'), (-180.0, 180.0)), ...}, 'GLN': {'chi1': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)'), (-180.0, 180.0)), 'chi2': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)'), (-180.0, 180.0)), 'chi3': (('(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)', '(segid "%s" and resid %d and name oe1)'), (-180.0, 180.0)), 'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'GLU': {'chi1': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)'), (-180.0, 180.0)), 'chi2': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)'), (-180.0, 180.0)), 'chi3': (('(segid "%s" and resid %d and name cb)', '(segid "%s" and resid %d and name cg)', '(segid "%s" and resid %d and name cd)', '(segid "%s" and resid %d and name oe1)'), (-90.0, 90.0)), 'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, 'GLY': {'omega': (('(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))', '(name ca and bondedto (name n and bondedto (segid "%s" and resid %d and name c)))'), (-180.0, 180.0)), 'phi': (('(name c and bondedto (segid "%s" and resid %d and name n))', '(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)'), (-180.0, 180.0)), 'psi': (('(segid "%s" and resid %d and name n)', '(segid "%s" and resid %d and name ca)', '(segid "%s" and resid %d and name c)', '(name n and bondedto (segid "%s" and resid %d and name c))'), (-180.0, 180.0))}, ...}