#!/bin/tcsh
# shell that takes a vmd session file and changes
# every file path with current path in the terminal
# To be used only with .vmd files generated by the 
# IGMPlot program.


echo
echo
echo "--------------------------------------"
echo
echo "vmdpath VERSION 2.0, 20/06/2020"



# Command usage
if ($#argv == 0) then
   echo Usage\: vmdpath \[filename with extension\]
   exit 0
endif


set extName=`echo $1|awk -F "." '{print $NF}'`
set jobName=`echo $1|sed "s/\.$extName//"`

awk  -f ~/bin/vmdpath.awk  $1 >  "$jobName"Local.vmd

exit
echo
echo "--> file "$jobName"Local.vmd produced"
echo
echo "--------------------------------------"
echo








