Skip to content

Commit 3016861

Browse files
committed
Fix: Clean up flexaidds __init__.py — remove duplicate imports, fix __version__ override, export StatMechEngine/Thermodynamics unconditionally
- Remove duplicate imports of BindingModeResult, DockingResult, PoseResult (were imported on lines 3 and 48) - Remove hardcoded __version__ = "0.1.0" that overwrote the correct "1.0.0-alpha" from __version__.py - Remove redundant None assignments in ImportError branch before the pure-Python fallback imports replaced them - Add StatMechEngine and Thermodynamics to __all__ unconditionally since they are always available via pure-Python fallback when C++ bindings are absent https://claude.ai/code/session_01DSrCdvJRYJpc3FXtYHLozu
1 parent af69aee commit 3016861

File tree

1 file changed

+3
-19
lines changed

1 file changed

+3
-19
lines changed

python/flexaidds/__init__.py

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,6 @@
2121
)
2222
HAS_CORE_BINDINGS = True
2323
except ImportError:
24-
BoltzmannLUT = None
25-
ENCoMEngine = None
26-
NormalMode = None
27-
Replica = None
28-
State = None
29-
StatMechEngine = None
30-
Thermodynamics = None
31-
TIPoint = None
32-
VibrationalEntropy = None
33-
WHAMBin = None
34-
kB_kcal = 0.0019872041
35-
kB_SI = 1.380649e-23
3624
HAS_CORE_BINDINGS = False
3725
# Fall back to pure-Python implementations where available
3826
from .thermodynamics import StatMechEngine, Thermodynamics, kB_kcal, kB_SI
@@ -45,9 +33,6 @@
4533
VibrationalEntropy = None
4634
WHAMBin = None
4735

48-
from .models import BindingModeResult, DockingResult, PoseResult
49-
from .results import load_results
50-
5136
__all__ = [
5237
# Python models & I/O (always available)
5338
"PoseResult",
@@ -59,13 +44,14 @@
5944
"kB_SI",
6045
# Availability flag
6146
"HAS_CORE_BINDINGS",
47+
# Always available (pure-Python fallback or C++ core)
48+
"StatMechEngine",
49+
"Thermodynamics",
6250
]
6351

6452
# C++ core modules (only available when compiled)
6553
if HAS_CORE_BINDINGS:
6654
__all__.extend([
67-
"StatMechEngine",
68-
"Thermodynamics",
6955
"State",
7056
"BoltzmannLUT",
7157
"Replica",
@@ -75,5 +61,3 @@
7561
"NormalMode",
7662
"VibrationalEntropy",
7763
])
78-
79-
__version__ = "0.1.0"

0 commit comments

Comments
 (0)