| dihedralPot |
index |
1D Restraint on Dihedral angle - replacement for CDIH XPLOR term
energy of restraint is given by w * (angle - angle_1)**e, where angles are
given in degrees, e is given by expon(), and w is given by the per-restraint
value of scale(). The overall energy is the sum of such terms multiplied by
the DihedralPot's scale() value.
FIX: full 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 | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Functions | ||
| ||