You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In md.py, there's a function for energy minimization called minimize(). The three necessary args of it are struct, top and top_includes. The comments there suggest that top_includes is a list of dirs in which .itp ff files are searched. Assuming it's a list of str of path to the dirs, it does not make sense at line 215 where the list is input to another function called data_tofile () so the itp files can be copied to the temporary dir with .gro and .top files. However, according to the code in data_tofile(), the input should be a single file otherwise the error "expected either Dataset, ndarray or file path as src" is raised.
The error can be repeated by running the following code in the test dir with a terminal:
python
import os
import proto_md
struct = "../sample/SpaceWarping/Struct/1PRT.gro"
struct = os.path.abspath(struct)
top = "../sample/SpaceWarping/Top/1PRT.top"
top = os.path.abspath(top)
top_includes = "../sample/SpaceWarping/Top"
top_includes = os.path.abspath(top_includes)
os.path.isdir(top_includes) #This will return True
proto_md.md.minimize(struct=struct, top=top, top_includes=[top_includes])
The text was updated successfully, but these errors were encountered:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/******/miniconda3/envs/mmic/lib/python3.9/site-packages/proto_md/md.py", line 215, in minimize data_tofile(i, dirname=dirname)
File "/home/******/miniconda3/envs/mmic/lib/python3.9/site-packages/proto_md/util/util.py", line 94, in data_tofile
raise TypeError(
TypeError: expected either Dataset, ndarray or file path as src
top_includes should be a list of files to include for the topology and not the dir. In the docstrings for data_tofile, you'll notice that fid can be None only when dealing with the h5py datasets. In other words, if your itp files are h5py datasets, then your code should work.
In md.py, there's a function for energy minimization called minimize(). The three necessary args of it are
struct
,top
andtop_includes
. The comments there suggest thattop_includes
is a list of dirs in which .itp ff files are searched. Assuming it's a list of str of path to the dirs, it does not make sense at line 215 where the list is input to another function calleddata_tofile ()
so the itp files can be copied to the temporary dir with .gro and .top files. However, according to the code in data_tofile(), the input should be a single file otherwise the error "expected either Dataset, ndarray or file path as src" is raised.The error can be repeated by running the following code in the test dir with a terminal:
The text was updated successfully, but these errors were encountered: