-
Notifications
You must be signed in to change notification settings - Fork 21
feat: add function that returns cif filenames based on chemical formula #336
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
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #336 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 9 9
Lines 516 525 +9
=========================================
+ Hits 516 525 +9
🚀 New features to boost your workflow:
|
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.
is there a reason you are using beautiful soup and not making an API call to COD?
Whoops not really, that was a mistake. I've corrected the function now :) |
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.
that looks better. What is the payload from the API call? I am a bit confused that there are cif files involved. Doesn't it send json or sthg like that?
Yes, the API returns a json file. I implemented something similar to what I saw here https://github.com/materialsproject/pymatgen/blob/master/src/pymatgen/ext/cod.py. I was thinking it might be cleaner if we extract the cif filenames, so that when we compute the density we can pass the cif filenames as arguments. If we keep the functions for computing density private, it would be easier to work with the json files directly? |
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.
this looks good. Two quick questions:
- why are we dealing with cif files? Is there a way to get the data without files involved?
- Let's think about whether we want to use the pymatgen wrapper directly. Downside is we then have pymatgen as a dependency. Another Downside is that we can then only do things that pymatgetn can do. Upside is that they maintain that code. Let's just think about it for a bit.
But issue (1) is more problematic for me if we can avoid it.
We don't need the cif files, from the purpose of computing density we can stop at |
Shall we close this then, since we don't need this function? |
Yep, closing this, made a new PR on computing density based on a json file in #338 |
Task 2 in #331
@sbillinge ready for review