-
Notifications
You must be signed in to change notification settings - Fork 23
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
Nodes, docs, and an example for excited states #42
Conversation
1. Fix a bug where the charges tensor is incorrectly sliced. 2. Add corresponding tests to NACR layers.
When the predicted vector is not in the same quadrant as the true value, the calculated loss would be smaller than the correct one. This might cause training process slower or stuck.
minor doc update
Now "auto" will use pytorch when numba or cupy is not installed
One thing I changed that you may not like is # charges contain multiple targets, so set up broadcasting
charges = charges.unsqueeze(2)
positions = positions.unsqueeze(1) Line 46 and 47 in layers/physics.py. I did this so that dipoles and NACR are both (n_molecules, n_states, n_dims). Before, dipole was (n_molecules,n_dims, n_states) |
Thank you! I'm not sure if we had an example that trained to multiple types of dipoles before, so maybe it's not a worry to change how that works - so long as it is documented?. A good thing for us to do to catch on this kind of thing is see if we can modify the ANI1x training to do dipole-based charge assignment training (aka ACA method). In terms of the locations of the objects I wonder if it makes sense to make an "excited_states" node/layer files because of how your various pieces are related to each other. What do you think about that possibility? (it's a question for discussion, not sure what is best). Thank you for including documentation! There are some conflicts appearing here (such as CombineEnergies not appearing on your PR), this will need to be fixed before we could merge. One aspect here I am not totally set on is the name "NACR" - if this is extremely standard we could use it, but it is not very verbose, so anyone unfamiliar will not have any idea what these objects are or how they work. Can you edit the changelog to summarize your updates? |
Single-target will be the same, and all multi-target will be (n_molecule, n_targets, 3). Only existing multi-target dipole training will be affected, as the corresponding dataset would be (n_molecule, 3, n_targets). Do we even have this case before?
We probably don't have this piece of information in the docs at all. Maybe I should add it. I have mentioned this in the example.
I'm not familiar with this part. Maybe I can ask Sakib.
You mentioned this before. I actually had all functions/classes in one file as well. Either way has its own advantage.
Just some basic doc strings and inline comments, but the shape and type of the important variables should be clear to other users.
I will take care of them tomorrow. Just some changes from Sakib are missing from my fork and some strings formatted differently.
Thanks for pointing this out. NACR (Non-Adiabatic Coupling vectoR) is always used within Sergei's academic family tree. Many others directly use NAC to refer to NACR and use something else for the scalar (Non-Adiabatic Coupling Term, NACT for us). Another common one is derivate coupling (DC) for NACR.
I totally forgot the changelog part. I will do it tomorrow. |
I think either NonAdiabaticCoupling or NonAdiabaticCouplingVector would both be fine for class names. |
Then NonAdiabaticCoupling? A little shorter and we can clearly state it is for the vector in the doc string. We will have hippynn.layers.physics.NonAdiabaticCouplingMultiState Should we keep all of them in the same file? |
@tautomer I moved the new functions around and grouped them with our other excited state type node. I also updated the documentation. Are there any outstanding issues? |
@lubbersnick Hi, Nick. Sorry for the delay. I'm totally fine with your edits. |
Excited state nodes, docs, and an example (lanl#42)
No description provided.