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
ChemSage DAT support: Constituent parsing bug #419
Comments
There may be some bugs hiding, having a reproducible example would be helpful if one is found.
The intent of IIRC, I think the parsed names of |
Try out the database I linked above, you will see issues with the constituents immediately. Here's an example: Or, if I delete the So both of those are wrong in different ways. The first shouldn't consider I've not had time to see where this goes wrong, but since all that I changed in the DAT was the constituent name, it certainly seems that more information is being extracted from that name than is safe. |
Yeah that's, definitely not correct for the species, but do you know if it's affecting the correctness for any phases or models? For example, the species should be similarly incorrect for the Shishin Fe-Sb-O-S database, but we have some explicit tests in the test suite with that compares pycalphad energies to Thermochimica energies. |
I set up a calculation as follows:
With the database as it is originally, my output is:
With the brackets removed from
With all brackets removed the output is:
I want to emphasize that none of these databases is more or less correct than the others. About the tests: they have the quadruplet concentrations set directly, so it is believable that some error modes are sidestepped. |
The constituents of a multi-sublattice phase listed in a DAT can be chemically complex or contain information about the charge state of the constituent, or really anything else at all. See here for an example:
Fe[3+]
contains a number that tells you about the charge state, whileV2O3
contains numbers that tell you about the stoichiometry of the constituent.It appears that currently, pycalphad counts on the square brackets being there around the charges. So things work fine for
Fe[3+]
, but break down if one hasFe3+
instead, as it reads this as 3 irons. Due to this issue, incorrect results will be computed for many DAT files.However, you cannot count on this convention being followed in DAT files, and in fact it rarely is. Further, one really ought not to be using the constituent names for anything. They are there for readability only, and follow no rules at all. Renaming all five constituents to
Bob
should result in no changes to the calculation.There is in fact no way at all to determine the stoichiometry of individual constituents in an MQMQA phase from a DAT file. Fortunately, these aren't necessary as the quadruplet stoichiometries can be determined from the stoichiometries of the endmembers, the coordinations, and the arrays that link the endmembers to the constituents.
The text was updated successfully, but these errors were encountered: