Loading...
Searching...
No Matches
RGPotEngine.h File Reference
#include <cstddef>
#include <cstdint>
#include <memory>
#include <string>

Go to the source code of this file.

Classes

struct  RGPotEngineOptions
class  RGPotEngine
 Opaque rgpot-backed engine (nwchemc / cpmdc / metatomic / uma / xtb). More...

Functions

std::string nwchemDftInputBlock (const std::string &theory, const std::string &scfType, int multiplicity, const std::string &existing)
 NWChem input block for a DFT theory.

Function Documentation

◆ nwchemDftInputBlock()

std::string nwchemDftInputBlock ( const std::string & theory,
const std::string & scfType,
int multiplicity,
const std::string & existing )

NWChem input block for a DFT theory.

Empty when existing is set or the theory is not DFT. theory is matched without regard to case.

Definition at line 181 of file RGPotEngine.cpp.

183 {
184 if (!existing.empty()) {
185 return existing;
186 }
187 const std::string theoryKey = to_lower(theory);
188 const std::string scfKey = to_lower(scfType);
189 if (theoryKey == "dft" && looks_like_dft_xc(scfKey)) {
190 return "dft\n xc " + scfType + "\n mult " + std::to_string(multiplicity) +
191 "\nend";
192 }
193 if (looks_like_dft_xc(theoryKey)) {
194 return "dft\n xc " + theory + "\n mult " + std::to_string(multiplicity) +
195 "\nend";
196 }
197 return {};
198}