Find_adsorption_sites

Deal all,

How do I do to put a molecule in the center of the unit cell slab using pymatgen? Is there any special function to find this site, like ontop, hollow, and bridge?

Hi, Celso_Rego,

I’m not quite sure I understand your question.

If you want to transfer an atom to the center of your unit cell, then you only need to calculate the center of the unit cell, and move the molecule to that point.

If I understand correctly about what you said, an example is in below:

from ase.build import bulk, molecule
from pymatgen.io.ase import AseAtomsAdaptor

# create a Pt bulk
Pt_bulk = bulk('Pt', a=3.98, cubic=True)
structure = AseAtomsAdaptor.get_structure(atoms=Pt_bulk)
cells = structure.lattice.matrix
a = cells[0]
b = cell[1]
c = cell[2]

# create a molecule (H2O)
mol = molecule('H2O')
mol_pmg = AseAtomsAdaptor.get_molecule(atoms=mol)

# calculate the center
center = (a+b+c)/2

# move the molecule to the center
mv_vector = center - molecule[0].coords

for site in mol_pmg:
    site.coords += mv_vector

If this is not what you want, please comment below.

Best,
ZDH

1 Like

Hi @Zhengda_He and @Celso_Rego
I encounter somg question in finding adsorption sites which may be similar to this. By my understanding, what Celso_Rego want is to find adsorption sites that closed to the center of the slab.

In my case, If I use AdsorbateSiteFinder to find adsorption sites in surfaces that I’m interested, the results may looks like this.
QQ截图20210415191733

One can find that some adsorption sites are close to the boundary of the slab and make it inconvenient to add a adsorbate upon it expecially when the adsorbate is a large molecular.

So do pymatgen have some ways to list the adsorption site that have the same symmetry or just give adsorption sites that are closer to the center of slab directly.

1 Like

Hi @Zhou_Jing
Did you ever find a solution to your problem as I’m having the exact same problem as you and everything I am trying is not working for me?

If not, no worries, I just can’t find anywhere else discussing this particular problem

Hi @Henry_Snowden
I did find a way later. Actually, Pymatgen first finds all the adsorption sites, then the unique adsorption sites are obtained. You can set symm_reduce=0 on the find_adsorption_sites(), then you can get all adsorption sites, like ads_sites_sym0=asf.find_adsorption_sites(symm_reduce=0,distance=2). And for me, I will then refer to the originally obtained unique adsorption sites to find the site I want in ads_sites_sym0 after adding their index in a plot_slab() matplotlib object.