Re: [AMBER] Batch leap error!

From: Hannes Loeffler <Hannes.Loeffler.stfc.ac.uk>
Date: Fri, 17 Apr 2015 14:31:29 +0100

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

Cheers,
Hannes.

_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Apr 17 2015 - 07:00:02 PDT
Custom Search