|
12 | 12 | string2symbols = catmap.string2symbols
|
13 | 13 | plt = catmap.plt
|
14 | 14 |
|
| 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""" |
15 | 28 |
|
16 | 29 | class ReactionModel:
|
17 | 30 | """
|
@@ -60,6 +73,9 @@ def __init__(self, **kwargs):
|
60 | 73 | self._solved = None
|
61 | 74 | # Keeps track of whether or not the model was solved.
|
62 | 75 |
|
| 76 | + # check if citation information is written |
| 77 | + self.citation_info_written = False |
| 78 | + |
63 | 79 | # Attributes for logging
|
64 | 80 | self._log_lines = []
|
65 | 81 | self._log_dict = {}
|
@@ -1159,6 +1175,10 @@ def _header(self,exclude_outputs=[],re_parse=False):
|
1159 | 1175 | header += 'binary_data = ' + 'pickle.load(open("' + \
|
1160 | 1176 | self.data_file +'","rb"))\n\n'
|
1161 | 1177 | 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 |
1162 | 1182 | for attr in dir(self):
|
1163 | 1183 | if (not attr.startswith('_') and
|
1164 | 1184 | not callable(getattr(self,attr)) and
|
|
0 commit comments