-
Notifications
You must be signed in to change notification settings - Fork 18
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
A better PyTorch wrapper #19
Conversation
pytorch/SymmetryFunctions.py
Outdated
@@ -61,12 +63,13 @@ class TorchANISymmetryFunctions(torch.nn.Module): | |||
|
|||
>>> print(energy, forces) | |||
""" | |||
holder: Optional[torch.classes.NNPOps.CustomANISymmetryFunctions] |
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.
Maybe call it something more descriptive like symmetryFunctions
? In my example, the name holder
was a ValueHolder
object.
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.
I'm still working on cleaning up the code, but to call an instance symmetryFunctions
is misleading and might be confused with an actual reference to the function symFunc
.
Benchmarks Molecule: 46 atoms ( Original TorchANI: 5.0 ms |
Very nice! |
What's the status of this PR? It would be really good if we could get it finished up and merged in. |
It works, but needs some tests. I will finish it after more or less two weeks, when the paper is done. |
Any more updates? Until this is done, we can't use this kernel in OpenMM. |
Ping @giadefa |
@peastman I have managed to fix the serialization issue. Could you review? |
Looks much better! Can we use a more meaningful name than "Holder", for example, ANISymmetryFunctions? That will make the code easier to understand. Have you tested this to see if compiling to TorchScript works? |
PyTorch wrapper implement four classes/functions:
I doubt that renaming
Yes, |
can we merge this? |
Ok! |
ANISymmetryFunctions
object