votca 2024.2-dev
Loading...
Searching...
No Matches
votca::tools::Calculator Class Referenceabstract

Base class for all calculators. More...

#include <calculator.h>

Inheritance diagram for votca::tools::Calculator:

Public Member Functions

 Calculator ()=default
 
virtual ~Calculator ()=default
 
virtual std::string Identify () const =0
 Calculator name.
 
virtual std::string Package () const =0
 Package name.
 
virtual void Initialize (const Property &user_options)=0
 Initializes a calculator from an XML file with options.
 
void setnThreads (Index nThreads)
 Sets number of threads to use.
 

Protected Attributes

Index nThreads_
 
bool maverick_
 

Detailed Description

Base class for all calculators.

Calculators are grouped in CalculatorFactories and are run by Threads or Applications. Every calculator has a description (an XML file) installed in VOTCASHARE which is used to compile HELP. This XML file also contains default values.

Definition at line 40 of file calculator.h.

Constructor & Destructor Documentation

◆ Calculator()

votca::tools::Calculator::Calculator ( )
default

◆ ~Calculator()

virtual votca::tools::Calculator::~Calculator ( )
virtualdefault

Member Function Documentation

◆ Identify()

◆ Initialize()

virtual void votca::tools::Calculator::Initialize ( const Property & user_options)
pure virtual

Initializes a calculator from an XML file with options.

Options are passed to a calculator by the Application These option overwrite defaults

Parameters
user_optionsProperty object passed by the application to a calculator

Implemented in votca::xtp::JobCalculator, votca::xtp::QMCalculator, and votca::xtp::QMTool.

◆ Package()

virtual std::string votca::tools::Calculator::Package ( ) const
pure virtual

Package name.

This name is the name of the package the calculator belongs to, e.g. csg, xtp, etc..

Returns
Package name

Implemented in votca::xtp::JobCalculator, votca::xtp::QMCalculator, and votca::xtp::QMTool.

◆ setnThreads()

void votca::tools::Calculator::setnThreads ( Index nThreads)
inline

Sets number of threads to use.

If only one thread is used, this calculator behaves as a master

Parameters
nThreadsnumber of threads running this calculator

Definition at line 83 of file calculator.h.

Member Data Documentation

◆ maverick_

bool votca::tools::Calculator::maverick_
protected

Definition at line 90 of file calculator.h.

◆ nThreads_

Index votca::tools::Calculator::nThreads_
protected

Definition at line 89 of file calculator.h.


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