VMD-L Mailing List
From: chandrakala gowda (chandrakala.gowda_at_gmail.com)
Date: Fri Nov 29 2013 - 06:14:51 CST
- Next message: Ajasja Ljubetič: "Re: loading pdb files from multiple directories"
- Previous message: Axel Kohlmeyer: "Re: loading pdb files from multiple directories"
- In reply to: Axel Kohlmeyer: "Re: loading pdb files from multiple directories"
- Next in thread: Ajasja Ljubetič: "Re: loading pdb files from multiple directories"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]
Thank you very much Axel.
My new code is
for {set i 1} {$i < 9} {incr i} {
cd "/work/test0$i";
mol new xyz.pdb
mol delrep 0 top
mol representation NewCartoon
mol color Chain
mol addrep top
}
and it works !
thanks a lot again.
Cheers,
Chandra
On Fri, Nov 29, 2013 at 12:59 PM, Axel Kohlmeyer <akohlmey_at_gmail.com> wrote:
> On Fri, Nov 29, 2013 at 11:43 AM, chandrakala gowda
> <chandrakala.gowda_at_gmail.com> wrote:
> > Hi all,
> >
> > I have to load pdb files from multiple directories. I tried to set the
> cd to
> > change within a loop
> >
> > for {set i 1} {$i < 12} {incr i} {
> > set cd {/work/test_0$i}
> > mol new $cd/xyz.pdb
> > mol delrep 0 top
> > mol representation NewCartoon
> > mol color Chain
> > mol addrep top
> > }
> >
> > I get the following error message
> >
> > Could not read file /work/test_0$i/final.pdb
> >
> > how to I format the code to include a variable name in the 'cd'
> > I am grateful if someone could resolve this issue for me.
>
> this is a Tcl issue. using {} make /work/test_0$i a _literal_ string,
> you have to use "" instead, so that variables are expanded.
>
> axel.
>
> >
> > Chandrakala
> >
> >
> >
> >
>
>
>
> --
> Dr. Axel Kohlmeyer akohlmey_at_gmail.com http://goo.gl/1wk0
> International Centre for Theoretical Physics, Trieste. Italy.
>
- Next message: Ajasja Ljubetič: "Re: loading pdb files from multiple directories"
- Previous message: Axel Kohlmeyer: "Re: loading pdb files from multiple directories"
- In reply to: Axel Kohlmeyer: "Re: loading pdb files from multiple directories"
- Next in thread: Ajasja Ljubetič: "Re: loading pdb files from multiple directories"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] [ attachment ]