Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Identifying catalyst and adsorbate #186

Closed
chaitjo opened this issue Feb 1, 2021 · 3 comments
Closed

Identifying catalyst and adsorbate #186

chaitjo opened this issue Feb 1, 2021 · 3 comments

Comments

@chaitjo
Copy link

chaitjo commented Feb 1, 2021

Hi! I was interested in identifying the catalyst and adsorbate atoms within the PyG Batch/Data object:

Batch(atomic_numbers=[172], batch=[172], cell=[2, 3, 3], cell_offsets=[7584, 3], distances=[7584], edge_index=[2, 7584], fixed=[172], force=[172, 3], natoms=[2], neighbors=[2], pos=[172, 3], pos_relaxed=[172, 3], tags=[172], y_init=[2], y_relaxed=[2])

Intuitively, I understand that all the catalyst atoms are packed at the end of the Data object attribute lists, e.g. the atomic numbers 6, 1, 1, 1, and 8:

> data.atomic_numbers[data.batch==0]
tensor([20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20.,
        20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20., 20.,
        20., 20., 20., 20., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28.,
        28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28.,
        28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28.,
        28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28.,
        28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28., 28.,  6.,  1.,
         1.,  1.,  8.], device='cuda:0')

> data.fixed[data.batch==0]
tensor([1., 1., 1., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 1.,
        1., 1., 1., 0., 0., 1., 1., 1., 1., 1., 1., 0., 0., 1., 1., 1., 1., 0.,
        1., 1., 0., 1., 1., 0., 1., 1., 0., 1., 1., 1., 1., 1., 1., 0., 1., 1.,
        0., 1., 1., 0., 1., 1., 0., 1., 1., 1., 1., 1., 1., 0., 1., 1., 0., 1.,
        1., 0., 1., 1., 0., 1., 1., 1., 1., 1., 1., 0., 1., 1., 0., 1., 1., 0.,
        1., 1., 0., 1., 1., 1., 0., 0., 0., 0., 0.], device='cuda:0')

> data.tags[data.batch==0]
tensor([0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 1, 1, 0,
        0, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0,
        0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0,
        0, 1, 0, 0, 1, 0, 0, 0, 0, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 0,
        2, 2, 2, 2, 2], device='cuda:0')

Am I correct in my understanding that the 'tags' attribute is the reverse of the 'fixed' attribute, but also identifies the catalyst atoms with the tag = 2?

@mshuaibii
Copy link
Collaborator

Hi @chaitjo

Great question. Each system (or Data object in this case) consists of a catalyst + adsorbate. Catalysts consist of a surface and a subsurface. During the DFT relaxation process subsurface atoms were fixed, preventing them from moving during the relaxation.

data.fixed is used to identify those fixed atoms, 1 being fixed and 0 being free. data.tags is used to identify the type of atom with 0, 1, 2 corresponding to subsurface, surface, and adsorbate atoms respectively. Connecting it back to data.fixed we can see that all atoms with data.tags = 0 have data.fixed = 1.

Am I correct in my understanding that the 'tags' attribute is the reverse of the 'fixed' attribute, but also identifies the catalyst atoms with the tag = 2?

Catalyst atoms would then correspond to tags = 0,1

Check out this notebook we put together to help better interact/understand the data: https://github.com/Open-Catalyst-Project/ocp/blob/master/docs/source/tutorials/data_playground.ipynb.

I hope this helps clarify

@chaitjo
Copy link
Author

chaitjo commented Feb 1, 2021

Ah, sorry, when I wrote 'catalyst' atoms, I meant the 'adsorbate' atoms!

@chaitjo
Copy link
Author

chaitjo commented Feb 1, 2021

Thanks for the clarification.

@chaitjo chaitjo closed this as completed Feb 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants