From eedad4782257f1cc8aee1808f6ebdd487db25fe6 Mon Sep 17 00:00:00 2001 From: Sudarshan Vijay Date: Thu, 9 May 2024 21:12:32 +0200 Subject: [PATCH] update citation information --- catmap/model.py | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/catmap/model.py b/catmap/model.py index e8d4834..2d8083c 100644 --- a/catmap/model.py +++ b/catmap/model.py @@ -12,6 +12,19 @@ string2symbols = catmap.string2symbols plt = catmap.plt +PAPER1 = """\ +Medford, A. J., Shi, C., Hoffmann, M. J., Lausche, A. C., Fitzgibbon, S. R., \ +Bligaard, T., & Nørskov, J. K. (2015). CatMAP: a software package for descriptor-based \ +microkinetic mapping of catalytic trends. Catalysis Letters, 145, 794-807.""" + +PAPER2 = f"""\ +Vijay, S., H. Heenen, H., Singh, A. R., Chan, K., & Voss, J. (2024). \ +Number of sites-based solver for determining coverages from steady-state mean-field \ +micro-kinetic models. Journal of Computational Chemistry, 45(9), 546-551.""" + +CITATION_INFORMATION = f"""\ +If you find CatMAP useful to your research, please cite both the following papers: +\n {PAPER1} \n {PAPER2}\n""" class ReactionModel: """ @@ -60,6 +73,9 @@ def __init__(self, **kwargs): self._solved = None # Keeps track of whether or not the model was solved. + # check if citation information is written + self.citation_info_written = False + # Attributes for logging self._log_lines = [] self._log_dict = {} @@ -1159,6 +1175,10 @@ def _header(self,exclude_outputs=[],re_parse=False): header += 'binary_data = ' + 'pickle.load(open("' + \ self.data_file +'","rb"))\n\n' header += 'locals().update(binary_data)\n\n' + header += f'__citation__ = """{CITATION_INFORMATION}"""\n' + if not self.citation_info_written: + print(CITATION_INFORMATION) + self.citation_info_written = True for attr in dir(self): if (not attr.startswith('_') and not callable(getattr(self,attr)) and