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
FIX: ChemSage DAT: Case sensitivity of compound names in endmembers #426
base: develop
Are you sure you want to change the base?
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #426 +/- ##
===========================================
+ Coverage 90.22% 90.24% +0.01%
===========================================
Files 50 50
Lines 7696 7708 +12
===========================================
+ Hits 6944 6956 +12
Misses 752 752
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
I'm hesitant about this because (if I understand #419) I believe that in FactSage giving both As in #419:
It happens to be that the casing can disambiguate them here, but in general I don't think we can expect that to be true. It's not yet clear to me how reconcile the fact that the names are meaningless, but they are quite meaningful in pycalphad because we make an assumption that names are distinguishing in the The error you get with |
Where is the stoichiometry information coming from for each phase at Model construction time? |
I'm not sure I know what you're referring to about stoichiometry. The constituent species are known via the |
I think I mean to ask about the chemistry of the phases (what chemical species are in solution), not the stoichiometry exactly. Can we construct meaningful constituent names from the cation/anion information we have for each phase? It seems like this information has to exist somewhere, or else it wouldn't be possible to construct a mass balance. |
I think I understand your question now. According to #419, the DAT lets us get the pure elements constituents of any species. We could construct a name from that, rather than using the name/label in the DAT. I don’t know if the species by stoichiometry are guaranteed to be unique, but I don’t know why they wouldn’t be for in any phase in practice. For example, in this test database the numbers after
|
I think I'm understanding this issue better now. Can we discard the label at |
These are some minimal changes to allow for case sensitivity in DAT compound names (fixes #425). This doesn't address the fundamental issue that DAT and pycalphad think of constituents differently (#419) but it will hopefully enable a greater subset of DAT files to work without issue. In particular, we no longer convert the entire input file to uppercase before parsing. Instead, selective uppercasing is applied where it is "safer" to extract unambiguous names (though it is still not safe in general).
There is a test to make sure the database from the original issue parses, but this still needs a validation test to make sure the parsed database is correct.