Potgenpbe5.3: Difference between revisions

From Wiki
Jump to navigation Jump to search
New page: #!/bin/bash # Create a GGA_PAW POTCAR file by concatenation of POTCAR files # D.K. version 2010-07-08 TGN # Define local potpaw_GGA pseudopotential repository: repo="/home/oldhome/nlopez/...
 
No edit summary
Line 1: Line 1:
#!/bin/bash
#!/bin/bash
# Create a GGA_PAW POTCAR file by concatenation of POTCAR files
# Create a GGA_PAW POTCAR file by concatenation of POTCAR files
# D.K. version 2010-07-08 TGN
# D.K. version 2010-07-08 TGN  
 
# Define local potpaw_GGA pseudopotential repository:
# Define local potpaw_GGA pseudopotential repository:
repo="/home/oldhome/nlopez/PPS/pot_for_vasp5.3/PBE"
repo="/home/oldhome/nlopez/PPS/pot_for_vasp5.3/PBE"  
 
# Check if older version of POTCAR is present
# Check if older version of POTCAR is present
if [ -f POTCAR ] ; then
if [ -f POTCAR ] ; then
mv -f POTCAR old-POTCAR
  mv -f POTCAR old-POTCAR
echo " ** Warning: old POTCAR file found and renamed to 'old-POTCAR'."
  echo " ** Warning: old POTCAR file found and renamed to 'old-POTCAR'."
fi
 
# Main loop - concatenate the appropriate POTCARs (or archives)
for i in $*
do
if test -f $repo/$i/POTCAR ; then
  cat $repo/$i/POTCAR >> POTCAR
elif test -f $repo/$i/POTCAR.Z ; then
  zcat $repo/$i/POTCAR >> POTCAR
elif test -f $repo/$i/POTCAR.gz ; then
  gunzip -c $repo/$i/POTCAR.gz >> POTCAR
else
  echo " ** Warning: No suitable POTCAR for element '$i' found!! Skipped this element."
  fi
  fi
done
# Main loop - concatenate the appropriate POTCARs (or archives)
for i in $*
do
  if test -f $repo/$i/POTCAR ; then
  cat $repo/$i/POTCAR >> POTCAR
  elif test -f $repo/$i/POTCAR.Z ; then
  zcat $repo/$i/POTCAR >> POTCAR
  elif test -f $repo/$i/POTCAR.gz ; then
  gunzip -c $repo/$i/POTCAR.gz >> POTCAR
  else
  echo " ** Warning: No suitable POTCAR for element '$i' found!! Skipped this element."
  fi
done

Revision as of 14:38, 7 August 2019

#!/bin/bash
# Create a GGA_PAW POTCAR file by concatenation of POTCAR files
# D.K. version 2010-07-08 TGN 

# Define local potpaw_GGA pseudopotential repository:
repo="/home/oldhome/nlopez/PPS/pot_for_vasp5.3/PBE" 

# Check if older version of POTCAR is present
if [ -f POTCAR ] ; then
 mv -f POTCAR old-POTCAR
 echo " ** Warning: old POTCAR file found and renamed to 'old-POTCAR'."
fi

# Main loop - concatenate the appropriate POTCARs (or archives)
for i in $*
do
 if test -f $repo/$i/POTCAR ; then
  cat $repo/$i/POTCAR >> POTCAR
 elif test -f $repo/$i/POTCAR.Z ; then
  zcat $repo/$i/POTCAR >> POTCAR
 elif test -f $repo/$i/POTCAR.gz ; then
  gunzip -c $repo/$i/POTCAR.gz >> POTCAR
 else
  echo " ** Warning: No suitable POTCAR for element '$i' found!! Skipped this element."
 fi
done