RDCode: Builder.h Source File

# 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
    00035       \return the new force field. The client is responsible for free'ing this.
    00036     */
    00037     ForceFields::ForceField *constructForceField(ROMol &mol,
    00038                                                  double vdwThresh=100.0,
    00039                                                  int confId=-1);
    00040
    00041     //! Builds and returns a UFF force field for a molecule
    00042     /*!
    00043
    00044       \param mol        the molecule to use
    00045       \param params     a vector with pointers to the ForceFields::UFF::AtomicParams
    00046                         structures to be used
    00047       \param vdwThresh  the threshold to be used in adding van der Waals terms
    00048                         to the force field. Any non-bonded contact whose current
    00049                         distance is greater than \c vdwThresh * the minimum value
    00050                         for that contact will not be included.
    00051       \param confId     the optional conformer id, if this isn't provided, the molecule's
    00052                         default confId will be used.
    00053
    00054       \return the new force field. The client is responsible for free'ing this.
    00055     */
    00056     ForceFields::ForceField *constructForceField(ROMol &mol,
    00057                                                  const AtomicParamVect &params,
    00058                                                  double vdwThresh=100.0,
    00059                                                  int confId=-1);
    00060
    00061     namespace Tools {
    00062       // these functions are primarily exposed so they can be tested.
    00063       void addBonds(const ROMol &mol,const AtomicParamVect &params,
    00064                     ForceFields::ForceField *field);
    00065       int *buildNeighborMatrix(const ROMol &mol);
    00066       void addAngles(const ROMol &mol,const AtomicParamVect &params,
    00067                      ForceFields::ForceField *field,int *neighborMatrix);
    00068       void addNonbonded(const ROMol &mol,int confId, const AtomicParamVect &params,
    00069                         ForceFields::ForceField *field,int *neighborMatrix,
    00070                         double vdwThresh=100.0);
    00071       void addTorsions(const ROMol &mol,const AtomicParamVect &params,
    00072                        ForceFields::ForceField *field,
    00073                        std::string torsionBondSmarts="[!$(*#*)&!D1]~[!$(*#*)&!D1]");
    00074       //void addInversions(const ROMol &mol,const AtomicParamVect &params,
    00075       //ForceFields::ForceField *field);
    00076     }
    00077   }
    00078 }
    00079
    00080
    00081 #endif