robinzyb / cp2kdata

cp2k postprocessing tools
https://robinzyb.github.io/cp2kdata/
GNU Lesser General Public License v3.0
52 stars 18 forks source link

NotImplementedError: cp2k version=9.1 is not supported yet for parsing MD cell from cp2k log files. #56

Closed JQ-JQQ closed 1 month ago

JQ-JQQ commented 2 months ago

I used the log file output from 9.1 and got an error. I noticed that the output file in the test is also version 9.1 and NPT_I, but it still got an error. data=dpdata.LabeledSystem("./",cp2k_output_name="output",fmt="cp2kdata/md") error: NotImplementedError: cp2k version=9.1 is not supported yet for parsing MD cell from cp2k log files. Could you help me? Thank you very much!

robinzyb commented 2 months ago

For code robustness, I exclude the version I haven't tested. Could you provide your MD output with 2-3 steps to me so that I can test if it works well in cp2kdata.

robinzyb commented 2 months ago

PS: all md output files in your md folders

JQ-JQQ commented 2 months ago

cp2k-data.tar.gz Thanks for your reply.! Here are all my md files.

robinzyb commented 1 month ago

hi, cp2kdata now doesn't support pdb format for pos file output. could you send me md output with pos file of xyz format? 2 or 3 steps of simulation would be best. the setup instruction: https://robinzyb.github.io/cp2kdata/docs/dpdata_plugin.html note that you can also write the -1.cell file

JQ-JQQ commented 1 month ago

I'm sorry for my oversight, I modified my inp file and it seems to have worked. Here is the output information: _--- You are parsing data using package Cp2kData --- Parsing Energies from ./SbCl-1.ener Parsing Structures from ./SbCl-pos-1.xyz Parsing Forces from ./SbCl-frc-1.xyz Parsing Stresses from ./log Parsing Cells from ./SbCl-1.cell Atom names are fake chemical symbols as you set in cp2k input. Virial Parsing using cp2kdata as plug in for dpdata was not multiplied by volume before cp2kdata v0.6.4 please check the cp2kdata version and the virial.npy

--- You are parsing data using package Cp2kData ---_

But what confuses me is that because it is in npy format, I don’t know how to judge the correctness of the extracted data.
The submitted files include all md files and npy files. cp2k-data-new.tar.gz

robinzyb commented 1 month ago

you are using the version 0.6.9, that means don't have to check the numpy. I will add new function to print the version of cp2kdata. you can check the version of cp2kdata using pip show cp2kdata npy file can be loaded using numpy np.load method. please check out the documentation of numpy

JQ-JQQ commented 1 month ago

Thank you very much for your reply! I will try to look at the output information of the npy file.

robinzyb commented 1 month ago

You can now use the newest version of cp2kdata 0.7.0. https://github.com/robinzyb/cp2kdata/releases/tag/v0.7.0 update the cp2kdata by pip install cp2kdata -U The cell information can be parsed either from -1.cell file or log file for cp2k v9.1

JQ-JQQ commented 1 month ago

Thanks for your help, I will try it as soon as possible.