def make_run_all_script(wd):
run_all = """#!/bin/bash
for i in *.pdb; do
echo "Running ${i}..."
seq=`echo ${i} | cut -d. -f1`
curr_dir=`pwd`
cp ${i} temp.pdb
tleap -f leaprc
rm temp.pdb
mv temp_mod.pdb xleap_modified/${seq}_xleap.pdb
mv temp_mod.prmtop amber_minimized/${seq}.prmtop
mv temp_mod.inpcrd amber_minimized/${seq}.inpcrd
done
"""
my_file = op.join(wd, 'run_all.sh')
with open(my_file, 'w') as f:
f.write(run_all)
os.chmod(my_file, 0o755)
return my_file
评论列表
文章目录