#! /bin/tcsh 

echo '# plot of the current vs z of the he atom ' > current_tip.dat

foreach d1 ( 0 1 2 3 4 5  )
  foreach d2 ( 0  1 2 3 4 5  )
    foreach d3 ( 0 1 2 3 )

       cd  $d1.$d2.$d3

       echo '--------> ' `pwd` ' <-------'

       if [[ -s safe ]] ; then
	    echo 'skipping directory ' $dir ' as it is NOT SAFE'
	    echo -1 > ../tmp
       else
	    ~/Software/TOOLS/CURRENT/model_4/curr_gf KS.dat OV.dat 1.0 > ../tmp
       fi
       cd ..

       echo $d1 $d2 $d3 `cat tmp` >> current_tip.dat

    end
  end
end



