tagTool
index


 
  TagTool: class for managing a tagSimulation.TagSimulation- aid in
  attaching tags and manipulating tag coordinates. Tags can be attached to
  one or more locations on the tagged molecule. 
 
Terminology:
 
   taggedSim - Simulation containing the biomolecule to which tags
               are attached.
   tagSim    - Simulation containing tag coordinates.
   fullSim   - the TagSimulation which contains the tagged molecule
               with tags attached.
 
Usually, taggedSim and tagSim are XplorSimulations, and could even be the
same. 
 
To add a new tag:
 
import tagTool
tagTool.tagDB['resname'] = tagTool.TagDBInfo('resname',...)

 
Classes
       
builtins.object
TagDBInfo
TagInfo
TagTool

 
class TagDBInfo(builtins.object)
    TagDBInfo(tagName, attachAtoms, topology=None, parameters=None, coords=None, coordsFilename=None, paraAtomname=None, rigidRegions=None, otherNames=[])
 

 
  Methods defined here:
__init__(self, tagName, attachAtoms, topology=None, parameters=None, coords=None, coordsFilename=None, paraAtomname=None, rigidRegions=None, otherNames=[])
where: 
    tagName      -  residueName of the tag
    tagNames     -  list containing all residue names tag is known by
    attachAtoms  -  name of 3 atoms used to attach tag to biomolecule-
                   order is significant
    topology     -  filename of topoogy file
    parameters   -  filename of parameters file
    coords       -  after initialization, contains a dictionary 
                   containing entries of
                       (segid,resid) -> "PDB ATOM RECORD"
    coordFilename - filename of PDB containing tag coordinates with
                    optional rotamer weights.
    paraAtomname  - name of paramagnetic atom in tag.
    rigidRegions  - sequence of strings containing names of atoms to
                   grouped in rigid bodies.

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class TagInfo(TagDBInfo)
    TagInfo(dbInfo, tool, simulation=None)
 
Inherits members from TagDBInfo.
 
Important members:
  tool       - the TagTool object which created this object.
  simulation - Simulation containing the tag atoms. This may or may not
               be the same as that of tool.taggedSim.
  resid
  segids
  coords
  weights
  probWidth
  distanceSigmoidWidth
  paraAtomRadius
 
 
Method resolution order:
TagInfo
TagDBInfo
builtins.object

Methods defined here:
__init__(self, dbInfo, tool, simulation=None)
where: 
    tagName      -  residueName of the tag
    tagNames     -  list containing all residue names tag is known by
    attachAtoms  -  name of 3 atoms used to attach tag to biomolecule-
                   order is significant
    topology     -  filename of topoogy file
    parameters   -  filename of parameters file
    coords       -  after initialization, contains a dictionary 
                   containing entries of
                       (segid,resid) -> "PDB ATOM RECORD"
    coordFilename - filename of PDB containing tag coordinates with
                    optional rotamer weights.
    paraAtomname  - name of paramagnetic atom in tag.
    rigidRegions  - sequence of strings containing names of atoms to
                   grouped in rigid bodies.
attachTag(self, selection, fullSim=None, verbose=False)
Attach all tag residues in this TagInfo instance to the residue
specified by the selection argument. 
 
In the tagSimulation.TagSimulation specified by the fullSim
argument (self.tool.fullSim iffullSim is None), the
new tag will have the residueNum in the selection. The segmentName
will be that of the residue attachment point concatenated with that of
the tag, so is a requirement that the segment name of the atoms
specified in selection not be longer than one character.
numCopies(self)
readCoordsInfo(self, verbose)
Populations tagInfo members:
coords,weights,probWidth,
distanceSigmoidWidth,paraAtomRadius,
coordsFilename

Data descriptors inherited from TagDBInfo:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class TagTool(builtins.object)
    TagTool(tagSimulation=None, selection='not PSEUDO', simName='TagSimulation')
 

 
  Methods defined here:
__init__(self, tagSimulation=None, selection='not PSEUDO', simName='TagSimulation')
Create a TagTool object given a selection specifying atoms
to be used as the base, including positions to anchor tags.
 
Members:
  taggedSim:     simulation.Simulation of the passed selection
                 argument.
  tagSimulation: tagSimulation.TagSimulation created for
                 tags subsequently added using the addTags()
                 method.
  tagEntries:    list of TagInfo objects created/added.
addAtoms(self, tagName, numCopies=None, useCoordLibrary=True, randomizeTorsions=False, resid=1, segid=None, tagSimulation='tagged', makePseudo=None, verbose=False)
Add tag atoms to the TagSimulation fullSim. These are logically
separate from the copies attached to residues, and may be attached to
more than one residue using the attachTag method of the returned
TagInfo object. 
 
The numCopies argument specifies the number of tag coordinate
sets to add. A numCopies value of None specifies that all
conformations in the rotamer library are read, if coordinates
are specified, otherwise a single rotamer is generated. If numCopies
is greater than the number of copies in the rotamer library,
conformations are cycled through in a round-robin fashion.
 
The resid parameter specifies residue number for all copies of the
generated tag residue.
 
Copies are distinguished by their segid. The segid (string)
argument specifies the start segid for the newly created tag
atoms. If specified, it should follow this rule: all but the
first character should be digit characters (0-9), else it
defaults to self.defaultSegid. The segid for subsequent copies are 
generated by incrementing the numeric portion of this segid.
 
If randomizeTorsions==True, the tag torsion angles are randomized, so 
that the coordinate library is no longer used.
 
The tagSimulation argument can be used to specify a Simulation in
which to place the new tag atoms, or it can be one of three string
values. For a value of "tagged" (the default), the tag atoms are
placed in the TagTool's taggedSim Simulation. A  value of "current",
means the current Simulation is used, and a value of "new" causes a
separate newly-created XplorSimulation to be used. Whatever its value.
the tagSimulation is specified in the returned TagInfo's simulation
member.
 
As a side-effect, the [tagResidues] atomSelLang abbrevation is
updated to include all tag residue atoms, and the [fixedReference]
abbreviation is updated, if necessary, to contain the [tagResidues]
entries.
 
This method returns a TagInfo object 
If tag weights are present for tagName, these are set in the weights
member of the object.
 
By default, if tagSimulation != "new" all added atoms are designated
as pseudo atoms for the atomSelLang specifications. The behavior
can be forced by setting makePseudo to True or False.
addTag(self, selection, tagName, numCopies=None, useCoordLibrary=True, randomizeTorsions=False, atomResid=None, atomsExist=False, segid=None, verbose=False)
Add atoms to a simulation, and anchor the tag to an existing
residue identified by the selection argument.
 
This method calls addAtoms if atomsExist=False, and then attachTag. 
If atomResid==None, the resid of the generated tag is that 
corresponding to the selection argument.
create_TagRepel(self, selection='all', termName='tagRepel', bbSel='name CA C N O HN HA* HT* OT*')
Create a repelPot.RepelPot term to prevent intra-tag overlap
and overlap of tag atoms with backbone atoms. The selection argument
can be used to further restrict included atoms.
extendedCoords(self)
Generate random, extended initial coords
loadCoords(self, tagNum, tagInfo, inTagNum, loadSim, verbose)
Load PDB record number inTagNum from from tagInfo.coords, and
copy these to the new tag (with new segid/resid, Simulation).
loadParameters(self, tagInfo, verbose)
loadTopologyIfNeeded(self, tagInfo, simulation=None, force=False, verbose=False)
If force=True, load topology info unconditionally.
placeInFrame(self, tagInfo)
For each tag copy,
            put in canonical reference frame
             attachAtoms[0] is at the origin
             z is along the attachAtoms[1]-attachAtoms[0] vector
             v is along the attachAtoms[2]-attachAtoms[0] vector
potName(self)
rigidTopologySetup(self, ivm)
segidsResids(self)
Return list of (segid,resid) pairs for all added tags.
simulation(self)
return fullSim

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
Functions
       
analyze(potlist)
Go through the potlist and collect info about all Tags, then print out 
unique tag parameters (probWidth, distanceSigmoidWidth, paraAtomRadius) -
These will go in PDB headers.
doRandomizeTorsions(selection, attachAtoms, rigidRegions)
Helper function to randomize torsion angles in the specified selection
is a fashion such that the coordinates of atoms specified in attachAtoms
are held fixed in space, and atoms in rigidRegions are group as rigid
bodies.
getDBentry(tagName)
Find the proper entry for tagDB, given a tag name.
getDBname(tagName)
Find the proper key for tagDB, given a tag name.
topologySetup(ivm, list=[], options=[])
Call TagInfo.topologySetup for each instance, if "rigidSidechain" is
present in the options list.
updateDBentry(tagName, attachAtoms=None, topology=None, parameters=None, coords=None, coordsFilename=None, paraAtomname=None, rigidRegions=None)
Update an entry with the given tagName in the tag database. Any other 
entry can be specified.

 
Data
        paramsInitialized = {}
tagDB = {'CED': <tagTool.TagDBInfo object>, 'CYSP': <tagTool.TagDBInfo object>}