hbPot
index


#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_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();
 
 
 
 
  acceptors   - array of all possible proton acceptors represented by 
  donors      - array of all possible proton donors
 
  hbonds() - return a sequence of (a,d) tuples representing identified
             hydrogen bonds. The values of a and d  are indices into the
             acceptors and donors member arrays, respectively. 
 
  HBPot_DA class
 
    Members:
  
      atom      - atom.Atom (donor or acceptor) involved in hydrogen bond
      nextAtom  - atom.Atom atom bonded to the atom member, used to define
                  hydrogen bonding geometry.
     typeNum
 
  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_DAClass
CDSList_MapType
CDSList_Pair_int_int
HBBasePot_HBKernel
HBPot_LetterClass
HBBase_DAClass
HBKernel
HBPot
HBPot_DA
HBPot_Geom
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_DAClass(builtins.object)
    CDSList_DAClass(*args)
 

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

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 HBBasePot_HBKernel(builtins.object)
    HBBasePot_HBKernel(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
acceptors(self, *args, **kwargs) -> 'CDSList< HBBasePot< HBKernel >::DAType > const &'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
donors(self, *args, **kwargs) -> 'CDSList< HBBasePot< HBKernel >::DAType > const &'
findAcceptorsDonors(self, *args, **kwargs) -> 'void'
hbonds(self, *args, **kwargs) -> 'CDSList< Pair< int,int > > const &'
moveTol(self, *args, **kwargs) -> 'float_type const'
numRestraints(self, *args, **kwargs) -> 'int'
rMax(self, *args, **kwargs) -> 'float_type const'
rOn(self, *args, **kwargs) -> 'float_type const'
residCutoff(self, *args, **kwargs) -> 'int 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'
setResidCutoff(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

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

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 HBBase_DAClass(builtins.object)
    HBBase_DAClass(*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_HBBase_DAClass(...)

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 HBKernel(builtins.object)
    HBKernel(*args, **kwargs)
 

 
  Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
construct(self, *args, **kwargs) -> 'void'
energyMaybeDeriv(self, *args, **kwargs) -> 'float_type'
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'
setThresholdStr(self, *args, **kwargs) -> 'void'
thresholdStr(self, *args, **kwargs) -> 'String const'
violated(self, *args, **kwargs) -> 'bool'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
surfMap

 
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_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(HBBasePot_HBKernel)
    HBPot_LetterClass(*args, **kwargs)
 

 
 
Method resolution order:
HBPot_LetterClass
HBBasePot_HBKernel
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
acceptors(self, *args, **kwargs) -> 'CDSList< HBPot_DA > const &'
donors(self, *args, **kwargs) -> 'CDSList< HBPot_DA > const &'
energy(self, *args, **kwargs) -> 'float_type'
getGeom(self, *args, **kwargs) -> 'HBPot_Geom'
getMapString(self, *args, **kwargs) -> 'String'
info(self, *args, **kwargs) -> 'String'
pyXplorHelp(self, *args, **kwargs) -> 'String'
violated(self, *args, **kwargs) -> 'bool'

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

Data descriptors defined here:
thisown

 
The membership flag

Methods inherited from HBBasePot_HBKernel:
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
findAcceptorsDonors(self, *args, **kwargs) -> 'void'
hbonds(self, *args, **kwargs) -> 'CDSList< Pair< int,int > > const &'
moveTol(self, *args, **kwargs) -> 'float_type const'
numRestraints(self, *args, **kwargs) -> 'int'
rMax(self, *args, **kwargs) -> 'float_type const'
rOn(self, *args, **kwargs) -> 'float_type const'
residCutoff(self, *args, **kwargs) -> 'int 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'
setResidCutoff(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
verbose(self, *args, **kwargs) -> 'bool const'
violations(self, *args, **kwargs) -> 'float_type'

Data descriptors inherited from HBBasePot_HBKernel:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

 
list of weak references to the object (if defined)

 
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)
asString(self, *args, **kwargs) -> 'String'
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)
acceptors(self, *args, **kwargs) -> 'CDSList< HBPot_DA > const &'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
decrRefCnt(self, *args, **kwargs) -> 'void'
donors(self, *args, **kwargs) -> 'CDSList< HBPot_DA > const &'
energy(self, *args, **kwargs) -> 'float_type'
findAcceptorsDonors(self, *args, **kwargs) -> 'void'
getGeom(self, *args, **kwargs) -> 'HBPot_Geom'
getMapString(self, *args, **kwargs) -> 'String'
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'
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'
residCutoff(self, *args, **kwargs) -> 'int const'
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'
setResidCutoff(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
setThreshold(self, *args, **kwargs) -> 'void'
setVerbose(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'
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)
instanceDataCleanup

 
instanceDataCreate

 
instanceData_

 
modified

 
registeredSimulations

 
thisown

 
The membership flag

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

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