-
Notifications
You must be signed in to change notification settings - Fork 215
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
Embedding spin multiplicity and charge based on SpookyNet implementation #608
Embedding spin multiplicity and charge based on SpookyNet implementation #608
Conversation
The molecular charge and molecular spin embedding taken from SpookyNet and slighly modified for SchNet representation.
testing the electronic_embedding module databases for carbene and ag3 ions train_V01.py is the main file to run the training train.sh is the bash script to run the training on the cluster
Thanks for the PR, @epens94!
Since I have no access to your forked repo, I can not do these changes myself :) |
I think I implemented all of your suggestions. |
ShiftedSoftplus with trainable True results in NaN values. I havent figured out why yet. |
Hi @epens94 ,
Apart from that, I think we are ready to merge :) |
@Stefaanhess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good! Thank you :)
Type of PR
Description
Right now only singlet neutral charged molecules can be clearly distinguished by the model representations (SchNet, PainNN etc)
Main addition is the new class "ElectronicEmbedding".
The implementation follows reference https://doi.org/10.1038/s41467-021-27504-0 (SpookyNet)
The new class can be invoked for SchNet and PaiNN representations (SO3 is not yet implemented)
Validation of new Feature$\alpha$ (angle between 2,0,1) are below 0.1 (see figure 1 and 2).
The feature was tested on two model systems Ag3+/Ag3- and singlet/triplet CH2. Training was done on energies and forces. The databases were the same as used in the reference. PES calculation were done on GFN2-xtb level of theory.
With spin_charge embedding deviations from r (bond length between Ag-Ag or C-H) and
The RMSD for the minimum energy structures are below 10e-4 Angstrom.
When spin respective charge are embedded the qualitative correct PES can be obtained (see figure
Additional Notes
In SpookyNet reference a complex nuclear embedding method based on the atomic electronic configuration was used. Invoking this nuclear embedding method results in slower model convergence (approx. ten times slower). The final error metric (MAE) is roughly 50% better than the simple nuclear embedding scheme. For both systems the MAEs on the test sets were 10-25x lower (Ag3+/Ag3-), 50-120x lower (singlet/triplet CH2) as plain chemical accuracy (1kcal/mol).