% ------------------------------------------------------------ % quantum-chemistry-bonn.sty v0.1 2025/06/04 %Package for unifying the writing of common qc program names % Copyright (c) 2025 Christian Selzer % ------------------------------------------------------------ %%Identification %%The package identifies itself and the LaTeX version needed \NeedsTeXFormat{LaTeX2e} \ProvidesPackage{quantum-chemistry-bonn}[2025/06/04 quantum-chemistry-bonn] \RequirePackage{xcolor} \RequirePackage{siunitx} \RequirePackage{expl3,xparse} %==========Colorors======== \definecolor{bonnblue}{RGB}{7, 78, 159} \definecolor{bonnred}{RGB}{185, 39, 39} \definecolor{bonnyellow}{RGB}{252, 186, 0} \definecolor{bonngrey}{RGB}{144, 144, 133} \definecolor{bonngray}{RGB}{144, 144, 133} % Wir sind faul, wir brauchen grey und gray. \definecolor{bonngreen}{RGB}{0, 123, 78} \definecolor{newaccent}{RGB}{0, 0, 0} \definecolor{black}{RGB}{0, 0, 0} \definecolor{highlightgreen}{RGB}{0, 204, 0} \definecolor{white}{RGB}{255, 255, 255} \definecolor{StdBody}{RGB}{233,233,233} \newcommand{\colb}[1]{\textcolor{bonnblue}{#1}} \newcommand{\coly}[1]{\textcolor{bonnyellow}{#1}} \newcommand{\colr}[1]{\textcolor{bonnred}{#1}} \newcommand{\colg}[1]{\textcolor{bonngrey}{#1}} %==========Programms======= \newcommand*{\orca}{{\fontfamily{pag}\selectfont ORCA}} \newcommand*{\censo}{{\fontfamily{pag}\selectfont CENSO}} \newcommand*{\draco}{{{\textsc{Draco}}}} \newcommand*{\crest}{{{\textsc{CREST}}}} \newcommand{\xtb}{\texttt{xTB}} \newcommand{\tblite}{\texttt{tblite}} %============Misc========== \newcommand*{\etal}{\textit{et al.}} \newcommand*{\ie}{\textit{i.e.}} \newcommand*{\eg}{\textit{e.g.}} %============Units========== \DeclareSIUnit[number-unit-product = {\,}]{\calorie}{cal} \sisetup{per-mode = power} \newcommand{\kcalpmol}{\unit{\kilo\calorie\per\mol}} \newcommand{\kjpmol}{\unit{\kilo\joule\per\mol}} %============Quantities========== \newcommand*{\pka}{p\textit{K}\textsubscript{a}} \newcommand*{\logkow}{log~\textit{K}\textsubscript{ow}} \newcommand*{\logkwa}{log~\textit{K}\textsubscript{wa}} \newcommand*{\logpl}{log~\textit{P}\textsubscript{L}} \newcommand*{\dgsolv}{$\delta$\textit{G}\textsubscript{solv}} %=========QC-Methods======== %\newcommand*{\rsc}{r\textsuperscript{2}SCAN-3c} %––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– \ExplSyntaxOn %–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– % Create a prop list to hold “key → formatted text”: \prop_new:N \l__qc_methods_prop % \DeclareMethod{}{} % Stores (lowercase() → ) in the prop list \NewDocumentCommand \DeclareMethod { m m } { \prop_put:Nnn \l__qc_methods_prop { \tl_lower_case:n { #1 } } { #2 } } % \method{} % 1) Lowercase the key internally % 2) If found in \l__qc_methods_prop, print the stored formatted text % 3) Otherwise, print back the raw (case‐preserved) \NewDocumentCommand \method { m } { \prop_get:NnNTF \l__qc_methods_prop { \tl_lower_case:n { #1 } } \l__qc_tmp_tl { % ⟶ Found: print the “pretty” version \l__qc_tmp_tl } { % ⟶ Not found: fall back to raw input #1 } } %–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– \ExplSyntaxOff %––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– %––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– \ExplSyntaxOn % Create a comma‐separated “batch declare” command: % % \DeclareMethods{alias_1,alias_2,..}{formatted text} % % Internally, this splits the comma list and does exactly what % \DeclareMethod does for each item. \NewDocumentCommand \DeclareMethods { m m } { \clist_map_inline:nn { #1 } { \prop_put:Nnn \l__qc_methods_prop { \tl_lower_case:n { ##1 } } { #2 } } } \ExplSyntaxOff %––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– %------------------------------------------------------- % Declare Methods %------------------------------------------------------- \DeclareMethods{rsc,r2scan3c,r2scan-3c}{r\textsuperscript{2}SCAN-3c} \DeclareMethods{wr2scand4,wr2scan-d4,wr2scand4}{$\omega$r\textsuperscript{2}SCAN-D4} \DeclareMethods{wpr2scan50d4,wpr2scan50-d4,wpr2scan50d4}{$\omega$Pr\textsuperscript{2}SCAN50-D4} \endinput