From: Justin Gullingsrud (jgulling_at_mccammon.ucsd.edu)
Date: Sat Apr 10 2004 - 13:48:19 CDT

Mike,

On Fri, Apr 09, 2004 at 10:17:26PM -0700, Mike McCallum wrote:
>
> I'm trying to center a selection using tkcon. The foreach is failing,
> and I'm not sure why:
>
> >Main< (Lambda) 73 % set sel [atomselect top all]
> atomselect4
> >Main< (Lambda) 74 % set center [list [measure center $sel]]
> {1.13973164558 2.0826420784 -8.2399187088}
> >Main< (Lambda) 76 % foreach mol [molinfo list]{

I think you might just need a space between [molinfo list] and the open
brace. Otherwise your example seems fine.

Cheers,

Justin

> wrong # args: should be "foreach varList list ?varList list ...?
> command"
>
> (I would follow this command with
>
> molinfo $mol set center $center }
>
> )
> I found the example here:
> http://www.ks.uiuc.edu/Research/vmd/mailing_list/vmd-l/1413.html ;
>
> RIght now I'm using charmm to center the selections (I know how to do
> it that way, but it is a pain,
> compared to using VMD).
>
> Cheers,
>
> Mike
> --
> C. Michael McCallum
> http://chem.cop.uop.edu/cmmccallum.html
> Associate Professor
> Department of Chemistry, UOP
> mmccallum .at. pacific .dot. edu (209) 946-2636 v /
> (209) 946-2607 fax
>