On Mon, Dec 10, 2012, Sajeewa Pemasinghe wrote:
>
> I have to run the same 3 commands on about 200 pdb files which are like
> cdd1.pdb ,cdd2.pdb, cdd3.pdb.......cdd200.pdb. Is there any way I can get
> this run by a script like (rough)
>
> for(int i=0;i<200;i++){
>
> command1 cddi.pdb
> command2 cddi.pdb
> command3 cddi.pdb
>
> }
Shells can do this; see, e.g.
http://tldp.org/HOWTO/Bash-Prog-Intro-HOWTO-7.html for info on how to make a
loop in the bash shell. It would look something like this (untested!)
for i in `seq 1 200`; do
command1 cdd$i.pdb
command2 cdd$i.pdb
command3 cdd$i.pdb
done
Learning shell scripts is well worth your time. (Note that your text
indicated that you wanted to have i go from 1 to 200, but your sample code
looped from 0 to 199; be sure to write you really want.)
...dac
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Dec 10 2012 - 06:00:05 PST