RDKit
Open-source cheminformatics and machine learning.
Loading...
Searching...
No Matches
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.
 
 ParamCollection (std::string paramData)
 

Static Public Member Functions

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

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 113 of file UFF/Params.h.

Constructor & Destructor Documentation

◆ ParamCollection()

ForceFields::UFF::ParamCollection::ParamCollection ( std::string paramData)

Member Function Documentation

◆ getParams()

static const 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.

◆ operator()()

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 137 of file UFF/Params.h.

References symbol.


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