Making an overview presentation of the scaling relations

The following video-presentation – for the CHEAC Summer school 2025 – retells our review on the scaling relations electrocatalysis https://chemrxiv.org/engage/chemrxiv/article-details/67ed469081d2151a02b33a98

The final video

From the beginning I decided to try AI to prepare the presentation. Eventually the only to record the video turned out to be by the traditional way. Together with co-authors Ritums and Nadezda, we used PowerPoint with its slide-by-slide recording feature. As we were in 3 different locations, we exchanged the presentation several time while recording. I used chatgpt 4o and 5 to write lecturer’s notes for every slide. In particular, I gave the chat our article’s pdf-file and then discussed every slide-text using canvas-feature to polish it iteratively. Nadezda also used chatgpt to refined her slides before reading them aloud. Overall, I have spend over two weeks planning the presentation. Then a week polishing the slides. Then several days to record and re-record slides. And finally I have got this the final video-presentation.

Adding voice to a ready presentation

app.pictory.ai does a relatively good job on reading the lecturer’s notes in a ready presentation. Thought, it reads “Jan” and “OOH” in a funny way. And it adds a lot of 10–20 second pauses. Also the slide numbering is off as well as all animation. The picture is also cut from below. But overall, it takes around 2 hours to generate this voiced video and process it.

Use NotebookLM to make a podcast

In the prompt I have specified to avoid banned tells, see https://doublelayer.eu/vilab/2024/12/17/list-of-banned-tells-for-gpt/ Well, I have forbidden to use “pivotal”, but AI still uses “pivotal”.

I am not responsible for the result 🙂 I have heard it and it sounds OK-ish.

Using Gemini in Google Slides

Does not work for me. Gemini wants to draw images. I just want to enter my own figures.

All I need is to convert Figures to Slides

https://www.magicslides.app promises to do exactly that but I failed with a notice that below 5 Mb files are allowed.

SlideAI extension also does not do what I want.

Ufff … manual upload is still the fastest and most robust. Well, it is not so simple, as most of my figures are in pdf, so I wrote this script to convert everything to png. When it took me 2 mins to drag-and-drop all png figure to my presentation. Hurray!

#!/bin/bash

# Create output folder
mkdir -p png

# List of input files
files=(
"Figure 1 mechanisms.png"
"Figure 18 Timeline.png"
"FIgure 14 distances.pdf"
"Figure 11 relative.pdf"
"Figure 6 3dvolcano_withscaling.pdf"
"Figure 2 publications.pdf"
"Figure 5 3dvolcano.pdf"
"Figure 17 perspectives.pdf"
"Figure 16 O_bypassing.pdf"
"Figure 15 O_pushing.pdf"
"Figure 12 O_breaking.pdf"
"Figure 13 O_switching.png"
"Figure 10 O_tuning.pdf"
"Figure 7 projection_potential.pdf"
"Figure 9 projection_ads.pdf"
"Figure 8 timeline.pdf"
"Figure 3 ass_diss.png"
"Figure 4 scalings.png"
)

# Loop through files
for f in "${files[@]}"; do
  base=$(basename "$f")
  name="${base%.*}"
  ext="${base##*.}"
  
  if [[ "$ext" == "pdf" ]]; then
    convert -density 300 "$f" -quality 100 "png/${name}.png"
  elif [[ "$ext" == "png" ]]; then
    cp "$f" "png/${name}.png"
  else
    echo "Unsupported file type: $f"
  fi
done

Use NotebookLM to create FAQ

Pretty cool – NotebookLM make a FAQ.

What are scaling relations in electrocatalysis, and why are they important?

Scaling relations are correlations between the adsorption energies of reaction intermediates on a catalyst’s surface. They are crucial in multi-step electrocatalytic reactions, such as the oxygen reduction reaction (ORR), carbon dioxide reduction (CO2R), and nitrogen reduction (N2RR). The concept emerged in 2005 with the discovery of linear relations between adsorption energies of intermediates like OH, OOH, and O on metal surfaces. Understanding these relations is vital because they define fundamental chemical limitations in electrocatalytic reactions, impacting the design of more efficient catalysts for energy conversion technologies like electrolysers, fuel cells, and metal-air batteries.

How do scaling relations limit the efficiency of oxygen electrocatalysis?

In oxygen electrocatalysis, particularly the oxygen reduction reaction (ORR), the adsorption energies of key intermediates (OOH, OH, O) are correlated by scaling relations. These correlations constrain the achievable catalytic activity, often visualised on “volcano plots.” The OOH-OH and O-OH scaling relations, for instance, mean that if a catalyst binds one intermediate optimally, it might bind another too strongly or too weakly, preventing it from reaching the ideal catalytic activity (the “volcano top”). This limitation is significant, as experimental results have shown catalytic overpotentials converging to a limit set by these relations for over two decades, hindering progress in sustainable energy solutions.

What are the main reaction mechanisms in oxygen electrocatalysis, and how does catalyst geometry influence them?

Oxygen electrocatalysis primarily proceeds via two mechanisms: associative and dissociative. The associative mechanism, which dominates most known catalysts, involves intermediates like OOH, OH, and O adsorbing at a single active site. Geometrically, this requires only one atom in the active site. The dissociative mechanism, conversely, requires at least two neighbouring atoms to accommodate dissociation products (O and OH). On metal surfaces, a spatial mismatch often prevents the dissociative mechanism, as O preferentially adsorbs on hollow sites and OH on top sites. However, dual-atom site catalysts (DACs) can facilitate dissociative pathways by providing two adjacent sites, allowing for the adsorption of dissociation products. The inter-atomic distance within these active sites is a critical geometric parameter that influences the energy barrier for dissociation, balancing thermodynamics and kinetics.

What is the “volcano plot” in electrocatalysis, and how do scaling relations affect it?

The “volcano plot” is a theoretical framework used to understand electrocatalysis, typically representing overpotential or activity as an “altitude” against adsorption energy descriptors. For ORR, it correlates adsorption energies with deviations from the thermodynamic equilibrium potential. Scaling relations define the “paths” or “fixed climbing routes” on this volcano plot that are accessible to catalysts. For example, the OOH-OH scaling relation appears as a plane on the three-dimensional volcano, and catalysts following this relation are confined to a specific line on the volcano’s surface. This means that while an “ideal catalyst” (the volcano’s apex) might exist theoretically, scaling relations prevent most catalysts from reaching it, limiting the search for optimal catalysts to a two-dimensional projection.

What are the five general strategies for “manipulating” scaling relations in electrocatalysis?

The review outlines five general strategies for manipulating scaling relations to enhance electrocatalytic performance:

  1. Tuning: Adjusting the adsorption energy of a key intermediate (e.g., ∆GOH) to optimise catalyst performance within the constraints of an existing scaling relation, adhering to the Sabatier principle.
  2. Breaking: Decreasing the intercept (β) of a scaling relation by selectively stabilising one intermediate over another (e.g., OOH relative to OH), often by introducing spectator groups that induce stabilising interactions.
  3. Switching: Changing the slope (α) of a scaling relation by enabling an alternative reaction mechanism (e.g., switching from an associative to a dissociative mechanism in ORR) to avoid problematic intermediates. This usually requires dual active sites.
  4. Pushing: A combined strategy that changes the slope and adjusts the intercept, simultaneously switching to an alternative mechanism and using stabilising interactions (similar to breaking).
  5. Bypassing: Completely decoupling adsorption energies by switching between two distinct states of the catalyst (e.g., geometric or electronic) during the reaction cycle, with each state having optimal adsorption energies for specific intermediates. This strategy aims to eliminate all scaling relation constraints.

How does the “breaking” strategy specifically aim to overcome the OOH-OH scaling relation?

The “breaking” strategy focuses on reducing the intercept of the OOH-OH scaling relation (from approximately 3.2 eV to an ideal value of 2.46 eV) by selectively stabilising the OOH intermediate relative to OH. This typically involves introducing spectator groups or a second adsorption site near the active site. These spectators can form hydrogen bonds or other stabilising interactions with OOH, effectively shifting its adsorption energy without proportionally affecting OH. While challenging to achieve experimentally, this strategy has been demonstrated in oxygen evolution reactions (OER) and more recently in ORR using dual-atom catalysts (DACs) with specific active sites like PN3FeN3, where the phosphorus acts as a spectator to stabilise OOH through hydrogen bonding.

What role do Single-Atom Site Catalysts (SACs) and Dual-Atom Site Catalysts (DACs) play in manipulating scaling relations?

Single-Atom Site Catalysts (SACs) and Dual-Atom Site Catalysts (DACs) are crucial in manipulating scaling relations due to their distinct geometric and electronic properties. SACs typically allow for “on-top” adsorption, primarily favouring the associative mechanism in ORR. DACs, with their two neighbouring active sites, offer the possibility of accommodating two dissociation products simultaneously, thereby enabling the dissociative mechanism. This ability to switch mechanisms is key to the “switching” strategy, where DACs can replace the OOH intermediate with two distinct O and OH intermediates adsorbed at separate sites. Furthermore, the precise control over inter-atomic distances and curvature in DACs allows for fine-tuning of electronic structures and promoting specific interactions (like hydrogen bonding), contributing to “breaking” and “pushing” strategies.

What is the ultimate goal of manipulating scaling relations, and how does the “bypassing” strategy contribute to this vision?

The ultimate goal of manipulating scaling relations is to achieve ideal catalyst performance, ideally with zero overpotential, by overcoming the fundamental limitations imposed by these correlations. The “bypassing” strategy represents the most ambitious approach towards this goal. It seeks to completely decouple the adsorption energies of reaction intermediates by allowing the catalyst to switch between two or more distinct states (e.g., geometric, electronic, or photonic) during the reaction cycle. Each state would be optimally configured to bind specific intermediates at the ideal energy values required for efficient catalysis. While seemingly challenging in practice, this concept, inspired by natural enzymes like cytochrome c oxidase, offers a theoretical pathway to eliminate all scaling constraints and achieve the theoretical apex of the volcano plot, pushing the boundaries of what is currently achievable in electrocatalysis.

Call for Postdoctoral Fellows

Join the DoubleLayer hub as a postdoctoral fellow at the University of Latvia!

If you are a post-doc seeking independence through training skills and gaining knowledge in a supportive environment, then this post is for you. That is an opportunity to advance your career through Marie Skłodowska-Curie Actions (MSCA) by focusing on competencies – academic writing, research methods, and supervision – essential for succeeding in academia and industry.

You need to submit just one proposal on 10 September 2025 to participate in at least three funding calls. The proposal is only 10 pages long. The first application is for the MSCA or MSCA4Ukraine postdoctoral fellowship, which provides funding for up to 24 months of research and training. To get this prestigious grant, one must gain more than 95% in the evaluation. However, passing the 85% threshold already opens the opportunity to be funded through the ERA Fellowship or MSCA Seal of Excellence in Estonia. Moreover, passing the 70% threshold makes you eligible to be funded by Latvia. Even more, there is a Latvian post-doc fellowship with the next call in early 2026. And the is also new EU initiative ‘Choose Europe for Science’ to attract 10,000 researchers from abroad. That MSCA COFUND call will open on 1 October 2025 and close on 3 December 2025. Submitting to all these 6! opportunities per 1 proposal increases your chances of fulfilling your research idea and advancing your career. These fellowships include funds for salary, mobility, research, and allowances described in the following table.

Disclaimer: The data in the table might be incorrect. CCC value is taken form 2025 program. Salary is estimated using this calculator.

Latvian 1MSCAERA talentsLatvian 2
Submission16th May 202510th Sept 202510th Sept 2025March 2026
DecisionSummer 2025Feb 2026Feb 2026May 2026
Start6 M after approvalMay–Dec 2026May–Dec 2026Sept–Dec 2026
Threshold / %tbu958585
Success / %≤50 (70 PF)15 (1700 PF)(20 PF)tbu
Linklzp.gov.lvec.europa.euec.europa.eulzp.gov.lv
Duration / M3612–2412–2412–24
Total salary / €/M38605990*0.8385990*0.8383860
Net salary / €/M2080270027002080
Research / €/M1000100010001000
Overhead6%650 €650 €6%
Mobility / €/M700710710?
Family / €/M660660660?
Move / €710 (+660)67006700?
Secondment / M>2 (mandatory)
>6 (optional)
(optional)(optional)(optional)

Why University of Latvia?

  • Great working conditions at a new campus (house of nature) in the heart of Riga.
  • The Chemistry department belongs to the Faculty of Medicine and Life Sciences.
  • Attention to work–life balance, safety, and DEI.
  • Systematic support during the process of the application, such as summer writing camp.
  • No teaching obligations for PF fellows with personal funding.
  • Regulated work-week of 40 hours from Monday to Friday only.
  • At the same time possibility to access research infrastructure at any time and work from home.
  • 2 months vacation.

Why the DoubleLayer hub?

  • The DoubleLayer hub is an emerging excellence centre for modelling scalable chemical processes involving the electrical double layer.
  • It has a horizontal hierarchy and focuses on process-orientated research with attention to excellence and collaboration.

Why Vladislav Ivanistsev as a mentor?

  • Research experience related to the electrical double layer, see list of publications.
  • Experience in supervising dozens of postdocs and BSc–PhD students as well as mentoring over 100 members of the Estonian national team at the international Chemistry Olympiad.
  • Experience in obtaining MSCA PF and national grants.
  • Personal support during the process of application.
  • In 2024 MSCA call, Vladislav consulted 5 applicants: 3 of them got the MSCA PF and 2 got the seal of excellence.

Further details

To be considered for the opportunity, you will undergo a pre-selection process based on your CV, project idea, and motivation letter. There are three main eligibility requirements:

  • You must hold a PhD and up-to 8 years of full-time research experience by the time of the application. Check the eligibility calculator.
  • Applicants of any nationality are welcome, but they must not have lived or worked in Latvia for more than 12 months during the 3 years leading up to the closing date of the call on 10 September 2025.
  • Applicants must choose the Chemistry Department at the university of Latvia as their host institution.

For any other further questions, please contact vladislav.ivanistsev@doublelayer.eu. Prefix your email subject title with “DoubleLayer hub:”

Fonts for grant proposals

The reference font for the body text of European proposals is Times New Roman (Windows platforms), Times/Times New Roman (Apple platforms) or Nimbus Roman No. 9 L (Linux distributions). The Roman family is from a pre-digital age and has well-recognizable features.

Is it the best font in terms of readability? On the one hand, there is a tendency to move from Times-type fonts to plainer fonts, like Calibri. On the other hand, many studies (with controversial results) account for aspects like Dyslexia, typeface anatomy, and Display vs. Print. The effect of font choice on readability and compression on big numbers seems small or insignificant. However, my point is that a proposal must be clear to a few reviewers, who might have difficulties understanding the proposal due to age, Dyslexia, and colour vision deficiency. These few people will have some feelings about how the text is formatted. For that reason and also because of my artistic education in caligraphy, I have been looking for and playing with font combinations for a long time. Here is what I have tried and liked.

1. STIX two and Source Sans form a pair of Serif and Sans fonts. STIX two resulted from a collaborative effort from the most prominent academic publishing companies. Its predecessor (STIX one) has exactly the same metrics as Times New Roman. STIX two is somewhat bigger, which is not prohibited by the EU funding agencies. The main benefit of using STIX fonts is that these are mathematical fonts and, thus, can be natively used in MS Equation Editor (instead of Cambria) and LaTeX (as XITS or STIX2).

2. An excellent substitution for Times New Roman is Zilla Slab – a unique font by the Mozilla foundation – which has the same metrics as Times New Roman, is a Sans font, yet looks like a monospace one, does have features of a Dyslexia-friendly typeface, and looks great in print and on screen. It is freely available from Google fonts. It can be used with Times New Roman (or similar) as a pair of Serif and Sans fonts.

3. Libertinus Serif + Gill Sans is my favourite Serif and Sans pair. You can see Linux Libertine in the Wikipedia logo. Gill Sans Nova is commonly fond in the University of Tartu (Estonia) press. Although Libertinus Serif has an original Sans counterpart, its combination with Gill Sans looks most natural. I love Libertinus because of its amazingly looking ligatures, and it is also compatible with MS Equation Editor and LaTeX.

PS One can play with fonts in the EU projects to make their proposal more appealing. Like Estonian grants, I prefer calls, where applicants fill out online forms without changing the text appearance. Of course, the text looks ugly due to nasty line breaks, horrible chemical formulas and mathematical equations, and poor typography. Still, the competition is more fair because everyone is in the same conditions. 

Reference style for an MSCA proposal

Dani Bodor created a nice reference style that is suitable for writing an MSCA proposal:

marie-sklodowska-curie-actions.csl

See forums.zotero.org/discussion/73275/foot-notes-for-a-marie-curie-application.

This style is similar to what I used in my LaTeX template:

www.overleaf.com/latex/templates/msca-template/dskmdjpzbhkg

Here is the code for that style:

<?xml version="1.0" encoding="utf-8"?>
<style xmlns="http://purl.org/net/xbiblio/csl" class="note" version="1.0" demote-non-dropping-particle="never" page-range-format="chicago" default-locale="en-GB">
  <!-- This style was edited with the Visual CSL Editor (http://editor.citationstyles.org/visualEditor/) -->
  <info>
    <title>Marie Skłodowska-Curie actions</title>
    <id>http://www.zotero.org/styles/marie-sklodowska-curie-actions</id>
    <link href="http://www.zotero.org/styles/marie-sklodowska-curie-actions" rel="self"/>
    <link href="https://forums.zotero.org/discussion/comment/262041/#Comment_262041" rel="documentation"/>
    <author>
      <name>Dani Bodor</name>
      <email>d.bodor@ucl.ac.uk</email>
    </author>
    <category citation-format="note"/>
    <category field="generic-base"/>
    <summary>For use in application to H2020 Marie Skłodowska-Curie Actions fellowship</summary>
    <updated>2017-07-31T17:37:20+00:00</updated>
    <rights license="http://creativecommons.org/licenses/by-sa/3.0/">This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 License</rights>
  </info>
  <locale xml:lang="en">
    <terms>
      <term name="editor" form="verb-short">ed.</term>
      <term name="translator" form="verb-short">trans.</term>
      <term name="editortranslator" form="verb-short">
        <single>ed. and trans.</single>
        <multiple>ed. and trans.</multiple>
      </term>
      <term name="editortranslator" form="verb">
        <single>Edited and translated by</single>
        <multiple>Edited and translated by</multiple>
      </term>
      <term name="translator" form="short">trans.</term>
    </terms>
  </locale>
  <macro name="secondary-contributors">
    <choose>
      <if type="chapter paper-conference" match="none">
        <names variable="editor translator" delimiter=". ">
          <label form="verb" text-case="capitalize-first" suffix=" "/>
          <name and="text" delimiter=", "/>
        </names>
      </if>
    </choose>
  </macro>
  <macro name="container-contributors">
    <choose>
      <if type="chapter paper-conference" match="any">
        <group delimiter=", ">
          <choose>
            <if variable="author">
              <choose>
                <if variable="container-author" match="any">
                  <names variable="container-author">
                    <label form="verb-short" text-case="lowercase" suffix=" "/>
                    <name and="text" delimiter=", "/>
                  </names>
                </if>
              </choose>
              <choose>
                <if variable="container-author author" match="all">
                  <group delimiter=". ">
                    <text variable="page"/>
                    <names variable="editor translator" delimiter=", ">
                      <label form="verb" suffix=" "/>
                      <name and="text" delimiter=", "/>
                    </names>
                  </group>
                </if>
                <else>
                  <names variable="editor translator" delimiter=", ">
                    <label form="verb" text-case="lowercase" suffix=" "/>
                    <name and="text" delimiter=", "/>
                  </names>
                </else>
              </choose>
            </if>
          </choose>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="recipient-note">
    <names variable="recipient" delimiter=", ">
      <label form="verb" text-case="lowercase" suffix=" "/>
      <name and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="editor">
    <names variable="editor">
      <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
      <label form="short" prefix=", "/>
    </names>
  </macro>
  <macro name="translator">
    <names variable="translator">
      <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
      <label form="verb-short" prefix=", "/>
    </names>
  </macro>
  <macro name="recipient">
    <group delimiter=" ">
      <choose>
        <if type="personal_communication">
          <choose>
            <if variable="genre">
              <text variable="genre" text-case="capitalize-first"/>
            </if>
            <else>
              <text term="letter" text-case="capitalize-first"/>
            </else>
          </choose>
        </if>
      </choose>
      <text macro="recipient-note"/>
    </group>
  </macro>
  <macro name="contributors">
    <group delimiter=". ">
      <names variable="author">
        <name name-as-sort-order="first" and="text" sort-separator=", " delimiter=", " delimiter-precedes-last="always"/>
        <substitute>
          <text macro="editor"/>
          <text macro="translator"/>
        </substitute>
      </names>
      <text macro="recipient"/>
    </group>
  </macro>
  <macro name="recipient-short">
    <names variable="recipient">
      <label form="verb" text-case="lowercase" suffix=" "/>
      <name form="short" and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="contributors-short">
    <group delimiter=" ">
      <names variable="author">
        <name form="short" and="symbol"/>
        <substitute>
          <names variable="editor"/>
          <names variable="translator"/>
        </substitute>
      </names>
      <text macro="recipient-short"/>
    </group>
  </macro>
  <macro name="interviewer">
    <names variable="interviewer" delimiter=", ">
      <label form="verb" text-case="capitalize-first" suffix=" "/>
      <name and="text" delimiter=", "/>
    </names>
  </macro>
  <macro name="title">
    <choose>
      <if variable="title" match="none">
        <choose>
          <if type="personal_communication" match="none">
            <text variable="genre" text-case="capitalize-first"/>
          </if>
        </choose>
      </if>
      <else-if type="bill book graphic legislation motion_picture song" match="any">
        <text variable="title" text-case="title" font-style="italic"/>
        <group prefix=" (" suffix=")" delimiter=" ">
          <text term="version"/>
          <text variable="version"/>
        </group>
      </else-if>
      <else-if variable="reviewed-author">
        <group delimiter=", ">
          <text variable="title" font-style="italic" prefix="Review of "/>
          <names variable="reviewed-author">
            <label form="verb-short" text-case="lowercase" suffix=" "/>
            <name and="text" delimiter=", "/>
          </names>
        </group>
      </else-if>
      <else-if type="legal_case interview patent" match="any">
        <text variable="title"/>
      </else-if>
      <else>
        <text variable="title" text-case="title" quotes="true"/>
      </else>
    </choose>
  </macro>
  <macro name="description">
    <group delimiter=", ">
      <group delimiter=". ">
        <text macro="interviewer"/>
        <text variable="medium" text-case="capitalize-first"/>
      </group>
      <choose>
        <if variable="title" match="none"/>
        <else-if type="thesis speech" match="any"/>
        <else-if type="patent">
          <group delimiter=" ">
            <text variable="authority"/>
            <text variable="number"/>
          </group>
        </else-if>
        <else>
          <text variable="genre" text-case="capitalize-first"/>
        </else>
      </choose>
    </group>
  </macro>
  <macro name="container-title">
    <group delimiter=" ">
      <choose>
        <if type="chapter paper-conference" match="any">
          <text term="in" text-case="capitalize-first"/>
        </if>
      </choose>
      <choose>
        <if type="legal_case" match="none">
          <text variable="container-title" text-case="title" font-style="italic"/>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="collection-title">
    <choose>
      <if match="none" type="article-journal">
        <choose>
          <if match="none" is-numeric="collection-number">
            <group delimiter=", ">
              <text variable="collection-title" text-case="title"/>
              <text variable="collection-number"/>
            </group>
          </if>
          <else>
            <group delimiter=" ">
              <text variable="collection-title" text-case="title"/>
              <text variable="collection-number"/>
            </group>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="collection-title-journal">
    <choose>
      <if type="article-journal">
        <group delimiter=" ">
          <text variable="collection-title"/>
          <text variable="collection-number"/>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="edition-note">
    <choose>
      <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
        <choose>
          <if is-numeric="edition">
            <group delimiter=" ">
              <number variable="edition" form="ordinal"/>
              <text term="edition" form="short"/>
            </group>
          </if>
          <else>
            <text variable="edition"/>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="edition">
    <choose>
      <if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
        <choose>
          <if is-numeric="edition">
            <group delimiter=" ">
              <number variable="edition" form="ordinal"/>
              <text term="edition" form="short"/>
            </group>
          </if>
          <else>
            <text variable="edition" text-case="capitalize-first" suffix="."/>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-note">
    <choose>
      <if type="article-journal">
        <group delimiter=", ">
          <text macro="collection-title-journal"/>
          <number variable="volume"/>
          <group delimiter=" ">
            <text term="issue" form="short"/>
            <number variable="issue"/>
          </group>
        </group>
      </if>
      <else-if type="legal_case">
        <group delimiter=", ">
          <group delimiter=" ">
            <number variable="volume"/>
            <text variable="container-title"/>
            <text variable="page"/>
          </group>
          <text variable="locator"/>
        </group>
      </else-if>
      <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song" match="any">
        <group delimiter=", ">
          <text macro="edition-note"/>
          <group delimiter=" ">
            <text term="volume" form="short"/>
            <number variable="volume" form="numeric"/>
          </group>
          <choose>
            <if variable="locator" match="none">
              <group delimiter=" ">
                <number variable="number-of-volumes" form="numeric"/>
                <text term="volume" form="short" plural="true"/>
              </group>
            </if>
          </choose>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-join-with-space">
    <choose>
      <if type="article-journal" variable="volume" match="all">
        <choose>
          <if match="none" variable="collection-title">
            <text macro="locators"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-join-with-comma">
    <choose>
      <if type="legal_case chapter paper-conference" match="any">
        <text macro="locators"/>
      </if>
      <else-if type="article-journal">
        <choose>
          <if variable="volume" match="none">
            <text macro="locators"/>
          </if>
          <else-if match="any" variable="collection-title">
            <text macro="locators"/>
          </else-if>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-join-with-period">
    <choose>
      <if type="legal_case article-journal chapter paper-conference" match="none">
        <text macro="locators"/>
      </if>
    </choose>
  </macro>
  <macro name="locators">
    <choose>
      <if type="article-journal">
        <group delimiter=", ">
          <text macro="collection-title-journal"/>
          <number variable="volume"/>
          <group delimiter=" ">
            <text term="issue" form="short"/>
            <number variable="issue"/>
          </group>
        </group>
      </if>
      <else-if type="legal_case">
        <group delimiter=" ">
          <number variable="volume"/>
          <text variable="container-title"/>
          <text variable="page"/>
        </group>
      </else-if>
      <else-if type="bill book graphic legal_case legislation motion_picture report song" match="any">
        <group delimiter=". ">
          <text macro="edition"/>
          <group delimiter=" ">
            <text term="volume" form="short" text-case="capitalize-first"/>
            <number variable="volume" form="numeric"/>
          </group>
          <group delimiter=" ">
            <number variable="number-of-volumes" form="numeric"/>
            <text term="volume" form="short" plural="true"/>
          </group>
        </group>
      </else-if>
      <else-if type="chapter paper-conference" match="any">
        <group delimiter=". ">
          <text macro="edition"/>
          <choose>
            <if variable="page" match="none">
              <group delimiter=" ">
                <text term="volume" form="short" text-case="capitalize-first"/>
                <number variable="volume" form="numeric"/>
              </group>
            </if>
          </choose>
        </group>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-newspaper">
    <choose>
      <if type="article-newspaper">
        <group delimiter=", ">
          <group delimiter=" ">
            <number variable="edition"/>
            <text term="edition"/>
          </group>
          <group delimiter=" ">
            <text term="section" form="short"/>
            <text variable="section"/>
          </group>
        </group>
      </if>
    </choose>
  </macro>
  <macro name="event">
    <choose>
      <if variable="title">
        <group delimiter=" ">
          <text term="presented at"/>
          <text variable="event"/>
        </group>
      </if>
      <else>
        <group delimiter=" ">
          <text term="presented at" text-case="capitalize-first"/>
          <text variable="event"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="originally-published">
    <group delimiter=", ">
      <group delimiter=": ">
        <text variable="original-publisher-place"/>
        <text variable="original-publisher"/>
      </group>
      <date variable="original-date" form="text" date-parts="year"/>
    </group>
  </macro>
  <macro name="reprint">
    <choose>
      <if variable="original-date issued" match="all">
        <text value="reprint" text-case="capitalize-first"/>
      </if>
    </choose>
  </macro>
  <macro name="publisher">
    <choose>
      <if type="thesis">
        <text variable="publisher"/>
      </if>
      <else-if type="speech">
        <text variable="event-place"/>
      </else-if>
      <else>
        <group delimiter=": ">
          <text variable="publisher-place"/>
          <text variable="publisher"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="issued">
    <choose>
      <if variable="issued">
        <choose>
          <if type="graphic report" match="any">
            <date variable="issued" form="text"/>
          </if>
          <else-if type="legal_case">
            <group delimiter=" ">
              <text variable="authority"/>
              <date variable="issued">
                <date-part name="year"/>
              </date>
            </group>
          </else-if>
          <else-if type="bill book chapter graphic legal_case legislation motion_picture paper-conference report song thesis" match="any">
            <date variable="issued">
              <date-part name="year"/>
            </date>
          </else-if>
          <else-if type="patent">
            <group delimiter=", ">
              <group delimiter=" ">
                <text value="filed"/>
                <date variable="submitted" form="text"/>
              </group>
              <group delimiter=" ">
                <choose>
                  <if variable="issued submitted" match="all">
                    <text term="and"/>
                  </if>
                </choose>
                <text value="issued"/>
                <date variable="issued" form="text"/>
              </group>
            </group>
          </else-if>
          <else>
            <date variable="issued" form="text"/>
          </else>
        </choose>
      </if>
      <else-if variable="status">
        <text variable="status"/>
      </else-if>
      <else-if variable="accessed URL" match="all"/>
      <else>
        <text term="no date" form="short"/>
      </else>
    </choose>
  </macro>
  <macro name="point-locators-subsequent">
    <choose>
      <if type="legal_case"/>
      <else-if variable="locator">
        <choose>
          <if locator="page" match="none">
            <group delimiter=" ">
              <choose>
                <if type="bill book graphic legislation motion_picture report song" match="any">
                  <choose>
                    <if variable="volume">
                      <group delimiter=", ">
                        <group delimiter=" ">
                          <text term="volume" form="short"/>
                          <number variable="volume" form="numeric"/>
                        </group>
                        <label variable="locator" form="short"/>
                      </group>
                    </if>
                    <else>
                      <label variable="locator" form="short"/>
                    </else>
                  </choose>
                </if>
                <else>
                  <label variable="locator" form="short"/>
                </else>
              </choose>
              <text variable="locator"/>
            </group>
          </if>
          <else-if type="bill book graphic legislation motion_picture report song" match="any">
            <group delimiter=":">
              <number variable="volume" form="numeric"/>
              <text variable="locator"/>
            </group>
          </else-if>
          <else>
            <text variable="locator"/>
          </else>
        </choose>
      </else-if>
    </choose>
  </macro>
  <macro name="locators-chapter">
    <choose>
      <if type="chapter paper-conference" match="any">
        <choose>
          <if variable="author container-author" match="all"/>
          <else>
            <choose>
              <if variable="page">
                <number variable="volume" suffix=":"/>
                <text variable="page"/>
              </if>
            </choose>
          </else>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-journal-join-with-colon">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="volume issue" match="any">
            <text variable="page"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="locators-journal-join-with-comma">
    <choose>
      <if type="article-journal">
        <choose>
          <if variable="volume issue" match="none">
            <text variable="page"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="archive">
    <choose>
      <if type="thesis">
        <group delimiter=" ">
          <text variable="archive"/>
          <text variable="archive_location" prefix="(" suffix=")"/>
        </group>
      </if>
      <else>
        <group delimiter=". ">
          <text variable="archive_location" text-case="capitalize-first"/>
          <text variable="archive"/>
          <text variable="archive-place"/>
        </group>
      </else>
    </choose>
  </macro>
  <macro name="issue-join-with-space">
    <choose>
      <if type="article-journal legal_case" match="any">
        <choose>
          <if variable="issue volume" match="any">
            <text macro="issue"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issue-join-with-period">
    <choose>
      <if type="article-journal legal_case" match="none">
        <choose>
          <if type="speech" variable="publisher publisher-place" match="any">
            <text macro="issue"/>
          </if>
        </choose>
      </if>
    </choose>
  </macro>
  <macro name="issue-join-with-comma">
    <choose>
      <if type="article-journal legal_case" match="none">
        <choose>
          <if type="speech" variable="publisher publisher-place" match="none">
            <text macro="issue"/>
          </if>
        </choose>
      </if>
      <else-if variable="volume issue" match="none">
        <text macro="issue"/>
      </else-if>
    </choose>
  </macro>
  <macro name="issue">
    <choose>
      <if type="legal_case" match="any">
        <text macro="issued" prefix="(" suffix=")"/>
      </if>
      <else-if type="article-journal">
        <choose>
          <if variable="issue volume" match="any">
            <text macro="issued" prefix="(" suffix=")"/>
          </if>
          <else>
            <text macro="issued"/>
          </else>
        </choose>
      </else-if>
      <else-if type="speech">
        <group delimiter=", ">
          <group delimiter=" ">
            <choose>
              <if variable="title" match="none"/>
              <else>
                <text variable="genre" text-case="capitalize-first"/>
              </else>
            </choose>
            <text macro="event"/>
          </group>
          <text variable="event-place"/>
          <text macro="issued"/>
        </group>
      </else-if>
      <else-if type="article-newspaper">
        <text macro="issued"/>
      </else-if>
      <else-if variable="publisher-place publisher" match="any">
        <group delimiter=", ">
          <choose>
            <if type="thesis">
              <text variable="genre" text-case="capitalize-first"/>
            </if>
          </choose>
          <group delimiter=". ">
            <text macro="originally-published"/>
            <group delimiter=", ">
              <text macro="reprint"/>
              <text macro="publisher"/>
            </group>
          </group>
          <text macro="issued"/>
        </group>
      </else-if>
      <else>
        <text macro="issued"/>
      </else>
    </choose>
  </macro>
  <macro name="access">
    <group delimiter=". ">
      <choose>
        <if type="graphic report" match="any">
          <text macro="archive"/>
        </if>
        <else-if type="article-journal bill book chapter legal_case legislation motion_picture paper-conference" match="none">
          <text macro="archive"/>
        </else-if>
      </choose>
      <choose>
        <if variable="issued" match="none">
          <group delimiter=" ">
            <text term="accessed" text-case="capitalize-first"/>
            <date variable="accessed" form="text"/>
          </group>
        </if>
      </choose>
      <choose>
        <if type="legal_case" match="none">
          <choose>
            <if variable="DOI">
              <text variable="DOI" prefix="doi:"/>
            </if>
            <else>
              <text variable="URL"/>
            </else>
          </choose>
        </if>
      </choose>
    </group>
  </macro>
  <macro name="case-locator-subsequent">
    <choose>
      <if type="legal_case">
        <text macro="locators-note"/>
      </if>
    </choose>
  </macro>
  <macro name="case-issue-subsequent">
    <choose>
      <if type="legal_case">
        <text macro="issue"/>
      </if>
    </choose>
  </macro>
  <citation et-al-min="4" et-al-use-first="1" disambiguate-add-names="true">
    <layout suffix="." delimiter="; ">
      <choose>
        <if match="all" position="subsequent">
          <text variable="first-reference-note-number" prefix="see ref: "/>
        </if>
        <else-if type="webpage post-weblog" match="any">
          <group delimiter=" ">
            <text variable="title" suffix=": "/>
            <text variable="URL"/>
          </group>
        </else-if>
        <else>
          <group delimiter=", ">
            <text macro="contributors-short" strip-periods="true"/>
            <text variable="title" font-style="italic" />
            <group delimiter=" ">
              <group delimiter=", ">
                <date date-parts="year" form="numeric" variable="issued"/>
                <text macro="case-locator-subsequent"/>
                <choose>
                  <if type="chapter" match="any">
                    <group>
                      <text variable="title" form="short"/>
                      <text value="in: " prefix=", "/>
                      <text variable="container-title" form="short" font-style="italic" suffix=", "/>
                      <text variable="publisher" prefix="(" suffix=")"/>
                      <text variable="page" form="short" prefix=": "/>
                    </group>
                  </if>
                  <else>
                    <group delimiter=" ">
                      <text variable="container-title" form="short" strip-periods="true" font-style="italic"/>
                      <text variable="volume" strip-periods="true" font-weight="bold" suffix=":"/>
                      <text variable="page" form="short" strip-periods="false"/>
                    </group>
                  </else>
                </choose>
              </group>
              <text macro="case-issue-subsequent"/>
            </group>
            <text macro="point-locators-subsequent"/>
          </group>
        </else>
      </choose>
    </layout>
  </citation>
  <bibliography hanging-indent="true" et-al-min="11" et-al-use-first="7" subsequent-author-substitute="&#8212;&#8212;&#8212;" entry-spacing="0">
    <sort>
      <key variable="call-number"/>
    </sort>
    <layout suffix=".">
      <group delimiter=". ">
        <group delimiter=": ">
          <group delimiter=", ">
            <group delimiter=" ">
              <group delimiter=". ">
                <group delimiter=" ">
                  <group delimiter=", ">
                    <group delimiter=". ">
                      <group delimiter=". ">
                        <text macro="contributors"/>
                        <text macro="title"/>
                      </group>
                      <text macro="description"/>
                      <text macro="secondary-contributors"/>
                      <group delimiter=", ">
                        <text macro="container-title"/>
                        <text macro="container-contributors"/>
                      </group>
                      <text macro="locators-join-with-period"/>
                    </group>
                    <text macro="locators-join-with-comma"/>
                    <text macro="locators-chapter"/>
                  </group>
                  <text macro="locators-join-with-space"/>
                </group>
                <text macro="collection-title"/>
                <text macro="issue-join-with-period"/>
              </group>
              <text macro="issue-join-with-space"/>
            </group>
            <text macro="issue-join-with-comma"/>
            <text macro="locators-journal-join-with-comma"/>
            <text macro="locators-newspaper"/>
          </group>
          <text macro="locators-journal-join-with-colon"/>
        </group>
        <text macro="access"/>
      </group>
    </layout>
  </bibliography>
</style>

Some pictures on preparing my MSCA proposal

While preparing the final report on the past MSCA project, I found some memorable pictures. Here me, my wife and nephew are building a LEGO illustration for the project proposal. Yes, we had some fun while I was thinking about the concept.

The results looks pretty.

Still, as the concept illustration, I draw this figure. Today, I have reused it for the report illustration.

Memory issues in GPAW

Try to use default parameters for the calculator. Simple and often useful.

Below you find a list of suggestions that should be considered when encountering a memory problem – when a calculation does not fit an allocated memory limit.

Note1: You can use –dry-run to make memory estimation and check for parallelization over kpts, domain, and bands as well as use of symmetry.

gpaw python --dry-run=N script.py

Mind that the memory estimation with –dry-run is underestimated. https://gitlab.com/gpaw/gpaw/-/issues/614

Note2: You can use def monkey_patch_timer() to write information about memory usage into mem.* files. Call the function before the actual work is started.

from gpaw.utilities.memory import monkey_patch_timer

monkey_patch_timer()

SUBMISSION OPTIONS

  1. Try increasing the total memory or memory per tasks in the submission script, if you are sure that everything else (see below) is correct.
  2. Try increasing number of tasks (CPUs×threading) and nodes, if only you are sure that everything else (see below) is correct. Note that your calculation accesses all the nodes’ memory independent on the number of allocated tasks, but not not all memory is actually available because some is used by the OS and other running jobs. Also, increasing the number of tasks decreases parallelization efficiency and might decrease the queue priority (depending on the queuing system).

GEOMETRY

  1. Check the model geometry. Perhaps, you can make a more compact model. For example, with orthorhombic=False option.
  2. In slab calculations, use just enough vacuum. Mind that PW mode is egg-box effect free, so, with the dipole-layer correction, you can reduce the vacuum layer significantly. Just check for the energy convergence.
    https://wiki.fysik.dtu.dk/gpaw/tutorialsexercises/electrostatics/dipole_correction/dipole.htm
  3. Ensure that symmetry is used. Sometimes, the calculator uses less symmetry than there is. In that case, recheck the geometry. Remember that you can preserve symmetry during optimization. https://wiki.fysik.dtu.dk/ase/ase/constraints.html#the-fixsymmetry-class

PARALLELIZATION

In general, parallelization over domains requires less memory than parallelization over bands and k-points, but the default order of parallelization is k-points, then domains, then bands. Remember the formula kpts×domain×bands = N, where N is the number of tasks (CPUs).

  1. In most cases, the default parallelization with symmetry is most efficient in terms of memory usage.
  2. Reprioritizing parallelization over domain can reduce memory consumption, but also slow down the calculation as parallelization over k-points is usually more time-efficient.
  3. Parallelization over any type can be suppressed by setting, for example, for domains like parallel = {'domain':1}. In the LCAO mode, you should check whether parallelizing over bands, like parallel = {'bands':2}, helps with the memory issue.

CALCULATOR PARAMETERS

  1. Consider using a different mode. “With LCAO, you have fewer degrees of freedom, so memory usage is low. PW mode uses more memory and FD a lot more.” https://wiki.fysik.dtu.dk/gpaw/documentation/basic.html#manual-mode
  2. Change calculation parameters, like h, cutoff, setups (like setups={'Pt': '10'}), basis (like basis={'H': 'sz', 'C': 'dz'}), etc. Check for convergence of properties, like in this tutorial: wiki.fysik.dtu.dk/gpaw/summerschools/summerschool22/catalysis/catalysis.html#extra-material-convergence-test
  3. It is possible to reduce the memory by changing the mixer options.
    https://wiki.fysik.dtu.dk/gpaw/documentation/convergence.html

Bader and Hirshfeld charges with python

Bader analysis is a fast and simple way of getting atomic charges. It is especially useful for periodic calculations. The analysis can be done on the fly using pybader tool from pypi.org/project/pybader. I recommend using it within conda environments.

The installation is straightforward:

pip install pybader

The usage is less obvious. Here is a function for obtaining xmol-type xyz that can obtained with GPAW and visualized with ASE:


def xyzb(atoms, filename, nCPU):
  from pybader.io import gpaw
  from pybader.interface import Bader
  import os
  bader = Bader(*gpaw.read_obj(atoms.calc)) # read ASE object 'atoms'
  bader(threads=nCPU)                       # specify the number of CPUs
  f = open('{0}.xyz'.format(filename), 'w') # set xmol format
  b = bader.atoms_charge                    # get number of electrons per atom
  n = atoms.get_atomic_numbers()            # get atomic numbers
  a = atoms.get_chemical_symbols()          # get chemical symbols
  p = atoms.get_positions()                 # get positions of the atoms
  f.write('{0}\n'.format(len(a)))
  f.write('Properties=species:S:1:pos:R:3:charge:R:1\n') # ensure compatibility with ASE
  for i in range(len(a)):                   # print symbol, positions, and charge
    s = '{0}'.format(a[i])
    x = '{0:.6f}'.format(round(p[i][0],6))
    y = '{0:.6f}'.format(round(p[i][1],6))
    z = '{0:.6f}'.format(round(p[i][2],6))
    c = '{0:.3f}'.format(round(float(n[i]) - float(b[i]),3))
    f.write('{0:<4}{1:>16}{2:>16}{3:>16}{4:>10}\n'.format(s,x,y,z,c))
  f.close()
  del bader
  os.remove('bader.p')

Similarly one can obtain xmol-type xyz file with Hirshfeld charges:


def xyzh(atoms, filename):
  from gpaw.analyse.hirshfeld import HirshfeldPartitioning
  f = open('{0}.xyz'.format(filename), 'w') # set xmol format
  a = atoms.get_chemical_symbols()          # get chemical symbols
  p = atoms.get_positions()                 # get positions of the atoms
  h = HirshfeldPartitioning(atoms.calc).get_charges()
  f.write('{0}\n'.format(len(a)))
  f.write('Properties=species:S:1:pos:R:3:charge:R:1\n') # ensure compatibility with ASE
  for i in range(len(a)):                   # print symbol, positions, and charge
    s = '{0}'.format(a[i])
    x = '{0:.6f}'.format(round(p[i][0],6))
    y = '{0:.6f}'.format(round(p[i][1],6))
    z = '{0:.6f}'.format(round(p[i][2],6))
    c = '{0:.3f}'.format(round(h[i],3))
    f.write('{0:<4}{1:>16}{2:>16}{3:>16}{4:>10}\n'.format(s,x,y,z,c))
  f.close()

In the LCAO mode of GPAW one can also get the Mulliken charges. Test before using:


def xyzm(atoms, filename):
  from gpaw.lcao.tools import get_mulliken
  f = open('{0}.xyz'.format(filename), 'w') # set xmol format
  a = atoms.get_chemical_symbols()          # get chemical symbols
  p = atoms.get_positions()                 # get positions of the atoms
  m = get_mulliken(atoms.calc, range(len(a)))
  f.write('{0}\n'.format(len(a)))
  f.write('Properties=species:S:1:pos:R:3:charge:R:1\n') # ensure compatibility with ASE
  for i in range(len(a)):                   # print symbol, positions, and charge
    s = '{0}'.format(a[i])
    x = '{0:.6f}'.format(round(p[i][0],6))
    y = '{0:.6f}'.format(round(p[i][1],6))
    z = '{0:.6f}'.format(round(p[i][2],6))
    c = '{0:.3f}'.format(round(m[i],3))
    f.write('{0:<4}{1:>16}{2:>16}{3:>16}{4:>10}\n'.format(s,x,y,z,c))
  f.close()