#!/bin/csh
#
# This UCSF Generation and Cleanup script was created by AGNuS 1.0.
#


# Testing to delete ./pipe_conversion/
if (-e ./pipe_conversion/) then
	echo "Deleteing ./pipe_conversion/"
	rm -fr ./pipe_conversion/ 
endif

# Testing to delete ./pipe_processing/
if (-e ./pipe_processing/) then
	echo "Deleteing ./pipe_processing/"
	rm -fr ./pipe_processing/ 
endif

# Testing to delete ./HcccoNH_tocsy_xy.pipe
if (-e ./HcccoNH_tocsy_xy.pipe) then
	echo "Deleteing ./HcccoNH_tocsy_xy.pipe"
	rm -fr ./HcccoNH_tocsy_xy.pipe 
endif

# Testing to delete ./HcccoNH_tocsy_xz.pipe
if (-e ./HcccoNH_tocsy_xz.pipe) then
	echo "Deleteing ./HcccoNH_tocsy_xz.pipe"
	rm -fr ./HcccoNH_tocsy_xz.pipe 
endif

# Generate UCSF if ./HcccoNH_tocsy.pipe exists
if (-e ./HcccoNH_tocsy.pipe) then
	echo "Attempting to generate UCSF file ./HcccoNH_tocsy.ucsf"
	if ( { pipe2ucsf ./HcccoNH_tocsy.pipe ./HcccoNH_tocsy.ucsf } ) then 
		echo "Deleteing ./HcccoNH_tocsy.pipe"
		rm -f ./HcccoNH_tocsy.pipe 
	endif
endif

