Mod:Hunt Research Group/w63Cl- cpmd
1. which Wannier functions are associated to Cl: have to compute the distance of each Wannier centre from the Cl position, given also in output. The four distances that are shorter are the Wannier functions of interest.
2. Code to do 1.
Now it reads the Wannier centres from wannier.dat, and subtract from each of them the position of Cl. The vector d contains this difference (dx, dy, dz). Now I have to apply PBCs (should be simple to do, because the unit cell is cubic.)
PBC: for some Wannier centres, d(x)=W(x)-Cl(x) could be larger than the size of the unit cell. In those cases, you need to subtract the length of the cell from d(x) (or (dy) or d(z).
To do:
the first thing we want to look at is simply where the wannier centers are.
and then the ones associated with Cl and first solvation shell.
then we need to do all the wannier functions (localisation) with all the centers. get this information using this fortran code. It will print out the Wannier function index, and the distance from Cl. The 4 wannier functions with the shortest distances are those associated with Cl-.
To know which ones are the Wannier functions assocaited with the first wolvation shell there are two ways. the first peak in the Cl-O RDF (for instance) gives an idea of the position of the first solvation shell.
Here we want to know how many Wannier functions belong to the water molecules that are contained in the first solvation shell of Cl.
We know that each water molecule had 4 Wannier centres attached (one for each pair of valence electron).
So, if we know how many water molecules are contained in the first solvation shell, we also know how many Wannier centres are in the first solvation shell, and we can work out their indices.
Of course, during a MD trajectory the indices of the Wannier functions will change.
So can you find out the indices of the four Wannier functions localised on Cl now?