Setandsubmit.s: Difference between revisions

From Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 31: Line 31:
  #The molecules:
  #The molecules:


     for j in CN ; do
     for j in CN CO NO; do





Revision as of 09:37, 27 May 2010

go back to Main Page, Computational Resources, Scripts, Useful scripts


#README
#README
#README
#  We need an INPUT folder. Inside it, it is neccesary:  INCAR, KPOINTS, POTCAR (named POTCAR.Me.Molecule , POTCAR.Pt.NO , for each metal)
#  and the converged CONTCAR, and also, a file called INPUT
#  with the cell parameters in the following format:
#
#                                    "Me"      "cell parameter" , for example:
#
#
#                                     Au            4.0223
#                                     Cu            3.6267
#                                      .               .
#                                      .               .
#                                      .               .
#
#It is neccesry also the submision file "script.s":


#Create the directories for all the metals, both in home and in scratch.
#Here there is the set of metals that we are going to studie:
   for i in  Au Cu Ir Pd Pt Rh ; do


#The molecules:
   for j in CN CO NO; do


#and the states:
   for k in initial final ts ; do
       mkdir Me-$j
       mkdir Me-$j/$i
       mkdir Me-$j/$i/$j
       mkdir Me-$j/$i/$j/$k
       mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j
       mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j/$i
       mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j
       mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k


#Copy INCAR, KPOINTS, and POTCAR's in /scratch/
       cp ./INPUTS/INCAR /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
       cp ./INPUTS/KPOINTS /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
       cp ./INPUTS/POTCAR.$i.$j /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k


#CONTCAR's tunning
  echo $i $j > Me-$j/$i/$j/$k/POSCAR.$k
  grep "$i" INPUTS/INPUT | awk ' {print $2}' > parameter
  tail parameter >> Me-$j/$i/$j/$k/POSCAR.$k
 M=`wc -l INPUTS/CONTCAR.Pt.CN | awk '{print $1}'`
 N=`expr $M - 2`
echo $N


  tail -$N INPUTS/CONTCAR.Pt.CN >> Me-$j/$i/$j/$k/POSCAR.$k
  mv Me-$j/$i/$j/$k/POSCAR.$k Me-$j/$i/$j/$k/POSCAR


       cp ./INPUTS/INCAR /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
       cp ./INPUTS/KPOINTS /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
       cp ./INPUTS/POTCAR.$i.$j /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k/POTCAR
       cp Me-$j/$i/$j/$k/POSCAR /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k/POSCAR


#Copia el script a los directorios
  head -30 script.s > Me-$j/$i/$j/$k/script.$i.$j.$k.s
  echo "cd /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k" >> Me-$j/$i/$j/$k/script.$i.$j.$k.s
  tail -2  script.s >> Me-$j/$i/$j/$k/script.$i.$j.$k.s


# Now run
  echo Me-$j/$i/$j/$k >> jobs
  llsubmit Me-$j/$i/$j/$k/script.$i.$j.$k.s >> jobs


done
done
done
#And move the input files to the folder
mv INPUTS Me-$j
mv script.s Me-$j