Acellera / htmd

HTMD: Programming Environment for Molecular Discovery
https://software.acellera.com/docs/latest/htmd/index.html
Other
253 stars 58 forks source link

conversion despite float already #1005

Closed alejandrovr closed 2 years ago

alejandrovr commented 2 years ago

after mol.write('output.xtc')

MemoryError                               Traceback (most recent call last)
--> 306     coords = coords.astype(np.float32) * 0.1  # Convert from A to nm
    307     if not box.flags["C_CONTIGUOUS"]:
    308         box = np.ascontiguousarray(box)

MemoryError: Unable to allocate 31.2 GiB for an array with shape (557720, 3, 5000) and data type float32
stefdoerr commented 2 years ago

I checked. It's not the conversion to float32. It's the multiplication for some reason. Seems like the operation is not done in place on the same array and the garbage collector takes a bit to get rid of the old memory. Not sure I can do much about it.

stefdoerr commented 2 years ago

@alejandrovr I think you fixed this bug, no?