-
Notifications
You must be signed in to change notification settings - Fork 21
feat: implement get_density_from_cloud()
#333
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
base: main
Are you sure you want to change the base?
Conversation
for r in results: | ||
if r.get("sg", "unknown").replace(" ", "").lower() == phase: | ||
return r["structure"].density | ||
print( |
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.
Print out available densities and phases. Since COD() handles invalid samples and phases I didn't write any error message here.
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's nicely done but it is failing tests. We may want to mock the API call in the test. We generally don't want the tests to rely on an internet connection.
I got a chance to play around with the functions a bit more. I also meant to say "space group" instead of "phase" earlier and in the code. I think the issues are:
|
honestly I am not sure I would rely on pymatgen/MP. Why not just make an API call to COD and get the cif and compute the density? |
closes #331
@sbillinge ready for review