Builder.h

Go to the documentation of this file.
00001 //
00002 //  Copyright (C) 2004-2006 Rational Discovery LLC
00003 //
00004 //   @@ All Rights Reserved  @@
00005 //
00006 #ifndef _RD_UFFBUILDER_H_
00007 #define _RD_UFFBUILDER_H_
00008 
00009 #include <vector>
00010 #include <string>
00011 
00012 namespace ForceFields {
00013   class ForceField;
00014   namespace UFF {
00015     class AtomicParams;
00016   }
00017 }
00018 
00019 namespace RDKit {
00020   class ROMol;
00021   namespace UFF {
00022     typedef std::vector<const ForceFields::UFF::AtomicParams *> AtomicParamVect;
00023 
00024     //! Builds and returns a UFF force field for a molecule
00025     /*!
00026       
00027       \param mol        the molecule to use
00028       \param vdwThresh  the threshold to be used in adding van der Waals terms
00029                         to the force field. Any non-bonded contact whose current
00030                         distance is greater than \c vdwThresh * the minimum value
00031                         for that contact will not be included.
00032       \param confId     the optional conformer id, if this isn't provided, the molecule's
00033                         default confId will be used.
00034       \param ignoreInterfragInteractions if true, nonbonded terms will not be added between
00035                                          fragments
00036 
00037       \return the new force field. The client is responsible for free'ing this.
00038     */
00039     ForceFields::ForceField *constructForceField(ROMol &mol,
00040                                                  double vdwThresh=100.0,
00041                                                  int confId=-1,
00042                                                  bool ignoreInterfragInteractions=true);
00043 
00044     //! Builds and returns a UFF force field for a molecule
00045     /*!
00046       
00047       \param mol        the molecule to use
00048       \param params     a vector with pointers to the ForceFields::UFF::AtomicParams
00049                         structures to be used
00050       \param vdwThresh  the threshold to be used in adding van der Waals terms
00051                         to the force field. Any non-bonded contact whose current
00052                         distance is greater than \c vdwThresh * the minimum value
00053                         for that contact will not be included.
00054       \param confId     the optional conformer id, if this isn't provided, the molecule's
00055                         default confId will be used.
00056       \param ignoreInterfragInteractions if true, nonbonded terms will not be added between
00057                                          fragments
00058     
00059       \return the new force field. The client is responsible for free'ing this.
00060     */
00061     ForceFields::ForceField *constructForceField(ROMol &mol,
00062                                                  const AtomicParamVect &params,
00063                                                  double vdwThresh=100.0,
00064                                                  int confId=-1,
00065                                                  bool ignoreInterfragInteractions=true);
00066 
00067     namespace Tools {
00068       // these functions are primarily exposed so they can be tested.
00069       void addBonds(const ROMol &mol,const AtomicParamVect &params,
00070                     ForceFields::ForceField *field);
00071       int *buildNeighborMatrix(const ROMol &mol);
00072       void addAngles(const ROMol &mol,const AtomicParamVect &params,
00073                      ForceFields::ForceField *field,int *neighborMatrix);
00074       void addNonbonded(const ROMol &mol,int confId, const AtomicParamVect &params,
00075                         ForceFields::ForceField *field,int *neighborMatrix,
00076                         double vdwThresh=100.0,bool ignoreInterfragInteractions=true);
00077       void addTorsions(const ROMol &mol,const AtomicParamVect &params,
00078                        ForceFields::ForceField *field,
00079                        std::string torsionBondSmarts="[!$(*#*)&!D1]~[!$(*#*)&!D1]");
00080       //void addInversions(const ROMol &mol,const AtomicParamVect &params,
00081       //ForceFields::ForceField *field);
00082     }
00083   }
00084 }
00085 
00086 
00087 #endif

Generated on Fri Apr 3 06:03:01 2009 for RDCode by  doxygen 1.5.6