Python: module dihedralPot
 
dihedralPot
index


1D Restraint on Dihedral angle - replacement for CDIH XPLOR term
 
FIX: documentation needed
 
#include <pot.hh>
#include <restraint.hh>
#include <dihedral.hh>
#include <atomSel.hh>    
 
// ONE-DIMENSIONAL POTENTIAL
 
class Dihedral_Restraint;
 
class DihedralPot: public Pot {
 
private:
  AtomSel selection_;
  CDSList<CDS::rc_ptr<Dihedral_Restraint> > restraints_;
   
 
public:
  
  DihedralPot(const String&     instanceName,
                    AtomSel&    selection   );
 
 
  float_type calcEnergy();
  float_type calcEnergyAndDerivs(DerivList*);
 
  void removeRestraint(const int rNum);  //FIX: add this!
  void addRestraints(const String& restraints);
 
  float_type violations();
  float_type rms();
  int numRestraints() const { return restraints_.size(); }     //const?!!!
 
  ACCESSOR(allowBadRestraints,AllowBadRestraints,bool);
  MODACCESSOR(showAllRestraints,ShowAllRestraints,bool);
 
  AtomSel     selection() const { return selection_; }
  Simulation* simulation() const 
  { return (Simulation*)(selection_.simulation()); }
 
  String showViolations();
  String info();
 
  CDSList<CDS::rc_ptr<Dihedral_Restraint> > restraints() {
    modified.update();
    modified.set();
    return restraints_;
  }
 
  ACCESSOR(comment, Comment, String);
  ACCESSOR(verbose, Verbose, bool);
 
  friend class Dihedral_Restraint;
 
};
 
 
class Dihedral_Restraint: public Restraint<const DihedralPot> {
 
private:
  //String name_;
  float_type calcd_;
  float_type obs_;
  float_type err_;
  int expon_;
  float_type scale_;
  String comment_;
 
public:
  Dihedral_Restraint(const DihedralPot* const pot, const String& name);
  float_type energy();
  void deriv(DerivList&);
  //String name() const { return name_; }  //overrides Restraint version
 
  //make this block private?
  Dihedral dihedral;
  //  float_type angle1val;
 
  String name() const;
 
  //accessors
  float_type calcd() { return calcd_ * 180/PI; }
  float_type obs()  const { return  obs_  * 180/PI; }
  float_type err()  const { return  err_  * 180/PI; }
  int expon()  const { return expon_; }
  float_type scale()  const { return scale_; }
  String comment()  const { return  comment_; }
 
  void setObs(const float_type& val)  { obs_=val *PI/180; }
  void setErr(const float_type& val)  { err_ = val *PI/180; }
  void setExpon(const int& val)       { expon_ = val; }
  void setScale(const float_type& val){ scale_ = val; }
  void setComment(const String& val)  { comment_ = val; }
  
 
 
  friend ostream& operator<<(ostream& s, const Dihedral_Restraint& x);
  friend istream& operator>>(istream& s, Dihedral_Restraint& r);
  friend class DihedralPot;
 
};
 
#endif
 
 
 
# 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_DihedralRestraint
DihedralPot
DihedralPot_LetterClass
Modified
ModifiedBase
Restraint_DihedralPot
Dihedral_Restraint
rc_ptr_Dihedral_Restraint

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

 
  Methods defined here:
__delitem__(self, *args, **kwargs) -> 'void'
__getitem__(self, *args) -> 'CDSList< CDS::rc_ptr< Dihedral_Restraint > >'
__getslice__(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< Dihedral_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_DihedralRestraint(...)

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 DihedralPot_LetterClass(builtins.object)
    DihedralPot_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'
allowBadRestraints(self, *args, **kwargs) -> 'bool const'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
comment(self, *args, **kwargs) -> 'String const'
info(self, *args, **kwargs) -> 'String'
numRestraints(self, *args, **kwargs) -> 'int'
pyXplorHelp(self, *args, **kwargs) -> 'String'
removeRestraint(self, *args, **kwargs) -> 'void'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< Dihedral_Restraint > >'
rms(self, *args, **kwargs) -> 'float_type'
selection(self, *args, **kwargs) -> 'AtomSel'
setAllowBadRestraints(self, *args, **kwargs) -> 'void'
setComment(self, *args, **kwargs) -> 'void'
setShowAllRestraints(self, *args, **kwargs) -> 'void'
setVerbose(self, *args, **kwargs) -> 'void'
showAllRestraints(self, *args, **kwargs) -> 'bool const'
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_DihedralPot_LetterClass(...)

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 Dihedral_Restraint(Restraint_DihedralPot)
    Dihedral_Restraint(*args, **kwargs)
 

 
 
Method resolution order:
Dihedral_Restraint
Restraint_DihedralPot
builtins.object

Methods defined here:
__init__(self, *args, **kwargs)
Initialize self.  See help(type(self)) for accurate signature.
__repr__ = _swig_repr(self)
calcd(self, *args, **kwargs) -> 'float_type'
comment(self, *args, **kwargs) -> 'String'
deriv(self, *args, **kwargs) -> 'void'
energy(self, *args, **kwargs) -> 'float_type'
err(self, *args, **kwargs) -> 'float_type'
expon(self, *args, **kwargs) -> 'int'
name(self, *args, **kwargs) -> 'String'
obs(self, *args, **kwargs) -> 'float_type'
scale(self, *args, **kwargs) -> 'float_type'
setComment(self, *args, **kwargs) -> 'void'
setErr(self, *args, **kwargs) -> 'void'
setExpon(self, *args, **kwargs) -> 'void'
setObs(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'

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

Data descriptors defined here:
dihedral

 
thisown

 
The membership flag

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

Data descriptors inherited from Restraint_DihedralPot:
__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_DihedralPot(builtins.object)
    Restraint_DihedralPot(*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_DihedralPot(...)

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

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'Dihedral_Restraint *'
__init__(self, *args)
Initialize self.  See help(type(self)) for accurate signature.
__ref__(self, *args, **kwargs) -> 'Dihedral_Restraint &'
__repr__ = _swig_repr(self)
calcd(self, *args, **kwargs) -> 'float_type'
comment(self, *args, **kwargs) -> 'String'
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'
err(self, *args, **kwargs) -> 'float_type'
expon(self, *args, **kwargs) -> 'int'
forceDelete(self, *args, **kwargs) -> 'void'
incr(self, *args, **kwargs) -> 'void'
name(self, *args, **kwargs) -> 'String'
obs(self, *args, **kwargs) -> 'float_type'
ptr(self, *args, **kwargs) -> 'Dihedral_Restraint *'
release(self, *args, **kwargs) -> 'Dihedral_Restraint *'
reset(self, *args, **kwargs) -> 'void'
scale(self, *args, **kwargs) -> 'float_type'
setComment(self, *args, **kwargs) -> 'void'
setErr(self, *args, **kwargs) -> 'void'
setExpon(self, *args, **kwargs) -> 'void'
setName(self, *args, **kwargs) -> 'void'
setObs(self, *args, **kwargs) -> 'void'
setScale(self, *args, **kwargs) -> 'void'
violated(self, *args, **kwargs) -> 'bool'

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

Data descriptors defined here:
__dict__

 
dictionary for instance variables (if defined)
__weakref__

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

 
thisown

 
The membership flag

 
realDihedralPot = class DihedralPot(builtins.object)
    realDihedralPot(*args)
 

 
  Methods defined here:
__deref__(self, *args, **kwargs) -> 'DihedralPot *'
__init__(self, *args)
__oldinit__ = __init__(self, *args, **kwargs)
__ref__(self, *args, **kwargs) -> 'DihedralPot &'
__repr__ = _swig_repr(self)
addRestraints(self, *args, **kwargs) -> 'void'
allowBadRestraints(self, *args, **kwargs) -> 'bool const'
calcEnergy(self, *args, **kwargs) -> 'float_type'
calcEnergyAndDerivs(self, *args, **kwargs) -> 'float_type'
comment(self, *args, **kwargs) -> 'String 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'
removeRestraint(self, *args, **kwargs) -> 'void'
resetInstanceName(self, *args, **kwargs) -> 'void'
resetPotName(self, *args, **kwargs) -> 'void'
restraints(self, *args, **kwargs) -> 'CDSList< CDS::rc_ptr< Dihedral_Restraint > >'
rms(self, *args, **kwargs) -> 'float_type'
scale(self, *args, **kwargs) -> 'float_type const'
selection(self, *args, **kwargs) -> 'AtomSel'
setAllowBadRestraints(self, *args, **kwargs) -> 'void'
setComment(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'
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_DihedralPot(...)

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
       
DihedralPot(*args)
pyXplorHelp(*args) -> 'String'