Uh oh!
There was an error while loading. Please reload this page.
feat: add function that returns cif filenames based on chemical formula - #336
feat: add function that returns cif filenames based on chemical formula#336yucongalicechen wants to merge 5 commits into
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:
|
sbillinge
left a comment
There was a problem hiding this comment.
is there a reason you are using beautiful soup and not making an API call to COD?
yucongalicechen
commented
May 3, 2025
Whoops not really, that was a mistake. I've corrected the function now :) |
sbillinge
left a comment
There was a problem hiding this comment.
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?
yucongalicechen
commented
May 12, 2025
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? |
sbillinge
left a comment
There was a problem hiding this comment.
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.
yucongalicechen
commented
May 13, 2025
We don't need the cif files, from the purpose of computing density we can stop at |
sbillinge
commented
May 13, 2025
Shall we close this then, since we don't need this function? |
yucongalicechen
commented
May 13, 2025
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