AttributeError: module 'numpy' has no attribute 'float'.

108 views
Skip to first unread message

Xiaowen Wang

unread,
Nov 10, 2023, 12:10:31 PM11/10/23
to gmx_MMPBSA
I encountered an issue while running MM/PBSA calculations on a set of protein-ligand systems using Interaction entropy method. After parsing results to output files, the process consistently encounters the following errors:
[INFO   ] Preparing trajectories for simulation...

[INFO   ] 1000 frames were processed by cpptraj for use in calculation.

[INFO   ] Running calculations on normal system...
[INFO   ] Beginning PB calculations with /home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/bin/sander
[INFO   ]   calculating complex contribution...
[INFO   ]   calculating receptor contribution...
[INFO   ]   calculating ligand contribution...
[INFO   ] Parsing results to output files...

  File "/home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/bin/gmx_MMPBSA", line 8, in <module>
    sys.exit(gmxmmpbsa())
  File "/home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/app.py", line 112, in gmxmmpbsa
    app.parse_output_files()
  File "/home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/main.py", line 1088, in parse_output_files
    self.get_iec2entropy(from_calc)
  File "/home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/main.py", line 1107, in get_iec2entropy
    ie = InteractionEntropyCalc(edata, self.INPUT)
  File "/home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/calculation.py", line 630, in __init__
    self._calculate()
  File "/home/xwpnp/Tools/software/miniconda3/envs/gmxMMPBSA/lib/python3.9/site-packages/GMXMMPBSA/calculation.py", line 637, in _calculate
    exp_energy_int = np.array([], dtype=np.float)
  File "/home/xwpnp/.local/lib/python3.9/site-packages/numpy/__init__.py", line 324, in __getattr__
    raise AttributeError(__former_attrs__[attr])
AttributeError: module 'numpy' has no attribute 'float'.
`np.float` was a deprecated alias for the builtin `float`. To avoid this error in existing code, use `float` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.float64` here.
The aliases was originally deprecated in NumPy 1.20; for more details and guidance see the original release note at:
    https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
Exiting. All files have been retained.


gmx_MMPBSA v1.5.6 was installed by conda. Here is the parameter settings from mmpbsa.in input file:
&general
sys_name="IE",
startframe=1,
endframe=1000,
forcefields="leaprc.protein.ff14SB,leaprc.gaff"
interaction_entropy=1, ie_segment=25, temperature=298
/
#&gb
#igb=5, saltcon=0.150,
#/
&pb
istrng=0.150
/


Interestingly, when I utilized MM/GBSA to include entropy calculation using the IE method, the process terminated successfully.

Mario E. Valdes-Tresanco

unread,
Nov 10, 2023, 12:56:49 PM11/10/23
to Xiaowen Wang, gmx_MMPBSA
Please update gmx_MMPBSA

pip install gmx-mmpbsa -U

--
You received this message because you are subscribed to the Google Groups "gmx_MMPBSA" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gmx_mmpbsa+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gmx_mmpbsa/09fa1a78-94d0-47ca-a75e-97e22f0882b2n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages