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

Predict at atom level #26

Open
ma763 opened this issue Feb 11, 2021 · 3 comments
Open

Predict at atom level #26

ma763 opened this issue Feb 11, 2021 · 3 comments

Comments

@ma763
Copy link

ma763 commented Feb 11, 2021

Hello,

Thank you so much for this project, very interesting!

I am trying to use this package to do a regression prediction to the atom level instead of predicting a property for the whole crystal. I am trying to input the atom labels but struggling to change the data.py script accordingly... what would be the easiest way to input the atom labels?

And I guess I need to output the atom prediction before the pooling? Does this correspond to return out of def forward(): in model.py?

Thanks!
Marta

@txie-93
Copy link
Owner

txie-93 commented Feb 11, 2021

I think you will need to get the atom features before pooling, as you suggested. The atom features are atom_fea at the following line.

atom_fea = conv_func(atom_fea, nbr_fea, nbr_fea_idx)

@ma763
Copy link
Author

ma763 commented Feb 12, 2021

Okay, that's helpful, will try this!

However, I am still struggling to input the atom label data for training (instead of giving a label for the whole crystal structure). Is it even possible?
Or if not, do you recommend that I try another package for what I am trying to do?

I really appreciate your help, thank you very much.

@txie-93
Copy link
Owner

txie-93 commented Feb 16, 2021

You will need to change the data loader in that case.

Check out the dataset class here.

return (atom_fea, nbr_fea, nbr_fea_idx), target, cif_id

You may also need to change the collate function.

def collate_pool(dataset_list):

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