File: ChiralViolationContrib.h

package info (click to toggle)
rdkit 201203-3
  • links: PTS, VCS
  • area: main
  • in suites: wheezy
  • size: 37,840 kB
  • sloc: cpp: 93,902; python: 51,897; java: 5,192; ansic: 3,497; xml: 2,499; sql: 1,641; yacc: 1,518; lex: 1,076; makefile: 325; fortran: 183; sh: 153; cs: 51
file content (43 lines) | stat: -rw-r--r-- 1,369 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
//
// Created by Santosh Putta, Nov 2006
//
#ifndef __RD_CHIRALVIOLATIONCONTRIB_H__
#define __RD_CHIRALVIOLATIONCONTRIB_H__

#include <ForceField/Contrib.h>

namespace DistGeom {
  class ChiralSet;
  
  //! A term to capture the violation of chirality at an atom center
  //!
  class ChiralViolationContrib : public ForceFields::ForceFieldContrib {
  public:
    ChiralViolationContrib() : d_idx1(0), d_idx2(0), d_idx3(0), d_idx4(0), 
      d_volLower(0.0), d_volUpper(0.0), d_weight(0.0){};
    
    //! Constructor
    /*!
      \param owner      pointer to the owning forcefield
      \param cset       a chiral set containing the four chiral atom ids (in sequence)
                        and the upper and lower limits on the signed chiral volume
      \param weight     (optional) the weight to be used for this contrib
                        
    */
    ChiralViolationContrib(ForceFields::ForceField *owner, const ChiralSet *cset, double weight=1.0);
    
    //! return the contribution of this contrib to the energy of a given state 
    double getEnergy(double *pos) const;
    
    //! calculate the contribution of this contrib to the gradient at a given state
    void getGrad(double *pos, double *grad) const;

  private:
    unsigned int d_idx1, d_idx2, d_idx3, d_idx4;
    double d_volLower;
    double d_volUpper;
    double d_weight;
  };
}

#endif