Many-body decomposition | Video tutorial to single-point calculation wrapper script (5/5)

Philip Zhu
41 followers
17 Video Views·Feb 11, 2025
Video tutorial to smart single-point calculation wrapper script. Github:
https://github.com/PhilipZhu/singlepoint-energy-batch
In this example, I will show you how to use this many-body decomposition code.
So, here I have a structure for a dimer, which you can see a picture here.
We have atoms that is grouped in two.
So, assume each of them is a molecule.
The many-body decomposition is a mathematical decomposition of structures of its energy based on its constituents.
So, it decomposes the energy as the energy contribution from its monomer,
the interaction between two monomers, plus the interaction between three monomers, up to n monomers.
So, it's a mathematical decomposition that is quite useful in computational chemistry.
And, it can be recursively defined by the total energy of all of its subsystems.
So, here, for example, in these systems, we are saying that these are molecule 1, these are molecule 2, and these are the same.
Although helium doesn't bind, we assume, because it's a mathematical concept, we assume these two are grouped as a single group,
and this is group 2, and we want to do, we try to do a many-body decomposition of these two systems.
So, to use this, we run this MBD.
And, as you can see here, the usage is use n atoms equals to something, and then run this MBD with input.xyz.
And, you can see that n atoms can be defined or explained here.
This is a string. It means the number of atoms in each monomer,
which means that if you specify like this, it means that the first monomer has 3 atoms, the second monomer has 2 atoms, the third monomer has 2 atoms.
So, in our case, we have n atoms, the first molecule has 2 atoms, the second molecule has 2 atoms.
And then we run this MBD with input.xyz.
What are we missing?
Okay, let's specify a software.
Let's specify a software.
Here, software.ini path can be found.
Let's specify a template.
Template, my software.
Let's use the fast one.
Gaussian.
Software.ini.
Okay.
So, here is the calculation.
So, what it did is it generated a calculation folder, and here you can see all the xyz files generated.
So, here we have the input dimer has 2 molecules, and it generated its subsystems.
This 1 means that it's a 1-mer, which is a monomer.
xx is an identifier that the script 1 needs, so it doesn't mean anything.
01 is binary encoded, means that 0 means the first molecule does not exist.
The second molecule do exist.
Whereas this thing is a 1-mer, so it's a subsystem for this supersystem.
This is a 1-mer where the first molecule exists, and the second molecule doesn't exist.
Here is a dimer where the first exists, the second also exists.
So, it automatically generates this, so we can see what it actually looks like.
This is where only the second monomer exists, this is where only the first monomer exists, and this is where both of them exist.
After it generated all these xyzs, it calculates, it invokes, uses these single points on each of these xyz files.
So it calculates the total energy for each of these xyz files.
So you can see each of them created a calculation folder, and then created that file which contains the total energy.
After all of these finishes, so you can see, this is composed of two frames.
The first frame comes from the first frame of the input dimer, and the second frame comes from the second frame of the input dimer.
And now it generates two frames, and therefore, in this file, this is the two hydrogen atoms, this is the two helium atoms, this is the total energy.
The helium atom has a much more negative total energy because it has two electrons, one electron is attracted by the nuclei, so it has a less negative energy, total energy.
So after it calculates the total energy for all these subsystems, the script, the mdb.sh script will perform the many-body decomposition that satisfies this decomposition rule.
So once it finishes, all of this calculation will be stored in this 1mb01, 1mb02 data.
So this xx.dat stores the total energy, this mb.dat stores the many-body energies.
And it's similarly binary encoded, and this is the two-body energies for the dimer.
So the total energy as you can see, the total energy for the dimer, which is four hydrogen atoms, four helium atoms, it is much more negative than the four hydrogen atoms.
But when you can see the many-body energy for this helium, the many-body, which means the interaction between the two hydrogen molecules, is larger than the interaction between the two groups of helium.
Of course, that's expected because helium is inert, it doesn't interact much, and hydrogen is less inert.
So the many-body energy calculates the interaction between these two groups of atoms, in this case it's the two hydrogen molecules, and in this case it's just two groups of helium.
And this software.ini that we specified when we were running it, which is here, is exactly what we showed in the last example.
So that specifies the software that you want to use.
So you can also use this many-body d-cums with any custom software that can give you an energy from a set of coordinates.
So that is the end for the example.
