so you could use:
---
Script 1
antechamber/parmchk commands (just not typing out in full to save space)
NAME=$1
export NAME
tleap <<- EOF
source leaprc.gaff
source leaprc.ff14SB
source leaprc.tip3p
gaff=loadamberparams gaff.dat
LIG=loadmol2 $NAME.mol2
loadamberparams $NAME.frcmod
saveoff LIG $NAMEL.lib
complex=loadpdb $NAME.pdb
solvatebox complex TIP3PBOX 8.0
loadamberparams frcmod.ionsjc_tip3p
addIons2 complex Na+ 0
addIons2 complex Cl- 0
saveamberparm complex $NAME.prmtop $NAME.crd
quit
EOF
export NAME
export GPU
./Script 3
---
This way the '$NAME' will get expanded whereas if you feed in a file with
the '-f' flag, it will not.
---
alternatively, you could use:
cat <<- EOF > script2
source leaprc.gaff
source leaprc.ff14SB
source leaprc.tip3p
gaff=loadamberparams gaff.dat
LIG=loadmol2 $NAME.mol2
loadamberparams $NAME.frcmod
saveoff LIG $NAMEL.lib
complex=loadpdb $NAME.pdb
solvatebox complex TIP3PBOX 8.0
loadamberparams frcmod.ionsjc_tip3p
addIons2 complex Na+ 0
addIons2 complex Cl- 0
saveamberparm complex $NAME.prmtop $NAME.crd
quit
EOF
tleap -f script2
---
This second form will write script 2 on the fly then feed it to tleap.
Hope that helps.
On Mon, Aug 20, 2018 at 2:39 AM, Keiran Corbett <keirancorbett.gmail.com>
wrote:
> *Summary*
> *(The script runs fine if I manually input the names but obviously would
> rather not do that each time. *
> *1. I cannot get my variables to transfer across from the bash line into
> tleap*
> *2. I cant get script 3 to run after doing the tleap caculation *
>
> So I want to run some files through tleap
> I generate the input using antechamber then parmchk
> Then I open up a new script in tleap (But want the variables $1 etc. to
> come with it)
> I then try to open a 3rd script but it doesnt let me
> To run I type ./Script1 $1 (Where $1 is a name like 2XHX)
> Script 1
> antechamber/parmchk commands (just not typing out in full to save space)
> NAME=$1
> export NAME
> tleap -f Script 2
> Script 2
> #!/bin/bash
> source leaprc.gaff
> source leaprc.ff14SB
> source leaprc.tip3p
> gaff=loadamberparams gaff.dat
> LIG=loadmol2 $NAMEL.mol2
> loadamberparams $NAMEL.frcmod
> saveoff LIG $NAMEL.lib
> complex=loadpdb $NAME.pdb
> solvatebox complex TIP3PBOX 8.0
> loadamberparams frcmod.ionsjc_tip3p
> addIons2 complex Na+ 0
> addIons2 complex Cl- 0
> saveamberparm complex $NAME.prmtop $NAME.crd
> quit
> export NAME
> export GPU
> ./Script 3
> Script 3 is a set of bashline commands to run CUDA
>
> *So to summaries*
> *(The script runs fine if I manually input the names but obviously would
> rather not do that each time)*
>
> *1. I cannot get my variables to transfer across from the bash line into
> tleap*
> *2. I cant get script 3 to run after doing the tleap caculations.*
>
> Just a side note I am aware that I am running some older versions of things
> and I am trying to get that updated but it is going to take some time.
> _______________________________________________
> AMBER mailing list
> AMBER.ambermd.org
> http://lists.ambermd.org/mailman/listinfo/amber
>
_______________________________________________
AMBER mailing list
AMBER.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber
Received on Mon Aug 20 2018 - 06:00:06 PDT