-
Notifications
You must be signed in to change notification settings - Fork 20
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
Added complete transform module for graph generation and #153
Conversation
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
@ipcamit thanks! I don't think there will be major changes needed but a couple of small tweaks. I have no idea of how Also, let's be consistent in naming and such:
|
Ok, let me go through the comments and also add explanatory note on graph utilities and classes. In brief, KLIFFTorchGraph is torch geometric compatible graph generated such that it is completely local and works with OpenKIM drivers. Its biggest benefit is that it does not require any global lattice information etc, and can be used for parallel graph convolutions. Would add more information with first round of improvements. |
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 think I have addressed the comments, please let me know if you have more suggestions. Pushing the changes after this. Just saw comment about type annotations. Will include it in next iteration.
@ipcamit thanks! I'll give it a second go soon and provide feedback if I have. |
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
kliff/transforms/configuration_transforms/graphs/generate_graph.py
Outdated
Show resolved
Hide resolved
@ipcamit A few more comments. The only major one is on the use of |
sure. let me go through these and then we can discuss further. |
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.
Addressed all comments. I think it is nearly done. Will push updated code.
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.
All good. The only question I have now is the PyGgraph
. I commented in the original thread. Copied here:
else:
class PyGGraph:
The above defined is not a subclass of pyg data. So, it will not have collate_fn and such. Then what's its use case?
I have commented in detail above. The main use case is to avoid any conditional imports of the dataclass. Without torch geometric it will log a warning and work as a simple data container. With torch geometric it will also collate. So with or without torch geometric KLIFF code will work. With Torch geometric it will be just more efficient. |
All good. I think the only missing part is type annotation. Can you please add that? |
I have added type annotations wherever I could. Please let me know if you spot any missed ones. |
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.
- A couple of annotation needs to be added in
__init__
nl_ctx
in one methods need to be removed
Summary
This PR integrates all the transforms for the Configuration objects, including configuration transforms (fingerprinting), and property transforms (normalization of energy and forces).
The coordinate transforms are the major contribution which includes graph generation and descriptor generation from
libdescriptor
.It also introduces functions to compute some descriptor widths in
kliff.utils
as I was not sure of where to best keep those functions.I will commit the unit tests for these modules next, which will install the libdescriptor python package to compute and compare descriptors. That commit will also move existing descriptor module to legacy. But will do all of that in next commit with first round of comments.
Also, with this commit I have modified the README file to state the purpose of this branch, as Stefano asked it for pointing it to people. Please let me know if we should include more information.
PS: @mjwen I am also tagging Eric (@EFuem ) in this PR as he has offered to be an extra set of eyes for helping out in the transition.