votca 2026-dev
Loading...
Searching...
No Matches
citations.h
Go to the documentation of this file.
1/*
2 * Copyright 2009-2026 The VOTCA Development Team
3 * (http://www.votca.org)
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License")
6 *
7 * You may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 */
19
20#pragma once
21#ifndef VOTCA_XTP_CITATIONS_H
22#define VOTCA_XTP_CITATIONS_H
23
24// Standard includes
25#include <string>
26#include <vector>
27
28namespace votca {
29namespace xtp {
30
40namespace citations {
41
42struct Reference {
43 std::string key;
44 std::string text;
45 std::string doi; // may be empty
46};
47
49struct Optional {
50 std::string key;
51 std::string when;
52};
53
55 std::vector<std::string> keys; // every run
56 std::vector<Optional> optional;
57};
58
60void Cite(const std::string& key);
62std::vector<std::string> Used();
63void Reset();
64
66const std::vector<Reference>& References();
67bool Exists(const std::string& key);
69std::string Format(const std::string& key);
70
72std::string Report();
73
75CalculatorEntry ForCalculator(const std::string& name);
77std::vector<std::string> Calculators();
79std::string CalculatorReport(const std::string& name);
80
81} // namespace citations
82} // namespace xtp
83} // namespace votca
84
85#endif // VOTCA_XTP_CITATIONS_H
References for the methods used in a run.
Definition citations.h:40
CalculatorEntry ForCalculator(const std::string &name)
the references of a calculator or tool (empty for unknown names)
Definition citations.cc:324
std::string CalculatorReport(const std::string &name)
the text printed by –cite
Definition citations.cc:339
const std::vector< Reference > & References()
all references
Definition citations.cc:126
void Cite(const std::string &key)
marks a reference as used (thread safe; unknown keys are printed as such)
Definition citations.cc:289
std::vector< std::string > Used()
the keys used so far, in the order of first use
Definition citations.cc:297
bool Exists(const std::string &key)
Definition citations.cc:273
std::vector< std::string > Calculators()
all calculators and tools of the table
Definition citations.cc:330
std::string Report()
the block printed at the end of a run (empty if nothing was cited)
Definition citations.cc:307
std::string Format(const std::string &key)
one line: text and DOI
Definition citations.cc:279
Provides a means for comparing floating point numbers.
Definition basebead.h:33
std::vector< Optional > optional
Definition citations.h:56
std::vector< std::string > keys
Definition citations.h:55
a reference that depends on the options of a calculator
Definition citations.h:49