Updated colors for atoms in ASE in 2024 look like this:

For POV rendering there are several options: ASE2, ASE3, Glass, Glass2, Intermediate, JMOL, Pale, Simple, VMD. I like intermediate because it does not have an reflection and glare.

Updated colors for atoms in ASE in 2024 look like this:

For POV rendering there are several options: ASE2, ASE3, Glass, Glass2, Intermediate, JMOL, Pale, Simple, VMD. I like intermediate because it does not have an reflection and glare.

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.
Recently I have been preparing for an interview for a faculty position. As usual I watched a lot of videos, read some tutorials, chatted with GPT, and talked to people (to whom I am very grateful).
The most insightful video turned out to be by Wenhao Sun UM. See below. It is about having a solid research vision!
Besides I would highly recommend a youtube channel “Life in academia” of a very positive prof. Matthias Rillig.
P.S. Despite preparation, I have not anticipated even a single question.
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.

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.

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

P.S. You can see that Pt(111) surface corrugates in case of my 2×2 model. For wider models, the surface remains flat.
Today we installed some software on a laptop of our first year student:
When next time (like in 2024), GPAW refers to a beta-version of ASE to that
conda install -c conda-forge gpaw
conda remove --force ase
pip install --upgrade git+https://gitlab.com/ase/ase.git@master
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()
In this work [0], we have applied the DFT-based delta Kohn–Sham (ΔKS) method to ion pairs in a vacuum to obtain X-ray photoelectron spectra of corresponding ionic liquids (IL). On the example of forty ion pairs, we demonstrate how the core level binding energy (BE) values can be calculated and used to plot theoretical spectra at a low computational cost. Furthermore, we compare the ΔKS results, 1s Kohn–Sham orbital energies, and atomic charges against the experimental X-ray photoelectron data. Recently, in connection to the electrochemical application in the supercapacitors, we have measured spectra for EMImBF4 and EMImB(CN)4 ionic liquids at the carbon–IL interface [1–3]. Other experimental spectra were obtained from the literature [4,5]. Both the ΔKS BE values and the 1s Kohn–Sham orbital energies show a correlation, yet with a different order of the BEs assigned to specific atoms. We find that neither DDEC6 nor Bader charges correlate with the experimental data. Thus, the DFT calculations of 1s Kohn–Sham orbital energies provide the fastest way of predicting the XPS spectra. However, more detailed experimental studies are required to resolve the right order of the BE values and its relation to the atomistic structure of the ILs. The ΔKS calculations provide the most precise estimations of the BEs. Herewith, they also demand more resources and cause computational difficulties discussed in the presentation. Besides the prediction power, a robust computational method can help in intepretating experimental data when the appropriate reference values are either not available nor directly applicable. Thus, the ΔKS method can find its application in various fields of physics and chemistry where the XPS is used for resolving electronic and geometric structures of pure ILs, their mixtures, and at interfaces.
In this work, we have applied the DFT-based delta Kohn–Sham (ΔKS) method to ion pairs in a vacuum to obtain X-ray photoelectron spectra of corresponding ionic liquids (IL). On the example of forty ion pairs, we demonstrate how the core level binding energy (BE) values can be calculated and used to plot theoretical spectra at a low computational cost. Furthermore, we compare the ΔKS results, 1s Kohn–Sham orbital energies, and atomic charges against the experimental X-ray photoelectron data. Recently, in connection to the electrochemical application in the supercapacitors, we have measured spectra for EMImBF4 and EMImB(CN)4 ionic liquids at the carbon–IL interface [1–3]. Other experimental spectra were obtained from the literature [4,5]. Both the ΔKS BE values and the 1s Kohn–Sham orbital energies show a correlation, yet with a different order of the BEs assigned to specific atoms. We find that neither DDEC6 nor Bader charges correlate with the experimental data. Thus, the DFT calculations of 1s Kohn–Sham orbital energies provide the fastest way of predicting the XPS spectra. However, more detailed experimental studies are required to resolve the right order of the BE values and its relation to the atomistic structure of the ILs. The ΔKS calculations provide the most precise estimations of the BEs. Herewith, they also demand more resources and cause computational difficulties discussed in the presentation. Besides the prediction power, a robust computational method can help in intepretating experimental data when the appropriate reference values are either not available nor directly applicable. Thus, the ΔKS method can find its application in various fields of physics and chemistry where the XPS is used for resolving electronic and geometric structures of pure ILs, their mixtures, and at interfaces.
[0] M. Lembinen, E. Nõmmiste, H. Ers, B. Docampo‐Álvarez, J. Kruusma, E. Lust, V.B. Ivaništšev, Calculation of core‐level electron spectra of ionic liquids, Int. J. Quantum Chem. 120 (2020). https://doi.org/10.1002/qua.26247.
[1] J. Kruusma, A. Tõnisoo, R. Pärna, E. Nõmmiste, I. Tallo, T. Romann, E. Lust, Electrochimica Acta 206 (2016) 419–426.
[2] J. Kruusma, A. Tõnisoo, R. Pärna, E. Nõmmiste, I. Kuusik, M. Vahtrus, I. Tallo, T. Romann, E. Lust, J. Electrochem. Soc. 164 (2017) A3393–A3402.
[3] A. Tõnisoo, J. Kruusma, R. Pärna, A. Kikas, M. Hirsimäki, E. Nõmmiste, E. Lust, J. Electrochem. Soc. 160 (2013) A1084–A1093.
[4] A. Foelske-Schmitz, D. Weingarth, R. Kötz, Surf. Sci. 605 (2011) 1979–1985.
[5] I.J. Villar-Garcia, E.F. Smith, A.W. Taylor, F. Qiu, K.R.J. Lovelock, R.G. Jones, P. Licence, Phys. Chem. Chem. Phys. 13 (2011) 2797–2808.