#!/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

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

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

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

