robinzyb / cp2kdata

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

Only 1 Frame Detected in AIMD Simulation with CP2K and cp2kdata #54

Closed lijiwei2018 closed 2 months ago

lijiwei2018 commented 3 months ago

I am new to CP2K and DeepMD. I have been running AIMD simulations using CP2K and subsequently parsing the data with cp2kdata. However, I encountered an issue where only 1 frame is detected in the output, as shown in the attached screenshot. image

Code Snippet from cp2kdata import Cp2kOutput cp2k_output_file = "cp2k.log" cp2koutput = Cp2kOutput(output_file=cp2k_output_file, run_type="MD")

I have attached a screenshot of the issue for reference. If more information or files are needed, please let me know. Thank you for your assistance!

lijiwei2018 commented 3 months ago

cp2kdata Version: 0.6.9 Install cp2kdata using pip install cp2kdata.

lijiwei2018 commented 3 months ago

I couldn't successfully test the data from the previous question. 0.3ps.zip import dpdata cp2kmd_dir = "./" cp2kmd_output_name = "md.log" dp = dpdata.LabeledSystem(cp2kmd_dir, cp2k_output_name=cp2kmd_output_name, fmt="cp2kdata/md") print(dp)

NotImplementedError Traceback (most recent call last) in <cell line: 4>() 2 cp2kmd_dir = "./" 3 cp2kmd_output_name = "md.log" ----> 4 dp = dpdata.LabeledSystem(cp2kmd_dir, cp2k_output_name=cp2kmd_output_name, fmt="cp2kdata/md") 5 print(dp)

2 frames /usr/local/lib/python3.10/dist-packages/dpdata/system.py in load_format(fmt) 35 if fmt in formats: 36 return formats[fmt]() ---> 37 raise NotImplementedError( 38 "Unsupported data format {}. Supported formats: {}".format( 39 fmt, " ".join(formats)

NotImplementedError: Unsupported data format cp2kdata/md. Supported formats: xyz quip/gap/xyz_file quip/gap/xyz vasp/contcar vasp/poscar contcar poscar vasp/string vasp/outcar outcar vasp/xml xml gaussian/log gaussian/md gaussian/gjf lammps/lmp lmp lammps/dump dump deepmd/raw deepmd deepmd/comp deepmd/npy deepmd/npy/mixed deepmd/hdf5 siesta/output siesta/aimd_output n2p2 psi4/out psi4/inp pymatgen/structure pymatgen/molecule pymatgen/computedstructureentry list stru abacus/stru abacus/lcao/scf abacus/pw/scf abacus/scf abacus/lcao/md abacus/pw/md abacus/md abacus/lcao/relax abacus/pw/relax abacus/relax mol_file mol sdf_file sdf ase/structure ase/traj qe/cp/traj qe/pw/scf gromacs/gro gro orca/spout pwmat/output pwmat/mlmd pwmat/movement mlmd movement pwmat/final.config pwmat/atom.config final.config atom.config dftbplus fhi_aims/output fhi_aims/md fhi_aims/scf openmx/md cp2k/aimd_output cp2k/output 3dmol amber/md sqm/out sqm/in

robinzyb commented 3 months ago

Did you install cp2kdata and dpdata in the same python environment?

robinzyb commented 3 months ago

please provide the md files so that I can check

lijiwei2018 commented 3 months ago

@robinzyb https://colab.research.google.com/drive/1raCq-81cTf8fYMAc6felA0auWv2rXGtK?usp=drive_link https://drive.google.com/drive/folders/1vmQDmI_gBSVSqafpCgUeWnHwFrV-t_Jm

robinzyb commented 2 months ago
cp: cannot stat '/content/drive/MyDrive/202405/cp2k/*': No such file or directory

only valid in your google drive. Also, I found in your screenshot, the run type is parsed as "ENERGY". Did you append different calculations into one output file? If so, please delete the irrelevant content in your output..

lijiwei2018 commented 2 months ago

Thank you for your help. I modified the Colab notebook, and I will check the output file for any irrelevant content from different calculations and remove it if necessary.

robinzyb commented 2 months ago

@lijiwei2018 solved?

lijiwei2018 commented 2 months ago

@robinzyb My issue has been resolved, thank you.

lijiwei2018 commented 2 months ago

Hello, I am in the process of creating a dataset to train a force field for Fe3O4 using CPMD simulations. Could you advise on the appropriate size for the unit cell in terms of the number of atoms? Would 56 atoms be sufficient, or should I consider a multiple of 56?

robinzyb commented 2 months ago

hi could you move this to discussion of dpgen or deepmd repository??