votca 2026-dev
Loading...
Searching...
No Matches
citations.cc
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// Standard includes
21#include <algorithm>
22#include <iterator>
23#include <map>
24#include <mutex>
25#include <sstream>
26
27// Local VOTCA includes
28#include "votca/xtp/citations.h"
29
30namespace votca {
31namespace xtp {
32namespace citations {
33
34namespace {
35
36std::mutex& Lock() {
37 static std::mutex lock;
38 return lock;
39}
40
41std::vector<std::string>& UsedKeys() {
42 static std::vector<std::string> used;
43 return used;
44}
45
46const std::vector<Optional>& GWBSEOptions() {
47 static const std::vector<Optional> options = {
48 {"Wehner:2018", "GW-BSE"},
49 {"Tirimbo:2020a", "GW-BSE"},
50 {"vanSchilfgaarde:2006", "quasiparticle self-consistent GW (gw.do_qsgw)"},
51 {"Marie:2023", "SRG regularization of QSGW"},
52 };
53 return options;
54}
55
56const std::vector<Optional>& DFTOptions() {
57 static const std::vector<Optional> options = {
58 {"Wu:2005", "constrained DFT (cdft)"},
59 {"Helmich-Paris:2021", "second-order (TRAH) SCF steps"},
60 {"Manby:2012", "projection-based DFT-in-DFT embedding"},
61 {"Sundaram:2024", "projection-based DFT-in-DFT embedding"},
62 };
63 return options;
64}
65
66std::vector<Optional> Join(std::vector<Optional> a,
67 const std::vector<Optional>& b) {
68 a.insert(a.end(), b.begin(), b.end());
69 return a;
70}
71
72const std::map<std::string, CalculatorEntry>& Table() {
73 const std::vector<std::string> structure = {"Ruehle:2011"};
74 const std::vector<Optional> electronic = Join(DFTOptions(), GWBSEOptions());
75 const std::vector<Optional> embedded =
76 Join(electronic, {{"Baumeier:2014", "GW-BSE region"},
77 {"Tirimbo:2020b", "GW-BSE region"},
78 {"Tirimbo:2024a", "GW-BSE region"},
79 {"Thole:1981", "polar region"},
80 {"Poelking:2016", "Ewald region"}});
81 const std::vector<Optional> couplings =
82 Join(electronic, {{"Baumeier:2010", "DFT couplings (dftcoupling)"},
83 {"Wehner:2017", "BSE couplings (bsecoupling)"}});
84 const std::vector<Optional> grw = {
85 {"Chen:2025a", "graph random walk (solver exact or grw)"}};
86 const std::vector<Optional> network = {
87 {"Chen:2025b", "traps (trap finder or trap templates)"}};
88
89 static const std::map<std::string, CalculatorEntry> table = {
90 // calculators (xtp_run)
91 {"neighborlist", {structure, {}}},
92 {"mapchecker", {structure, {}}},
93 {"ianalyze", {structure, {}}},
94 {"eanalyze", {structure, {}}},
95 {"einternal", {structure, {}}},
96 {"vaverage", {structure, {}}},
97 {"kmcmultiple", {structure, grw}},
98 {"kmctof", {structure, grw}},
99 {"kmclifetime", {{"Ruehle:2011", "Wehner:2020"}, {}}},
100 {"grw", {{"Chen:2025a", "Stenzel:2014"}, {}}},
101 {"ewaldbackground", {{"Poelking:2016", "Poelking:2015"}, {}}},
102 // job calculators (xtp_parallel)
103 {"iqm", {structure, couplings}},
104 {"ipodcoupling", {{"Ghan:2020", "Baumeier:2010"}, DFTOptions()}},
105 {"eqm", {{}, electronic}},
106 {"iexcitoncl", {{"Thole:1981"}, {}}},
107 {"qmmm", {structure, embedded}},
108 // tools (xtp_tools)
109 {"dftgwbse", {{}, electronic}},
110 {"spectrum", {{}, GWBSEOptions()}},
111 {"excitoncoupling", {{"Wehner:2017"}, electronic}},
112 {"coupling", {{"Baumeier:2010"}, {}}},
113 {"podcoupling", {{"Ghan:2020", "Baumeier:2010"}, {}}},
114 {"molpol", {{"Thole:1981"}, {}}},
115 {"partialcharges", {{"Breneman:1990"}, {}}},
116 {"diabatization", {{"Tirimbo:2024b"}, {}}},
117 {"latticegen", {{"Chen:2025a"}, {}}},
118 {"networkfit", {{"Baumeier:2012", "Kordt:2014"}, network}},
119 {"networkgen", {{"Baumeier:2012", "Kordt:2014"}, network}},
120 };
121 return table;
122}
123
124} // namespace
125
126const std::vector<Reference>& References() {
127 static const std::vector<Reference> references = {
128 // the VOTCA paper
129 {"Baumeier:2024",
130 "Baumeier, Wehner, Renaud, Zapata Ruiz, Halver, Madhikar, Gerritsen, "
131 "Tirimbo, Sijen, Rosenberger, Brown, Sundaram, Krajniak, Bernhardt, and "
132 "Junghans, VOTCA: multiscale frameworks for quantum and classical "
133 "simulations in soft matter, J. Open Source Softw. 9, 6864 (2024)",
134 "10.21105/joss.06864"},
135 // methods developed with VOTCA-XTP
136 {"Ruehle:2011",
137 "Ruehle, Lukyanov, May, Schrader, Vehoff, Kirkpatrick, Baumeier, and "
138 "Andrienko, Microscopic simulations of charge transport in disordered "
139 "organic semiconductors, J. Chem. Theory Comput. 7, 3335 (2011)",
140 "10.1021/ct200388s"},
141 {"Baumeier:2010",
142 "Baumeier, Kirkpatrick, and Andrienko, Density-functional based "
143 "determination of intermolecular charge transfer properties for "
144 "large-scale morphologies, Phys. Chem. Chem. Phys. 12, 11103 (2010)",
145 "10.1039/C002337J"},
146 {"Baumeier:2012",
147 "Baumeier, Stenzel, Poelking, Andrienko, and Schmidt, Stochastic "
148 "modeling of molecular charge transport networks, Phys. Rev. B 86, "
149 "184202 (2012)",
150 "10.1103/PhysRevB.86.184202"},
151 {"Baumeier:2014",
152 "Baumeier, Rohlfing, and Andrienko, Electronic excitations in push-pull "
153 "oligomers and their complexes with fullerene from many-body Green's "
154 "functions theory with polarizable embedding, J. Chem. Theory Comput. "
155 "10, 3104 (2014)",
156 "10.1021/ct500479f"},
157 {"Kordt:2014",
158 "Kordt, Stenzel, Baumeier, Schmidt, and Andrienko, Parametrization of "
159 "extended Gaussian disorder models from microscopic charge transport "
160 "simulations, J. Chem. Theory Comput. 10, 2508 (2014)",
161 "10.1021/ct500269r"},
162 {"Stenzel:2014",
163 "Stenzel et al., A general framework for consistent estimation of "
164 "charge transport properties via random walks in random environments, "
165 "Multiscale Model. Simul. 12, 1108 (2014)",
166 "10.1137/130942504"},
167 {"Poelking:2015",
168 "Poelking, Tietze, Elschner, Olthof, Hertel, Baumeier, Wuerthner, "
169 "Meerholz, Leo, and Andrienko, Impact of mesoscale order on "
170 "open-circuit voltage in organic solar cells, Nat. Mater. 14, 434 "
171 "(2015)",
172 "10.1038/nmat4167"},
173 {"Poelking:2016",
174 "Poelking and Andrienko, Long-range embedding of molecular ions and "
175 "excitations in a polarizable molecular environment, J. Chem. Theory "
176 "Comput. 12, 4516 (2016)",
177 "10.1021/acs.jctc.6b00599"},
178 {"Wehner:2017",
179 "Wehner and Baumeier, Intermolecular singlet and triplet exciton "
180 "transfer integrals from many-body Green's functions theory, J. Chem. "
181 "Theory Comput. 13, 1584 (2017)",
182 "10.1021/acs.jctc.6b00935"},
183 {"Wehner:2018",
184 "Wehner, Brombacher, Brown, Junghans, Caylak, Khalak, Madhikar, "
185 "Tirimbo, and Baumeier, Electronic excitations in complex molecular "
186 "environments: many-body Green's functions theory in VOTCA-XTP, J. "
187 "Chem. Theory Comput. 14, 6253 (2018)",
188 "10.1021/acs.jctc.8b00617"},
189 {"Wehner:2020",
190 "Wehner and Baumeier, Multiscale simulations of singlet and triplet "
191 "exciton dynamics in energetically disordered molecular systems based "
192 "on many-body Green's functions theory, New J. Phys. 22, 033033 (2020)",
193 "10.1088/1367-2630/ab7a04"},
194 {"Tirimbo:2020a",
195 "Tirimbo, Sundaram, Caylak, Scharpach, Sijen, Junghans, Brown, Zapata "
196 "Ruiz, Renaud, Wehner, and Baumeier, Excited-state electronic structure "
197 "of molecules using many-body Green's functions: quasiparticles and "
198 "electron-hole excitations with VOTCA-XTP, J. Chem. Phys. 152, 114103 "
199 "(2020)",
200 "10.1063/1.5144277"},
201 {"Tirimbo:2020b",
202 "Tirimbo, de Vries, Weijtens, Bobbert, Neumann, Coehoorn, and Baumeier, "
203 "Quantitative predictions of photoelectron spectra in amorphous "
204 "molecular solids from multiscale quasiparticle embedding, Phys. Rev. B "
205 "101, 035402 (2020)",
206 "10.1103/PhysRevB.101.035402"},
207 {"Tirimbo:2024a",
208 "Tirimbo, Sundaram, and Baumeier, Embedded many-body Green's function "
209 "methods for complex molecular systems, WIREs Comput. Mol. Sci. 14, "
210 "e1734 (2024)",
211 "10.1002/wcms.1734"},
212 {"Tirimbo:2024b",
213 "Tirimbo and Baumeier, Electronic couplings and conversion dynamics "
214 "between localized and charge transfer excitations from many-body "
215 "Green's functions theory, J. Chem. Theory Comput. 20, 4605 (2024)",
216 "10.1021/acs.jctc.4c00142"},
217 {"Sundaram:2024",
218 "Sundaram and Baumeier, Quantum-quantum and quantum-quantum-classical "
219 "schemes for near-gap excitations with projection-based-embedded "
220 "GW-Bethe-Salpeter equation, J. Chem. Theory Comput. 20, 5451 (2024)",
221 "10.1021/acs.jctc.4c00163"},
222 {"Chen:2025a",
223 "Chen, van der Hoorn, and Baumeier, A graph random walk method for "
224 "calculating time-of-flight charge mobility in organic semiconductors "
225 "from multiscale simulations, Multiscale Model. Simul. 23, 1439 (2025)",
226 "10.1137/24M1658085"},
227 {"Chen:2025b",
228 "Chen, van der Hoorn, and Baumeier, Automatic identification of traps "
229 "in molecular charge transport networks of organic semiconductors, "
230 "Phys. Rev. B 111, 224209 (2025)",
231 "10.1103/shyl-kcfp"},
232 // methods by others
233 {"Thole:1981",
234 "Thole, Molecular polarizabilities calculated with a modified dipole "
235 "interaction, Chem. Phys. 59, 341 (1981)",
236 "10.1016/0301-0104(81)85176-2"},
237 {"Breneman:1990",
238 "Breneman and Wiberg, Determining atom-centered monopoles from "
239 "molecular electrostatic potentials, J. Comput. Chem. 11, 361 (1990)",
240 "10.1002/jcc.540110311"},
241 {"Wu:2005",
242 "Wu and Van Voorhis, Direct optimization method to study constrained "
243 "systems within density-functional theory, Phys. Rev. A 72, 024502 "
244 "(2005)",
245 "10.1103/PhysRevA.72.024502"},
246 {"vanSchilfgaarde:2006",
247 "van Schilfgaarde, Kotani, and Faleev, Quasiparticle self-consistent GW "
248 "theory, Phys. Rev. Lett. 96, 226402 (2006)",
249 "10.1103/PhysRevLett.96.226402"},
250 {"Manby:2012",
251 "Manby, Stella, Goodpaster, and Miller, A simple, exact "
252 "density-functional-theory embedding scheme, J. Chem. Theory Comput. 8, "
253 "2564 (2012)",
254 "10.1021/ct300544e"},
255 {"Ghan:2020",
256 "Ghan, Kunkel, Reuter, and Oberhofer, Improved projection-operator "
257 "diabatization schemes for the calculation of electronic coupling "
258 "values, J. Chem. Theory Comput. 16, 7431 (2020)",
259 "10.1021/acs.jctc.0c00887"},
260 {"Helmich-Paris:2021",
261 "Helmich-Paris, A trust-region augmented Hessian implementation for "
262 "restricted and unrestricted Hartree-Fock and Kohn-Sham methods, J. "
263 "Chem. Phys. 154, 164104 (2021)",
264 "10.1063/5.0040798"},
265 {"Marie:2023",
266 "Marie and Loos, A similarity renormalization group approach to Green's "
267 "function methods, J. Chem. Theory Comput. 19, 3943 (2023)",
268 "10.1021/acs.jctc.3c00281"},
269 };
270 return references;
271}
272
273bool Exists(const std::string& key) {
274 const std::vector<Reference>& refs = References();
275 return std::any_of(refs.begin(), refs.end(),
276 [&key](const Reference& r) { return r.key == key; });
277}
278
279std::string Format(const std::string& key) {
280 const std::vector<Reference>& refs = References();
281 auto it = std::find_if(refs.begin(), refs.end(),
282 [&key](const Reference& r) { return r.key == key; });
283 if (it == refs.end()) {
284 return key;
285 }
286 return it->doi.empty() ? it->text : it->text + ", doi:" + it->doi;
287}
288
289void Cite(const std::string& key) {
290 std::lock_guard<std::mutex> guard(Lock());
291 std::vector<std::string>& used = UsedKeys();
292 if (std::find(used.begin(), used.end(), key) == used.end()) {
293 used.push_back(key);
294 }
295}
296
297std::vector<std::string> Used() {
298 std::lock_guard<std::mutex> guard(Lock());
299 return UsedKeys();
300}
301
302void Reset() {
303 std::lock_guard<std::mutex> guard(Lock());
304 UsedKeys().clear();
305}
306
307std::string Report() {
308 const std::vector<std::string> used = Used();
309 if (used.empty()) {
310 return "";
311 }
312 const std::string rule(78, '=');
313 std::ostringstream out;
314 out << rule << "\n"
315 << "Please cite the methods used in this run:\n";
316 std::size_t n = 1;
317 for (const std::string& key : used) {
318 out << " [" << n++ << "] " << Format(key) << "\n";
319 }
320 out << rule << "\n";
321 return out.str();
322}
323
324CalculatorEntry ForCalculator(const std::string& name) {
325 const auto& table = Table();
326 auto it = table.find(name);
327 return it == table.end() ? CalculatorEntry{} : it->second;
328}
329
330std::vector<std::string> Calculators() {
331 const auto& table = Table();
332 std::vector<std::string> names;
333 names.reserve(table.size());
334 std::transform(table.begin(), table.end(), std::back_inserter(names),
335 [](const auto& entry) { return entry.first; });
336 return names;
337}
338
339std::string CalculatorReport(const std::string& name) {
340 const CalculatorEntry entry = ForCalculator(name);
341 std::ostringstream out;
342 out << "References for " << name << ":\n";
343 out << " " << Format("Baumeier:2024") << "\n";
344 for (const std::string& key : entry.keys) {
345 out << " " << Format(key) << "\n";
346 }
347 if (!entry.optional.empty()) {
348 out << "Depending on the options:\n";
349 for (const Optional& opt : entry.optional) {
350 out << " " << opt.when << ": " << Format(opt.key) << "\n";
351 }
352 }
353 return out.str();
354}
355
356} // namespace citations
357} // namespace xtp
358} // namespace votca
class to store tables like rdfs, tabulated potentials, etc
Definition table.h:36
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
Charge transport classes.
Definition ERIs.h:28
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