Skip to content

Commit

Permalink
Merge pull request #167 from sudarshanv01/update-citation-information
Browse files Browse the repository at this point in the history
update citation information
  • Loading branch information
vossjo authored Jun 25, 2024
2 parents 72a6c59 + eedad47 commit ed04f91
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions catmap/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
"""
Expand Down Expand Up @@ -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 = {}
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ed04f91

Please sign in to comment.