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


#ifndef __hbPot_hh__
#define __hbPot_hh__
 
#include <pot.hh>
#include <cdsList.hh>
#include <cdsMap.hh>
#include <atomSel.hh>
//#include <cdsString.hh>
//#include <spline3D.hh>
#include <auto_ptr.hh>
//#include <accessor.hh>
 
class HBSurf;
 
struct HBPot_DAType {
  int    num;
  String typeStr;
  String sel;
  String nextSel;
};
 
const int aTypeBits = 8;
const int dTypeBits = 8;
const int deltaResidBits = 3;
 
struct HBPot_TypeInfo {
  unsigned char aType : aTypeBits;
  unsigned char dType : dTypeBits;
  unsigned char deltaResid : deltaResidBits;
};
 
struct HBPot_MapType {
  String typePair;
  String filename;
  int deltaResid;
  float_type scale;
  HBPot_TypeInfo id;
  HBSurf* surf;
};
 
struct HBPot_DA {
  Atom atom;
  Atom nextAtom;
  int  typeNum;
  HBPot_DA() {} // required by CDSList
  HBPot_DA(Atom atom,
           Atom nextAtom,
           int typeNum) : atom(atom), nextAtom(nextAtom), typeNum(typeNum) {}
};
 
struct HBPot_Geom {
  float_type r;
  float_type theta;
  float_type phi;
};
 
class HBPot : public Pot {
 
  AtomSel sel;
  CDSList<HBPot_DAType> aList;
  CDSList<HBPot_DAType> dList;
  CDSList<HBPot_MapType> mappings;
  
  CDSList< Pair<int,int> > hbonds_;
 
  class NeighborBin; // list of donors near each acceptor
  CDS::auto_ptr<NeighborBin> neighborBin;
 
  CDSVector<Vec3>       savePos;
 
  CDSMap<String,HBSurf*> surfMap;
 
public:
 
  HBPot(const String& instanceName,
        const CDSList<HBPot_DAType>& aList,
        const CDSList<HBPot_DAType>& dList,
        const CDSList<HBPot_MapType>& mappings,
              AtomSel selection     = AtomSel("not pseudo"),
        const String& thresholdStr  = "",
        const bool    verbose       = false
        );
 
  ~HBPot();
 
  CDSList<HBPot_DA> acceptors;
  CDSList<HBPot_DA> donors;
 
  // indices into acceptors and donors, respectively
  const CDSList<Pair<int,int> >& hbonds() { 
   modified.update(); return hbonds_; }
 
  void findAcceptorsDonors();
 
  HBPot_TypeInfo genPairType(const HBPot_DA& acceptor,
                             const HBPot_DA& donor   ,
                             const int       deltaResid) const;
  int getMap(const HBPot_DA& acceptor,
             const HBPot_DA& donor   ) const;
  String getMapString(const HBPot_DA& acceptor,
                   const HBPot_DA& donor   ) const {
   return mappings[ getMap(acceptor,donor) ].filename;
  }
  HBPot_MapType getMapping(const int index) const {
   // no boudns checking!
   return mappings[ index ];
  }
 
 
  bool movedTooMuch();
  void updateNeighborList();
  CDSList<CDSList<int> > neighbors;   // neighboring atoms to be considered
 
  ACCESSOR(thresholdStr,ThresholdStr,String);
  ACCESSOR(verbose,Verbose,bool);
  ACCESSOR(rMax,RMax,float_type); // usually set from HBSurf
  ACCESSOR(rOn,ROn,float_type); // distance where the cutoff function --> 1
  ACCESSOR(moveTol,MoveTol,float_type); // usually set from HBSurf
 
  AtomSel selection() { return sel; }
 
  String info() const;
 
  float_type calcEnergy();
  float_type calcEnergyAndDerivs(DerivList*);
 
  float_type rms() { return -1; }
 
  float_type energy(const HBPot_DA& acceptor,
                    const HBPot_DA& donor   ) const;
  void deriv(const HBPot_DA& acceptor,
             const HBPot_DA& donor   ,
                   DerivList& dlist);
 
  HBPot_Geom getGeom(const HBPot_DA& acceptor,
                     const HBPot_DA& donor   ) const;
 
 
  bool violated(const HBPot_DA& acceptor,
                const HBPot_DA& donor   ) const;
  float_type violations();
  int numRestraints() const { return -1; }
                          
};
 
#endif /* __hbPot_hh__ */
 
 
 
# 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_CDSList_int
CDSList_DA
CDSList_DAType
CDSList_MapType
CDSList_Pair_int_int
HBPot
HBPot_DA
HBPot_DAType
HBPot_Geom
HBPot_LetterClass
HBPot_MapType
HBPot_TypeInfo
Modified
ModifiedBase
Pair_int_int

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDSList< int > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDSList< int > >'
__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_CDSList_int(...)

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< HBPot_DA >'
__getslice__(self, *args, **kwargs) -> 'CDSList< HBPot_DA >'
__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_DA(...)

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< HBPot_DAType >'
__getslice__(self, *args, **kwargs) -> 'CDSList< HBPot_DAType >'
__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_DAType(...)

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< HBPot_MapType >'
__getslice__(self, *args, **kwargs) -> 'CDSList< HBPot_MapType >'
__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_MapType(...)

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< Pair< int,int > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< Pair< int,int > >'
__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_Pair_int_int(...)

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

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

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
nextAtom

 
thisown

 
The membership flag
typeNum

 

 
class HBPot_DAType(builtins.object)
    HBPot_DAType(*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_HBPot_DAType(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
num

 
sel

 
thisown

 
The membership flag
typeStr

 

 
class HBPot_Geom(builtins.object)
    HBPot_Geom(*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_HBPot_Geom(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
r

 
theta

 
thisown

 
The membership flag

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

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'float_type'
findAcceptorsDonors(self, *args, **kwargs) -> 'void'
genPairType(self, *args, **kwargs) -> 'HBPot_TypeInfo'
getGeom(self, *args, **kwargs) -> 'HBPot_Geom'
getMap(self, *args, **kwargs) -> 'int'
getMapString(self, *args, **kwargs) -> 'String'
getMapping(self, *args, **kwargs) -> 'HBPot_MapType'
hbonds(self, *args, **kwargs) -> 'CDSList< Pair< int,int > > const &'
info(self, *args, **kwargs) -> 'String'
moveTol(self, *args, **kwargs) -> 'float_type const'
movedTooMuch(self, *args, **kwargs) -> 'bool'
numRestraints(self, *args, **kwargs) -> 'int'
pyXplorHelp(self, *args, **kwargs) -> 'String'
rMax(self, *args, **kwargs) -> 'float_type const'
rOn(self, *args, **kwargs) -> 'float_type const'
rms(self, *args, **kwargs) -> 'float_type'
selection(self, *args, **kwargs) -> 'AtomSel'
setMoveTol(self, *args, **kwargs) -> 'void'
setRMax(self, *args, **kwargs) -> 'void'
setROn(self, *args, **kwargs) -> 'void'
setThresholdStr(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
thresholdStr(self, *args, **kwargs) -> 'String const'
updateNeighborList(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violated(self, *args, **kwargs) -> 'bool'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
donors

 
neighbors

 
thisown

 
The membership flag

 
class HBPot_MapType(builtins.object)
    HBPot_MapType(*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_HBPot_MapType(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
filename

 
id

 
scale

 
surf

 
thisown

 
The membership flag
typePair

 

 
class HBPot_TypeInfo(builtins.object)
    HBPot_TypeInfo(*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_HBPot_TypeInfo(...)

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
dType

 
deltaResid

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

 
  Methods defined here:
__eq__(self, *args, **kwargs) -> 'bool'
Return self==value.
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
b

 
thisown

 
The membership flag

Data and other attributes defined here:
__hash__ = None

 
realHBPot = class HBPot(builtins.object)
    realHBPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'HBPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'HBPot &'
__repr__ = _swig_repr(self)
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
decrRefCnt(self, *args, **kwargs) -> 'void'
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'float_type'
findAcceptorsDonors(self, *args, **kwargs) -> 'void'
genPairType(self, *args, **kwargs) -> 'HBPot_TypeInfo'
getGeom(self, *args, **kwargs) -> 'HBPot_Geom'
getMap(self, *args, **kwargs) -> 'int'
getMapString(self, *args, **kwargs) -> 'String'
getMapping(self, *args, **kwargs) -> 'HBPot_MapType'
hbonds(self, *args, **kwargs) -> 'CDSList< Pair< int,int > > const &'
incrRefCnt(self, *args, **kwargs) -> 'void'
info(self, *args, **kwargs) -> 'String'
instanceData(self, *args, **kwargs) -> 'PyObject *'
instanceName(self, *args, **kwargs) -> 'char const *'
moveTol(self, *args, **kwargs) -> 'float_type const'
movedTooMuch(self, *args, **kwargs) -> 'bool'
numRestraints(self, *args, **kwargs) -> 'int'
potName(self, *args, **kwargs) -> 'char const *'
pyXplorHelp(self, *args, **kwargs) -> 'String'
rMax(self, *args, **kwargs) -> 'float_type const'
rOn(self, *args, **kwargs) -> 'float_type const'
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'
selection(self, *args, **kwargs) -> 'AtomSel'
setMoveTol(self, *args, **kwargs) -> 'void'
setRMax(self, *args, **kwargs) -> 'void'
setROn(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setThresholdStr(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
threshold(self, *args, **kwargs) -> 'float_type const'
thresholdStr(self, *args, **kwargs) -> 'String const'
unRegister(self, *args, **kwargs) -> 'void'
updateDelta(self, *args, **kwargs) -> 'void'
updateNeighborList(self, *args, **kwargs) -> 'void'
updateValues(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violated(self, *args, **kwargs) -> 'bool'
violations(self, *args, **kwargs) -> 'float_type'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
donors

 
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
neighbors

 
registeredSimulations

 
thisown

 
The membership flag

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

 
Data
        aTypeBits = 8
cvar = <Swig global variables>
dTypeBits = 8
deltaResidBits = 3