Python: module cstMagPot
 
cstMagPot
index


potential term to refine against chemical shift tensor magnitudes.
 
This term is normally constructed using the helper function 
cstMagTools.create_CSTMagPot.
 
constructor: CSTMagPot(instanceName,
                       angle1Vals,
                       angle2Vals,
                       surf1Vals,
                       surf2Vals,
                       surf3Vals,
                       simulation=0)
  instanceName is a user-specified identifier
  angle1Vals and angle2Vals are sequences of angle values defining a grid
  on which three tensor magnitudes s11, s22 and s33 are specified.
  surf1Vals, surf2Vals and surf3Vals are these surface values in 
  cdsMatrix.CDSMatrix_double objects.
  simulation is an optional simulation.Simulation specification
  [it defaults to the current Simulation.]
 
methods
  addRestraints(restraintString) - add the specified restraints specified in 
                                   the given string. See below for restraint
                                   assignment syntax.
 
  calcEnergy()                 - calc energy, returns the energy value.
  calcEnergyAndDerivs(derivs)  - calc energy, derivs, returns the energy value.
 
  rms()            - return the restraint rms violation
  numRestraints()  - return the numbder of restraints defined for this term.
  violations()     - return number of violations
  restraints()     - return a list of restraints. See the description of the
                     CSTMag_Restraint class below.
  
  info()                    - current info about the state of this instance
  showRestraints(violated)  - return info on restraints. Argument violated is
                              boolean specifying whether to return only 
                              violated restraints.
  showViolations()          - return string containing pretty-printed info
                              on all violated restraints.
 
  simulation()              - return the associated simulation.
 
 
 
 
 The following parameters can be set [defaults in square brackets]
 
  verbose    - if true, sporadically spit out info [False]
  scale      - scale factor [1]
  cstOffset  - offset added to all surfaces [0]
  cstScale   - scale factor applied to all surfaces [1]
  cstWeights - weighting in the energy calculation of each surface contribution
               [ (1,1,1) ]
  threshold  - threshold in violation calculation [0.5]
  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]
 
 the above quantities may be retrieved using the member function form
 quantity(), while they are set using the form setQuantity(value).
 
The following raw members can be accessed:
 
  angle1Vals          - values of angles on the grid
  angle2Vals            returned as a list.
  surf1               - the three surfaces representations corresponding to
  surf2                 s11, s22 and s33.
  surf3                 These are spline.Spline2D objects.
 
 The energy function for each restraint is defined as
 
   scale * (w1 * (s11-s11_obs)^2 +
            w2 * (s22-s22_obs)^2 +
            w3 * (s33-s33_obs)^2 )
 
  where w1-3 are weights specified by cstWeights. s11, s22 and s33 are
calculated from the two associated dihedral phi1 and phi2 angles via
 
      s11 = cstScale * surf1(phi1,phi2) + cstOffset
 
surf1 is interpolated from the input surface grid values.
      
      
The restraint table format consists of pairs of specifications.
 
  NAME <string>
 
  ASSIgn (selection1A) (selection1B) (selection1C) (selection1D) 
         (selection2A) (selection2B) (selection2C) (selection2D) 
           <s11_obs> <s22_obs> <s33_obs>  ! optional comment
 
The name statement specifies the name for the following assignment. If
it is omitted, a numerical name is generated.
 
The two sets of four atom selections in the ASSIgn statement specify
two dihedral angles. This statement can be split across muliple lines,
but the comment, if specified, should be on the same line as s33_obs.
 
 
  CSTMag_Restraint class
 
methods:
  name()    - the restraint name
  comment() - the restraint comment (entered after the ! in the ASSIgn
              statement)
  energy()  - the energy associated with this restraint.
 
raw members:
  phi1    -    dihedral.Dihedral objects representing the two 
  phi2         dihedral angles
 
  vphi1   -    values of these angles from the most recent energy calculation
  vphi2
 
  calcd1  -    calculated surface values
  calcd2
  calcd3
 
  obs1    -    observed surface values as input via the ASSIgn statement
  obs2         in the restraint table.
  obs3
 
 
 
 
# 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
CDSList_CSTMag_Restraint
CSTMagPot
CSTMagPot_LetterClass
Modified
ModifiedBase
Restraint_CSTMag
CSTMag_Restraint
rc_ptr_CSTMag_Restraint

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDS::rc_ptr< CSTMag_Restraint > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< CSTMag_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_CSTMag_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 CSTMagPot_LetterClass(builtins.object)
    CSTMagPot_LetterClass(*args, **kwargs)
 

 
  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'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
cstOffset(self, *args, **kwargs) -> 'float_type const'
cstScale(self, *args, **kwargs) -> 'float_type const'
cstWeights(self, *args, **kwargs) -> 'Vec3 const'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
pyXplorHelp(self, *args, **kwargs) -> 'String'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< CSTMag_Restraint > >'
rms(self, *args, **kwargs) -> 'float_type'
setCSTOffset(self, *args, **kwargs) -> 'void'
setCSTScale(self, *args, **kwargs) -> 'void'
setCSTWeights(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'
simulation(self, *args, **kwargs) -> 'Simulation *'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
angle2Vals

 
surf1

 
surf2

 
surf3

 
thisown

 
The membership flag

 
class CSTMag_Restraint(Restraint_CSTMag)
    CSTMag_Restraint(*args, **kwargs)
 

 
 
Method resolution order:
CSTMag_Restraint
Restraint_CSTMag
builtins.object

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

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

Data descriptors defined here:
calcd1

 
calcd2

 
calcd3

 
obs1

 
obs2

 
obs3

 
phi1

 
phi2

 
thisown

 
The membership flag
vphi1

 
vphi2

 

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

Data descriptors inherited from Restraint_CSTMag:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
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)
asString(self, *args, **kwargs) -> 'String'
assertClear(self, *args, **kwargs) -> 'void'
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_CSTMag(builtins.object)
    Restraint_CSTMag(*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_CSTMag(...)

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_CSTMag_Restraint(builtins.object)
    rc_ptr_CSTMag_Restraint(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'CSTMag_Restraint *'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__ref__(self, *args, **kwargs) -> 'CSTMag_Restraint &'
__repr__ = _swig_repr(self)
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) -> 'float_type'
forceDelete(self, *args, **kwargs) -> 'void'
incr(self, *args, **kwargs) -> 'void'
name(self, *args, **kwargs) -> 'String'
ptr(self, *args, **kwargs) -> 'CSTMag_Restraint *'
release(self, *args, **kwargs) -> 'CSTMag_Restraint *'
reset(self, *args, **kwargs) -> 'void'
setName(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
calcd2

 
calcd3

 
obs1

 
obs2

 
obs3

 
phi1

 
phi2

 
thisown

 
The membership flag
vphi1

 
vphi2

 

 
realCSTMagPot = class CSTMagPot(builtins.object)
    realCSTMagPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'CSTMagPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'CSTMagPot &'
__repr__ = _swig_repr(self)
addRestraints(self, *args, **kwargs) -> 'void'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
cstOffset(self, *args, **kwargs) -> 'float_type const'
cstScale(self, *args, **kwargs) -> 'float_type const'
cstWeights(self, *args, **kwargs) -> 'Vec3 const'
decrRefCnt(self, *args, **kwargs) -> 'void'
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 *'
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< CSTMag_Restraint > >'
rms(self, *args, **kwargs) -> 'float_type'
scale(self, *args, **kwargs) -> 'float_type const'
setCSTOffset(self, *args, **kwargs) -> 'void'
setCSTScale(self, *args, **kwargs) -> 'void'
setCSTWeights(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setShowAllRestraints(self, *args, **kwargs) -> 'void'
setThreshold(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, **kwargs) -> 'Simulation *'
threshold(self, *args, **kwargs) -> 'float_type const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
angle2Vals

 
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
registeredSimulations

 
surf1

 
surf2

 
surf3

 
thisown

 
The membership flag

 
Functions
       
CSTMagPot(*args)
pyXplorHelp(*args) -> 'String'