Skip to content

Commit ed04f91

Browse files
authored
Merge pull request #167 from sudarshanv01/update-citation-information
update citation information
2 parents 72a6c59 + eedad47 commit ed04f91

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

catmap/model.py

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,19 @@
1212
string2symbols = catmap.string2symbols
1313
plt = catmap.plt
1414

15+
PAPER1 = """\
16+
Medford, A. J., Shi, C., Hoffmann, M. J., Lausche, A. C., Fitzgibbon, S. R., \
17+
Bligaard, T., & Nørskov, J. K. (2015). CatMAP: a software package for descriptor-based \
18+
microkinetic mapping of catalytic trends. Catalysis Letters, 145, 794-807."""
19+
20+
PAPER2 = f"""\
21+
Vijay, S., H. Heenen, H., Singh, A. R., Chan, K., & Voss, J. (2024). \
22+
Number of sites-based solver for determining coverages from steady-state mean-field \
23+
micro-kinetic models. Journal of Computational Chemistry, 45(9), 546-551."""
24+
25+
CITATION_INFORMATION = f"""\
26+
If you find CatMAP useful to your research, please cite both the following papers:
27+
\n {PAPER1} \n {PAPER2}\n"""
1528

1629
class ReactionModel:
1730
"""
@@ -60,6 +73,9 @@ def __init__(self, **kwargs):
6073
self._solved = None
6174
# Keeps track of whether or not the model was solved.
6275

76+
# check if citation information is written
77+
self.citation_info_written = False
78+
6379
# Attributes for logging
6480
self._log_lines = []
6581
self._log_dict = {}
@@ -1159,6 +1175,10 @@ def _header(self,exclude_outputs=[],re_parse=False):
11591175
header += 'binary_data = ' + 'pickle.load(open("' + \
11601176
self.data_file +'","rb"))\n\n'
11611177
header += 'locals().update(binary_data)\n\n'
1178+
header += f'__citation__ = """{CITATION_INFORMATION}"""\n'
1179+
if not self.citation_info_written:
1180+
print(CITATION_INFORMATION)
1181+
self.citation_info_written = True
11621182
for attr in dir(self):
11631183
if (not attr.startswith('_') and
11641184
not callable(getattr(self,attr)) and

0 commit comments

Comments
 (0)