Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- File Edit Options Buffers Tools Sh-Script Help
- #!/bin/bash
- CHARGE_STRING="Neutral Cation"
- CHARGE_VALUE="0 +1"
- MULTIPLICITY_VALUE="1 2"
- OMEGA_VALUE="0.1 0.2 0.4"
- template_file=BdPC0058.inp
- input_file=BdPC0058_CHARGE_STRING_wOMEGA_VALUE.inp
- for i in $CHARGE_STRING ; do
- work_dir=CHARGE_STRING${ii}_OMEGA_VALUE${jj}
- for jj in $OMEGA_VALUE ; do
- work_dir=CHARGE_STRING${ii}OMEGA_VALUE${jj}
- if [ ! -d $work_dir ] ; then
- mkdir $work_dir
- else
- rm -r $work_dir/*
- fi
- sed -e "s/CHARGE_STRING/${i}/g" \
- -e "s/CHARGE_VALUE/${ii}/g" \
- -e "s/MULTIPLICITY_VALUE/${j}/g" \
- -e "s/OMEGA_VALUE/${jj}/g" \
- -e "s/checkpoint/BdPC0057_wLR_HF${i}_wSR_DFA${j/g" \
- $template_file > $work_dir/$input_file
- done
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement