From: Axel Kohlmeyer (akohlmey_at_cmm.chem.upenn.edu)
Date: Tue Apr 28 2009 - 08:24:04 CDT

On Tue, 2009-04-28 at 01:55 -0500, Eduardo Cruz-Chu wrote:
> You can load your trajectory and save the last frame as PDB using only
> VMD.
>
> For instance, let's say your DCD has 1000 frames. First load the
> molecule:
>
> mol load psf XYZ.psf dcd XYZ.dcd

please note that "mol load" is obsolescent syntax, it should
not be used for any new script, and also the command sequence
can be improved on. e.g.:

set mol [mol new XYZ.psf type psf waitfor all]
mol addfile XYZ.dcd type dcd first 999 last 999 waitfor all molid $mol

set sel [atomselect $mol all]
animate write pdb OUT.pdb sel $sel $mol

this way:
- you can change the selection to any subset
- you can write out selection trajectories, if needed
- you only need to store the one frame you read.

since the data stored in a .psf is a bit different from a .pdb
and if you already have a .pdb file the information of which you
want to preserver, you can change the first read to.

set mol [mol new XYZ.pdb type pdb waitfor all]
animate delete beg 0 end -1 $mol

$sel delete
unset sel

cheers,
   axel.

>
> Then select the last frame:
> set lastFrame [ atomselect top all frame 999 ]
>
> and save it as PDB:
> $lastFrame writepdb XYZlastFrame.pdb
>
>
>
>
>
> On Tue, 28 Apr 2009, DimitryASuplatov wrote:
>
> > Hello,
> >
> > I have a dcd trajectory and I want to have the last frame of this run
> > in pdb format.
> >
> > 1/ As I learned - the first possible way is to use catdcd program. My
> > question here - could it be launched from vmd console without the need
> > to download and separately install it?
> >
> > 2/ Is the any other (more preffered) way.
> >
> > Thanks.
> > SDA
> >

-- 
=======================================================================
Axel Kohlmeyer   akohlmey_at_cmm.chem.upenn.edu   http://www.cmm.upenn.edu
   Center for Molecular Modeling   --   University of Pennsylvania
Department of Chemistry, 231 S.34th Street, Philadelphia, PA 19104-6323
tel: 1-215-898-1582,  fax: 1-215-573-6233,  office-tel: 1-215-898-5425
=======================================================================
If you make something idiot-proof, the universe creates a better idiot.