Skip to content

Commit

Permalink
Release 4.1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
reiher-research-group committed Jan 25, 2023
1 parent f26e6c7 commit d581223
Show file tree
Hide file tree
Showing 5 changed files with 66 additions and 4 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Changelog
=========

Release 4.1.0
-------------

- Add new interface ``EmbeddingCalculator``. This class is derived from
the calculator class and allows for embedding calculations with different
underlying calculators.

Release 4.0.2
-------------

Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cmake_minimum_required(VERSION 3.9)
# tree must then provide a properly namespaced target with the same name as
# your project.
project(Core
VERSION 4.0.2
VERSION 4.1.0
DESCRIPTION "Module management and core interface definitions"
)

Expand Down
55 changes: 55 additions & 0 deletions src/Core/Core/Interfaces/EmbeddingCalculator.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
/**
* @file Calculator.h
* @copyright This code is licensed under the 3-clause BSD license.\n
* Copyright ETH Zurich, Laboratory of Physical Chemistry, Reiher Group.\n
* See LICENSE.txt for details.
*/
#ifndef CORE_EMBEDDINGCALCULATOR_H
#define CORE_EMBEDDINGCALCULATOR_H
/* Internal Includes */
#include "Core/ExportControl.h"
#include "Core/Interfaces/Calculator.h"
/* External Includes */
#include <Eigen/Core>
#include <memory>
#include <string>
#include <vector>

namespace Scine {
namespace Utils {
class Settings;
class Results;
} // namespace Utils
namespace Core {
class Calculator;

class EmbeddingCalculator : public Calculator {
public:
static constexpr const char* interface = "embedding_calculator";

/// @brief Default constructor.
EmbeddingCalculator() = default;
/**
* @brief Sets the underlying calculators for a calculation performed with the embedding calculator.
* @note In the derived class, care must be taken of the exakt embedding method (for instance, QM/QM or QM/MM) and
* that the overall Hamiltonian is correctly constructed.
* @param underlyingCalculators A vector of Calculators.
*/
virtual void setUnderlyingCalculators(std::vector<std::shared_ptr<Calculator>> underlyingCalculators) = 0;
/**
* @brief Accessor for the underlying calculators.
* @return std::vector<std::shared_ptr<Calculator>> A vector of underlying calculators.
*/
virtual std::vector<std::shared_ptr<Calculator>> getUnderlyingCalculators() = 0;
/// @brief Default destructor.
virtual ~EmbeddingCalculator() = default;

private:
// The underlying calculators.
std::vector<std::shared_ptr<Calculator>> underlyingCalculators_;
};

} // namespace Core
} // namespace Scine

#endif // CORE_CALCULATORWITHREFERENCE_H
4 changes: 2 additions & 2 deletions src/Core/Core/Module.h
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ class Module {
* to the desired interface interface.
*/
virtual boost::any get(const std::string& /* interface */, const std::string& /* model */
) const = 0;
) const = 0;

/*!
* @brief Checks if this module supplies a particular model of an interface.
Expand All @@ -109,7 +109,7 @@ class Module {
* @endcode
*/
virtual bool has(const std::string& /* interface */, const std::string& /* model */
) const noexcept = 0;
) const noexcept = 0;

/*!
* @brief Announces all interfaces of which the module provides at least one model
Expand Down

0 comments on commit d581223

Please sign in to comment.