RDCode: ChiralViolationContrib.h Source File

- Main Page
- Namespaces
- Classes
- Files
- Directories

# ChiralViolationContrib.h

Go to the documentation of this file.

    00001 //
    00002 // Created by Santosh Putta, Nov 2006
    00003 //
    00004 #ifndef __RD_CHIRALVIOLATIONCONTRIB_H__
    00005 #define __RD_CHIRALVIOLATIONCONTRIB_H__
    00006
    00007 #include <ForceField/Contrib.h>
    00008
    00009 namespace DistGeom {
    00010   class ChiralSet;
    00011
    00012   //! A term to capture the violation of chirality at an atom center
    00013   //!
    00014   class ChiralViolationContrib : public ForceFields::ForceFieldContrib {
    00015   public:
    00016     ChiralViolationContrib() : d_idx1(0), d_idx2(0), d_idx3(0), d_idx4(0),
    00017       d_volLower(0.0), d_volUpper(0.0), d_weight(0.0){};
    00018
    00019     //! Constructor
    00020     /*!
    00021       \param owner      pointer to the owning forcefield
    00022       \param cset       a chiral set containing the four chiral atom ids (in sequence)
    00023                         and the upper and lower limits on the signed chiral volume
    00024       \param weight     (optional) the weight to be used for this contrib
    00025
    00026     */
    00027     ChiralViolationContrib(ForceFields::ForceField *owner, const ChiralSet *cset, double weight=1.0);
    00028
    00029     //! return the contribution of this contrib to the energy of a given state
    00030     double getEnergy(double *pos) const;
    00031
    00032     //! calculate the contribution of this contrib to the gradient at a given state
    00033     void getGrad(double *pos, double *grad) const;
    00034
    00035   private:
    00036     unsigned int d_idx1, d_idx2, d_idx3, d_idx4;
    00037     double d_volLower;
    00038     double d_volUpper;
    00039     double d_weight;
    00040   };
    00041 }
    00042
    00043 #endif