Setandsubmit.s: Difference between revisions

From Wiki
Jump to navigation Jump to search
No edit summary
Dkarhanek (talk | contribs)
mNo edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
go back to [[Main Page]], [[Computational Resources]], [[Scripts]], [[Scripts for VASP]]
 
 
'''IMPORTANT!!!''' You need the following file [[script.s]] in order to use ''setandsubmit.s''!!
 
  #README
  #README
  #README
  #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)
  #  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
  #  and the converged CONTCAR, and also, a file called INPUT
Line 17: Line 21:
  #                                      .              .
  #                                      .              .
  #
  #
  #It is neccesry to the file "script.s":
  #It is neccesry also the submision file "script.s":
 
 
 
  #Create the directories for all the metals, both in home and in scratch.
  #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:
  #Here there is the set of metals that we are going to studie:
 
     for i in  Au Cu Ir Pd Pt Rh ; do
     for i in  Au Cu Ir Pd Pt Rh ; do
 
 
  #The molecules:
  #The molecules:
 
     for j in CN ; do
     for j in CN CO NO; do
 
 
  #and the states:
  #and the states:
 
     for k in initial final ts ; do
     for k in initial final ts ; do
 
         mkdir Me-$j
         mkdir Me-$j
         mkdir Me-$j/$i
         mkdir Me-$j/$i
         mkdir Me-$j/$i/$j
         mkdir Me-$j/$i/$j
         mkdir Me-$j/$i/$j/$k
         mkdir Me-$j/$i/$j/$k
 
         mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j
         mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j
         mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j/$i
         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
         mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
         mkdir /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
 
 
  #Copy INCAR, KPOINTS, and POTCAR's in /scratch/
  #Copy INCAR, KPOINTS, and POTCAR's in /scratch/
 
         cp ./INPUTS/INCAR /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
         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/KPOINTS /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
         cp ./INPUTS/POTCAR.$i.$j /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
  #CONTCAR's tunning
 
   echo $i $j > Me-$j/$i/$j/$k/POSCAR.$k
   echo $i $j > Me-$j/$i/$j/$k/POSCAR.$k
   grep "$i" INPUTS/INPUT | awk ' {print $2}' > parameter
   grep "$i" INPUTS/INPUT | awk ' {print $2}' > parameter
   tail parameter >> Me-$j/$i/$j/$k/POSCAR.$k
   tail parameter >> Me-$j/$i/$j/$k/POSCAR.$k
 
   M=`wc -l INPUTS/CONTCAR.Pt.CN | awk '{print $1}'`
   M=`wc -l INPUTS/CONTCAR.Pt.CN | awk '{print $1}'`
   N=`expr $M - 2`
   N=`expr $M - 2`
 
  echo $N
  echo $N
 
 
   tail -$N INPUTS/CONTCAR.Pt.CN >> Me-$j/$i/$j/$k/POSCAR.$k
   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
   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/INCAR /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k
         cp ./INPUTS/KPOINTS /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 ./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
         cp Me-$j/$i/$j/$k/POSCAR /gpfs/scratch/iciq08/iciq08494/Me-$j/$i/$j/$k/POSCAR
 
 
  #Copia el script a los directorios
  #Copy the script to the directories
 
   head -30 script.s > Me-$j/$i/$j/$k/script.$i.$j.$k.s
   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
   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
   tail -2  script.s >> Me-$j/$i/$j/$k/script.$i.$j.$k.s
 
 
  # Now run
  # Now run
 
   echo Me-$j/$i/$j/$k >> jobs
   echo Me-$j/$i/$j/$k >> jobs
   llsubmit Me-$j/$i/$j/$k/script.$i.$j.$k.s >> jobs
   llsubmit Me-$j/$i/$j/$k/script.$i.$j.$k.s >> jobs
 
 
  done
  done
  done
  done
  done
  done
 
  #And move the input files to the folder
  #And move the input files to the folder
 
  mv INPUTS Me-$j
  mv INPUTS Me-$j
  mv script.s Me-$j
  mv script.s Me-$j

Latest revision as of 13:23, 21 September 2010

go back to Main Page, Computational Resources, Scripts, Scripts for VASP


IMPORTANT!!! You need the following file script.s in order to use setandsubmit.s!!

#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


#Copy the script to the directories

  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