List of banned tells for GPT

1) Just watched Andy Stapleton youtube-video about echo technique for working with chatGPT. After that I have made my list of banned tells for GPT. Here it is.

You must not use these words and phrases: Vibrant, Bustling, Vital, Out of the box, Underscores, Dive into, Reverberate, Delve, Hustle and bustle, Foster, Labyrinthine, Moist, Remnant, Nestled, Game changer, Symphony, Gossamer, Enigma, A testament to, Indelible, Meticulous, Meticulously, Navigating, Complexities, Realm, Tailored, Underpins, Everchanging, Ever-evolving, Not only, Embark, Designed to enhance, It is advisable, Daunting,  In the realm of, Unlock the secrets, Unveil the secrets, Diving, Unleash, Harness, Tapestry, Take a dive into, Leverage, Metropolis, Unless, Arguably, To put it simply, Promptly, In today's digital era. Avoid analogies and ambiguity in wording. Avoid using gerunds, mdash, and other ways of extending sentences; instead split a sentence and consider removing the unnecessary second part. Avoid words that non-native speakers may not understand. Avoid jargon, but do keep all my terms – do not substitute technical terms with analogies. Avoid comparative adjectives and remove adjectives that do not shape the meaning. 

2) Previously I also used this prompt for working with LaTeX codes, but now I simply use texGPT in overleaf for quick drafting.
Start every sentence on a new line. Add line breaks after every 60 characters to make the text easier to read, but do not add these breaks within commented text. Preserve all original comments exactly as written, and do not delete anything unless explicitly instructed.

3) When working within a project, I define instructions like this:

Prohibited words and phrases: You must not use these words and phrases: Vibrant, Bustling, Vital, Out of the box, Underscores, Dive into, Reverberate, Delve, Hustle and bustle, Foster, Labyrinthine, Moist, Remnant, Nestled, Game changer, Symphony, Gossamer, Enigma, A testament to, Indelible, Meticulous, Meticulously, Navigating, Complexities, Realm, Tailored, Underpins, Everchanging, Ever-evolving, Not only, Embark, Designed to enhance, It is advisable, Daunting,  In the realm of, Unlock the secrets, Unveil the secrets, Diving, Unleash, Harness, Tapestry, Take a dive into, Leverage, Metropolis, Unless, Arguably, To put it simply, Promptly, In today's digital era. Avoid analogies and ambiguity in wording. Avoid using gerunds, mdash, and other ways of extending sentences; instead split a sentence and consider removing the unnecessary second part. Avoid words that non-native speakers may not understand. Avoid jargon, but do keep all my terms – do not substitute technical terms with analogies. Avoid comparative adjectives and remove adjectives that do not shape the meaning. 
You must avoid using "potential" in the sense of showing the capacity to develop into something in the future, because "electric potential" is a physical quantity. you must avoid "framework" in the sense of a basic structure underlying a computations, because "organic framework" is a term in material science. You must avoid using "capacity" and "capacitance" in sense of ability to do something, because similar terms are used in electrochemistry. You must avoid using "generation" in sense of production.

My first presentation generated with AI

I am working on a presentation and use AI for the first time to draft some texts.

There are already existing solutions. Like plug-ins for google slides and copilot that works with powerpoint. I am using chatGPT and work in google slides.

Here is how I add some slides through app scripts:

function addSlide() {
    const presentationName = "ScientificActivities";
    const presentations = DriveApp.getFilesByName(presentationName);
    if (!presentations.hasNext()) return;

    const presentation = SlidesApp.openById(presentations.next().getId());
    const layouts = presentation.getMasters()[0].getLayouts();
    const targetLayout = layouts.find(layout => layout.getLayoutName() === "OBJECT");
    if (!targetLayout) return;

    const titleText = "Bridging Modelling and Scalable Chemical Processes"; // Edit title here
    const bodyText = "Assoc. Prof. Vladislav Ivaništšev"; // Edit body content here

    const newSlide = presentation.appendSlide(targetLayout);
    newSlide.getPlaceholder(SlidesApp.PlaceholderType.TITLE).asShape().getText().setText(titleText);
    newSlide.getPlaceholder(SlidesApp.PlaceholderType.BODY).asShape().getText().setText(bodyText);
}

Title and body can be generated by … within a long conversation with my personal research assistants. I enjoy the process because these skills will save me a lot of time in the future, although right now it took me some hours to get this simple code working. I have also used AI to find and download a dozen on logos of universities that I have visited (shown below). And it saved me time to get facts from my CV right into the slides.

Setting infrastructure is the first step

This week, I have repeatedly discussed the same topic with many peers: What is the first step in starting a new project? Like … a PhD project. For me, it’s about lowering the barriers that prevent beginning the research in the first place. It is all about setting up the right environment, which I call “infrastructure.”

Sometimes, my infrastructure gets disrupted, which slows me down. For example, my new laptop was a major annoyance for some months already. The fan was running at 100% RPM constantly after a software update. It made me worry instead of focusing on the work. Finally, this Saturday morning, I managed to fix it. I am not sure which solution worked – perhaps it was “fan control” – but now I can calmly work in silence.

Additionally, while troubleshooting, I learned more about my CPU and GPU setup. Interestingly, my laptop has two types of CPUs (performance and efficient), totalling 10 cores and 12 threads. I added commands for GPAW Python to run my DFT calculations on 4 and 8 threads accordingly. Yes, I enjoy running tests on my laptop before syncing them via Git and running them on an HPC. Also, I have finally set up the second build-in SSD to store large amounts of data. Hurray!

alias gw8="taskset -c 4-11 mpirun --use-hwthread-cpus -np 8 --bind-to core python"
alias gw4="taskset -c 0-3 mpirun --use-hwthread-cpus -np 4 --bind-to core python"

Calculations run twice faster in 4 performance threads than in 8 efficiency ones!

Feels so good when an infrastructure works for you (and not the other way around).

P.S. The problem returned in a while. This time I installed ProcessLasso to set CPU affinity of most of the processes to energy efficient CPUs.

Optimizers in ASE

Optimising even simple intermediate on metal surfaces might be tricky. They tend change the adsorption site. OOH also very flexible in changing geometry. Thus, some optimizers get stuck (like BFGSLineSearch) while others just crush (like GPMin).

Here is my test with OCPCalculator and EquiformerV2-31M-S2EF-OC20-All+MD (on 1 CPU in Google Colab). Optimisation of OH on Pt(111) is simple.

Here SciPyFminBFGS failed and other optimizers ended up with the same structure, shown below.

Optimisation of OOH on Pt(111) is challenging. GoodOldQuasiNewton, FIRE, FIRE2, MDMin, and BFGSLineSearch (QuasiNewton) do not converge in 95 cycles (which I set as a maximum number of cycles). GPMin, SciPyFminBFGS, SciPyFminCG, and LBFGSLineSearch failed.

Geometry obtained with FIRE2 (similar to BFGS and FIRE)
Geometry obtained with LBFGS. It is clearly far from the optimum.

ResearchCOMP – the European Competence Framework for Researchers

The new Framework for Researchers is a cool tool for planning your career. However, it is so hard to understand and remember. That is why I suggest using the following tree analogy.

ResearchCOMP is an essence like a tree. Roots of critical thinking (1) with trunk of self-management (2) and branches of collaboration (3) hold leaves as research (4) and fruits as impact (5). Water = management 6) and sun = tools (7) nourish the research tree.
The following illustration has been prepared by my son:

Art created by Naran Pavanello, 9 years old

ResearchCOMP, Like a Tree

Roots of critical thinking, deep and strong,
The trunk of self-management keeps you moving along.
Branches of collaboration, reaching far,
Leaves of research, showing who you are.

Fruits of impact, growing bright,
Water of management keeps it right.
Sunlight from tools makes it thrive,
Nourishing the research, keeping it alive.

“Content created with assistance from ChatGPT, an AI language model by OpenAI.”

With this analogy it is now easy to explain what a PhD. student should focus on.

Cognitive Abilities (Roots):
As a Ph.D. student, you first build your thinking skills like problem-solving and creativity. These skills are like roots that hold you on the ground.

Self-Management (Trunk):
You need to manage your time and stress, set goals, and balance your workload. This helps you stay focused and handle challenges, like a trunk.

Working with Others (Branches):
Collaboration is key. Branch with supervisors and teams, seek feedback, and build connections to grow your research.

Managing Research (Water):
You manage your PhD project. This includes organizing resources, meeting deadlines, and planning your work. It is like a flow.

Managing Research Tools (Sun):
Learn to use research tools like data management and software. These help keep your work organized. It is like external source of energy = sunlight.

Doing Research (Leaves):
This is your core work – running experiments, analyzing data, and writing papers to build expertise in your field. Leaves are as dynamic as your research.

Making an Impact (Fruits):
Your research creates impact. Publish, attend conferences, and share your findings as fruits to the society.

And now you can compare a young tree to a mature one. The difference is that the young one is expected to “bloom”, whether the mature one is expected to give “fruits”, as illustrated below.

Working with cubes

Working with cubes can be tedious. I need to show a change in electronic density of a MOF. For that I made two cubes for neutral and charged MOF. Then took their difference using cube_tools, like this.

import numpy as np
from cube_tools import cube

# Load the cube files using the cube class
cube1 = cube('mof_opt_0.0.cube')
cube2 = cube('mof_opt_2.0.cube')

# Subtract the data from cube1 from cube2
cube_diff = cube('mof_opt_2.0.cube')
cube_diff.data = cube2.data - cube1.data

# Get z-axis data and find indices where z > 13.3 (jellium density)
z_indices_above_threshold = np.where(cube_diff.Z > 13.3)[0]

# Remove densities above z = 13.3 by setting them to zero
for idx in z_indices_above_threshold:
    cube_diff.data[:, :, idx] = 0

# Save the modified cube data to a new file
cube_diff.write_cube('cdd.cube')

Once I have got the charge density difference and opened it in VMD, I realised that one part of my MOF is right at the border of a periodic cell, so that part of density was split. So, I used a terminal command to shift the cube like this “cube_tools -t -24 -36 0 cdd.cube”. I had to shift manually positions of the atoms by taking into account the voxels size. Next challenge was hiding half of my MOF to clear the view. So I used this tcl syntax in VMD:

vmd > mol clipplane normal 0 0 0 {1 0 0}
vmd > mol clipplane center 0 0 0 {3 0 0}
vmd > mol clipplane status 0 0 0 1
vmd > mol clipplane normal 0 1 0 {1 0 0}
vmd > mol clipplane center 0 1 0 {3 0 0} 
vmd > mol clipplane status 0 1 0 1
vmd > mol clipplane normal 0 2 0 {1 0 0}
vmd > mol clipplane center 0 2 0 {3 0 0}
vmd > mol clipplane status 0 2 0 1

Here is the result – density is almost homogeneously spread over my MOF upon charging.

Choosing the right style for academic writing

Whoooh, once some big stuff got done, I can return to polishing some drafts. I need to change the style of a whole paper. I am going to do that in three steps using AI. First, I refresh my memory about writing styles. Here is a table listing them.

Writing StyleDescriptionExample with “I”Example with “We”
Active – PersonalUse first-person pronouns to highlight the author’s direct involvement.I have made calculations that show ideal catalysts can exist.We have made calculations that show ideal catalysts can exist.
Active – ImpersonalUses neutral subject (e.g., ‘this plot’, ‘this article’) to describe actions.The calculations show that ideal catalysts can exist.
Passive – EmphasisingFocus on the action rather than the actor, but maintain importance.Calculations have been made, showing that ideal catalysts can exist.
Passive – DiminishingDownplay the action and the results using the past simple tense.Calculations were made, and ideal catalysts could exist.
Perfect Tense – HighlightingUse present perfect to emphasise ongoing relevance or result of an action.I have made calculations, which show ideal catalysts can exist.We have made calculations, which show ideal catalysts can exist.
Past Tense – DiminishingUse simple past to minimise the impact or make the statement more tentative.I made calculations, and they suggest ideal catalysts could exist.We made calculations, and they suggest ideal catalysts could exist.
Conditional or DoubtfulUse conditional mood to express uncertainty or possibility.Calculations may suggest that ideal catalysts can exist.
Future CertaintyExpress actions or findings as a certain outcome in the future.Future calculations will confirm that ideal catalysts can exist.

Second, I analyse a dozen of articles from the targeted journal to identify its commonly used style. Third, I will play a bit with AI to see how my text can be rewritten. As I already have Zotero references in my text, I won’t copy-paste anything from the AI. Yet, I expect the AI assistance will save me some hours.


Some tests with GFN2-xTB

GFN2-xTB [10.1021/acs.jctc.8b01176] is a strange model. I have been testing GFN1 and GFN2 on OOH adsorption on Pt(111). GFN1 from TBLITE with ASE works well. It converges and optimizes to meaningful structures. GFN2 however behaves odd in terms of convergence and optimization. For instance, O–H bond becomes broken. I have tested GFN2 also with xtb, for which the input is quite complicated in comparison to ASE inputs. Anyway, it worked only when I specified the periodic conditions in both xtb.inp and Pt-OOH.coord files. Then I executed xtb like this:

xtb Pt-OOH.coord --gfn2 --tblite --opt --periodic --input xtb.inp
Optimization of Pt(111)–OOH with GFN2-xTB (xtb) resulting in O–H bond dissociation.

P.S. You can see that Pt(111) surface corrugates in case of my 2×2 model. For wider models, the surface remains flat.

A simple recipe for making an apptainer with conda, ASE, and GPAW

At the Tartu HPC cluster I have a limit for number of files, which prevents me from having too many conda environments. So, after I have ruined my base environment, I decided to finally switch to Singularity/Apptainer. Here is a simple recipe for creating an apptainer which is equivalent to standard conda installation. It is just an example. Note that AMD/Intel optimized apptainers will run 10–20% faster than the conda one.

P.S. I have ruined my base environment while trying to install XMGRACE, which is so much easier to use than writing a python code just to check calculations results.

Bootstrap: docker
From: continuumio/miniconda3

%post
    # Install necessary packages including InfiniBand support using apt
    apt-get update && \
    apt-get install -y infiniband-diags perftest ibverbs-providers libibumad3 libibverbs1 libnl-3-200 libnl-route-3-200 librdmacm1 lldpad libdapl2 libdapl-dev rdmacm-utils ibverbs-utils && \
    apt-get install -y grace povray && \
    rm -rf /var/lib/apt/lists/*

    # Configure conda
    conda install --solver=classic conda-forge::conda-libmamba-solver conda-forge::libmamba conda-forge::libmambapy conda-forge::libarchive
    conda install -y python=3.11

    # Install openmpi and ucx from conda
    conda install -y -c conda-forge openmpi=4.1.6=*hc5af2df* ucx

    # Install gpaw from conda
    conda install -y -c conda-forge gpaw=24*=*openmpi*

    # Install other packages
    conda install -y -c conda-forge dftd4 dftd4-python

    # Optionally, clean up Conda to reduce the image size
    conda clean --all -f -y

%environment
    # Activate the base environment
    source /opt/conda/etc/profile.d/conda.sh
    conda activate base