MMFF/Builder.h
Go to the documentation of this file.
//
// Copyright (C) 2013 Paolo Tosco
//
// Copyright (C) 2004-2006 Rational Discovery LLC
//
// @@ All Rights Reserved @@
// This file is part of the RDKit.
// The contents are covered by the terms of the BSD license
// which is included in the file license.txt, found at the root
// of the RDKit source tree.
//
#ifndef _RD_MMFFBUILDER_H_
#define _RD_MMFFBUILDER_H_
#include <vector>
#include <string>
#include <boost/shared_array.hpp>
#include <boost/tuple/tuple.hpp>
#include <boost/cstdint.hpp>
namespace ForceFields {
class ForceField;
}
namespace RDKit {
class ROMol;
namespace MMFF {
//! Builds and returns a MMFF force field for a molecule
/*!
\param mol the molecule to use
\param nonBondedThresh the threshold to be used in adding non-bonded terms
to the force field. Any non-bonded contact whose current
distance is greater than \c nonBondedThresh * the minimum value
for that contact will not be included.
\param confId the optional conformer id, if this isn't provided, the molecule's
default confId will be used.
\param ignoreInterfragInteractions if true, nonbonded terms will not be added between
fragments
\return the new force field. The client is responsible for free'ing this.
*/
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
/*!
\param mol the molecule to use
\param mmffMolProperties pointer to a MMFFMolProperties (as obtained by a
call to setupMMFFForceField())
\param nonBondedThresh the threshold to be used in adding non-bonded terms
to the force field. Any non-bonded contact whose current
distance is greater than \c nonBondedThresh * the minimum value
for that contact will not be included.
\param confId the optional conformer id, if this isn't provided, the molecule's
default confId will be used.
\param ignoreInterfragInteractions if true, nonbonded terms will not be added between
fragments
\return the new force field. The client is responsible for free'ing this.
*/
ForceFields::ForceField *constructForceField(ROMol &mol, MMFFMolProperties *mmffMolProperties,
double nonBondedThresh = 100.0, int confId = -1, bool ignoreInterfragInteractions = true);
namespace Tools {
enum {
RELATION_1_2 = 0,
RELATION_1_3 = 1,
RELATION_1_4 = 2,
RELATION_1_X = 3
};
// these functions are primarily exposed so they can be tested.
void setTwoBitCell(boost::shared_array<boost::uint8_t> &res,
unsigned int pos, boost::uint8_t value);
boost::uint8_t getTwoBitCell
(boost::shared_array<boost::uint8_t> &res, unsigned int pos);
boost::shared_array<boost::uint8_t> buildNeighborMatrix(const ROMol &mol);
void addBonds(const ROMol &mol,
MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field);
void addAngles(const ROMol &mol,
MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field);
void addStretchBend(const ROMol &mol,
MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field);
void addOop(const ROMol &mol,
MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field);
void addTorsions(const ROMol &mol,
MMFFMolProperties *mmffMolProperties, ForceFields::ForceField *field,
std::string torsionBondSmarts = "[!$(*#*)&!D1]~[!$(*#*)&!D1]");
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);
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);
}
}
}
#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:71
RDKit::MMFF::Tools::RELATION_1_3
Definition: MMFF/Builder.h:72
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:73
RDKit::ROMol
ROMol is a molecule class that is intended to have a fixed topology.
Definition: ROMol.h:105
RDKit::MMFF::Tools::buildNeighborMatrix
boost::shared_array< boost::uint8_t > buildNeighborMatrix(const ROMol &mol)
ForceFields
Definition: MMFF/Builder.h:22
RDKit::MMFF::Tools::RELATION_1_X
Definition: MMFF/Builder.h:74
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:52
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)