Package list votca-xtp / upstream/1.6.4
New upstream version 1.6.4 Nicholas Breen 10 months ago
8 changed file(s) with 22 addition(s) and 22 deletion(s). Raw diff Collapse all Expand all
00 For more detailed information about the changes see the history of the
11 [repository](https://github.com/votca/xtp/commits/master).
2
3 ## Version 1.6.4 (released 12.01.21)
4 * fix build on openSUSE (#622)
5 * Refactored logger (#625)
26
37 ## Version 1.6.3 (released 09.12.20)
48 * switch to ghcr.io for CI (#555)
11 project(votca-xtp)
22
33
4 set(PROJECT_VERSION "1.6.3")
4 set(PROJECT_VERSION "1.6.4")
55 set(PROJECT_CONTACT "bugs@votca.org")
66 string(REGEX REPLACE "^[1-9]+\\.([1-9]+).*$" "\\1" SOVERSION "${PROJECT_VERSION}")
77 if (NOT ${SOVERSION} MATCHES "[1-9]+")
4141 /*
4242 * Custom buffer to store messages
4343 */
44 class LogBuffer : public std::stringbuf {
44 class LogBuffer final : public std::stringbuf {
4545
4646 public:
4747 LogBuffer() : std::stringbuf() { _LogLevel = Log::current_level; }
104104 bool _writePreface = true;
105105
106106 protected:
107 int sync() override {
107 int sync() {
108108
109109 std::ostringstream _message;
110110
164164 }
165165
166166 public:
167 Logger() : std::ostream(new LogBuffer()), _ReportLevel(Log::current_level) {
167 Logger() : std::ostream(&_buffer), _ReportLevel(Log::current_level) {
168168 setMultithreading(_maverick);
169169 }
170170 Logger(Log::Level ReportLevel)
171 : std::ostream(new LogBuffer()), _ReportLevel(ReportLevel) {
171 : std::ostream(&_buffer), _ReportLevel(ReportLevel) {
172172 setMultithreading(_maverick);
173173 }
174174
175 ~Logger() final {
176 delete rdbuf();
177 rdbuf(nullptr);
178 }
179
180175 Logger &operator()(Log::Level LogLevel) {
181 dynamic_cast<LogBuffer *>(rdbuf())->setLogLevel(LogLevel);
176 _buffer.setLogLevel(LogLevel);
182177 return *this;
183178 }
184179
185180 void setReportLevel(Log::Level ReportLevel) { _ReportLevel = ReportLevel; }
186181 void setMultithreading(bool maverick) {
187182 _maverick = maverick;
188 dynamic_cast<LogBuffer *>(rdbuf())->setMultithreading(_maverick);
183 _buffer.setMultithreading(_maverick);
189184 }
190185 bool isMaverick() const { return _maverick; }
191186
192187 Log::Level getReportLevel() const { return _ReportLevel; }
193188
194189 void setPreface(Log::Level level, const std::string &preface) {
195 dynamic_cast<LogBuffer *>(rdbuf())->setPreface(level, preface);
190 _buffer.setPreface(level, preface);
196191 }
197192
198193 void setCommonPreface(const std::string &preface) {
202197 setPreface(Log::warning, preface);
203198 }
204199
205 void EnablePreface() { dynamic_cast<LogBuffer *>(rdbuf())->EnablePreface(); }
206
207 void DisablePreface() {
208 dynamic_cast<LogBuffer *>(rdbuf())->DisablePreface();
209 }
200 void EnablePreface() { _buffer.EnablePreface(); }
201
202 void DisablePreface() { _buffer.DisablePreface(); }
210203
211204 private:
205 LogBuffer _buffer;
212206 // at what level of detail output messages
213207 Log::Level _ReportLevel = Log::error;
214208
215209 // if true, only a single processor job is executed
216210 bool _maverick = false;
217211
218 std::string Messages() {
219 return dynamic_cast<LogBuffer *>(rdbuf())->Messages();
220 }
212 std::string Messages() { return _buffer.Messages(); }
221213 };
222214
223215 /**
2222 #include "votca/xtp/qmmolecule.h"
2323 #include <boost/filesystem.hpp>
2424 #include <boost/format.hpp>
25 #include <iomanip>
2526 #include <vector>
2627 #include <votca/tools/constants.h>
2728 #include <votca/tools/elements.h>
1717 */
1818
1919 #include "votca/xtp/eeinteractor.h"
20 #include <iomanip>
2021 #include <numeric>
2122 #include <votca/xtp/dipoledipoleinteraction.h>
2223 #include <votca/xtp/polarregion.h>
2020 #include <boost/algorithm/string.hpp>
2121 #include <boost/filesystem.hpp>
2222 #include <boost/format.hpp>
23 #include <iomanip>
2324 #include <votca/tools/filesystem.h>
2425 #include <votca/tools/getline.h>
2526 #include <votca/xtp/ecpaobasis.h>
1515 */
1616
1717 #include "apdft.h"
18 #include <iomanip>
1819 #include <votca/xtp/density_integration.h>
1920 #include <votca/xtp/orbitals.h>
2021 #include <votca/xtp/vxc_grid.h>
11
22 project(xtp-tutorials)
33
4 set(PROJECT_VERSION "1.6.3")
4 set(PROJECT_VERSION "1.6.4")
55
66 set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/CMakeModules)
77 include(GNUInstallDirs)