Re: [AMBER] Batch leap error!

From: Jason Swails <jason.swails.gmail.com>
Date: Fri, 17 Apr 2015 09:42:29 -0400

On Fri, Apr 17, 2015 at 9:31 AM, Hannes Loeffler <Hannes.Loeffler.stfc.ac.uk
> wrote:

> On Fri, 17 Apr 2015 08:07:17 -0400
> Jason Swails <jason.swails.gmail.com> wrote:
>
> > On Fri, Apr 17, 2015 at 7:17 AM, Hannes Loeffler
> > <Hannes.Loeffler.stfc.ac.uk
> > > wrote:
> >
> > > You are mixing shell scripting with leap scripting. I guess what
> > > you want is this
> > >
> > >
> > > #!/bin/sh
> > >
> > > for file in output*.pdb; do
> > > i=`expr index $file .`
> > > f1=`expr substr $file 1 $i`
> > >
> > > tleap -f - <<_EOF
> > > source leaprc.ff99SB
> > > x = loadpdb $file
> > > saveamberparm x $f1.top $f1.crd
> > > _EOF
> > >
> >
> > ​This doesn't actually work with tleap. stdin must come from a tty,
> > otherwise you get an error like this:
> >
> > ​
> > *** Error: tl_getline(): not interactive, use stdio.
> >
> > ​(I've tried this myself before, wishing it would work).
>
> Yes, because there was no "quit" command. If there is a "quit" teLeap
> will never enter the interactive loop and do the isatty() in gl_init()
> in getline.c.
>
> So script should be
>
> #!/bin/sh
>
> for file in output*.pdb; do
> i=`expr index $file .`
> f1=`expr substr $file 1 $i`
>
> tleap -f - <<_EOF
> source leaprc.ff99SB
> x = loadpdb $file
> saveamberparm x $f1.top $f1.crd
> quit
> _EOF
> done
>

​Cool! The "-f -" is essential, it appears (as is the quit, as you
mentioned).

Thanks!
Jason

-- 
Jason M. Swails
BioMaPS,
Rutgers University
Postdoctoral Researcher
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Apr 17 2015 - 07:00:03 PDT
Custom Search