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
Adding jarvis-tools structures #297
Conversation
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.
Great! Thanks @knc6!
I have a few comments and suggested changes.
Also, I think I found the issue of why our CI tests are failing, and I also have a question regarding the data structure of jarvis.tools.Atoms:elements
.
Our CI tests that the expected response is correct for the cases where the required adapter packages are and are not installed. It fails for a test that checks the expected response if the package requirement is not installed (see my comments in my review). |
Codecov Report
@@ Coverage Diff @@
## master #297 +/- ##
==========================================
+ Coverage 90.04% 90.12% +0.08%
==========================================
Files 54 55 +1
Lines 2270 2289 +19
==========================================
+ Hits 2044 2063 +19
Misses 226 226
Continue to review full report at Codecov.
|
Thanks @CasperWA for the feedback. I think I have taken all of them into account. |
About your comment on the Atoms object in the jarvis-tools, the elements is a character array such as ['Ac','Ac']. They can be converted to 'jarvis.core.specie.Specie' object for obtaining properties such as atomic mass, atomic number etc. @CasperWA |
Right, so it can also deal with: [
{
"name": "OX2",
"chemical_symbols": ["O", "vacancy"],
"concentration": [0.7, 0.3],
"mass": 16.0,
"original_name": "O1"
},
{
"name": "Cu",
"chemical_symbols": ["Cu"],
"concentration": [1.0],
"mass": 63.5,
"original_name": "Cu-species"
}
] Which is what the value of |
Yes, I think so too. But we do not have the vacancy in the Specie object. We mention in the 'test_special_species' function. We define a separate Vacancy object. |
The requested change doesn't load, not sure why. |
Do you mean it doesn't show because I've "resolved" them? You should be able to just press them and see what they were about :) By the way, I've rebased your commits on the latest commit in the |
So the Actually, we are not properly testing for this at the moment! So I think I'll create a separate PR adding this test. |
@knc6 I've been looking a bit into the code of jarvis, and it seems the Atoms(
elements=[specie.name for specie in attributes.species],
# ... other instantiating attributes ...
) Do you think this makes sense? Instead of your |
@knc6 I have updated your test here to take into account structures with special non-disordered species (i.e., updating it according to the newly added tests in #305. |
@CasperWA I changed the jarvis.py in the adapters/structures accordingly. Your changes makes sense to me. Atoms constructor should be able to take 'X' or any other character. It will only fail, if we ask for some chemical properties such as Specie('X').atomic_mass. |
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.
Thanks for this addition @knc6 !
I think all is as it should be.
No description provided.