Skip to content
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: Workspace API #432

Open
wants to merge 172 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
172 commits
Select commit Hold shift + click to select a range
b23a372
WIP: minimizer: Minimal dot derivative support
richardotis Jun 14, 2022
9af0aa7
ENH: Model: Add formulaenthalpy property
richardotis Jul 28, 2022
7656718
WIP: equilibrium: Sketch of new computed property framework
richardotis Jul 28, 2022
2bccdc6
Merge commit
Jul 28, 2022
908e863
WIP: equilibrium: Add sketch of dot_derivative function
richardotis Jul 28, 2022
654dce1
dot_derivatives ComputedProperty class
Jul 28, 2022
6385f78
WIP: equilibrium: Progress on dot derivative calculation
richardotis Jul 28, 2022
c53ff01
WIP: PhaseRecordFactory initial sketch
richardotis Jul 28, 2022
4aeab86
WIP: PhaseRecord: new interface
richardotis Jul 29, 2022
86c0492
WIP: PhaseRecord JIT
richardotis Jul 30, 2022
34e5db0
FIX: FastFunctionFactory: Only build grad/hess when needed for perfor…
richardotis Jul 30, 2022
34c5565
WIP: Remove build_callables and cleanup
richardotis Jul 30, 2022
7eecc01
FIX: dot_derivative function argument error. Still needs a test
richardotis Jul 30, 2022
c09791f
WIP: Workspace and ComputableProperty framework
richardotis Aug 28, 2022
3292f12
WIP: Workspace: some miscibility gap support
richardotis Aug 28, 2022
a619843
WIP: ComputedProperty: Enable general wildcard support
richardotis Aug 28, 2022
5d82c86
WIP: Generalized dot derivative calculation
richardotis Aug 29, 2022
bacff04
Merge branch 'develop' into dot_derivatives
richardotis Aug 29, 2022
091b07b
WIP: Generalized dot derivative support
richardotis Aug 30, 2022
af1fdbe
WIP: MoleFraction/minimizer: Support mole fractions in the denominato…
richardotis Aug 30, 2022
483ffad
MAINT: properties/workspace: Reorganize ComputableProperty code into …
richardotis Aug 30, 2022
43cc8ca
MAINT: properties: Eliminate dependency on runtype
richardotis Aug 30, 2022
8a70059
MAINT: Workspace: create _expand_property_arguments
richardotis Aug 30, 2022
ea1c605
MAINT: Organize Computable Property Framework into module
richardotis Sep 3, 2022
81a21d3
WIP: T0 MVP
richardotis Sep 3, 2022
beae031
FIX: tzero: Phase names in error messages
richardotis Sep 3, 2022
677681e
BLD: setup.py: Add runtype as dependency
richardotis Sep 3, 2022
6d9e269
WIP: equilibrium: Switch to Workspace API
richardotis Sep 4, 2022
d0e9709
FIX: setup.py: Add property_framework module
richardotis Sep 4, 2022
f3ee2d1
FIX: types: Use typing_extensions for Protocols in Python<3.8
richardotis Sep 4, 2022
29932d6
FIX: PhaseRecordFactory: py37 compat with lru_cache
richardotis Sep 4, 2022
74c157e
FIX: Workspace: parameters default value
richardotis Sep 4, 2022
67c0c08
Workspace: Wildcards in specification of dot derivatives
richardotis Sep 4, 2022
685b57e
WIP: ChemicalPotential: Support in the denominator of a dot derivative
richardotis Sep 4, 2022
9a121ed
ENH: Metaproperties: Dormant and isolated phase support
richardotis Sep 5, 2022
d9b275a
T0: Fix circular import for type checking
richardotis Sep 5, 2022
3626c59
MAINT: variables: Separate temperature and pressure into subclasses
richardotis Sep 25, 2022
0b2018e
ENH: Workspace: Initial support for physical units using pint
richardotis Sep 26, 2022
f538026
fixup
richardotis Sep 26, 2022
bb5ef48
WIP: units: moles-mass conversion proof of concept
richardotis Sep 26, 2022
9eed7c9
FIX: Model: Optimize away trivial Piecewise branches for performance
richardotis Oct 13, 2022
4c0318f
FIX: Model: Use raw string to avoid escape sequence in docstring
richardotis Oct 13, 2022
e4698a4
TST: test_model: Add newline at end of file
richardotis Oct 13, 2022
ec4bc10
WIP: Model: Try removing unnecessary branch to fix Mac errors
richardotis Oct 13, 2022
6ef8a4c
CI test only, should be reverted
richardotis Oct 13, 2022
671e006
Revert "CI test only, should be reverted"
richardotis Oct 13, 2022
3a04900
WIP: Workspace: MVP for reactive Workspace attributes
richardotis Oct 14, 2022
042af2a
FIX/TST: calculate: Do not sample between endmembers when there are t…
richardotis Oct 14, 2022
5c731eb
Debugging code
richardotis Oct 14, 2022
3ff08a0
fix typo
richardotis Oct 14, 2022
4a5e587
more debugging code
richardotis Oct 14, 2022
c38693f
debugging toggle verbosity for problem tests
richardotis Oct 14, 2022
4eed79f
debugging add energy test
richardotis Oct 14, 2022
e662dea
debugging force lambda backend
richardotis Oct 14, 2022
4c51e1b
Debugging focus fcc_l12 phase
richardotis Oct 14, 2022
cacd39a
debugging piecewise atom level
richardotis Oct 14, 2022
3d3a28d
debugging fix
richardotis Oct 14, 2022
5e54abd
debugging force numerical result
richardotis Oct 14, 2022
9fc9bc5
debugging switch to energy level evaluation
richardotis Oct 15, 2022
ddfa33b
WIP: attempt to fix numerical difference through forced type conversion
richardotis Oct 15, 2022
644d3df
debugging see if disordered fcc has the same issue
richardotis Oct 15, 2022
82ec816
WIP: Try not replacing the ordering contribution
richardotis Oct 15, 2022
b5be57c
WIP: Try unwrapping symbols only
richardotis Oct 15, 2022
771564f
BLD: deploy: Bump versions for wheel build/deploy
richardotis Oct 15, 2022
aa279f2
TST: test_calculate: Change test name
richardotis Oct 15, 2022
a54faec
MAINT: test_equilibrium: Remove debug verbosity from equilibrium calls
richardotis Oct 15, 2022
58f0f57
FIX: Workspace: Use default_factory in TypedField if value is None
richardotis Oct 15, 2022
490b71c
WIP: Workspace: plot: Better axis labeling for Quantities
richardotis Oct 15, 2022
c81d1b0
ENH: units: Add support for 'atom' as unit, for J/mol<->eV/atom conve…
richardotis Oct 15, 2022
0a072e8
WIP: units: Add support for getitem syntax for setting display units …
richardotis Oct 15, 2022
d1d53e4
WIP: fixes for models and T0 units
richardotis Oct 16, 2022
e14720f
FIX: utils: unpack_phases with KeysView input
richardotis Oct 16, 2022
e1f6055
FIX: Workspace: phases attribute with order-disorder
richardotis Oct 16, 2022
9737ab6
FIX: Workspace: Use PhaseRecordFactory state_variables attribute
richardotis Oct 16, 2022
bb16aad
ENH: ChemicalPotential: Add units
richardotis Oct 16, 2022
d309afa
FIX: ComponentsField: Do not keep instance-dependent state on the des…
richardotis Oct 16, 2022
2de7026
FIX: PhaseRecordFactory: reactive parameters attribute
richardotis Oct 16, 2022
d3ffcc3
FIX: ModelsField: Allow Model types to be specified
richardotis Oct 16, 2022
27da347
MAINT: PhaseRecordFactory/callables: Reorganize modules
richardotis Oct 16, 2022
67e836e
FIX: property_framework: Switch default properties shape to scalars
richardotis Oct 16, 2022
a35ec2c
ENH: variables: Move 'supported variables' to be dynamically computed
richardotis Oct 16, 2022
55516e4
MAINT: base units -> implementation units
richardotis Oct 16, 2022
48a9d46
Workspace: do not add units to plot label when are there none
richardotis Oct 16, 2022
06f0114
property_framework: Add units to property protocol
richardotis Oct 16, 2022
1783253
ENH: units: Add distinct 'fraction' units
richardotis Oct 18, 2022
2b98eab
TST: Add initial tests and fix comparison for properties
richardotis Oct 23, 2022
23933be
FIX/TST: Workspace: Add tzero test
richardotis Oct 23, 2022
5a8a6ab
WIP: property_framework: hashability of objects
richardotis Oct 23, 2022
79f927e
TST: Add test_workspace_conditions_change_clear_result
richardotis Oct 23, 2022
4970747
TST: Add test_workspace_conditions_specify_units
richardotis Oct 23, 2022
da091b7
FIX: minimizer: Types for index array
richardotis Oct 23, 2022
4638f50
WIP: minimizer: Try fixing dtype of index arrays again
richardotis Oct 23, 2022
26a1926
WIP try again
richardotis Oct 23, 2022
165bfef
FIX: minimizer: dtype mismatch issues on some platforms
richardotis Oct 23, 2022
836a62a
MAINT: equilibrium: coverage improvements
richardotis Oct 24, 2022
1e23f24
MAINT: Workspace: Rename dbf->database, comps->components
richardotis Oct 31, 2022
5463431
WIP: Workspace/variables: Cleanup for imperative conditions
richardotis Oct 31, 2022
86c69dd
WIP: Conditions with units
richardotis Oct 31, 2022
f8df169
WIP: renderer support
richardotis Nov 12, 2022
959ae41
MAINT/ENH: eqsolver: Make add_new_phases a cpdef function, for mapping
richardotis Nov 12, 2022
a69d1c7
MAINT: equilibrium: py310 import compat
richardotis Nov 12, 2022
822a452
FIX: conditions/ternplot: compatibility
richardotis Nov 12, 2022
27580f5
FIX: minimizer: Step size for small phase_amt changes
richardotis Nov 13, 2022
5ba4f83
FIX: Workspace: Check for bare arrays without units in recompute()
richardotis Dec 3, 2022
fe02439
ENH/DOC/WIP: Update some examples, first draft of new reference state…
richardotis Dec 4, 2022
5484471
FIX for ReferenceState example notebook
richardotis Dec 4, 2022
52b54c3
FIX: set_plot_renderer: incorrect variable name
richardotis Dec 4, 2022
f16f573
DOC: Add metastability related examples
richardotis Dec 4, 2022
8779e7c
fixup
richardotis Dec 4, 2022
3482368
DOC: Move some examples into advanced section
richardotis Dec 4, 2022
7b04268
DOC: Update more docs for Workspace
richardotis Dec 4, 2022
3cc5a2f
Merge branch 'develop' into dot_derivatives
richardotis Dec 4, 2022
3dd7250
DOC: Bump copyright year
richardotis Dec 4, 2022
75ff938
DOC/MAINT: triangular: Remove deprecated cla() and update ternplot ex…
richardotis Dec 4, 2022
8590469
TST/DOC: Add more CPF tests and fix small error in metastability note…
richardotis Dec 4, 2022
af46fcd
TST/FIX: Add CPF reference state tests and some small import fixes
richardotis Dec 5, 2022
c3a122a
MAINT: Workspace: Remove render() class function
richardotis Dec 5, 2022
5cc29d9
TST: test_cpf_calculation: Numerical tests for properties
richardotis Dec 5, 2022
1eae971
WIP: minimizer: Support for linear combinations of mole fractions as …
richardotis Dec 14, 2022
9384a33
ENH: Create Conditions object for handling workspace conditions
richardotis Dec 16, 2022
dd3ad34
WIP: Conditions: Small fixes, move get_system_spec back to Solver
richardotis Dec 17, 2022
ee308d3
Merge branch 'develop' into fix-large-branching
richardotis Feb 18, 2023
aadfda3
MAINT: Model: Remove unnecessary float coercion code
richardotis Feb 18, 2023
fb140a2
MAINT: Model: Try removing iteration count limit for Piecewise unwrap…
richardotis Feb 18, 2023
0cafa39
FIX: calculate: Still add some extra_points for very complex phases
richardotis Apr 6, 2023
678642f
FIX: minimizer: Gibbs phase rule compliance improvements
richardotis Apr 22, 2023
97e917b
TST: test_equilibrium: Gibbs phase rule compliance (gh-468)
richardotis Apr 22, 2023
1abd412
Merge branch 'develop' into fix-large-branching
richardotis Apr 22, 2023
37fee98
Merge remote-tracking branch 'richardotis/fix-468' into dot_derivatives
richardotis May 7, 2023
7b836e1
Merge remote-tracking branch 'richardotis/fix-large-branching' into d…
richardotis May 7, 2023
bfd2f5a
FIX/TST: tzero: Al-Zn database is not valid above 1700 Kelvin
richardotis May 7, 2023
0105144
FIX: calculate: Compute lingrid based on actual number of endmember p…
richardotis May 7, 2023
fdde673
Merge branch 'dot_derivatives' into add_lincomb_conds
richardotis May 7, 2023
ee46723
WIP: checkpoint with minimal lincomb condition example working and al…
richardotis May 7, 2023
8029507
FIX: Differentiability of props from metaproperties
richardotis Sep 11, 2023
2fbecd6
FIX: PhaseRecordFactory: Add items() attribute
richardotis Sep 15, 2023
4f9aa69
ENH: MassFraction: Support as condition and ComputableProperty
richardotis Sep 16, 2023
3528cd8
TST: Add mass fraction condition test
richardotis Sep 16, 2023
f4255d5
TST: Add linear combination of mole fractions test
richardotis Sep 16, 2023
af7b6f8
Merge branch 'develop' into add_lincomb_conds
richardotis Sep 16, 2023
ec82d51
ENH: Conditions: add basic repr
richardotis Sep 16, 2023
bea4040
Merge branch 'develop' into dot_derivatives
richardotis Sep 16, 2023
7c3ffa0
Merge branch 'develop' into dot_derivatives
richardotis Oct 28, 2023
a53606e
Merge branch 'develop' into dot_derivatives
richardotis Nov 24, 2023
330f885
MAINT: Fix syntax of nogil-except functions for recent Cython versions
richardotis Nov 24, 2023
5a00a51
FIX: metaproperties: SymEngine truth value of relational error
richardotis Nov 24, 2023
baf9fe5
WIP: calculate: Phase-local conditions support
richardotis Dec 23, 2023
f6ab681
WIP: LinearCombination: Add repr
richardotis Dec 23, 2023
df60d2a
FIX: CompositionSet: Use explicit indexing instead of slicing to work…
richardotis Dec 23, 2023
bb8cceb
FIX: minimizer: Use MIN_DRIVING_FORCE_TO_ADD instead of hard-coded co…
richardotis Dec 23, 2023
11a4757
Merge branch 'develop' into dot_derivatives
richardotis Dec 23, 2023
fa568a0
FIX: hitandrun: Add small numerical tolerance for calculating polytop…
richardotis Dec 23, 2023
a1db2b2
WIP: hitandrun: Try to increase robustness
richardotis Dec 23, 2023
bf7159e
MAINT: calculate: Remove unused function
richardotis Dec 23, 2023
30aa6d3
FIX: calculate/polytope: Handle case of zero-solutions in sampler
richardotis Dec 23, 2023
e07b704
WIP: polytope: Performance improvements
richardotis Dec 24, 2023
e1d105e
WIP: polytope: Adjust numerical tolerancing to try to fix test failur…
richardotis Dec 24, 2023
ea1a5e2
WIP: Phase-local conditions support
richardotis Dec 28, 2023
e421c78
ENH: conditions: Molar ratio condition support
richardotis Dec 28, 2023
3c24438
ENH/TST: Workspace: Phase-local conditions support
richardotis Dec 29, 2023
8bf693b
MAINT: cartesian: Remove obsolete module
richardotis Dec 29, 2023
f71253c
FIX/TST: equilibrium: Phases are correctly suspended when a subsystem…
richardotis Dec 29, 2023
4160127
MAINT/DOC: Regenerate API documentation
richardotis Dec 29, 2023
25f259f
fixup for missing RST file in docs
richardotis Dec 29, 2023
db39a7b
MAINT: calculate: Add shortcut path for no phase-local conditions
richardotis Dec 29, 2023
a0541fe
Merge branch 'develop' into dot_derivatives
bocklund Feb 7, 2024
ae57a2e
FIX: get_state_variables: Detect SystemMolesType (N) case
richardotis Apr 12, 2024
aff7dfb
FIX: Workspace: Unwrap models for PhaseRecordFactory to allow pickling
richardotis Apr 13, 2024
0490a51
FIX: Workspace: Type validation for models attribute
richardotis Apr 14, 2024
fa9ce0d
FIX: units: Set pycalphad's unit registry as pint application default…
richardotis Apr 14, 2024
59dcbda
FIX: lower_convex_hull: Correct array indexing for linear combination…
richardotis May 2, 2024
1aedcbd
FIX: ReferenceState: DifferentiableComputableProperty support
richardotis May 14, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions LICENSE.txt
Expand Up @@ -3,10 +3,11 @@ pycalphad, a Python library for the CALculation of PHAse Diagrams

The MIT License (MIT)

Copyright (c) 2014-2019 Richard Otis and Zi-Kui Liu
Copyright (c) 2016-2019 Brandon Bocklund
Copyright (c) 2016-2019 California Institute of Technology
Copyright (c) 2018-2019 Materials Genome Foundation
Copyright (c) 2014-2023 Richard Otis and Zi-Kui Liu
Copyright (c) 2016-2023 Brandon Bocklund
Copyright (c) 2016-2023 California Institute of Technology
Copyright (c) 2018-2023 Materials Genome Foundation
Copyright (c) 2020 David Walz

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
8 changes: 8 additions & 0 deletions docs/api/pycalphad.codegen.rst
Expand Up @@ -12,6 +12,14 @@ pycalphad.codegen.callables module
:undoc-members:
:show-inheritance:

pycalphad.codegen.phase\_record\_factory module
-----------------------------------------------

.. automodule:: pycalphad.codegen.phase_record_factory
:members:
:undoc-members:
:show-inheritance:

pycalphad.codegen.sympydiff\_utils module
-----------------------------------------

Expand Down
28 changes: 22 additions & 6 deletions docs/api/pycalphad.core.rst
Expand Up @@ -20,18 +20,18 @@ pycalphad.core.calculate module
:undoc-members:
:show-inheritance:

pycalphad.core.cartesian module
-------------------------------
pycalphad.core.composition\_set module
--------------------------------------

.. automodule:: pycalphad.core.cartesian
.. automodule:: pycalphad.core.composition_set
:members:
:undoc-members:
:show-inheritance:

pycalphad.core.composition\_set module
--------------------------------------
pycalphad.core.conditions module
--------------------------------

.. automodule:: pycalphad.core.composition_set
.. automodule:: pycalphad.core.conditions
:members:
:undoc-members:
:show-inheritance:
Expand Down Expand Up @@ -124,6 +124,14 @@ pycalphad.core.phase\_rec module
:undoc-members:
:show-inheritance:

pycalphad.core.polytope module
------------------------------

.. automodule:: pycalphad.core.polytope
:members:
:undoc-members:
:show-inheritance:

pycalphad.core.solver module
----------------------------

Expand All @@ -148,6 +156,14 @@ pycalphad.core.utils module
:undoc-members:
:show-inheritance:

pycalphad.core.workspace module
-------------------------------

.. automodule:: pycalphad.core.workspace
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

Expand Down
8 changes: 8 additions & 0 deletions docs/api/pycalphad.plot.rst
Expand Up @@ -20,6 +20,14 @@ pycalphad.plot.eqplot module
:undoc-members:
:show-inheritance:

pycalphad.plot.renderers module
-------------------------------

.. automodule:: pycalphad.plot.renderers
:members:
:undoc-members:
:show-inheritance:

pycalphad.plot.ternary module
-----------------------------

Expand Down
53 changes: 53 additions & 0 deletions docs/api/pycalphad.property_framework.rst
@@ -0,0 +1,53 @@
pycalphad.property\_framework package
=====================================

Submodules
----------

pycalphad.property\_framework.computed\_property module
-------------------------------------------------------

.. automodule:: pycalphad.property_framework.computed_property
:members:
:undoc-members:
:show-inheritance:

pycalphad.property\_framework.metaproperties module
---------------------------------------------------

.. automodule:: pycalphad.property_framework.metaproperties
:members:
:undoc-members:
:show-inheritance:

pycalphad.property\_framework.types module
------------------------------------------

.. automodule:: pycalphad.property_framework.types
:members:
:undoc-members:
:show-inheritance:

pycalphad.property\_framework.tzero module
------------------------------------------

.. automodule:: pycalphad.property_framework.tzero
:members:
:undoc-members:
:show-inheritance:

pycalphad.property\_framework.units module
------------------------------------------

.. automodule:: pycalphad.property_framework.units
:members:
:undoc-members:
:show-inheritance:

Module contents
---------------

.. automodule:: pycalphad.property_framework
:members:
:undoc-members:
:show-inheritance:
1 change: 1 addition & 0 deletions docs/api/pycalphad.rst
Expand Up @@ -12,6 +12,7 @@ Subpackages
pycalphad.io
pycalphad.models
pycalphad.plot
pycalphad.property_framework

Submodules
----------
Expand Down
2 changes: 1 addition & 1 deletion docs/conf.py
Expand Up @@ -47,7 +47,7 @@

# General information about the project.
project = 'pycalphad'
copyright = '2015, pycalphad Development Team'
copyright = '2015-2022, pycalphad Development Team'
author = 'pycalphad Developers'

# The version info for the project you're documenting, acts as replacement for
Expand Down
3 changes: 3 additions & 0 deletions docs/examples/LegacyEnergySurface.nblink
@@ -0,0 +1,3 @@
{
"path": "../../examples/LegacyEnergySurface.ipynb"
}
3 changes: 3 additions & 0 deletions docs/examples/LegacyReferenceState.nblink
@@ -0,0 +1,3 @@
{
"path": "../../examples/LegacyReferenceState.ipynb"
}
3 changes: 3 additions & 0 deletions docs/examples/Metastability.nblink
@@ -0,0 +1,3 @@
{
"path": "../../examples/Metastability.ipynb"
}
16 changes: 13 additions & 3 deletions docs/examples/index.rst
Expand Up @@ -6,10 +6,20 @@ Examples

BinaryExamples
TernaryExamples
Metastability
ReferenceStateExamples
EquilibriumWithOrdering
CementiteAnalysis

Advanced Examples
=================

.. toctree::
:maxdepth: 1

UsingCalculationResults
LegacyEnergySurface
LegacyReferenceState
ChargedPhases
ReferenceStateExamples
PlotActivity
EquilibriumWithOrdering
ViscosityModel
CementiteAnalysis
128 changes: 32 additions & 96 deletions examples/BinaryExamples.ipynb

Large diffs are not rendered by default.

123 changes: 94 additions & 29 deletions examples/CementiteAnalysis.ipynb

Large diffs are not rendered by default.

344 changes: 93 additions & 251 deletions examples/EquilibriumWithOrdering.ipynb

Large diffs are not rendered by default.

178 changes: 178 additions & 0 deletions examples/LegacyEnergySurface.ipynb

Large diffs are not rendered by default.

182 changes: 182 additions & 0 deletions examples/LegacyReferenceState.ipynb

Large diffs are not rendered by default.