-
Notifications
You must be signed in to change notification settings - Fork 108
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
ENH: Enable option B and option F support for TDBs #412
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #412 +/- ##
===========================================
+ Coverage 90.67% 90.83% +0.16%
===========================================
Files 45 45
Lines 6335 6448 +113
===========================================
+ Hits 5744 5857 +113
Misses 591 591
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
This implements the symmetry options at the level of the database parameters. Maybe one thing to discuss is whether it makes more sense to do this operation at the level of a database or to only do it inside the model. Some considerations:
|
I was prepared to argue against implementing the parameter augmentation at the Database level because I had concerns about round-tripping. However, I see that the approach here (marking the parameters with special metadata) makes it easy to preserve the round-trip property without intruding on Model definition. Also, it keeps Model objects from needing to know about symmetry. One concern I have is with performance. Does a multicomponent 4SL BCC or FCC phase with the symmetry options blow up in time or memory? My intuition is 'no' but I'd be interested to know how it behaves with Bengt's MPEA database, for example. |
Another question: Option B/F apply to all of a phase's model parameters (how it's implemented here), not just the energy, correct? |
Looking at databases I have access to, the biggest with symmetry options are On average over 20 runs:
The computational complexity of The way
Yes, I believe so. The Al-Fe database added to the tests has only the symmetrically distinct |
With the latest changes, you can now delete a model hint and it will effectively convert the database to not use the symmetry option. from pycalphad import Database, variables as v
dbf = Database("mpea-02b.tdb")
del dbf.phases["FCC_4SL"].model_hints["symmetry_FCC_4SL"]
dbf.to_file("mpea-02b-noF.tdb") However, when testing this, I noticed that calling
I'm leaning towards (2), but not sure. Is |
I think (2) is a good approach. |
Move over
generate_symmetric_group
from PhasesResearchLab/ESPEI#229 with tests.Add Al-Fe database from Sundman et al. 2009 that uses option B and option F. The option B phase also has a non-option B alternative, so we can compare energies.
This PR closes #202.