copy all pdb files for top100 proteins into directory ./TOP100/
	copy tleap.in to ./TOP100/
	tleap.in
| 
					loadAmberParams frcmod.ionsjc_tip3psource leaprc.ff14SB
 loadAmberParams frcmod.ions1lsm_1264_tip3p
 # Load the PDBs
 1e0q = loadPDB tmp.pdb
 relax 1e0q
 
					# SolvatesolvateBox 1e0q TIP3PBOX 20
 set 1e0q box {70 70 70}
 #Add ions
 
					addIonsRand 1e0q NA 0addIonsRand 1e0q CL 0
 
					# Save topology files
 saveAmberParm 1e0q 1e0q_box.prmtop 1e0q_box.inpcrd
 
					# Quitquit
 ~
 | 
	pipeline.sh
| 
					#!/bin/bashrm tmp*
 for i in $(ls *.pdb)
 do
 rm tmp*
 name=`echo $i|awk 'BEGIN{FS=".";}{print $1;}'`
 echo $name
 if grep -q "^MODEL" $i
 then
 pdb4amber --noter --model=1 -d -p -i $i -o tmp6.pdb 2>$name.log
 else
 awk '($5 == "A" || $5 =="1") && $1=="ATOM" { print $0}' $i >tmp7.pdb
 pdb4amber --noter -d -p -i tmp7.pdb -o tmp6.pdb 2>$name.log
 fi
 #awk '$5 == "A" && $1=="ATOM" { print $0}' $i >tmp6.pdb
 
					#pdb4amber --noter -d -p -i tmp6.pdb -o tmp5.pdbsed "s/HIS/HIE/g" tmp6.pdb >tmp4.pdb
 #reduce -Trim tmp4.pdb>tmp3.pdb
 
					if grep -q "H3" tmp4.pdbthen
 echo "H3 found"
 cat tmp4.pdb|grep ATOM >tmp1.pdb
 else
 echo "NO H3,adding hydrogen"
 reduce -BUILD tmp4.pdb>tmp2.pdb 2>>$name.log
 cat tmp2.pdb|grep ATOM >tmp1.pdb
 fi
 sed -i '/H1/d' tmp1.pdb
 sed -i '/H2/d' tmp1.pdb
 
					sed -n '/H3/p' tmp1.pdb|sed 's/H3  [A-Z][A-Z][A-Z]/C   ACE/g' >tmp_bsed -n '/OXT/p' tmp1.pdb|sed 's/OXT [A-Z][A-Z][A-Z]/N   NME/g' >tmp_e
 
					if ! [ -s tmp_b ];then echo "$i ACE failed";exit;fiif ! [ -s tmp_b ];then echo "$i NME failed";exit;fi
 
					sed -i '$d' tmp1.pdbsed -i '/H3/d' tmp1.pdb
 sed -i '/OXT/d' tmp1.pdb
 cat tmp_b tmp1.pdb tmp_e>tmp.pdb
 sed -i '$a\END' tmp.pdb
 sed "s/1e0q/$name/g" tleap.in >${name}_tleap.in
 echo "tleaping..."
 tleap -f ${name}_tleap.in 2>&1 >>$name.log
 x=`grep "box size" $name.log |awk '{print $5}'`
 y=`grep "box size" $name.log |awk '{print $6}'`
 z=`grep "box size" $name.log |awk '{print $7}'`
 x_int=`printf '%.0f' $x`
 y_int=`printf '%.0f' $y`
 z_int=`printf '%.0f' $z`
 x_format=`printf '%.*f' 7 $x_int`
 y_format=`printf '%.*f' 7 $y_int`
 z_format=`printf '%.*f' 7 $z_int`
 sed -i '$d' ${name}_box.inpcrd
 echo "  $x_format  $y_format  $z_format  90.0000000  90.0000000  90.0000000">>${name}_box.inpcrd
 echo "minimizing......"
 mpirun -np 10 pmemd.MPI -O -i min.mdin -o ${name}_min.out -c ${name}_box.inpcrd -p ${name}_box.prmtop -r ${name}_min.rst
 echo "heating......"
 mpirun -np 10 pmemd.MPI -O -i heat.mdin -o ${name}_heat.out -c ${name}_min.rst -p ${name}_box.prmtop -r ${name}_heat.rst
 echo "waiting for last simulation to finish...."
 result=`checkRunningProcess.sh pmemd.cuda.MPI`
 until [ $result == "NR" ];
 do
 sleep 10
 result=`checkRunningProcess.sh pmemd.cuda.MPI`
 done
 echo "production running......"
 mpirun -np 2 pmemd.cuda.MPI -O -i md.mdin -o ${name}_md.out -c ${name}_heat.rst -p ${name}_box.prmtop -r ${name}_md.rst -x ${name}_md.mdcrd &
 | 
	All proteins will be blocked at terminals and neutralized with NaCl.