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
I'm trying to convert the cp2k output file to DeepMD input format, but I keep getting an error even though I have turned on Forces, Print, Trajectories, and so on.
gen = reverse_readfile(filename) if reverse else zopen(filename, "rt")
File "/home1/.local/lib/python3.9/site-packages/monty/io.py", line 46, in zopen
_name, ext = os.path.splitext(filename)
File "/opt/apps/intel19/python3/3.9.7/lib/python3.9/posixpath.py", line 118, in splitext
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
Hi, I have not used the dpdata to convert the CP2K's output, but after checking the related code, I suggest changing x = dpdata.LabeledSystem('aimd', cp2k_outputtname="out.log", fmt='cp2k/aimd_output') to x = dpdata.LabeledSystem('aimd', cp2k_outputtname="/PATH/TO/YOUR/CALCULATION/FLODER, NOT THE LOG FILE", fmt='cp2k/aimd_output')
Bug summary
Hello,
I'm trying to convert the cp2k output file to DeepMD input format, but I keep getting an error even though I have turned on Forces, Print, Trajectories, and so on.
File "/home1/.local/lib/python3.9/site-packages/monty/io.py", line 46, in zopen
_name, ext = os.path.splitext(filename)
File "/opt/apps/intel19/python3/3.9.7/lib/python3.9/posixpath.py", line 118, in splitext
p = os.fspath(p)
TypeError: expected str, bytes or os.PathLike object, not NoneType
cp2k_test.zip
I have added my input and output log files
dpdata Version
0.2.18
Input Files, Running Commands, Error Log, etc.
**import dpdata
x = dpdata.LabeledSystem('aimd', cp2k_outputtname="out.log", fmt='cp2k/aimd_output')
x.to('deepmd/npy', 'dpmd_npy')**
I have used above script for reformatting data.
Steps to Reproduce
cp2k_test.zip
Further Information, Files, and Links
No response
The text was updated successfully, but these errors were encountered: