cgcnn
cgcnn copied to clipboard
Predict at atom level
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
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.
https://github.com/txie-93/cgcnn/blob/d612a69530a72ba686fca56813657b89f2440cc5/cgcnn/model.py#L154
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.
You will need to change the data loader in that case.
Check out the dataset class here. https://github.com/txie-93/cgcnn/blob/d612a69530a72ba686fca56813657b89f2440cc5/cgcnn/data.py#L350
You may also need to change the collate function. https://github.com/txie-93/cgcnn/blob/d612a69530a72ba686fca56813657b89f2440cc5/cgcnn/data.py#L96