From: John Stone (johns_at_ks.uiuc.edu)
Date: Tue Aug 29 2006 - 11:51:00 CDT

Hi,
  I have a question which may shed light on your problem.
Are you manually loading the DCD, waiting for the load to complete,
and then running the rest of the script, or are you running this entire
script in one go? One thing that's still missing from the top of your
script is the new load commands, and specifically "waitfor all" option.
You should be loading the DCD file like this:
  mol new all.psf waitfor all
  mol addfile 1.dcd waitfor all

Without the "waitfor all", your script may begin writing PDB files
before it is completely finished loading the DCD.
One trivial way to check this is to add some more debugging into your
script:
  puts "Writing PDB files..."
  mol load psf all.psf dcd 1.dcd
  set nf [molinfo top get numframes]
  set all [atomselect top all]
  for {set i 0 } {$i < $nf} {incr i} {
    puts "Writing $i.pdb ($i of $nf frames)"
    $all frame $i
    $all writepdb $i.pdb
  }
  $all delete

Another possibility here is that Windows is running out of file
handles. If this is what is happening, your script will fail
after a certain number of frames, and VMD should emit an error
saying it couldn't open the output file. If that occurs, then
we'll need to make more changes to your script... :)

  John

On Tue, Aug 29, 2006 at 04:02:10PM +0800, wang wrote:
> Dear Dimka ,
> Thanks for your help . But the script still didn't work . @@
> Could you know how to using C or fortran to read dcd file ?
> thx
> wang
>
>
>
>
>
>
>
>
>
> dimka ??:
>
> >also since you redefine the variable "all" with each iteration you may
> >run out of memory before your script completes, a better script would
> >be...
> >
> >mol load psf all.psf dcd 1.dcd
> >set nf [molinfo top get numframes]
> >set all [atomselect top all]
> >for {set i 0 } {$i < $nf} {incr i} {
> >$all frame $i
> >$all writepdb $i.pdb
> >}
> >
> >
> >On 8/29/06, dimka <newyorkdimka_at_gmail.com> wrote:
> >
> >>ran out of quota/disk space? file is greater than 2gb and operating
> >>system cannot support >2gb files...
> >>
> >>On 8/29/06, wang <c00jsw00_at_nchc.org.tw> wrote:
> >>> Dear all ,
> >>> I used VMD software to transform dcd file (from NAMD) into pdb
> >>format file .
> >>> There are 30000 frames in dcd file . But I only tranfromed 4500 pdb
> >>files .
> >>> Could you tell me how to fix the problem ?
> >>> thx
> >>> wang ^^
> >>>
> >>>
> >>> my script
> >>> _____________________________________________________
> >>> mol load psf all.psf dcd 1.dcd
> >>> set nf [molinfo top get numframes]
> >>> for {set i 0 } {$i < $nf} {incr i}
> >>> {
> >>> set all [atomselect top all frame $i ]
> >>> $all writepdb $i.pdb
> >>> }
> >>>
> >>>
> >>
> >

-- 
NIH Resource for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
Email: johns_at_ks.uiuc.edu                 Phone: 217-244-3349
  WWW: http://www.ks.uiuc.edu/~johns/      Fax: 217-244-6078