Hi Norman,
right, the problem is the magic string. After I overwrote the VEL string with CORD in a hex editor, VMD imported the vel file without error message. This magic string could easily be changed to CORD also for velocity files. In this case the CP2K velocities dumped in atomic units could be imported to VMD, but they are considered as coordinates. Just out of curiosity what do you expect to be displayed by VMD then? What would be the benefit?
Best regards,
Matthias
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
cp2k+uns...@googlegroups.com.
To post to this group, send email to cp...@googlegroups.com.
Visit this group at https://groups.google.com/group/cp2k.
For more options, visit https://groups.google.com/d/optout.
Hi Norman,
for such purpose (post-processing of CP2K pos and vel files) you may employ the dumpdcd.f90 code in the cp2k/tools folder which I mentioned already in my first email. It performs also the simple task of just changing “VEL” to “CORD”. Please check the examples listed using the –h flag. For example check the last examples which are mostly related to VMD specifically like:
- dumpdcd -o new.dcd -of dcd -vel2cord old.dcd (dump old.dcd as new.dcd and change only the DCD id string from VEL to CORD)
This is fixes the issue we are discussing here. I am also reluctant in changing VEL to CORD for CP2K vel files, because one would loose the information about the type of that file.
Please note, that dumpdcd.f90 provides even more advanced functionalities for conversion which sometimes might make the use of VMD for such purposes dispensable, like
- Output of an “atomic temperature”
- Application of periodic boundary conditions (PBC), i.e. “folding back” atoms to the original cell)
- Extraction of a subset of configurations (frames): scope by first and last frame, optionally with a stride
- Concatenation of several DCD files
- Dump in XMOL format
- List of atoms leaving the box (given a threshold value)
- Displacement of the atoms w.r.t. the first (original) configuration
Here is the full list of examples available with the –h flag:
dumpdcd UO2-2x2x2-pos-1.dcd (without atomic labels from XYZ file)
dumpdcd -xyz UO2-2x2x2.xyz UO2-2x2x2-pos-1.dcd (single DCD file)
dumpdcd -xyz UO2-2x2x2.xyz UO2-2x2x2-pos-1.dcd UO2-2x2x2-pos-2.dcd ... (multiple DCD files are dumped consecutively)
dumpdcd -info -xyz UO2-2x2x2.xyz UO2-2x2x2-pos-1.dcd UO2-2x2x2-pos-2.dcd (print additional information)
dumpdcd -debug -xyz UO2-2x2x2.xyz UO2-2x2x2-pos-1.dcd UO2-2x2x2-pos-2.dcd (print debug information)
dumpdcd -ekin -d -xyz UO2-2x2x2.xyz UO2-2x2x2-vel-1.dcd (print the "temperature" of each atom)
dumpdcd -ekin -xyz UO2-2x2x2.xyz UO2-2x2x2-vel-1.dcd (print just the temperature of each atom)
dumpdcd -first_frame 5 -last_frame 10 UO2-2x2x2-pos-1.dcd (just dump frame 5 to 10, ie. 6 frames in total)
dumpdcd -o outfile.xyz UO2-2x2x2-pos-1.dcd (write output to the file "outfile.xyz" instead of stdout)
dumpdcd -o test.xyz -output_format xmol -xyz ref.xyz -first 10 -last 10 test.dcd (dump 10th frame in XMOL format)
dumpdcd -of dcd -ff 10 -lf 20 test.dcd (dump the frames 10 to 20 in DCD format to the default output file output.dcd)
dumpdcd -o part.dcd -of dcd -ff 1 -lf 3 test.dcd (dump the frames 1 to 3 in DCD format to the output file part.dcd)
dumpdcd -o part.dcd -of dcd -first 10 -lf 100 -stride 10 test.dcd (dump the frames 10, 20, ..., 100 to the file part.dcd)
dumpdcd -output new.dcd -output_format dcd -pbc old.dcd (dump all frames applying PBC to the output file new.dcd)
dumpdcd -o new.dcd -of dcd -pbc -trace_atoms 0.02 old.dcd (all atoms more than 2% out of the box are listed)
dumpdcd -o new.dcd -e out_of_box.log -of dcd -pbc -trace_atoms 0.1 old.dcd (atoms more than 10% out of the box are listed)
dumpdcd -o new.dcd -of dcd -vel2cord old.dcd (dump old.dcd as new.dcd and change only the DCD id string from VEL to CORD)
dumpdcd -i -disp UO2-2x2x2-pos-1.dcd (dump the displacements of all atoms w.r.t. their positions in the first frame)
dumpdcd -i -of dcd -disp UO2-2x2x2-pos-1.dcd (dump the atomic displacements as x-coordinates of a DCD CORD file)
dumpdcd -i -of dcd -ekin -v2c -xyz UO2-2x2x2.xyz UO2-2x2x2-vel-1.dcd (dump the atomic temperatures as x-coordinates of a
DCD CORD file -> hack for VMD)
HTH,
Matthias
--
Hi Norman,
thanks for rising the issue.
I have just added also a –frc2cord flag for the CP2K frc files with the forces to complete the story.
Best,
Matthias
From: cp...@googlegroups.com [mailto:cp...@googlegroups.com] On Behalf Of NORMAN GEIST
Sent: Donnerstag, 28. Januar 2016 12:36
To: cp2k
--