Repository navigation
Add pressure to gas-phase compute config - #204
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #204 +/- ##
==========================================
+ Coverage 83.44% 83.61% +0.17%
==========================================
Files 58 58
Lines 5195 5195
==========================================
+ Hits 4335 4344 +9
+ Misses 860 851 -9 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟡 Changes recommended
The change is correct and tested, but a leftover, confusing comment in the new test fixture should be removed before approval.
1 open issue
What changed in this PR
This PR fixes issue #203, where the pressure measured in a thermophysical property target was not propagated to the gas-phase compute config. Because tyff.TensorReporter (and the equilibrate/produce steps) require a pressure argument even for gas-phase NVT runs, the missing key caused a PressureNotDefinedError/Parsl failure. The fix promotes pressure to the shared BaseComputeConfig and ensures the VacuumGas config receives it.
Changes:
- Moved
pressure: floatfromBulkLiquidup into the sharedBaseComputeConfigTypedDict so both liquid and gas configs carry it. - Populated
pressureon theVacuumGasconfig in_make_enthalpy_of_vaporization_compute_configs. - Added a
dhvap_entryfixture and atest_pressure_in_gas_configstest verifying pressure is present in all generated configs.
| File | Description |
|---|---|
| tyff/configs/_compute.py | Adds pressure to the base compute config so all phases inherit it. |
| tyff/configs/liquid.py | Removes the now-redundant pressure field from BulkLiquid. |
| tyff/compute/prep.py | Passes pressure into the gas-phase (VacuumGas) config. |
| tyff/_tests/conftest.py | Adds a dhvap_entry fixture for the enthalpy-of-vaporization case. |
| tyff/_tests/compute/test_prep.py | Adds a test asserting pressure is present in generated configs. |
Review effort: Balanced
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>

Closes #203