From: Tristan Croll (tristan.croll_at_qut.edu.au)
Date: Tue Sep 23 2014 - 19:13:08 CDT

Hi,

I find myself wanting to do something similar with my dcd continuations. Once the structure is loaded into memory (i.e. load the psf if you have it, or load one pdb then go to Molecule/Delete Frames to avoid duplication of coordinates), the one-liner I settled on for this (which should work for any set of files of the form {name}{number}.{extension}) looks like:

foreach i [lsort -dictionary [glob *.pdb]] {mol addfile $i}

Note that the -dictionary flag is necessary to force it to count 1, 2, ... 10, 11 rather than 1, 10, 11, 2, ...

Cheers,

Tristan

-----Original Message-----
From: owner-vmd-l_at_ks.uiuc.edu [mailto:owner-vmd-l_at_ks.uiuc.edu] On Behalf Of Maxim Belkin
Sent: Tuesday, 23 September 2014 9:24 PM
To: Aref Takiden
Cc: Vmd l
Subject: Re: vmd-l: merging several pdbs in one file

So, you should be able to use "animatepdbs" from Tk Console of VMD like this:

  source animatepdbs.tcl
  animatepdbs 1 3 "%d.pdb"

Replace "3" with the number of pdb files in your folder.
Try that and let us know if you get any error.

Maxim

On Sep 23, 2014, at 2:07 AM, Aref Takiden <aref.takiden_at_mailbox.tu-berlin.de> wrote:

> Hallo Maxim,
> my pdbs are named like 1.pdb, 2.pdb etc..
>
> Aref
>
>
>
>
>
>
> On 22 Sep 2014, at 20:04, Maxim Belkin <mbelkin_at_ks.uiuc.edu> wrote:
>
>> Aref, what are the names of the files you are trying to merge?
>>
>> Maxim
>>
>> On Sep 22, 2014, at 7:55 AM, Aref Takiden <aref.takiden_at_mailbox.tu-berlin.de> wrote:
>>
>>> Hi,
>>>
>>> I would like to merge several pdb-files into one dcd-like-file, in such away, that at the end, I could see for example the changes in the bond length of the different snapshots(pdb-files) as a graph in the label-window of vmd.
>>>
>>> I tried the script animatepdbs.tcl (link: http://www.ks.uiuc.edu/Research/vmd/script_library/scripts/animatepdbs/animatepdbs.tcl), but it loaded only the first file in spit of that it read the names of the other files. I tested that by adding the command "puts $filename" at the end of the for-loop.
>>> So in other words I had only one frame in my main window of vmd.
>>>
>>> I am thankful for any help.
>>>
>>> Best regards,
>>>
>>> --
>>> M. Sc. Aref Takiden
>>> Technical University of Berlin
>>> Institute of Chemistry
>>> AG Mroginski
>>> Straße des 17. Juni 135
>>> D-10623 Berlin
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>>
>