#!/bin/bash ##Should use a different seed for any later ##repeats/extensions of the same calculation. master_seed=11223355 for system in alphaL alphaR C7ax C7eq do ##use the same set of seeds for ##each system, but different seeds ##for each lambda seed=$master_seed ##put each calculation in a separate directory, ##just for tidiness mkdir -p $system cp $system.restraints $system/. cd $system for lambda in 0.000 0.125 0.250 0.375 0.500 0.625 0.750 0.875 1.000 do seed=$[seed + 17] ##prepare the input file with a command-line search-and-replace: sed -e "s/_RESTRAINTS_FILE_/$system.restraints/g" \ -e "s/_SEED_/$seed/g" \ -e "s/_SYS_/$system/" \ -e "s/_LAMBDA_/$lambda/" \ ../md_rest_emil.in > md.$system.$lambda.in ##prepare the EMIL input file: sed -e "s/_SEED_/$seed/g" \ -e "s/_LAMBDA_/$lambda/" \ ../emilParameters.in > emilParameters.$system.$lambda.in ##fork using the `&' operator and launch AMBER: nice sander -O -i md.$system.$lambda.in \ -p ../diala.top -c ../diala_md1.$system.rst \ -o diala_md1.$system.$lambda.out \ -x diala_md1.$system.$lambda.x \ -r diala_md1.$system.$lambda.rst & done cd .. done