Re: [AMBER] Scripting Bash to tleap

From: David A Case <david.case.rutgers.edu>
Date: Mon, 20 Aug 2018 07:39:57 -0400

On Mon, Aug 20, 2018, Keiran Corbett wrote:

> NAME=$1
> export NAME
> tleap -f Script 2
> Script 2
> #!/bin/bash

Above line is incorrect: this is not a bash script, rather it is a
script that will be read by tleap, which does not know about
environment variables.

> LIG=loadmol2 $NAMEL.mol2

Note that this line is looking for a variable called "NAMEL", but it is
not clear that you have ever defined this variable. Or is this just a
typo?

What you need to do is roughly this:

export NAME=<something>
cat <<EOF > Script2
source leaprc.gaff
...
LIG=loadmol2 $NAME.mol2
...
EOF

tleap -f Script2
/bin/rm Script2

That way, the shell is writing the script, and can interpolate
environment variables. Then the specialized script is sent to tleap.

...hope this helps....dac


_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Aug 20 2018 - 05:00:02 PDT
Custom Search