Skip to content

Commit 84a42be

Browse files
committed
Fix: resolve __init__.py version conflict, missing exports, and duplicate imports
- Remove hardcoded __version__ = "0.1.0" that overwrote the correct "1.0.0-alpha" imported from __version__.py - Add StatMechEngine and Thermodynamics to __all__ unconditionally since they are always available (C++ core or pure-Python fallback) - Remove duplicate import of models (BindingModeResult, DockingResult, PoseResult) and load_results that was redundant with lines 3-4 - Remove redundant None assignments in except block that were immediately overwritten by the fallback imports https://claude.ai/code/session_01YH8uujLJF3yCtfhiMxWMqc
1 parent af69aee commit 84a42be

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+
# StatMechEngine & Thermodynamics (always available: C++ or pure-Python fallback)
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)