MDANSE icon indicating copy to clipboard operation
MDANSE copied to clipboard

[BUG] `unit_cell` mismatch in `Configuration`

Open oerc0122 opened this issue 1 year ago • 0 comments

Description of the error MDANSE.MolecularDynamics.Configuration : Configuration contains a special check in __setitem__ for name=="unit_cell", however, on subclasses such as _PeriodicConfiguration this is instead an @property attribute. Meaning that there can be two instances of unit_cell (one in _variables one as _unit_cell) which do not align.

Neither seems to require/coerce to an MDANSE.MolecularDynamics.UnitCell.UnitCell class.

Describe the expected result Only once instance/method of characterising the unit cell.

Describe the actual result Multiple, one probably unused means.

Suggested fix Delete unused (probably __setitem__, needs checking) variant and unify.

Additional details N/A

oerc0122 avatar Mar 05 '25 13:03 oerc0122