RDKit: Builder.h Source File

| RDKit Open-source cheminformatics and machine learning.

- Main Page
- Namespaces
- Classes
- Files

- File List
- File Members

MMFF/Builder.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2013 Paolo Tosco
3 //
4 // Copyright (C) 2004-2006 Rational Discovery LLC
5 //
6 // @@ All Rights Reserved @@
7 // This file is part of the RDKit.
8 // The contents are covered by the terms of the BSD license
9 // which is included in the file license.txt, found at the root
10 // of the RDKit source tree.
11 //
12 #ifndef _RD_MMFFBUILDER_H_
13 #define _RD_MMFFBUILDER_H_
14
15 #include <vector>
16 #include <string>
17 #include <boost/shared_array.hpp>
18 #include <boost/tuple/tuple.hpp>
19 #include <boost/cstdint.hpp>
20
21 namespace ForceFields {
22 class ForceField;
23 }
24
25 namespace RDKit {
26 class ROMol;
27 namespace MMFF {
28 class MMFFMolProperties;
29
30 //! Builds and returns a MMFF force field for a molecule
31 /*!
32
33 \param mol the molecule to use
34 \param nonBondedThresh the threshold to be used in adding non-bonded terms
35 to the force field. Any non-bonded contact whose
36 current
37 distance is greater than \c nonBondedThresh * the minimum
38 value
39 for that contact will not be included.
40 \param confId the optional conformer id, if this isn't provided, the
41 molecule's
42 default confId will be used.
43 \param ignoreInterfragInteractions if true, nonbonded terms will not be added
44 between
45 fragments
46
47 \return the new force field. The client is responsible for free'ing this.
48 */
49 ForceFields::ForceField *constructForceField(
50 ROMol &mol, double nonBondedThresh = 100.0, int confId = -1,
51 bool ignoreInterfragInteractions = true);
52
53 //! Builds and returns a MMFF force field for a molecule
54 /*!
55
56 \param mol the molecule to use
57 \param mmffMolProperties pointer to a MMFFMolProperties (as obtained by
58 a
59 call to setupMMFFForceField())
60 \param nonBondedThresh the threshold to be used in adding non-bonded terms
61 to the force field. Any non-bonded contact whose current
62 distance is greater than \c nonBondedThresh * the minimum
63 value
64 for that contact will not be included.
65 \param confId the optional conformer id, if this isn't provided, the
66 molecule's
67 default confId will be used.
68 \param ignoreInterfragInteractions if true, nonbonded terms will not be added
69 between
70 fragments
71
72 \return the new force field. The client is responsible for free'ing this.
73 */
74 ForceFields::ForceField *constructForceField(
75 ROMol &mol, MMFFMolProperties *mmffMolProperties,
76 double nonBondedThresh = 100.0, int confId = -1,
77 bool ignoreInterfragInteractions = true);
78
79 namespace Tools {
80 enum { RELATION_1_2 = 0, RELATION_1_3 = 1, RELATION_1_4 = 2, RELATION_1_X = 3 };
81 // these functions are primarily exposed so they can be tested.
82 void setTwoBitCell(boost::shared_array<boost::uint8_t> &res, unsigned int pos,
83 boost::uint8_t value);
84 boost::uint8_t getTwoBitCell(boost::shared_array<boost::uint8_t> &res,
85 unsigned int pos);
86 boost::shared_array<boost::uint8_t> buildNeighborMatrix(const ROMol &mol);
87 void addBonds(const ROMol &mol, MMFFMolProperties *mmffMolProperties,
88 ForceFields::ForceField *field);
89 void addAngles(const ROMol &mol, MMFFMolProperties *mmffMolProperties,
90 ForceFields::ForceField *field);
91 void addStretchBend(const ROMol &mol, MMFFMolProperties *mmffMolProperties,
92 ForceFields::ForceField *field);
93 void addOop(const ROMol &mol, MMFFMolProperties *mmffMolProperties,
94 ForceFields::ForceField *field);
95 void addTorsions(const ROMol &mol, MMFFMolProperties *mmffMolProperties,
96 ForceFields::ForceField *field,
97 std::string torsionBondSmarts = "[!$(*#*)&!D1]~[!$(*#*)&!D1]");
98 void addVdW(const ROMol &mol, int confId, MMFFMolProperties *mmffMolProperties,
99 ForceFields::ForceField *field,
100 boost::shared_array<boost::uint8_t> neighborMatrix,
101 double nonBondedThresh = 100.0,
102 bool ignoreInterfragInteractions = true);
103 void addEle(const ROMol &mol, int confId, MMFFMolProperties *mmffMolProperties,
104 ForceFields::ForceField *field,
105 boost::shared_array<boost::uint8_t> neighborMatrix,
106 double nonBondedThresh = 100.0,
107 bool ignoreInterfragInteractions = true);
108 }
109 }
110 }
111
112 #endif
RDKit::MMFF::Tools::getTwoBitCell
boost::uint8_t getTwoBitCell(boost::shared_array< boost::uint8_t > &res, unsigned int pos)
RDKit::MMFF::Tools::addOop
void addOop(const ROMol &mol, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field)
RDKit::MMFF::Tools::RELATION_1_2
Definition: MMFF/Builder.h:80
RDKit::MMFF::Tools::RELATION_1_3
Definition: MMFF/Builder.h:80
RDKit::MMFF::Tools::addTorsions
void addTorsions(const ROMol &mol, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field, std::string torsionBondSmarts="[!$(*#*)&!D1]~[!$(*#*)&!D1]")
RDKit::MMFF::Tools::setTwoBitCell
void setTwoBitCell(boost::shared_array< boost::uint8_t > &res, unsigned int pos, boost::uint8_t value)
RDKit::MMFF::Tools::addStretchBend
void addStretchBend(const ROMol &mol, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field)
RDKit::MMFF::Tools::RELATION_1_4
Definition: MMFF/Builder.h:80
RDKit::ROMol
ROMol is a molecule class that is intended to have a fixed topology.
Definition: ROMol.h:102
RDKit::MMFF::Tools::buildNeighborMatrix
boost::shared_array< boost::uint8_t > buildNeighborMatrix(const ROMol &mol)
ForceFields
Definition: TorsionAngleM6.h:23
RDKit::MMFF::Tools::RELATION_1_X
Definition: MMFF/Builder.h:80
RDKit
Includes a bunch of functionality for handling Atom and Bond queries.
Definition: Atom.h:28
RDKit::MMFF::Tools::addAngles
void addAngles(const ROMol &mol, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field)
RDKit::MMFF::Tools::addEle
void addEle(const ROMol &mol, int confId, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field, boost::shared_array< boost::uint8_t > neighborMatrix, double nonBondedThresh=100.0, bool ignoreInterfragInteractions=true)
RDKit::MMFF::MMFFMolProperties
Definition: MMFF/AtomTyper.h:46
RDKit::MMFF::constructForceField
ForceFields::ForceField * constructForceField(ROMol &mol, double nonBondedThresh=100.0, int confId=-1, bool ignoreInterfragInteractions=true)
Builds and returns a MMFF force field for a molecule.
ForceFields::ForceField
A class to store forcefields and handle minimization.
Definition: ForceField.h:56
RDKit::MMFF::Tools::addVdW
void addVdW(const ROMol &mol, int confId, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field, boost::shared_array< boost::uint8_t > neighborMatrix, double nonBondedThresh=100.0, bool ignoreInterfragInteractions=true)
RDKit::MMFF::Tools::addBonds
void addBonds(const ROMol &mol, MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field)