From: Efthymiou, Christos (
Date: Tue Jun 21 2022 - 04:35:02 CDT


Thank you so much for your help. The commands in the Tk console worked perfectly.

I would like to put those commands in a .vmd file to be able to use source file.vmd to run all the commands rather than typing them each time. Is there a way to add a .vmd file to the path so that if I am not in the directory holding the .vmd file it will still run?

I created the .vmd file and placed it in my VMD folder. When I am creating the pdb/psf files without water, I change to my desired directory in the Tk console and then would like to run the .vmd file. However, since the .vmd file is not in the directory I changed into, I get an error that no file can be found. I also tried running source /path/to/file.vmd, but I get this error: wrong # args: should be "source ?-encoding name? fileName".

From: Geist, Norman <>
Sent: Sunday, June 19, 2022 9:51 PM
To: Efthymiou, Christos <>; Axel Kohlmeyer <>
Cc: <>
Subject: Re: vmd-l: How to reduce the size of a .dcd file?


saving a shortened DCD is also quite easily possible. Load PSF and PDB (PSF 1st.) and then in Extensions->TKConsole:

set a [atomselect top "not water"]
$a writepsf short.psf
$a writepdb short.pdb

Saving the indexfile for catdcd is similarly easy:

set fp [open indexfile w}]
set a [atomselect top "not water"]
puts $fp [$a get serial]
$a delete
close $fp

Then use catdcd like:

catdcd -s short.pdb -o short.dcd -otype dcd -i indexfile -dcd long1.dcd -dcd long2.dcd

Norman Geist

Am Sonntag, den 19-06-2022 um 15:15 schrieb Efthymiou, Christos:
Thank you for the link to the Windows installation!

Reading the possible input files, I see that .psf files are not one of the acceptable files. Is there a reason why water molecules cannot be removed from psf files? For my particular case, I was interested in using catdcd to reduce the size of my dcd trajectories to be able to analyze them with the program MDContactCom, which requires dcd and psf files as inputs. However, if I remove the water molecules from the dcd file and not the psf file, I get this error: - Func: convert - ERROR - xyz must be shape (Any, 44191, 3). You supplied (200, 5508, 3)

Searching online, this seems to be caused by a disconnect between the total number of atoms in the trajectory compared to the psf file (i.e. the lack of water in the dcd file). Is there a way to remove water molecules from the psf file?

Thanks again for all the help.

From: Axel Kohlmeyer <<>>
Sent: Friday, June 17, 2022 5:45 PM
To: Efthymiou, Christos <<>>
Cc: Geist, Norman <<>>;<> <<>>
Subject: Re: vmd-l: How to reduce the size of a .dcd file?

⚠ Caution: External sender

On Fri, Jun 17, 2022 at 10:35 AM Efthymiou, Christos <<>> wrote:

Additionally, is catdcd available on Windows? I cannot find any instructions or a manual on how to install and use the program.

I have not installed VMD on Windows in a long time. It used to be that a catdcd executable is only included in some packages and not in the Windows package.
Quite some time ago for some tutorials (and my own education), I had built Windows installer packages for catdcd. Those are still available at:;!!DZ3fjg!_EZJ0-7dDkBwZuihvvAD14SQj1HUB4iT8OpltqKJgJt8J3uXsUxNiL188lfqG_zk0RKRA01756Cuf4dX7Ox5Wr7zXCJ1Qew$ <*3A*2F**2Fwindows*2Ftesting*2F&data=05*7C01*7Cchristos.dereschuk.20**7Cb9566f7fb1064fb4d79c08da5224b0cf*7C1faf88fea9984c5b93c9210a11d9a5c2*7C0*7C0*7C637912614792233125*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=pEQUjYh6CLNIH4bpqMp0qjR6LP4qOKcjWWOiNNXD0m4*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUlJQ!!DZ3fjg!_EZJ0-7dDkBwZuihvvAD14SQj1HUB4iT8OpltqKJgJt8J3uXsUxNiL188lfqG_zk0RKRA01756Cuf4dX7Ox5Wr7z4UV6mlg$ >
Use at your own risk. I just checked with a Windows 11 virtual machine and it can still be installed and run...


Microsoft Windows [Version 10.0.22000.739]
(c) Microsoft Corporation. All rights reserved.

CatDCD 5.4
   catdcd -o outputfile [-otype <filetype>] [-i indexfile]
      [-stype <filetype>] [-s structurefile]
      [-first firstframe] [-last lastframe] [-stride stride]
      [-<filetype>] inputfile1 [-<filetype>] inputfile2 ...

Allowed input file types:
crd crdbox XDATCAR rst7 OUTCAR xml vcf vtf js car dcd namdbin POSCAR pqr cpmd dlpolyhist dlpoly3hist dlpolyconfig xyz tinker binpos ABINIT pdb lammpstrj hoomd cor bgf xsf gro g96 trr trj xtc pdbx xbgf cube mol2 dms dtr mae

Allowed output file types:
crd crdbox rst7 js dcd namdbin POSCAR pqr xyz binpos ABINIT pdb lammpstrj hoomd bgf gro trr pdbx xbgf mol2 dms dtr mae

Thanks for the help!


Dr. Axel Kohlmeyer<>;!!DZ3fjg!_EZJ0-7dDkBwZuihvvAD14SQj1HUB4iT8OpltqKJgJt8J3uXsUxNiL188lfqG_zk0RKRA01756Cuf4dX7Ox5Wr7zY41y-GE$ <*3A*2F**2F1wk0&data=05*7C01*7Cchristos.dereschuk.20**7Cb9566f7fb1064fb4d79c08da5224b0cf*7C1faf88fea9984c5b93c9210a11d9a5c2*7C0*7C0*7C637912614792233125*7CUnknown*7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0*3D*7C3000*7C*7C*7C&sdata=XMa13zy07J*2BYhRq6RdkLczXAwRFPwm4dg5iRPCpb4LU*3D&reserved=0__;JSUlJSUlJSUlJSUlJSUlJSUlJSUl!!DZ3fjg!_EZJ0-7dDkBwZuihvvAD14SQj1HUB4iT8OpltqKJgJt8J3uXsUxNiL188lfqG_zk0RKRA01756Cuf4dX7Ox5Wr7zMHLFjcg$ >
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.