ccrPot
index
/home/schwitrs/bzr-repo/xplor-python3/bin.Linux_x86_64/ccrPot.py

ccrPot
 
For Cross-correlation relaxation and RDC correlation potentials.
 
 
constructor:   
        CCRPot(instanceName, 
               restraints, 
               simulation=None)
 
        -instanceName is a user-specified identifier.
        -restraints is an restraint table (the format is described below)
        -simulation is an optional simulation.Simulation. It
         defaults to the current Simulation.
 
methods:
   addRestraints(string)       - add restraints
 
   rms()                       - return the RMSD of calculated - observed.
   chi2()                      - return the chi-squared value.
   correlation()             - return the correlation between
                                 calculated and observed.
   calcEnergy()                - calc energy, returns the energy value.
   calcEnergyAndDerivs(derivs) - calc energy, derivs, returns the energy value. 
 
   deviation()                 - return average of deviation of
                                 ensemble members. This is nonzero
                                 only for Ne>1 ensembleSimulations.
 
   numRestraints()             - return the number of restraints.
   violations()                - return number of violations
   info()                      - current info about the state of
                                 this instance.
 
 
   showViolations()            - return a string listing violated restraints. 
   showRestraints(violated)    - return info on restraints. Argument
                                 violated is boolean specifying whether
                                 to return only violated restraints. 
                               
                               
   restraints()                - return a list of restraints. See the
                                 description of the Restraint class below. 
                               
   simulation()                - return the associated simulation.Simulation.
 
 
 
 The following members can be read using the method named member() and set
 using the method setMember(val) [defaults in square brackets]
 
        scale        - scale factor (force constant) [1]
        threshold    - threshold in violation calculation [0]
        potType      - type of potential: "harmonic", "square", or
                       "correlation"  ["harmonic"]
        verbose      - boolean, whether to produce verbose output [False]
        prefactor    - constant prefactor by which to multiply all
                       restraints [1]
        showAllRestraints - boolean which changes the behavior of 
                            showViolations. If this parameter is set to True, 
                            the behavior of showViolations is modified such 
                            that all restraints are printed. Violated 
                            restraints are indicated by an asterisk in the 
                            first column. [False]
 
 
 
 
Assignment Table:
  
  The native format for the restraint is
 
    assign ( sel x1 ) ( sel x2 ) ( sel y1 ) (sel y2 )  obs err ! optional comment
 
  where the x1, x2, y1 and y2  selections specify (single) atoms involved
  in the interaction.  The observed value is given by obs argument.
  The error bound is given by error argument.  
 
Restraint class
 
methods:
  name()   -   name of this restraint.
  energy() -   energy due to this restraint
  calcd()  -   calculated observable (ensemble average).
  variance() - measure of spread between different ensemble members.
  diff()   -   difference between calcd and obs
 
  atomX1() - atoms as specified in the restraint table.
  atomX2() - 
  atomY1() - 
  atomY2() - 
  bSelection() - atomSel for atom B
 
  calced_contrib() - list of contributions due to each ensemble member.
 
  deviation() - 
 
 
 The following members can be read using member() or set using setMember(). 
 I.e. restraint.setObs( 1.2 )
   
   obs      - observed value
   err      - the experimental error.
   comment  - optional comment as specified in the restraint table.
 
 
The observable is computed as
 
  delta = 1/2 * prefactor * ( 3 cosTheta^2 -1 )
 
where prefactor is specified as above, and cosTheta is
 
  cosTheta = dotProd( unitVec( x2-x1 ) , unitVec( y2-y1 ) 
 
The energy computation depends on the value of potType:
 
For potType of "harmonic" and "square":
 
 E = scale * \sum_i diff_i^2
 
where 
            /  (calc_i - obs_i)/err_i  for potType=harmonic
  diff_i = |   (calc_i - obs_i - err)  for potType=square calc_i > obs_i + err_i
           |   0                       for potType=square abs(calc_i-obs_i)<err_i
            \  (calc_i - obs_i + err)  for potType=square calc_i < obs_i - err_i
 
For potType of "correlation"
 
  E = scale * (1 - correlation)
 
with
 
                     \sum_i (calcd_i-aveCalcd) * (obs_i-aveObs) 
 correlation =   ----------------------------------------------------
               sqrt( \sum_i (calcd_i-aveCalcd)^2 * \sum_i (obs_i-aveObs)^2 )
             
 
and aveCalcd and aveObs the average over calculdated and experimental
values, repspectively.  
 
 
 
# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

 
Classes
       
builtins.object
CCRPot
CDSList_CCR_Restraint
EnsemblePot
CCRPot_LetterClass
Modified
ModifiedBase
Restraint_CCRPot
CCR_Restraint
VarEnsWeights
rc_EnsemblePot
rc_ptr_CCR_Restraint

 
class CCRPot_LetterClass(EnsemblePot)
    CCRPot_LetterClass(*args, **kwargs)
 

 
 
Method resolution order:
CCRPot_LetterClass
EnsemblePot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
addRestraints(self, *args, **kwargs) -> 'void'
chi2(self, *args, **kwargs) -> 'float_type'
correlation(self, *args, **kwargs) -> 'float_type'
deviation(self, *args, **kwargs) -> 'double'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
potType(self, *args, **kwargs) -> 'CCRPot::CCRPotType'
prefactor(self, *args, **kwargs) -> 'float_type const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< CCR_Restraint > >'
rms(self, *args, **kwargs) -> 'double'
setPotType(self, *args, **kwargs) -> 'void'
setPrefactor(self, *args, **kwargs) -> 'void'
setShowAllRestraints(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showAllRestraints(self, *args, **kwargs) -> 'bool const'
showRestraints(self, *args, **kwargs) -> 'String'
showViolations(self, *args, **kwargs) -> 'String'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

Static methods defined here:
__swig_destroy__ = delete_CCRPot_LetterClass(...)

Data descriptors defined here:
thisown

 
The membership flag

Data and other attributes defined here:
CORRELATION = 2
HARMONIC = 0
SQUARE = 1

Methods inherited from EnsemblePot:
addEnsWeights(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
simulation(self, *args) -> 'EnsembleSimulation const *'
updateEnsWeights(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'

Data descriptors inherited from EnsemblePot:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class CCR_Restraint(Restraint_CCRPot)
    CCR_Restraint(*args, **kwargs)
 

 
 
Method resolution order:
CCR_Restraint
Restraint_CCRPot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
atomX1(self, *args, **kwargs) -> 'Atom'
atomX2(self, *args, **kwargs) -> 'Atom'
atomY1(self, *args, **kwargs) -> 'Atom'
atomY2(self, *args, **kwargs) -> 'Atom'
calcContrib(self, *args, **kwargs) -> 'void'
calcd(self, *args, **kwargs) -> 'float_type const'
comment(self, *args, **kwargs) -> 'String const'
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'double'
err(self, *args, **kwargs) -> 'float_type const'
name(self, *args, **kwargs) -> 'String'
obs(self, *args, **kwargs) -> 'float_type const'
ok(self, *args, **kwargs) -> 'int'
setCalcd(self, *args, **kwargs) -> 'void'
setComment(self, *args, **kwargs) -> 'void'
setErr(self, *args, **kwargs) -> 'void'
setObs(self, *args, **kwargs) -> 'void'
setVariance(self, *args, **kwargs) -> 'void'
variance(self, *args, **kwargs) -> 'float_type const'

Static methods defined here:
__swig_destroy__ = delete_CCR_Restraint(...)

Data descriptors defined here:
contrib

 
thisown

 
The membership flag
verbose

 

Methods inherited from Restraint_CCRPot:
diff(self, *args, **kwargs) -> 'float_type'
setName(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

Data descriptors inherited from Restraint_CCRPot:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
class CDSList_CCR_Restraint(builtins.object)
    CDSList_CCR_Restraint(*args)
 

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDS::rc_ptr< CCR_Restraint > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< CCR_Restraint > >'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__len__(self, *args, **kwargs) -> 'int'
__repr__ = _swig_repr(self)
__setitem__(self, *args, **kwargs) -> 'void'
append(self, *args, **kwargs) -> 'void'
help(self, *args, **kwargs) -> 'String'
remove(self, *args, **kwargs) -> 'void'
removeAll(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_CDSList_CCR_Restraint(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
The membership flag

 
class EnsemblePot(builtins.object)
    EnsemblePot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
clearEnsWeights(self, *args, **kwargs) -> 'void'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
simulation(self, *args) -> 'EnsembleSimulation const *'
updateEnsWeights(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'

Static methods defined here:
__swig_destroy__ = delete_EnsemblePot(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
The membership flag

 
class Modified(builtins.object)
    Modified(*args, **kwargs)
 

 
  Methods defined here:
__call__(self, *args, **kwargs) -> 'int'
Call self as a function.
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
clear(self, *args, **kwargs) -> 'void'
set(self, *args, **kwargs) -> 'void'
update(self, *args, **kwargs) -> 'void'
value(self, *args, **kwargs) -> 'int'

Static methods defined here:
__swig_destroy__ = delete_Modified(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
The membership flag

Data and other attributes defined here:
MOD_SELF = 1
MOD_SIMULATION = 2

 
class ModifiedBase(builtins.object)
    ModifiedBase(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
registerTo(self, *args, **kwargs) -> 'void'
unRegister(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'

Static methods defined here:
__swig_destroy__ = delete_ModifiedBase(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
registeredSimulations

 
thisown

 
The membership flag

 
class Restraint_CCRPot(builtins.object)
    Restraint_CCRPot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
diff(self, *args, **kwargs) -> 'float_type'
name(self, *args, **kwargs) -> 'String const'
setName(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

Static methods defined here:
__swig_destroy__ = delete_Restraint_CCRPot(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
The membership flag

 
class VarEnsWeights(builtins.object)
    VarEnsWeights(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

Static methods defined here:
__swig_destroy__ = delete_VarEnsWeights(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
mult

 
thisown

 
The membership flag

 
class rc_EnsemblePot(builtins.object)
    rc_EnsemblePot(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

Static methods defined here:
__swig_destroy__ = delete_rc_EnsemblePot(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
The membership flag

 
class rc_ptr_CCR_Restraint(builtins.object)
    rc_ptr_CCR_Restraint(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'CCR_Restraint *'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__ref__(self, *args, **kwargs) -> 'CCR_Restraint &'
__repr__ = _swig_repr(self)
atomX1(self, *args, **kwargs) -> 'Atom'
atomX2(self, *args, **kwargs) -> 'Atom'
atomY1(self, *args, **kwargs) -> 'Atom'
atomY2(self, *args, **kwargs) -> 'Atom'
calcContrib(self, *args, **kwargs) -> 'void'
calcd(self, *args, **kwargs) -> 'float_type const'
comment(self, *args, **kwargs) -> 'String const'
count(self, *args, **kwargs) -> 'int'
decr(self, *args, **kwargs) -> 'void'
deriv(self, *args, **kwargs) -> 'void'
diff(self, *args, **kwargs) -> 'float_type'
energy(self, *args, **kwargs) -> 'double'
err(self, *args, **kwargs) -> 'float_type const'
forceDelete(self, *args, **kwargs) -> 'void'
incr(self, *args, **kwargs) -> 'void'
name(self, *args, **kwargs) -> 'String'
obs(self, *args, **kwargs) -> 'float_type const'
ok(self, *args, **kwargs) -> 'int'
ptr(self, *args, **kwargs) -> 'CCR_Restraint *'
release(self, *args, **kwargs) -> 'CCR_Restraint *'
reset(self, *args, **kwargs) -> 'void'
setCalcd(self, *args, **kwargs) -> 'void'
setComment(self, *args, **kwargs) -> 'void'
setErr(self, *args, **kwargs) -> 'void'
setName(self, *args, **kwargs) -> 'void'
setObs(self, *args, **kwargs) -> 'void'
setVariance(self, *args, **kwargs) -> 'void'
variance(self, *args, **kwargs) -> 'float_type const'
violated(self, *args, **kwargs) -> 'bool'

Static methods defined here:
__swig_destroy__ = delete_rc_ptr_CCR_Restraint(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
thisown

 
The membership flag
verbose

 

 
realCCRPot = class CCRPot(builtins.object)
    realCCRPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'CCRPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'CCRPot &'
__repr__ = _swig_repr(self)
addEnsWeights(self, *args, **kwargs) -> 'void'
addRestraints(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
calcWDerivs(self, *args, **kwargs) -> 'bool const'
chi2(self, *args, **kwargs) -> 'float_type'
clearEnsWeights(self, *args, **kwargs) -> 'void'
correlation(self, *args, **kwargs) -> 'float_type'
decrRefCnt(self, *args, **kwargs) -> 'void'
deviation(self, *args, **kwargs) -> 'double'
energyMaybeDerivs0(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs1(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs2(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs3(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivs4(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPost(self, *args, **kwargs) -> 'float_type'
energyMaybeDerivsPre(self, *args, **kwargs) -> 'float_type'
ensWeight(self, *args, **kwargs) -> 'float_type'
ensWeights(self, *args, **kwargs) -> 'CDSList< float_type >'
ensWeightsInfo(self, *args, **kwargs) -> 'String'
getEnsWeights(self, *args, **kwargs) -> 'CDSList< VarEnsWeights > &'
incrRefCnt(self, *args, **kwargs) -> 'void'
info(self, *args, **kwargs) -> 'String'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
numRestraints(self, *args, **kwargs) -> 'int'
potName(self, *args, **kwargs) -> 'char const *'
potType(self, *args, **kwargs) -> 'CCRPot::CCRPotType'
prefactor(self, *args, **kwargs) -> 'float_type const'
pyXplorHelp(self, *args, **kwargs) -> 'String'
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'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< CCR_Restraint > >'
rms(self, *args, **kwargs) -> 'double'
scale(self, *args, **kwargs) -> 'float_type const'
setCalcWDerivs(self, *args, **kwargs) -> 'void'
setEnsWeights(self, *args, **kwargs) -> 'void'
setPotType(self, *args, **kwargs) -> 'void'
setPrefactor(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setShowAllRestraints(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setUseSimEnsWeights(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showAllRestraints(self, *args, **kwargs) -> 'bool const'
showRestraints(self, *args, **kwargs) -> 'String'
showViolations(self, *args, **kwargs) -> 'String'
simulation(self, *args) -> 'EnsembleSimulation const *'
threshold(self, *args, **kwargs) -> 'float_type const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateEnsWeights(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
useSimEnsWeights(self, *args, **kwargs) -> 'bool const'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

Static methods defined here:
__swig_destroy__ = delete_CCRPot(...)

Data descriptors defined here:
__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
       
CCRPot(*args)
pyXplorHelp(*args) -> 'String'