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

From: Stephan Schott via AMBER <amber.ambermd.org>
Date: Tue, 8 Aug 2023 15:50:42 +0200

Hi again,

Indeed there are 2 calls for np.float which should be changed. I will pass
a patch for this. In the meantime, if this is needed urgently, you can
either downgrade numpy within miniconda to 1.23, or change the calls in
v3numpy.py:

sed -i "s/np.float/float/"
/progs/all/opensource/ambertools/23/lib/python3.10/site-packages/packmol_memgen/lib/pdbremix/v3numpy.py

Best regards,

Stephan Schott Verdugo
Biochemist


Computational Biophysical Chemistry
Institut für Bio- und Geowissenschaften / Bioinformatik (IBG-4)
Forschungszentrum Jülich GmbH
Wilhelm-Johnen-Straße, 52425 Jülich
Germany

------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------
Forschungszentrum Juelich GmbH
52425 Juelich
Sitz der Gesellschaft: Juelich
Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
Vorsitzender des Aufsichtsrats: MinDir Volker Rieke
Geschaeftsfuehrung: Prof. Dr.-Ing. Wolfgang Marquardt (Vorsitzender),
Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens,
Prof. Dr. Astrid Lambrecht, Prof. Dr. Frauke Melchior
------------------------------------------------------------------------------------------------
------------------------------------------------------------------------------------------------


El mar, 8 ago 2023 a las 11:51, Stephan Schott (<
s.schott-verdugo.fz-juelich.de>) escribió:

> Hi Joao,
>
> I haven't those aliases, so indeed it could be the case this is failing.
> I'll have a look and get back to you.
>
> Cheers,
>
> Stephan Schott Verdugo
> Biochemist
>
>
> Computational Biophysical Chemistry
> Institut für Bio- und Geowissenschaften / Bioinformatik (IBG-4)
> Forschungszentrum Jülich GmbH
> Wilhelm-Johnen-Straße, 52425 Jülich
> Germany
>
>
> ---------------------------------------------------------------------------------------------
>
> ---------------------------------------------------------------------------------------------
> Forschungszentrum Juelich GmbH
> 52425 Juelich
> Sitz der Gesellschaft: Juelich
> Eingetragen im Handelsregister des Amtsgerichts Dueren Nr. HR B 3498
> Vorsitzender des Aufsichtsrats: MinDir Stefan Müller
> Geschaeftsfuehrung: Prof. Dr. Astrid Lambrecht (Vorsitzende),
> Karsten Beneke (stellv. Vorsitzender), Dr. Ir. Pieter Jansens, Prof. Dr.
> Frauke Melchior
>
> ---------------------------------------------------------------------------------------------
>
> ---------------------------------------------------------------------------------------------
>
>
> El mar, 8 ago 2023 a las 11:26, Damas Joao CHST via AMBER (<
> amber.ambermd.org>) escribió:
>
>> 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
>>
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Tue Aug 08 2023 - 07:00:02 PDT
Custom Search