RDKit
Open-source cheminformatics and machine learning.
ForceFields::UFF::ParamCollection Class Reference

singleton class for retrieving UFF AtomParams More...

#include <Params.h>

Public Member Functions

const AtomicParamsoperator() (const std::string &symbol) const
 Looks up the parameters for a particular UFF key and returns them. More...
 

Static Public Member Functions

static ParamCollectiongetParams (const std::string &paramData="")
 gets a pointer to the singleton ParamCollection More...
 

Detailed Description

singleton class for retrieving UFF AtomParams

Use the singleton like this:

ParamCollection *params=ParamCollection::getParams();
const AtomParams *ap=params("C_3");

If you have your own parameter data, it can be supplied as a string:

ParamCollection *params=ParamCollection::getParams(myParamData);
const AtomParams *ap=params("C_3");

You are responsible for making sure that the data is in the correct format (see Params.cpp for an example).

Definition at line 111 of file UFF/Params.h.

Member Function Documentation

static ParamCollection* ForceFields::UFF::ParamCollection::getParams ( const std::string &  paramData = "")
static

gets a pointer to the singleton ParamCollection

Parameters
paramData(optional) a string with parameter data. See below for more information about this argument
Returns
a pointer to the singleton ParamCollection

Notes:

  • do not delete the pointer returned here
  • if the singleton ParamCollection has already been instantiated and paramData is empty, the singleton will be returned.
  • if paramData is empty and the singleton ParamCollection has not yet been instantiated, the default UFF parameters (from Params.cpp) will be used.
  • if paramData is supplied, a new singleton will be instantiated. The current instantiation (if there is one) will be deleted.
const AtomicParams* ForceFields::UFF::ParamCollection::operator() ( const std::string &  symbol) const
inline

Looks up the parameters for a particular UFF key and returns them.

Returns
a pointer to the AtomicParams object, NULL on failure.

Definition at line 135 of file UFF/Params.h.

References RDKit::paramData.


The documentation for this class was generated from the following file: