Loading...
Searching...
No Matches
RGPotEngine.cpp File Reference
#include "eon/potentials/Rgpot/RGPotEngine.h"
#include "eon/potentials/Rgpot/CpmdMessage.h"
#include <algorithm>
#include <array>
#include <cctype>
#include <cstdint>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <stdexcept>
#include <string>
#include <tuple>
#include <vector>
#include <dlfcn.h>
#include "eon/potentials/Rgpot/RgpotGroupMpi.h"
#include <capnp/message.h>
#include <capnp/serialize.h>
#include "eon/potentials/Rgpot/GenericEngineLoader.h"
#include "eon/potentials/Rgpot/MetatomicEngineLoader.h"
#include "eon/potentials/Rgpot/XTBEngineLoader.h"
#include "rgpot/CPMDPot/CPMDPot.hpp"
#include "rgpot/CalculatorGroup.hpp"
#include "rgpot/NWChemPot/NWChemPot.hpp"
#include "rgpot/rpc/Potentials.capnp.h"

Go to the source code of this file.

Classes

struct  RGPotEngine::Impl

Namespaces

namespace  eon

Macros

#define _GNU_SOURCE

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.
::CPMDParams::Builder eon::fillCpmdParams (::capnp::MallocMessageBuilder &msg, const RGPotEngineOptions &opt)

Macro Definition Documentation

◆ _GNU_SOURCE

#define _GNU_SOURCE

Definition at line 6 of file RGPotEngine.cpp.

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}