Traceback (most recent call last):
File "/Users/geoffreysametz/Documents/programming/OpenMM/tutorials/alchemical-example.py", line 10, in <module>
fluid = LennardJonesFluid(sigma=sigma, epsilon=epsilon)
File "/Users/geoffreysametz/opt/anaconda3/envs/gmsmdml/lib/python3.9/site-packages/openmmtools/testsystems.py", line 1942, in __init__
TestSystem.__init__(self, **kwargs)
File "/Users/geoffreysametz/opt/anaconda3/envs/gmsmdml/lib/python3.9/site-packages/openmmtools/testsystems.py", line 496, in __init__
self._positions = unit.Quantity(np.zeros([0, 3], np.float), unit.nanometers)
File "/Users/geoffreysametz/opt/anaconda3/envs/gmsmdml/lib/python3.9/site-packages/numpy/__init__.py", line 284, in __getattr__
raise AttributeError("module {!r} has no attribute "
AttributeError: module 'numpy' has no attribute 'float'
The deprecation for the aliases np.object, np.bool, np.float, np.complex, np.str, and np.int is expired (introduces NumPy 1.20). Some of these will now give a FutureWarning in addition to raising an error since they will be mapped to the NumPy scalars in the future.
Apologies: I see this was fixed. Despite using a new conda install, and creating a new environment, an older version of openmmtools was installed as the default.
I tried to run the first OpenMM tutorial for alchemical free energy calculations. I received the following error:
Apparently the December release of Numpy 1.24 enforces the deprecations of types such as
numpy.float
:This page of the Numpy docs has a table of the deprecated numpy types and their replacements.