Find adsorption sites in pymatgen

Hello everyone!
Recently I use generate_adsorption_structures to generate H adsorption configuration on intermetallic surface. The codes are as follows:

mgzn2_111 = Structure.from_file("mgzn2_matrix.vasp")
asf_mgzn2_111 = AdsorbateSiteFinder(mgzn2_111)
asf_mgzn2_111.surface_sites

[PeriodicSite: Mg (2.6124, 1.5083, 21.3782) [0.3333, 0.1667, 0.7417],
 PeriodicSite: Mg (7.8372, 1.5083, 21.3782) [0.8333, 0.1667, 0.7417],
 PeriodicSite: Mg (-0.0000, 6.0331, 21.3782) [0.3333, 0.6667, 0.7417],
 PeriodicSite: Mg (5.2248, 6.0331, 21.3782) [0.8333, 0.6667, 0.7417],
 PeriodicSite: Zn (-0.0000, 0.0000, 21.1001) [0.0000, 0.0000, 0.7321],
 PeriodicSite: Zn (5.2248, 0.0000, 21.1001) [0.5000, 0.0000, 0.7321],
 PeriodicSite: Zn (-2.6124, 4.5248, 21.1001) [0.0000, 0.5000, 0.7321],
 PeriodicSite: Zn (2.6124, 4.5248, 21.1001) [0.5000, 0.5000, 0.7321]]

ads_sites = asf_mgzn2_111.find_adsorption_sites(distance=2.0)
for i in ads_sites['all']:
    print(np.round(i,4))

[ 2.6124  1.5083 23.3782]
[-0.      0.     23.1001]
[-0.      7.5414 23.2391]
[ 2.6124  0.     23.1001]
[-2.6124  7.5414 23.2391]
[ 5.2248  1.5083 23.3782]

My question is what does the parameter distance=2.0 mean? , I notice when I set distance=2.0 at a flat surface(such as Fe (001) surface, the surface sites own same Z coordinates),The Z coordinate of adsorbed H equals to 2+Z coordinate of surface Fe. When I use the same code in MgZn2(codes are shown above), I found the Z coordinate of adsorbed H are slightly difference. Why?

Thanks!

I find the explanation in official document but I don’t understand

  • distance (float) – distance from the coordinating ensemble of atoms along the miller index for the site (i. e. the distance from the slab itself)

Hi, I think this is because the z-coordinate of your Mg and Zn layers in the original slab are of different height. For the on-top positions, or e.g. bridges between two Mg and or two Zn atoms, the resulting height is just the height of those atoms plus distance. So, in the case of Mg and distance=2:
21.3782 + 2 = 23.3782.
For a bridge between Mg and Zn, or a four fold hollow (two Mg, two Zn), the code gives you the average height of the two surface atoms + distance, e.g.:
(21.3782 + 21.1001) / 2 + 2 = 23.2391

In any case you should relax the distance of the adsorbat!

1 Like