prePotTools
index


 
Tools to aid in setup/analysis of the Paramagnetic Relaxation Enhancement
potential term.
 
This module provides functions to simplify the creation, manipulation and
analysis of prePot.PREPot potential terms.

 
Classes
       
pyPot.PyPot(builtins.object)
twoSatePREPot

 
class twoSatePREPot(pyPot.PyPot)
    twoSatePREPot(name, popA, prePotA, prePotB)
 

 
 
Method resolution order:
twoSatePREPot
pyPot.PyPot
builtins.object

Methods defined here:
__init__(self, name, popA, prePotA, prePotB)
Initialize self.  See help(type(self)) for accurate signature.
calcEnergy(self)
calcEnergyAndDerivList(self, derivs)
q_factor(self, sel='all')
Return the Q factor.

Methods inherited from pyPot.PyPot:
__deref__(self, *args, **kwargs) -> 'PyPot *'
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'PyPot &'
__repr__ = _swig_repr(self)
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
decrRefCnt(self, *args, **kwargs) -> 'void'
incrRefCnt(self, *args, **kwargs) -> 'void'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
numRestraints(self, *args, **kwargs) -> 'int'
potName(self, *args, **kwargs) -> 'char const *'
pyXplorHelp(self, *args, **kwargs) -> 'String'
pythonPot(self, *args, **kwargs) -> 'PyObject *'
refCnt(self, *args, **kwargs) -> 'int'
registerInstanceData(self, *args, **kwargs) -> 'void'
registerTo(self, *args, **kwargs) -> 'void'
resetInstanceName(self, *args, **kwargs) -> 'void'
resetPotName(self, *args, **kwargs) -> 'void'
rms(self, *args, **kwargs) -> 'float_type'
scale(self, *args, **kwargs) -> 'float_type const'
setScale(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
threshold(self, *args, **kwargs) -> 'float_type const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
violations(self, *args, **kwargs) -> 'float_type'

Static methods inherited from pyPot.PyPot:
__swig_destroy__ = delete_PyPot(...)

Data descriptors inherited from pyPot.PyPot:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
registeredSimulations

 
thisown

 
The membership flag

 
Functions
       
Qfactor(term)
Term can be a single potential term, or a list of terms. If a list,
the combined Q-factor is computed, not the average of the terms.
addClockAtoms(resid=None, segid=None, tcOatom=None, tcXatom=None, tcYatom=None, ttOatom=None, ttXatom=None, ttYatom=None, tiOatom=None, tiXatom=None, tiYatom=None, simulation=None)
Create psf and initial coordinates for all clock atoms used for optimizing
correlation times tau_c, tau_t and tau_i.
addNonstereoRestraints(pre, inString)
To the specified prePot.PREPot object, add the restraints in
inString. These can be standard restraints, or restraints in which
geminal pairs are labelled with X/Y instead of 1/2. The optimal
assignment can then be made using the function processNonstereoRestraints.
analyze(potList)
Perform analysis of PREPot terms and return nicely formatted summary.
correlation(term)
Term can be a single potential term, or a list of terms, in which case
the average correlation is returned. FIX: should return overall
correlation instead.
create_PREPot(name, file=0, assignType='', frequency=500, scaleType='obsig', esim=0, restraints='', eSpinQuantumNumber=2.5, rlxType='r2dd', tauc=3.0, taut=0.5, taui=0.05, fixTau=False, clockResid=None, clockSegid=None, paraCenter=None, nucleusID=None, sumWeights=[], selection1='known', selection2='known', verbose=True)
Create a prePot.PREPot with given name, given the filename of a
PRE assignment table and/or a string of assignments, and an
ensemble simulation.
 
The assignType argument is a a deprecated argument, and now has no effect.
 
Specify the NMR Larmor frequency (in MHz) using the frequency argument.
 
eSpinQuantumNumber specifies the electron spin quantum number of the
spin label.
 
rlxType is a string that specifies the type of paramagnetic relaxation
mechanism; it can be one of 'r2dd', 'r2curie', 'r2mix', 'r1dd', 'r1curie',
or 'r1mix'.
 
tauc, taut, and taui specify correlation times in ns.  By default, tauc is
optimized along with atomic coordinates in the range 0.5tc .. 2tc, where
tc is the specified value.
 
Changing fixTau to True will disable correlation-time optimization (clock
pseudo atoms will not be added).
 
clockResid and clockSegid can be set if clock pseudo atoms preexist.
 
nucleusID can be one of  '15N', '1H', '13C', or '31P'.  If it is omitted,
an attempt is made to determine this type automatically.
 
The input restraint list is rewritten to be sum restraints if paraCenter is
set - it specifies which selection is to be treated as the paramagnetic
center.  For each restraint in the input table a SUM restraint is added for
each atom which matches paraCenter.  By default the SUM terms will be given
equal weights of 1, but the sumWeights argument can be used to change these
values.  The SUM restraints will be in order of appearance in the PSF.
 
Atom selections specified in restraints can be filtered by specifying 
(string) values for the selection1 and selection2 arguments. These are 
used to specify the sel1Filter and sel2Filter members of the PREPot term.
fitRho0(term, scaling='chi2')
Determine and set constant prefactor rho0 to minimize a target
function, specified by the scaling argument. Allowed values for scaling
are
   'chi2', 'uniform', 'obsig'
 
where chi2 is use to minimize chi^2, weighting by 1/err^2, for
uniform, weights are ignored, and for obsig, the scaling is
1/err^2*obs_i/obsMax, where is the observed value of restraint i, and
obsMax is the largest observed value.
fitTauc(term, verbose=False)
Determine the value of tauc which optimizes term's energy
getNucleusType(pre)
Determine the nucleous involved in the experiment.
getTagResidSels(pre)
Generate a list of atomSel.AtomSels for each unique tag residue. This
can be used to conveniently configure selection pairs for non-bonded
interactions.
 
Here it is assumed that sel1 in each restraint refers to the paramagnetic
center.
 
This function returns a named tuple with sels and union members, with the
second argument the union of the list.
makeTable(pre)
Return the assignment table (a string) corresponding to the 
restraints associated with the specified prePot.PREPot instance. 
 
Does not support SUM restraints or non-stereo-assigned restraints.
massSetup(list=[], axisMass=300)
Appropriately setup clock masses to axisMass.
 
If list is not specified, then pseudoatoms associated with
all registered PREPot objects are configured.
processNonstereoRestraints(pre)
Swap all non-stereospecifically labeled assignments s.t. energy
is minimized.
registerTerm(term)
Add the given PrePot object to a list associated with its Simulation.
These objects will be automatically processed by topologySetup and
massSetup.
setupSBMFmode(term)
Configure the given potential term to use modified model-free
Solomon-Bloembergen equation to calculate PREs.
setupSBmode(term)
Configure the given potential term to use Solomon-Bloembergen equation
to calculate PREs.
spaceSeparatedToRestraint(inString, paraSel, atomName='HN', residCol=1, preCol=2, errCol=None, defaultErr=0.1, residCharPrepend=False, illegalValues=[], segid=None)
Convert string restraint table (inString) consisting of columns
for resid and PRE values to an Xplor-NIH readable restraint
table. Column numbers start with 1.  paraSel is an atom selection
specifying the paramagnetic center.
 
Set residCharPrepend to True if the residCol takes the form Xnum, where X
is a chracter representing the residue type, and num is the residue
number. The illegalValues argument is a sequence of (string) value for
observed PRE. If these values are encountered, they will be ignored.
tauc(term)
topologySetup(ivm, list=[])
Configure the given ivm.IVM object's topology setup for clock atoms
based on which are allowed to float in each PREPot object's fixTacx
member. This function should be called prior to
ivm.IVM.autoTorsion() or protocol.torsionTopology(). If a list 
of PREPot terms is not given in the list argument, then all registered 
terms are configured.

 
Data
        default_resid = 1200
default_segid = ''
gyroMagneticRatios = {'13C': 6.7283, '15N': 2.7116, '1H': 26.75198, '31P': 10.841}
nonstereoAtomMap = {'HDX': ['HD1', 'HD2'], 'HGX': ['HG1', 'HG2']}
psfTemplate = '\nstructure\nPSF\n\n 1 !NTITLE\n REMARKS preP... 1 0 !NGRP\n 0 0 0\n\nend\n'
registeredTerms = {}