#!/bin/csh
#
# This UCSF Generation and Cleanup script was created by AGNuS 2.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

# Generate UCSF if ./C13_hsqc.pipe exists
if (-e ./C13_hsqc.pipe) then
	echo "Attempting to generate UCSF file ./C13_hsqc.ucsf"
	if ( { pipe2ucsf  ./C13_hsqc.pipe ./C13_hsqc.ucsf } ) then 
		if (-e ./Convert_C13_hsqc.csh ) then
			echo "ZZZZZZZZZZConversion_script_begin" >> ./C13_hsqc.ucsf
			cat ./Convert_C13_hsqc.csh >> ./C13_hsqc.ucsf
			echo "ZZZZZZZZZZConversion_script_end" >> ./C13_hsqc.ucsf
		endif
		if (-e ./Process_C13_hsqc.csh ) then
			echo "ZZZZZZZZZZProcessing_script_begin" >> ./C13_hsqc.ucsf
			cat ./Process_C13_hsqc.csh >> ./C13_hsqc.ucsf
			echo "ZZZZZZZZZZProcessing_script_end" >> ./C13_hsqc.ucsf
		endif
		echo "Deleteing ./C13_hsqc.pipe"
		rm -f ./C13_hsqc.pipe 
	endif
endif

