Advertisement
chiara_cara

Untitled

May 11th, 2017
197
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.50 KB | None | 0 0
  1. #!/bin/bash
  2.  
  3. for i in $1
  4. do
  5.    oldfolder=${i%[^0-9]}
  6.    foldername=${oldfolder%_*}
  7.    counter=${oldfolder: -2}
  8.    let "counter=counter+1"
  9.    newfolder=${foldername}_${counter}
  10.    mkdir ${newfolder}
  11.  
  12.    cp ${oldfolder}/dft* ${oldfolder}/positions.xyz ${oldfolder}/mof-1.restart ${oldfolder}/BASIS ${oldfolder}/POTENTIAL ${newfolder}
  13.    mv ${newfolder}/mof-1.restart ${newfolder}/nvt.inp
  14. #   (cd ${newfolder} ; cp2k-breniac.sh nvt ; qsub submit.sh)
  15.    (cd ${newfolder} ; cp2k-breniac.sh nvt)
  16. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement