[AMBER] Issue with deprecated np.float when using packmol-memgen

From: Damas Joao CHST via AMBER <amber.ambermd.org>
Date: Tue, 8 Aug 2023 09:26:09 +0000

Dear all,

I have AmberTools 23 installed through the source on a cluster, and recently one of my users reported the following when using packmol-memgen:

Traceback (most recent call last):
  File "/progs/all/opensource/ambertools/23/bin/packmol-memgen", line 189, in <module>
    packmol_memgen.main(args)
  File "/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/main.py", line 895, in main
    grid = pdbvol(pdb)
  File "/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/main.py", line 784, in pdbvol
    atoms = pdbatoms.read_pdb("temp.pdb")
  File "/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/lib/pdbremix/pdbatoms.py", line 212, in read_pdb
    atoms.append(AtomFromPdbLine(line))
  File "/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/lib/pdbremix/pdbatoms.py", line 128, in AtomFromPdbLine
    atom = Atom()
  File "/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/lib/pdbremix/pdbatoms.py", line 43, in __init__
    self.pos = v3.vector() if pos is None else pos
  File "/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/lib/pdbremix/v3numpy.py", line 29, in vector
    return np.zeros(3, dtype=np.float)
  File "/progs/all/opensource/ambertools/23/miniconda/lib/python3.10/site-packages/numpy/__init__.py", line 305, 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. Did you mean: 'cfloat'?

I did not change any parameters other than the prefix, so I assume the code just needs to be updated to match the more recent version of NumPy. The one that gets installed on my system is version 1.24. Or is there something that I should change from the installation perspective?

Thank you,
João

This message may contain confidential information. If you are not the designated recipient, please notify the sender immediately, and delete the original and any copies. Any use of the message by you is prohibited.
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Aug 08 2023 - 02:30:02 PDT
Custom Search