marrink-lab / polyply_1.0

Generate input parameters and coordinates for atomistic and coarse-grained simulations of polymers, ssDNA, and carbohydrates
Apache License 2.0
119 stars 21 forks source link

ValueError - x0 must only have one dimension - Martini Polymers Tutorial #345

Closed wapisani closed 9 months ago

wapisani commented 10 months ago

Describe the bug I'm going through the tutorial on Martini Polymers (https://github.com/marrink-lab/polyply_1.0/wiki/Tutorial:-Martini-Polymers) and I'm running into an error when attempting to generate the starting coordinates. I have followed the tutorial exactly with the same files and text.

When I run "polyply gen_coords -p system.top -o melt.gro -name PEO -dens 1000", I get the error "File "/home/wapisani/programs/python/3.11.4/lib/python3.11/site-packages/scipy/optimize/_minimize.py", line 533, in minimize raise ValueError("'x0' must only have one dimension.") ValueError: 'x0' must only have one dimension."

polyply version 1.5.0 python version 3.11.4

numpy version 1.24.4 vermouth version 0.9.3 networkx version 2.8.8 scipy version 1.11.2 decorator version 4.4.2 tqdm version 4.66.1 numba version 0.57.1

This appears to be a scipy issue, but I listed all the library version anyway, just in case. This is on a Linux environment within the Windows Subsystem for Linux.

Command line arguments

polyply gen_coords -p system.top -o melt.gro -name PEO -dens 1000

Expected behavior According to the tutorial, I expect a "melt.gro" file to be written.

Additional Files I added a text file containing the full traceback. polyply_tutorial_Martini_Polymers_Traceback.txt

fgrunewald commented 10 months ago

Hi @wapisani,

What you describe is a scipy dependency problem. We've fixed it already but have not yet released that patch. If you reinstall the polyply dev version form GitHub using pip install git+https://github.com/fgrunewald/polyply_1.0.git#polyply_1.0 the error should go away.

Thanks for reporting it! I'll keep the issue open until the patch is released.

Cheers, Fabian

wapisani commented 10 months ago

I removed my polyply venv and re-created it, and the error was gone. Thank you very much!!

fgrunewald commented 10 months ago

@wapisani let me know if you find any other bugs in the tutorial. We've just updated the section so there might be some stuff we haven't caught.

fgrunewald commented 9 months ago

fix solved in 1.6.0