How to change distance between adsorbate and atoms on surface

Hi, I would like to learn how to vary the distance from the adsorbate to atoms on the slab surface. I would like to run convergence test on distance between adsorbate and atoms on surface. The reason was when I add H2O on Al2O3 surface, the distance is 2.026A and my advisor think maybe H2O too close to the surface and we need run the convergence test for distance. I tried that the “distance” in find_adsorption_sites from AdsorbateSiteFinder module but it did not work.
Here is the code I used:

    # Add adsorbate to the CONTCAR
    asf = AdsorbateSiteFinder(al2o3_slab)
    sites = asf.find_adsorption_sites(distance = 5, put_inside= True)
    add_h2o_ver = asf.generate_adsorption_structures(h2o_ver,min_lw=1)

i tried to set “height” parameter = 3 in the AdsorbateSiteFinder class but didnt see any different.
Thank you for your time!

Hi Ngan_Huynh,

distance is the correct parameter to modify the distance for AdsorbateSiteFinder.find_adsorption_sites, but the ASF isn’t stateful so you don’t need to run find_adsorption_sites before running find_adsorption_structures. It’s a little complicated to pass it to generate_adsorption_structures. You have to use the find_args parameter with the distance key:

# Add adsorbate to the CONTCAR
asf = AdsorbateSiteFinder(al2o3_slab)
add_h2o_ver = asf.generate_adsorption_structures(h2o_ver, min_lw=1, find_args={"distance": 5})

Just FYI, we typically run ionic optimization after generating these structures, so the distance shouldn’t matter too much as long as it’s not super close.

Thank you for your help! I will give it a try now.