From: John Stone (johns_at_ks.uiuc.edu)
Date: Sun Jan 15 2017 - 02:47:25 CST

There must be a typo in your script somewhere if you're getting the
invalid command error. You can probably make it easier to track if
you add some "puts" commands in the script so it prints messages as
it runs.

Cheers,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, Jan 07, 2017 at 04:00:21PM +0330, fatehi_at_eng.uk.ac.ir wrote:
> Thanks dear Norman for your attention. I use following .TCl file for
> convert vel.dcd to .dat file, but i get this error "Invalid command name
> "1". Can you help me about it?
>
> proc v_com_traj {filename {dt 1} {selection all} {first_frame 0}
> {frame_step 1} {mol top} args} {
>
> set outfile [open $filename w]
> set convFact 2035.4
> set sel [atomselect $mol $selection frame 0]
> set num_frames [molinfo $mol get numframes]
>
> for {set frame $first_frame} {$frame < $num_frames} {incr frame
> $frame_step} {
>
> $sel frame $frame
> set vcom [vecscale $convFact [measure center $sel weight mass]]
> puts $outfile "$frame\t $vcom"
>
> }
> close $outfile
>
> }
>
> All the best

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