If you have a Linux Beowulf cluster,you can perform the individual dockings in parallel. Continuing with our example, instead of executing the body of the above loop,we will write it into a series of *.job files and use qsub (a PBS command)to schedule them to be executed by the cluster:
代码: 全选
for f in ligand_*.pdbqt; do
b=`basename $f .pdbqt`
echo Processing ligand $b
j=${b}.job
d=`pwd`
mkdir -p $b
echo "#! /bin/bash" > $j
echo "cd $d" >> $j
echo "vina --config conf.txt --cpu 1 --ligand $f --out ${b}/out.pdbqt --log ${b}/log.txt > ${b}/stdout 2> ${b}/stderr" >> $j
chmod +x $j
qsub -l cput=00:30:00 -l nodes=1:ppn=1 -l walltime=00:30:00 -l mem=512mb $j
done