Loading...
Searching...
No Matches
ObjectiveFunction.h
Go to the documentation of this file.
1/*
2** This file is part of eOn.
3**
4** SPDX-License-Identifier: BSD-3-Clause
5**
6** Copyright (c) 2010--present, eOn Development Team
7** All rights reserved.
8**
9** Repo:
10** https://github.com/TheochemUI/eOn
11*/
12#pragma once
13
14#include "Matter.h"
15
16namespace eonc {
17
19protected:
21
22public:
23 ObjectiveFunction(const Parameters &paramsPassed)
24 : params{paramsPassed} {}
25 virtual ~ObjectiveFunction() {}
26 virtual double getEnergy() = 0;
27 virtual VectorXd getGradient(bool fdstep = false) = 0;
28 virtual void setPositions(const VectorXd &x) = 0;
29 virtual VectorXd getPositions() = 0;
30 virtual int degreesOfFreedom() = 0;
31 virtual bool isConverged() = 0;
32 virtual double getConvergence() = 0;
33 virtual VectorXd difference(const VectorXd &a, const VectorXd &b) = 0;
34};
35
36} // namespace eonc
37
virtual VectorXd getGradient(bool fdstep=false)=0
virtual VectorXd difference(const VectorXd &a, const VectorXd &b)=0
ObjectiveFunction(const Parameters &paramsPassed)
virtual bool isConverged()=0
const Parameters & params
virtual VectorXd getPositions()=0
virtual void setPositions(const VectorXd &x)=0
virtual double getEnergy()=0
virtual double getConvergence()=0
virtual int degreesOfFreedom()=0
RAII resource manager for the ARTn C library with global synchronization.