Thanks Hannes and Jason, yes your suggestions did worked but there is still
an issue. My output is in the form of :output1..crd, output1..top,
output2..crd ,output2..top and so on.As Hannes had suggested below
mentioned is the script :
#! /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
-----------------------------------------
where can be the possible fault?
Thanking you again!
On Fri, Apr 17, 2015 at 7:12 PM, Jason Swails <jason.swails.gmail.com>
wrote:
> 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
>
--
Regards,
Pallavi Mohanty
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Fri Apr 17 2015 - 09:00:05 PDT