Commit defdd03
Fix: Narrow MolSysSuite Mass Policy guard to pure molar-mass quantities only.
The condition translating OpenMM molar-mass units (dalton, [M][mol]^-1)
to pint pure-mass dalton ([M]) was too broad: it matched any quantity
with [M]=1 and [mol]=-1, including kilojoule_per_mole ([L]=2, [T]=-2).
This caused puw.convert(openmm_kJ/mol, to_form='pint') to return dalton
instead of kilojoule/mole, breaking puw.standardize calls downstream.
The guard now also verifies that all other dimensions ([L], [T], [K],
[A], [Cd]) are zero, so only true molar-mass scalars (dalton, g/mol…)
are remapped. Energy-per-mole quantities pass through the normal
str(unit) path unaffected.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent eed5223 commit defdd03
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
333 | 333 | | |
334 | 334 | | |
335 | 335 | | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
336 | 343 | | |
337 | | - | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
338 | 347 | | |
339 | 348 | | |
340 | 349 | | |
| |||
0 commit comments