------------------------------------------------------------------------------- -- -- -- Automation Script File -- -- Delta NMR Processing and Control Interface -- -- -- -- Copyright (c) 2017 JEOL RESONANCE, Inc. -- -- All Rights Reserved -- -- -- ------------------------------------------------------------------------------- C:\Users\delta\Documents\JEOL\Delta 5.3\automation ------------------------------------------------------------------------------- -- IMPORTANT NOTES ------------------------------------------------------------------------------- -- Remember that when assigning to the x_sweep parameter from another data file -- (such as a scout scan) that we should obtain the 'x_sweep_clipped' parameter -- value which will give the corrected x_sweep value that we expect. This is -- because digital filtering modifies the x_sweep value prior to acquisition. ------------------------------------------------------------------------------- AUTOMATION VERSION 2; PURPOSE "A collection of Methods for use with Delta v 5.3.x and higher."; INCLUDE "Utilities" TO DOMAIN util; ENUM Spinlock_field IS ("2[kHz]", "3[kHz]", "4[kHz]", "5[kHz]", "6[kHz]", "7[kHz]", "8[kHz]"); NUMBER Gain_Range IS INTEGER FROM 0 TO 102 STEP 2 WITH NO UNIT; ENUM DOMS IS NAMESPACE CAPITALIZE KEYS "gamma" IGNORE ("nodraw"); NUMBER Sel_angle IS LIST (45, 90, 135) WITH UNIT [deg]; NUMBER SamplingPoints IS LIST (64, 128, 256, 512); NUMBER SamplingDensity IS LIST (6.25, 12.5, 25, 50, 62.5, 75); ENUM LinearNus IS ("Linear", "Nus"); ------------------------------------------------------------------------------- METHOD " 1. 1H" IS PURPOSE "Routine Proton single pulse experiment"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + 120[s]; VAR calculate_proton_90 : BOOLEAN = FALSE;--, HELP "Calculate 90 degee pulse?"; VAR force_tune : BOOLEAN = FALSE;--, DEPENDS ON calculate_proton_90 EVALUATE (calculate_proton_90 ? TRUE : FALSE), -- HELP "Retune RF coil(s)"; VAR dual_tuned : BOOLEAN = FALSE;--, HELP "Dual tuning for HFX probes"; VAR autogain : BOOLEAN = TRUE;--, HELP "Optimize gain value automatically"; VAR receiver_gain : Gain_Range = 0;--, DEPENDS ON autogain EVALUATE (autogain ? 0 : 46); EXPOSE VAR scans : NUMBER = 32, HELP "Number of scans to perform"; VAR dummy_scans : NUMBER = 0;--, HELP "Dummy scans"; VAR tip_angle : NUMBER = 45[deg];--, HELP "Tip angle"; EXPOSE VAR x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR data_points : NUMBER = 32768;--, HELP "Number of data points"; EXPOSE VAR relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : TEXT = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT Proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = receiver_gain; relaxation_delay = relaxation_delay; scans = scans; x_angle = tip_angle; x_offset = x_offset; x_sweep = x_sweep; x_points = data_points; x_prescans = dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE Proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; END METHOD " 1. 1H"; ------------------------------------------------------------------------------- METHOD " 2. 13C" IS PURPOSE "Routine Carbon single pulse experiment"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION carbon + 120[s]; VAR calculate_carbon_90 : BOOLEAN = FALSE;--, HELP "Calculate 90 degee pulse?"; VAR force_tune : BOOLEAN = FALSE;--, DEPENDS ON calculate_carbon_90 EVALUATE (calculate_carbon_90 ? TRUE : FALSE); VAR dual_tuned : BOOLEAN = FALSE;--, HELP "Dual tuning for HFX probes"; VAR autogain : BOOLEAN = TRUE;--, HELP "Optimize gain value automatically"; VAR receiver_gain : Gain_Range = 0;--, DEPENDS ON autogain EVALUATE (autogain ? 0 : 46); EXPOSE VAR scans : NUMBER = 256, HELP "Number of scans to perform"; VAR dummy_scans : NUMBER = 4;--, HELP "Dummy scans"; VAR tip_angle : NUMBER = 30[deg];--, HELP "Tip angle"; VAR sn_ratio : NUMBER = 0;--, HELP "Stop when s/n is achieved, 0 = skip test"; EXPOSE VAR x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR data_points : NUMBER = 32768; EXPOSE VAR relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET x_offset COIL oneh_coil DOMAIN irr_domain OFFSET 5[ppm]; INVOKE util.Set_1H_90_Params( before_tune_idler ); INVOKE util.gs(); IF SAMPLE "solvent" = "D2O" THEN SET calculate_carbon_90 = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_carbon_90, autogain, receiver_gain, 90[deg], dual_tuned ); IF calculate_carbon_90 THEN SET autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF carbon_rg /= NULL THEN SET receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = relaxation_delay; scans = scans; recvr_gain = receiver_gain; sn_ratio = sn_ratio; x_angle = tip_angle; x_offset = x_offset; x_sweep = x_sweep; x_points = data_points; x_prescans = dummy_scans; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon SAVE AS "$(SAMPLE)_CARBON_FT"; PRESENTATION carbon_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_CARBON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; END METHOD " 2. 13C"; ------------------------------------------------------------------------------- METHOD " 3. 1H & COSY" IS PURPOSE "Proton-Proton correlation spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * cosy + 120[s]; VAR calculate_proton_90 : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for Proton experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_proton_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT Proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; scans = proton_scans; recvr_gain = receiver_gain; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; relaxation_delay = proton_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE Proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT COSY IS SAVE AS "$(SAMPLE)_COSY$(fname_ext)"; COLLECT "cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH cosy AND cosy_pdf; END METHOD " 3. 1H & COSY"; ------------------------------------------------------------------------------- METHOD " 4. 1H & 13C" IS PURPOSE "Proton and Carbon"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION proton + carbon + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for proton experiment"; VAR carbon_autogain : BOOLEAN = TRUE; VAR carbon_receiver_gain : Gain_Range = 0; EXPOSE VAR carbon_scans : NUMBER = 256, HELP "Number of scans to perform"; VAR carbon_dummy_scans : NUMBER = 4; VAR carbon_tip_angle : NUMBER = 30[deg]; VAR carbon_sn_ratio : NUMBER = 0; EXPOSE VAR carbon_x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR carbon_x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR carbon_data_points : NUMBER = 32768; EXPOSE VAR carbon_relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; IF carbon_autogain = TRUE AND carbon_receiver_gain = 0 THEN SET carbon_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, carbon_autogain, carbon_receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET carbon_autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; IF carbon_rg /= NULL THEN SET carbon_receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = carbon_autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = carbon_relaxation_delay; scans = carbon_scans; recvr_gain = carbon_receiver_gain; sn_ratio = carbon_sn_ratio; x_angle = carbon_tip_angle; x_points = carbon_data_points; x_prescans = carbon_dummy_scans; x_offset = carbon_x_offset; x_sweep = carbon_x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon SAVE AS "$(SAMPLE)_CARBON_FT"; PRESENTATION carbon_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_CARBON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; END METHOD " 4. 1H & 13C"; ------------------------------------------------------------------------------- METHOD " 5. 1H, 13C & COSY" IS PURPOSE "Proton, Carbon, DQF COSY"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION proton + carbon + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * cosy + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for proton experiment"; VAR carbon_autogain : BOOLEAN = TRUE; VAR carbon_receiver_gain : Gain_Range = 0; EXPOSE VAR carbon_scans : NUMBER = 256, HELP "Number of scans to perform"; VAR carbon_dummy_scans : NUMBER = 4; VAR carbon_tip_angle : NUMBER = 30[deg]; VAR carbon_sn_ratio : NUMBER = 0; EXPOSE VAR carbon_x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR carbon_x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR carbon_data_points : NUMBER = 32768; EXPOSE VAR carbon_relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR xoffset : NUMBER = proton_x_offset; VAR xsweep : NUMBER = proton_x_sweep; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; IF carbon_autogain = TRUE AND carbon_receiver_gain = 0 THEN SET carbon_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, carbon_autogain, carbon_receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET carbon_autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; IF carbon_rg /= NULL THEN SET carbon_receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = carbon_autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = carbon_relaxation_delay; scans = carbon_scans; recvr_gain = carbon_receiver_gain; sn_ratio = carbon_sn_ratio; x_angle = carbon_tip_angle; x_points = carbon_data_points; x_prescans = carbon_dummy_scans; x_offset = carbon_x_offset; x_sweep = carbon_x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon SAVE AS "$(SAMPLE)_CARBON_FT"; PRESENTATION carbon_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_CARBON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_clip THEN INVOKE util.Handle_Clipping( processed_proton, xoffset, xsweep ); INFORM "x_offset set to $(xoffset)"; INFORM "x_sweep set to $(xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT COSY IS SAVE AS "$(SAMPLE)_DQF_COSY$(fname_ext)"; COLLECT "cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = xoffset; x_sweep = xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH cosy AND cosy_pdf; END METHOD " 5. 1H, 13C & COSY"; ------------------------------------------------------------------------------- METHOD " 6. 1H, 13C, COSY & edHSQC" IS PURPOSE "Proton, Carbon, DQF COSY, Edited HSQC"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION proton + carbon + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * cosy + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * hsqc + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for proton experiment"; VAR carbon_autogain : BOOLEAN = TRUE; VAR carbon_receiver_gain : Gain_Range = 0; EXPOSE VAR carbon_scans : NUMBER = 256, HELP "Number of scans to perform"; VAR carbon_dummy_scans : NUMBER = 4; VAR carbon_tip_angle : NUMBER = 30[deg]; VAR carbon_sn_ratio : NUMBER = 0; EXPOSE VAR carbon_x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR carbon_x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR carbon_data_points : NUMBER = 32768; EXPOSE VAR carbon_relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_proton_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; VAR perform_carbon_clip : BOOLEAN = FALSE; EXPOSE VAR hsqc_scans : NUMBER = 2, HELP " Number of scans for HSQC experiment"; EXPOSE VAR hsqc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HSQC experiment"; VAR hsqc_x_points : NUMBER = 1024; EXPOSE VAR hsqc_y_points : SamplingPoints = 128, HELP "t1 increments"; VAR hsqc_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; VAR carbon_xoffset : NUMBER = carbon_x_offset; VAR carbon_xsweep : NUMBER = carbon_x_sweep; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; IF carbon_autogain = TRUE AND carbon_receiver_gain = 0 THEN SET carbon_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, carbon_autogain, carbon_receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET carbon_autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; IF carbon_rg /= NULL THEN SET carbon_receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = carbon_autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = carbon_relaxation_delay; scans = carbon_scans; recvr_gain = carbon_receiver_gain; sn_ratio = carbon_sn_ratio; x_angle = carbon_tip_angle; x_points = carbon_data_points; x_prescans = carbon_dummy_scans; x_offset = carbon_x_offset; x_sweep = carbon_x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon SAVE AS "$(SAMPLE)_CARBON_FT"; PRESENTATION carbon_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_CARBON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT COSY IS SAVE AS "$(SAMPLE)_DQF_COSY$(fname_ext)"; COLLECT "cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH cosy AND cosy_pdf; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF perform_carbon_clip THEN INVOKE util.Handle_Clipping( processed_carbon, carbon_xoffset, carbon_xsweep ); INFORM "Carbon y_offset set to $(carbon_xoffset)"; INFORM "Carbon y_sweep set to $(carbon_xsweep)"; END IF; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hsqc_y_points, hsqc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_inverse_pn.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_inverse_pn_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HSQC IS SAVE AS "$(SAMPLE)_HSQC$(fname_ext)"; COLLECT "hsqc"; SET * = params; SET scans = hsqc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_xoffset; y_sweep = carbon_xsweep; x_points = hsqc_x_points; y_points = hsqc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hsqc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HSQC; VAR processed_hsqc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HSQC WITH "2d_inverse_pn.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC_FT"; SET processed_hsqc = processed_hsqc_temp; ELSE PROCESS HSQC WITH "2d_inverse_pn_nus.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC$(fname_ext)_FT"; SET processed_hsqc = processed_hsqc_temp; END IF; PRESENTATION hsqc_pdf TEMPLATE "cosy_runtime" WITH DATA processed_hsqc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HSQC$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hsqc AND hsqc_pdf; END METHOD " 6. 1H, 13C, COSY & edHSQC"; ------------------------------------------------------------------------------- METHOD " 7. 1H, 13C, COSY, edHSQC, HMBC" IS PURPOSE "Proton, Carbon, DQF COSY, Edited HSQC, HMBC"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION proton + carbon + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * cosy + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * hsqc + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * hmbc + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for proton experiment"; VAR carbon_autogain : BOOLEAN = TRUE; VAR carbon_receiver_gain : Gain_Range = 0; EXPOSE VAR carbon_scans : NUMBER = 256, HELP "Number of scans to perform"; VAR carbon_dummy_scans : NUMBER = 4; VAR carbon_tip_angle : NUMBER = 30[deg]; VAR carbon_sn_ratio : NUMBER = 0; EXPOSE VAR carbon_x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR carbon_x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR carbon_data_points : NUMBER = 32768; EXPOSE VAR carbon_relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_proton_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; VAR perform_carbon_clip : BOOLEAN = FALSE; EXPOSE VAR hsqc_scans : NUMBER = 2, HELP " Number of scans for HSQC experiment"; EXPOSE VAR hsqc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HSQC experiment"; VAR hsqc_x_points : NUMBER = 1024; EXPOSE VAR hsqc_y_points : SamplingPoints = 128, HELP "t1 increments"; VAR hsqc_sampling_density : SamplingDensity = 25; EXPOSE VAR hmbc_scans : NUMBER = 4; EXPOSE VAR hmbc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HMBC experiment"; VAR hmbc_x_points : NUMBER = 1024; EXPOSE VAR hmbc_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR hmbc_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; VAR carbon_xoffset : NUMBER = carbon_x_offset; VAR carbon_xsweep : NUMBER = carbon_x_sweep; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; IF carbon_autogain = TRUE AND carbon_receiver_gain = 0 THEN SET carbon_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, carbon_autogain, carbon_receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET carbon_autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; IF carbon_rg /= NULL THEN SET carbon_receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = carbon_autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = carbon_relaxation_delay; scans = carbon_scans; recvr_gain = carbon_receiver_gain; sn_ratio = carbon_sn_ratio; x_angle = carbon_tip_angle; x_points = carbon_data_points; x_prescans = carbon_dummy_scans; x_offset = carbon_x_offset; x_sweep = carbon_x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon SAVE AS "$(SAMPLE)_CARBON_FT"; PRESENTATION carbon_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_CARBON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT COSY IS SAVE AS "$(SAMPLE)_DQF_COSY$(fname_ext)"; COLLECT "cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH cosy AND cosy_pdf; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF perform_carbon_clip THEN INVOKE util.Handle_Clipping( processed_carbon, carbon_xoffset, carbon_xsweep ); INFORM "Carbon y_offset set to $(carbon_xoffset)"; INFORM "Carbon y_sweep set to $(carbon_xsweep)"; END IF; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hsqc_y_points, hsqc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_inverse_pn.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_inverse_pn_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HSQC IS SAVE AS "$(SAMPLE)_HSQC$(fname_ext)"; COLLECT "hsqc"; SET * = params; SET scans = hsqc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_xoffset; y_sweep = carbon_xsweep; x_points = hsqc_x_points; y_points = hsqc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hsqc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HSQC; VAR processed_hsqc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HSQC WITH "2d_inverse_pn.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC_FT"; SET processed_hsqc = processed_hsqc_temp; ELSE PROCESS HSQC WITH "2d_inverse_pn_nus.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC$(fname_ext)_FT"; SET processed_hsqc = processed_hsqc_temp; END IF; PRESENTATION hsqc_pdf TEMPLATE "cosy_runtime" WITH DATA processed_hsqc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HSQC$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hsqc AND hsqc_pdf; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF perform_carbon_clip THEN INVOKE util.Handle_Clipping( processed_carbon, carbon_xoffset, carbon_xsweep ); INFORM "Carbon y_offset set to $(carbon_xoffset)"; INFORM "Carbon y_sweep set to $(carbon_xsweep)"; END IF; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hmbc_y_points, hmbc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_hmbc_abs.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_hmbc_abs_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HMBC IS SAVE AS "$(SAMPLE)_HMBC$(fname_ext)"; COLLECT "hmbc_pfg"; SET * = params; SET scans = hmbc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_xoffset; y_sweep = carbon_xsweep; x_points = hmbc_x_points; y_points = hmbc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hmbc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HMBC; VAR processed_hmbc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HMBC WITH "2d_hmbc_abs.list" TO processed_hmbc_temp SAVE AS "$(SAMPLE)_HMBC_FT"; SET processed_hmbc = processed_hmbc_temp; ELSE PROCESS HMBC WITH "2d_hmbc_abs_nus.list" TO processed_hmbc_temp SAVE AS "$(SAMPLE)_HMBC$(fname_ext)_FT"; SET processed_hmbc = processed_hmbc_temp; END IF; PRESENTATION hmbc_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_hmbc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HMBC$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hmbc AND hmbc_pdf; END METHOD " 7. 1H, 13C, COSY, edHSQC, HMBC"; ------------------------------------------------------------------------------- METHOD " 8. 1H, COSY, edHSQC, HMBC" IS PURPOSE "Proton, DQF COSY, Edited HSQC, HMBC"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION proton + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * cosy + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * hsqc + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * hmbc + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for proton experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_proton_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; EXPOSE VAR carbon_x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR carbon_x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; EXPOSE VAR hsqc_scans : NUMBER = 2, HELP " Number of scans for HSQC experiment"; EXPOSE VAR hsqc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HSQC experiment"; VAR hsqc_x_points : NUMBER = 1024; EXPOSE VAR hsqc_y_points : SamplingPoints = 128, HELP "t1 increments"; VAR hsqc_sampling_density : SamplingDensity = 25; EXPOSE VAR hmbc_scans : NUMBER = 4, HELP " Number of scans for HMBC experiment"; EXPOSE VAR hmbc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HMBC experiment"; VAR hmbc_x_points : NUMBER = 1024; EXPOSE VAR hmbc_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR hmbc_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, TRUE, 46, 90[deg], dual_tuned ); VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT COSY IS SAVE AS "$(SAMPLE)_DQF_COSY$(fname_ext)"; COLLECT "cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH cosy AND cosy_pdf; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hsqc_y_points, hsqc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_inverse_pn.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_inverse_pn_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HSQC IS SAVE AS "$(SAMPLE)_HSQC$(fname_ext)"; COLLECT "hsqc"; SET * = params; SET scans = hsqc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_x_offset; y_sweep = carbon_x_sweep; x_points = hsqc_x_points; y_points = hsqc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hsqc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HSQC; VAR processed_hsqc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HSQC WITH "2d_inverse_pn.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC_FT"; SET processed_hsqc = processed_hsqc_temp; ELSE PROCESS HSQC WITH "2d_inverse_pn_nus.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC$(fname_ext)_FT"; SET processed_hsqc = processed_hsqc_temp; END IF; VAR processed_carbon : DATA; SET processed_carbon = project( processed_hsqc); PRESENTATION hsqc_pdf TEMPLATE "cosy_runtime" WITH DATA processed_hsqc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HSQC$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hsqc AND hsqc_pdf; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hmbc_y_points, hmbc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_hmbc_abs.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_hmbc_abs_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HMBC IS SAVE AS "$(SAMPLE)_HMBC$(fname_ext)"; COLLECT "hmbc_pfg"; SET * = params; SET scans = hmbc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_x_offset; y_sweep = carbon_x_sweep; x_points = hmbc_x_points; y_points = hmbc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hmbc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HMBC; VAR processed_hmbc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HMBC WITH "2d_hmbc_abs.list" TO processed_hmbc_temp SAVE AS "$(SAMPLE)_HMBC_FT"; SET processed_hmbc = processed_hmbc_temp; ELSE PROCESS HMBC WITH "2d_hmbc_abs_nus.list" TO processed_hmbc_temp SAVE AS "$(SAMPLE)_HMBC$(fname_ext)_FT"; SET processed_hmbc = processed_hmbc_temp; END IF; IF processed_carbon = NULL THEN SET processed_carbon = project( processed_hmbc); END IF; PRESENTATION hmbc_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_hmbc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HMBC$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hmbc AND hmbc_pdf; END METHOD " 8. 1H, COSY, edHSQC, HMBC"; ------------------------------------------------------------------------------- -- METHOD " 8. Quantitative Carbon" IS ------------------------------------------------------------------------------- METHOD " 9. DEPT" IS PURPOSE "Dept"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Dept + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR scans : NUMBER = 256, HELP "Number of scans to perform"; VAR dummy_scans : NUMBER = 4; EXPOSE VAR selection_angle : Sel_angle = 135[deg]; VAR sn_ratio : NUMBER = 0; EXPOSE VAR x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR data_points : NUMBER = 32768; EXPOSE VAR relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; VAR comment : TEXT = SAMPLE "comment"; VAR selection_angle_stripped_units : NUMBER = selection_angle`[]; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET x_offset COIL oneh_coil DOMAIN irr_domain OFFSET 5[ppm]; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, TRUE, 40, 90[deg], dual_tuned, before_tune_idler ); VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, autogain, receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF carbon_rg /= NULL THEN SET receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT Dept IS SAVE AS "$(SAMPLE)_DEPT_$(selection_angle_stripped_units)"; COLLECT "dept"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; recvr_gain = receiver_gain; scans = scans; selection_angle = selection_angle; x_offset = x_offset; x_sweep = x_sweep; relaxation_delay = relaxation_delay; x_points = data_points; x_prescans = dummy_scans; x_pulse = carbon_90; x_atn = carbon_atn; irr_pulse = proton_90; irr_atn = proton_atn; END EXPERIMENT; VISUALIZE Dept; PROCESS dept WITH "carbon_autophase_p.list" TO processed_dept SAVE AS "$(SAMPLE)_DEPT$(selection_angle_stripped_units)_FT"; PRESENTATION dept_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_dept TO JOB PRINTER AND FILE "$(SAMPLE)_DEPT_$(selection_angle_stripped_units).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH dept AND dept_pdf; END METHOD " 9. DEPT"; ------------------------------------------------------------------------------- METHOD "10. Edited Dept" IS PURPOSE "Edited Dept"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Carbon + Dept_45 + Dept_90 + Dept_135 + 120[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR scans : NUMBER = 256, HELP "Number of scans to perform"; VAR dummy_scans : NUMBER = 4; VAR sn_ratio : NUMBER = 0; VAR tip_angle : NUMBER = 30[deg]; EXPOSE VAR x_offset : NUMBER = 100[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 250[ppm], HELP "Sweep width"; VAR data_points : NUMBER = 32768; EXPOSE VAR relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET x_offset COIL oneh_coil DOMAIN irr_domain OFFSET 5[ppm]; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, autogain, 40, 90[deg], dual_tuned, before_tune_idler ); VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, autogain, receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF carbon_rg /= NULL THEN SET receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT Carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = relaxation_delay; scans = scans; recvr_gain = receiver_gain; sn_ratio = sn_ratio; x_angle = tip_angle; x_points = data_points; x_prescans = dummy_scans; x_offset = x_offset; x_sweep = x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; CONCEAL EXPERIMENT Dept_45 IS SAVE AS "$(SAMPLE)_DEPT45"; COLLECT "dept_dec"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; recvr_gain = carbon("recvr_gain"); selection_angle = 45[deg]; x_offset = carbon("x_offset"); x_sweep = carbon("x_sweep_clipped"); relaxation_delay = relaxation_delay; irr_90 = proton_90; irr_atn = proton_atn; x_pulse = carbon_90; x_atn = carbon_atn; scans = carbon("scans")/2; CONSTRAIN scans MULTIPLE OF 8 INCREASE; END EXPERIMENT; CONCEAL EXPERIMENT Dept_90 IS SAVE AS "$(SAMPLE)_DEPT90"; COLLECT "dept_dec"; SET comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; recvr_gain = dept_45("recvr_gain"); scans = dept_45("scans"); selection_angle = 90[deg]; x_offset = carbon("x_offset"); x_sweep = carbon("x_sweep_clipped"); relaxation_delay = dept_45("relaxation_delay"); irr_90 = proton_90; irr_atn = proton_atn; x_pulse = carbon_90; x_atn = carbon_atn; END EXPERIMENT; CONCEAL EXPERIMENT Dept_135 IS SAVE AS "$(SAMPLE)_DEPT135"; COLLECT "dept_dec"; SET comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; recvr_gain = dept_45("recvr_gain"); scans = dept_45("scans"); selection_angle = 135[deg]; x_offset = carbon("x_offset"); x_sweep = carbon("x_sweep_clipped"); relaxation_delay = dept_45("relaxation_delay"); irr_90 = proton_90; irr_atn = proton_atn; x_pulse = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VAR tmp_carbon : DATA; VAR tmp_45 : DATA; SET tmp_45 = dept_45 - dept_135; VAR tmp_90 : DATA; VAR tmp_135 : DATA; SET tmp_135 = dept_45 + dept_135 - sqrt(2) * dept_90; SET tmp_carbon = clip( ppm( machinephase( fft( sexp( carbon, 2[Hz], 0[s] ) ) ) ), 1.2, FALSE ); SET tmp_45 = ppm( machinephase( fft( sexp( tmp_45, 2[Hz], 0[s] ) ) ) ); SET tmp_90 = ppm( machinephase( fft( sexp( dept_90, 2[Hz], 0[s] ) ) ) ); SET tmp_135 = ppm( machinephase( fft( sexp( tmp_135, 2[Hz], 0[s] ) ) ) ); PERCIVAL <<< -- Make a vector that can be linked to in PM that will allow the CH's to -- have the same y min and max based on the current data files function CREATE_MAX_FILE( in45 : FILE, in90 : FILE, in135 : FILE ) return FILE is var mm : SET, max_y : NUMBER := -infinity, min_y : NUMBER := infinity, max_x : NUMBER := -infinity, min_x : NUMBER := infinity; for fl in {in45, in90, in135} loop mm := minmax( fl ); -- Pick the max y value in the set of files(get the largest positive value) if mm(2) > max_y then max_y := mm(2); end if; -- Pick the min y value in the set of files (get the largest negative value) if mm(1) < min_y then min_y := mm(1); end if; mm := minmax {(bounds fl){3,1}, (bounds fl){4,1}}; -- Pick the max x value in the set of files if mm(2) > max_x then max_x := mm(2); end if; -- Pick the min x value in the set of files if mm(1) < min_x then min_x := mm(1); end if; end loop; return vector {{max_x,max_y},{min_x,min_y}}; end CREATE_MAX_FILE; >>>; VAR max_file : DATA; SET max_file = CALL create_max_file( tmp_45, tmp_90, tmp_135 ); PROCESS tmp_carbon WITH "null.list" to tmp_carbon_ft SAVE AS "$(SAMPLE)_CARBON"; PROCESS tmp_90 WITH "null.list" to tmp_90_ft SAVE AS "$(SAMPLE)_METHINES"; PROCESS tmp_45 WITH "null.list" to tmp_45_ft SAVE AS "$(SAMPLE)_METHYLENES"; PROCESS tmp_135 WITH "null.list" to tmp_135_ft SAVE AS "$(SAMPLE)_METHYLS"; VISUALIZE tmp_135_ft WITH tmp_45_ft WITH tmp_90_ft WITH tmp_carbon_ft IN "data_slate"; PRESENTATION edited_dept_pdf TEMPLATE "dept" WITH DATA tmp_carbon AND tmp_90 AND tmp_45 AND tmp_135 AND max_file TO JOB PRINTER AND FILE "$(SAMPLE)_EDITED_DEPT.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH Carbon AND Dept_45 AND Dept_90 AND Dept_135 AND edited_dept_pdf; END METHOD "10. Edited Dept"; ------------------------------------------------------------------------------- METHOD "11. COSY" IS PURPOSE "Proton-Proton correlation spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * cosy + 120[s]; VAR calculate_proton_90 : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for Proton experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_proton_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT Proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; scans = proton_scans; recvr_gain = receiver_gain; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; relaxation_delay = proton_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE Proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT COSY IS SAVE AS "$(SAMPLE)_COSY$(fname_ext)"; COLLECT "cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH cosy AND cosy_pdf; END METHOD "11. COSY"; ------------------------------------------------------------------------------- METHOD "12. DQF COSY" IS PURPOSE "Proton-Proton correlation spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](25) / 100)) * dqf_cosy + 120[s]; VAR calculate_proton_90 : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for Proton experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; VAR perform_proton_clip : BOOLEAN = FALSE; EXPOSE VAR cosy_scans : NUMBER = 2, HELP "Number of scans to perform"; EXPOSE VAR cosy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR cosy_x_points : NUMBER = 1024; EXPOSE VAR cosy_y_points : SamplingPoints = 256, HELP "t1 increments"; VAR cosy_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT Proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; scans = proton_scans; recvr_gain = receiver_gain; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; relaxation_delay = proton_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE Proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( cosy_y_points, cosy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "cosy.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_cosy_abs_nus_no_sym.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT DQF_COSY IS SAVE AS "$(SAMPLE)_DQF_COSY$(fname_ext)"; COLLECT "dqf_cosy_pfg"; SET * = params; SET scans = cosy_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = cosy_x_points; y_points = cosy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = cosy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE DQF_COSY; VAR processed_cosy : DATA; IF linear_or_nus = "Linear" THEN PROCESS DQF_COSY WITH "cosy.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_DQF_COSY_FT"; SET processed_cosy = processed_cosy_temp; ELSE PROCESS DQF_COSY WITH "2d_cosy_abs_nus_no_sym.list" TO processed_cosy_temp SAVE AS "$(SAMPLE)_DQF_COSY$(fname_ext)_FT"; SET processed_cosy = processed_cosy_temp; END IF; PRESENTATION dqf_cosy_pdf TEMPLATE "cosy_runtime_positive" WITH DATA processed_cosy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_DQF_COSY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH dqf_cosy AND dqf_cosy_pdf; END METHOD "12. DQF COSY"; ------------------------------------------------------------------------------- -- METHOD "13. TOCSY" IS ------------------------------------------------------------------------------- METHOD "14. NOESY" IS PURPOSE "Proton-Proton Dipolar correlation spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](noesy_sampling_density) / 100)) * noesy + 240[s]; VAR calculate_proton_90 : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for Proton experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; EXPOSE VAR perform_proton_clip : BOOLEAN = TRUE, HELP "Optimize 1H sweep width and carrier offset"; EXPOSE VAR noesy_scans : NUMBER = 4, HELP "Number of scans to perform"; EXPOSE VAR noesy_mix_time : NUMBER = 500[ms], HELP "mix time"; EXPOSE VAR noesy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR noesy_x_points : NUMBER = 1024; VAR noesy_y_points : SamplingPoints = 256; EXPOSE VAR noesy_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT Proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; scans = proton_scans; recvr_gain = receiver_gain; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; relaxation_delay = proton_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE Proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( noesy_y_points, noesy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_homo2d_phase.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_homo2d_phase_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT NOESY IS SAVE AS "$(SAMPLE)_NOESY$(fname_ext)"; COLLECT "noesy_phase_pfgzz"; SET * = params; SET scans = noesy_scans; comment = comment; force_dual_mode = dual_tuned; mix_time = noesy_mix_time; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = noesy_x_points; y_points = noesy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = noesy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE NOESY; VAR processed_noesy : DATA; IF linear_or_nus = "Linear" THEN PROCESS NOESY WITH "2d_homo2d_phase.list" TO processed_noesy_temp SAVE AS "$(SAMPLE)_NOESY_FT"; SET processed_noesy = processed_noesy_temp; ELSE PROCESS NOESY WITH "2d_homo2d_phase_nus.list" TO processed_noesy_temp SAVE AS "$(SAMPLE)_NOESY$(fname_ext)_FT"; SET processed_noesy = processed_noesy_temp; END IF; PRESENTATION noesy_pdf TEMPLATE "cosy_runtime" WITH DATA processed_noesy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_NOESY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH noesy AND noesy_pdf; END METHOD "14. NOESY"; ------------------------------------------------------------------------------- METHOD "15. ROESY" IS PURPOSE "Proton-Proton Dipolar correlation spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](roesy_sampling_density) / 100)) * roesy + 120[s]; VAR calculate_proton_90 : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR autogain : BOOLEAN = TRUE; VAR receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay for Proton experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; EXPOSE VAR perform_proton_clip : BOOLEAN = TRUE, HELP "Optimize 1H sweep width and carrier offset"; EXPOSE VAR roesy_scans : NUMBER = 4, HELP "Number of scans to perform"; EXPOSE VAR roesy_mix_time : NUMBER = 250[ms], HELP "mix time"; VAR roesy_spinlock_field : Spinlock_field = "4[kHz]"; EXPOSE VAR roesy_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for Cosy experiemnt"; VAR roesy_x_points : NUMBER = 1024; VAR roesy_y_points : SamplingPoints = 256; EXPOSE VAR roesy_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT Proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; scans = proton_scans; recvr_gain = receiver_gain; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; relaxation_delay = proton_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE Proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "x_offset set to $(proton_xoffset)"; INFORM "x_sweep set to $(proton_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( roesy_y_points, roesy_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_homo2d_phase.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_homo2d_phase_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT ROESY IS SAVE AS "$(SAMPLE)_ROESY$(fname_ext)"; COLLECT "roesy_phase"; SET * = params; SET scans = roesy_scans; comment = comment; force_dual_mode = dual_tuned; mix_time = roesy_mix_time; spinlock_strength = roesy_spinlock_field; x_offset = proton_xoffset; x_sweep = proton_xsweep; x_points = roesy_x_points; y_points = roesy_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = roesy_relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE ROESY; VAR processed_roesy : DATA; IF linear_or_nus = "Linear" THEN PROCESS ROESY WITH "2d_homo2d_phase.list" TO processed_roesy_temp SAVE AS "$(SAMPLE)_ROESY_FT"; SET processed_roesy = processed_roesy_temp; ELSE PROCESS ROESY WITH "2d_homo2d_phase_nus.list" TO processed_roesy_temp SAVE AS "$(SAMPLE)_ROESY$(fname_ext)_FT"; SET processed_roesy = processed_roesy_temp; END IF; PRESENTATION roesy_pdf TEMPLATE "cosy_runtime" WITH DATA processed_roesy AND processed_proton AND processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_ROESY$(fname_ext).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH roesy AND roesy_pdf; END METHOD "15. ROESY"; ------------------------------------------------------------------------------- -- METHOD "16. HMQC" IS ------------------------------------------------------------------------------- METHOD "17. HSQC" IS PURPOSE "1H 13C Correlation Spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + (acquire_13c_data ? carbon : 0[s]) + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](hsqc_sampling_density) / 100)) * hsqc + 240[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; EXPOSE VAR acquire_13c_data : BOOLEAN = FALSE, HELP "Collect 13C data for high resolution projection"; VAR carbon_autogain : BOOLEAN = TRUE; VAR carbon_receiver_gain : Gain_Range = 0; EXPOSE VAR carbon_scans : NUMBER = 256, HELP "Number of scans to perform"; VAR carbon_dummy_scans : NUMBER = 4; VAR carbon_tip_angle : NUMBER = 30[deg]; VAR carbon_sn_ratio : NUMBER = 0; EXPOSE VAR carbon_x_offset : NUMBER = 85[ppm], DEPENDS ON acquire_13c_data EVALUATE (acquire_13c_data ? 100[ppm] : 85[ppm]); EXPOSE VAR carbon_x_sweep : NUMBER = 170[ppm], DEPENDS ON acquire_13c_data EVALUATE (acquire_13c_data ? 250[ppm] : 170[ppm]); VAR carbon_data_points : NUMBER = 32768; EXPOSE VAR carbon_relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; EXPOSE VAR perform_proton_clip : BOOLEAN = TRUE, HELP "Optimize 1H sweep width and carrier offset"; EXPOSE VAR perform_carbon_clip : BOOLEAN = TRUE, HELP "Optimize 13C sweep width and carrier offset"; EXPOSE VAR hsqc_scans : NUMBER = 2, HELP " Number of scans for HMQC experiment"; EXPOSE VAR hsqc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HMQC experiment"; EXPOSE VAR hsqc_x_points : NUMBER = 1024, HELP "HMQC data points"; VAR hsqc_y_points : SamplingPoints = 128; EXPOSE VAR hsqc_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; VAR carbon_xoffset : NUMBER = carbon_x_offset; VAR carbon_xsweep : NUMBER = carbon_x_sweep; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; IF carbon_autogain = TRUE AND carbon_receiver_gain = 0 THEN SET carbon_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination if requested, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, carbon_autogain, carbon_receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET carbon_autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; IF carbon_rg /= NULL THEN SET carbon_receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; VAR processed_carbon : DATA; VAR carbon_pdf : DATA; IF acquire_13c_data THEN CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = carbon_autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = carbon_relaxation_delay; scans = carbon_scans; recvr_gain = carbon_receiver_gain; sn_ratio = carbon_sn_ratio; x_angle = carbon_tip_angle; x_points = carbon_data_points; x_prescans = carbon_dummy_scans; x_offset = carbon_x_offset; x_sweep = carbon_x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon_temp SAVE AS "$(SAMPLE)_CARBON_FT"; SET processed_carbon = processed_carbon_temp; PRESENTATION carbon_pdf_temp TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_Carbon.pdf"; SET carbon_pdf = carbon_pdf_temp; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; END IF; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF processed_carbon /= NULL AND perform_carbon_clip THEN INVOKE util.Handle_Clipping( processed_carbon, carbon_xoffset, carbon_xsweep ); INFORM "Carbon y_offset set to $(carbon_xoffset)"; INFORM "Carbon y_sweep set to $(carbon_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hsqc_y_points, hsqc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_inverse_pn.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_inverse_pn_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HSQC IS SAVE AS "$(SAMPLE)_HSQC"; COLLECT "hsqc"; SET * = params; SET scans = hsqc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_xoffset; y_sweep = carbon_xsweep; x_points = hsqc_x_points; y_points = hsqc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hsqc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HSQC; VAR processed_hsqc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HSQC WITH "2d_inverse_pn.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC_FT"; SET processed_hsqc = processed_hsqc_temp; ELSE PROCESS HSQC WITH "2d_inverse_pn_nus.list" TO processed_hsqc_temp SAVE AS "$(SAMPLE)_HSQC$(fname_ext)_FT"; SET processed_hsqc = processed_hsqc_temp; END IF; IF processed_carbon = NULL THEN SET processed_carbon = project( processed_hsqc); END IF; PRESENTATION hsqc_pdf TEMPLATE "cosy_runtime" WITH DATA processed_hsqc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HSQC.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hsqc AND hsqc_pdf; END METHOD "17. HSQC"; ------------------------------------------------------------------------------- METHOD "18. HMBC" IS PURPOSE "1H 13C Long Range Correlation Spectroscopy"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Proton + (acquire_13c_data ? carbon : 0[s]) + ((linear_or_nus = "Linear") ? 1 : ([NUMERIC](hmbc_sampling_density) / 100)) * hmbc + 240[s]; VAR calculate_90s : BOOLEAN = FALSE; VAR force_tune : BOOLEAN = FALSE; VAR dual_tuned : BOOLEAN = FALSE; VAR proton_autogain : BOOLEAN = TRUE; VAR proton_receiver_gain : Gain_Range = 0; EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; VAR proton_dummy_scans : NUMBER = 0; VAR proton_tip_angle : NUMBER = 45[deg]; EXPOSE VAR proton_x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR proton_x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; VAR proton_data_points : NUMBER = 32768; EXPOSE VAR proton_relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; EXPOSE VAR acquire_13c_data : BOOLEAN = FALSE, HELP "Collect 13C data for high resolution projection"; VAR carbon_autogain : BOOLEAN = TRUE; VAR carbon_receiver_gain : Gain_Range = 0; EXPOSE VAR carbon_scans : NUMBER = 256, HELP "Number of scans to perform"; VAR carbon_dummy_scans : NUMBER = 4; VAR carbon_tip_angle : NUMBER = 30[deg]; VAR carbon_sn_ratio : NUMBER = 0; EXPOSE VAR carbon_x_offset : NUMBER = 100[ppm], DEPENDS ON acquire_13c_data EVALUATE (acquire_13c_data ? 100[ppm] : 100[ppm]); EXPOSE VAR carbon_x_sweep : NUMBER = 200[ppm], DEPENDS ON acquire_13c_data EVALUATE (acquire_13c_data ? 250[ppm] : 200[ppm]); VAR carbon_data_points : NUMBER = 32768; EXPOSE VAR carbon_relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay for carbon experiment"; EXPOSE VAR linear_or_nus : LinearNus = "Nus"; EXPOSE VAR perform_proton_clip : BOOLEAN = TRUE, HELP "Optimize 1H sweep width and carrier offset"; EXPOSE VAR perform_carbon_clip : BOOLEAN = TRUE, HELP "Optimize 13C sweep width and carrier offset"; EXPOSE VAR hmbc_scans : NUMBER = 4, HELP " Number of scans for HMQC Experiment"; EXPOSE VAR hmbc_relaxation_delay : NUMBER = 1.5[s], HELP "Pre-pulse delay for HMQC experiment"; VAR hmbc_x_points : NUMBER = 1024; EXPOSE VAR hmbc_y_points : SamplingPoints = 256, HELP "t1 increments"; EXPOSE VAR hmbc_sampling_density : SamplingDensity = 25; VAR comment : TEXT = SAMPLE "comment"; VAR nuslist_idx_base : NUMBER = 1; VAR obs_domain : DOMS = "Carbon13"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; VAR proton_xoffset : NUMBER = proton_x_offset; VAR proton_xsweep : NUMBER = proton_x_sweep; VAR carbon_xoffset : NUMBER = carbon_x_offset; VAR carbon_xsweep : NUMBER = carbon_x_sweep; IF proton_autogain = TRUE AND proton_receiver_gain = 0 THEN SET proton_receiver_gain = 46; END IF; IF carbon_autogain = TRUE AND carbon_receiver_gain = 0 THEN SET carbon_receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET carbon_x_offset COIL oneh_coil DOMAIN irr_domain OFFSET proton_x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_90s, proton_autogain, proton_receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_90s THEN SET proton_autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF SAMPLE "solvent" = "D2O" THEN SET calculate_90s = FALSE; INFORM "Solvent is D2O, skipping 13C pulse width determination if requested, continuing..."; END IF; INVOKE util.Auto_13C_90_Degree( calculate_90s, carbon_autogain, carbon_receiver_gain, 90[deg], dual_tuned ); IF calculate_90s THEN SET carbon_autogain = FALSE; END IF; VAR carbon_90 : NUMBER = SAMPLE "carbon_90"; VAR carbon_atn : NUMBER = SAMPLE "carbon_atn"; VAR carbon_rg : NUMBER = SAMPLE "carbon_rg"; IF proton_rg /= NULL THEN SET proton_receiver_gain = proton_rg; END IF; IF carbon_rg /= NULL THEN SET carbon_receiver_gain = carbon_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "proton"; SET auto_gain = proton_autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = proton_receiver_gain; relaxation_delay = proton_relaxation_delay; scans = proton_scans; x_angle = proton_tip_angle; x_offset = proton_x_offset; x_sweep = proton_x_sweep; x_points = proton_data_points; x_prescans = proton_dummy_scans; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE proton; PROCESS Proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PRESENTATION proton_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_proton TO JOB PRINTER AND FILE "$(SAMPLE)_PROTON.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND proton_pdf; VAR processed_carbon : DATA; VAR carbon_pdf : DATA; IF acquire_13c_data THEN CONCEAL EXPERIMENT carbon IS SAVE AS "$(SAMPLE)_CARBON"; COLLECT "carbon"; SET auto_gain = carbon_autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = carbon_relaxation_delay; scans = carbon_scans; recvr_gain = carbon_receiver_gain; sn_ratio = carbon_sn_ratio; x_angle = carbon_tip_angle; x_points = carbon_data_points; x_prescans = carbon_dummy_scans; x_offset = carbon_x_offset; x_sweep = carbon_x_sweep; x_90_width = carbon_90; x_atn = carbon_atn; END EXPERIMENT; VISUALIZE carbon; PROCESS carbon WITH "carbon_autophase_p.list" TO processed_carbon_temp SAVE AS "$(SAMPLE)_CARBON_FT"; SET processed_carbon = processed_carbon_temp; PRESENTATION carbon_pdf_temp TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_Carbon.pdf"; SET carbon_pdf = carbon_pdf_temp; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH carbon AND carbon_pdf; END IF; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; -- Call clip() here to set x_sweep and x_offset if highres exists --- IF perform_proton_clip THEN INVOKE util.Handle_Clipping( processed_proton, proton_xoffset, proton_xsweep ); INFORM "Proton x_offset set to $(proton_xoffset)"; INFORM "Proton x_sweep set to $(proton_xsweep)"; END IF; IF processed_carbon /= NULL AND perform_carbon_clip THEN INVOKE util.Handle_Clipping( processed_carbon, carbon_xoffset, carbon_xsweep ); INFORM "Carbon y_offset set to $(carbon_xoffset)"; INFORM "Carbon y_sweep set to $(carbon_xsweep)"; END IF; VAR y_nuslist : LIST = {}; IF linear_or_nus = "Nus" THEN INVOKE util.y_nuslist( hmbc_y_points, hmbc_sampling_density, y_nuslist ); INFORM "Setting non uniform sampling points to $(y_nuslist)"; END IF; VAR params : util.Assoc; VAR fname_ext : TEXT = ""; IF linear_or_nus = "Linear" THEN SET params("process") = "2d_hmbc_abs.list"; ELSE SET params("y_nuslist") = y_nuslist; SET params("nuslist_idx_base") = nuslist_idx_base; SET params("process") = "2d_hmbc_abs_nus.list"; SET fname_ext = "_NUS"; END IF; CONCEAL EXPERIMENT HMBC IS SAVE AS "$(SAMPLE)_HMBC$(fname_ext)"; COLLECT "hmbc_pfg"; SET * = params; SET scans = hmbc_scans; comment = comment; force_dual_mode = dual_tuned; x_offset = proton_xoffset; x_sweep = proton_xsweep; y_offset = carbon_xoffset; y_sweep = carbon_xsweep; x_points = hmbc_x_points; y_points = hmbc_y_points; recvr_gain = proton("recvr_gain") + 4; relaxation_delay = hmbc_relaxation_delay; x_pulse = proton_90; x_atn = proton_atn; y_pulse = carbon_90; y_atn = carbon_atn; END EXPERIMENT; VISUALIZE HMBC; VAR processed_hmbc : DATA; IF linear_or_nus = "Linear" THEN PROCESS HMBC WITH "2d_hmbc_abs.list" TO processed_hmbc_temp SAVE AS "$(SAMPLE)_HMBC_FT"; SET processed_hmbc = processed_hmbc_temp; ELSE PROCESS HMBC WITH "2d_hmbc_abs_nus.list" TO processed_hmbc_temp SAVE AS "$(SAMPLE)_HMBC$(fname_ext)_FT"; SET processed_hmbc = processed_hmbc_temp; END IF; IF processed_carbon = NULL THEN SET processed_carbon = project( processed_hmbc); END IF; PRESENTATION hmbc_pdf TEMPLATE "cosy_runtime" WITH DATA processed_hmbc AND processed_proton AND processed_carbon TO JOB PRINTER AND FILE "$(SAMPLE)_HMBC.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH hmbc AND hmbc_pdf; END METHOD "18. HMBC"; ------------------------------------------------------------------------------- METHOD "19. Selective NOESY 1D" IS PURPOSE "1D noe experiment"; -- duration help "COLLECT statement experiment" + tune time + padding for gradient shimming" DURATION oned_noesy + (force_tune ? 60[s] : 0[s]) + 120[s]; EXPOSE VAR force_tune : BOOLEAN = TRUE, HELP "Retune RF coil(s)"; EXPOSE VAR dual_tuned : BOOLEAN = FALSE, HELP "Dual tuning for HFX probes"; EXPOSE VAR autogain : BOOLEAN = TRUE, HELP "Optimize gain value automatically"; EXPOSE VAR receiver_gain : Gain_Range = 0, DEPENDS ON autogain EVALUATE (autogain ? 0 : 46); EXPOSE VAR scans : NUMBER = 16, HELP "Number of scans to perform, n*4"; EXPOSE VAR excitation_offset : NUMBER = 5[ppm], HELP "Offset to be excited"; EXPOSE VAR selective_bandwidth : NUMBER = 50[Hz], HELP "Bandwidth of exciatation"; EXPOSE VAR mix_time : NUMBER = 500[ms], HELP "Spin mixing time"; EXPOSE VAR x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; EXPOSE VAR data_points : NUMBER = 32768; EXPOSE VAR relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR obs_sel_180 : NUMBER = 20[ms]; VAR obs_sel_atn : NUMBER = 60[dB]; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET x_offset; INVOKE util.gs(); INVOKE util.Soft_pw_atn( selective_bandwidth, obs_sel_180, obs_sel_atn ); INFORM "Gaussian pulse width set to $(obs_sel_180)"; INFORM "Attenuator set to $(obs_sel_atn)"; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; CONCEAL EXPERIMENT oned_noesy IS SAVE AS "$(SAMPLE)_ONED_NOESY_OFFSET_$(excitation_offset)"; COLLECT "noe_1d_dpfgse"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; mix_time = mix_time; obs_sel_offset = excitation_offset; obs_sel_180 = obs_sel_180; obs_sel_atn = obs_sel_atn; process = "proton_autophase.list"; recvr_gain = receiver_gain; scans = scans; relaxation_delay = relaxation_delay; x_offset = x_offset; x_sweep = x_sweep; x_points = data_points; END EXPERIMENT; VISUALIZE oned_noesy; VAR tmp_noesy : DATA; SET tmp_noesy = phase( ppm( machinephase( fft( sexp( oned_noesy, 2[Hz], 0[s] ) ) ) ), 180, 0, 50[%] ); PROCESS tmp_noesy WITH "null.list" to processed_noesy SAVE AS "$(SAMPLE)_ONED_NOESY_$(excitation_offset)_FT"; PRESENTATION oned_noesy_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_noesy TO JOB PRINTER AND FILE "$(SAMPLE)_ONED_NOESY_$(excitation_offset).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH oned_noesy AND oned_noesy_pdf; END METHOD "19. Selective NOESY 1D"; ------------------------------------------------------------------------------- -- METHOD "20. Selective TOCSY 1D" IS ------------------------------------------------------------------------------- METHOD "21. Selective ROESY 1D" IS PURPOSE "1D noe experiment"; -- duration help "COLLECT statement experiment" + tune time + padding for gradient shimming" DURATION oned_roesy + (force_tune ? 60[s] : 0[s]) + 120[s]; EXPOSE VAR force_tune : BOOLEAN = FALSE, HELP "Retune RF coil(s)"; EXPOSE VAR dual_tuned : BOOLEAN = FALSE, HELP "Dual tuning for HFX probes"; EXPOSE VAR autogain : BOOLEAN = TRUE, HELP "Optimize gain value automatically"; EXPOSE VAR receiver_gain : Gain_Range = 0, DEPENDS ON autogain EVALUATE (autogain ? 0 : 46); EXPOSE VAR scans : NUMBER = 16, HELP "Number of scans to perform, n*4"; EXPOSE VAR excitation_offset : NUMBER = 5[ppm], HELP "Offset to be excited"; EXPOSE VAR selective_bandwidth : NUMBER = 50[Hz], HELP "Bandwidth of exciatation"; EXPOSE VAR spinlock_strength : Spinlock_field = "4[kHz]", HELP "Spin lock field"; EXPOSE VAR mix_time : NUMBER = 250[ms], HELP "Spin mixing time"; EXPOSE VAR x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; EXPOSE VAR data_points : NUMBER = 32768; EXPOSE VAR relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR obs_sel_180 : NUMBER = 20[ms]; VAR obs_sel_atn : NUMBER = 60[dB]; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET x_offset; INVOKE util.gs(); INVOKE util.Soft_pw_atn( selective_bandwidth, obs_sel_180, obs_sel_atn ); INFORM "Gaussian pulse width set to $(obs_sel_180)"; INFORM "Attenuator set to $(obs_sel_atn)"; SET MACHINE PARAMETER "spin_state" = "SPIN OFF"; CONCEAL EXPERIMENT oned_roesy IS SAVE AS "$(SAMPLE)_ONED_ROESY_OFFSET_$(excitation_offset)"; COLLECT "roesy_1d_dpfgse"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; mix_time = mix_time; obs_sel_offset = excitation_offset; obs_sel_180 = obs_sel_180; obs_sel_atn = obs_sel_atn; process = "proton_autophase.list"; recvr_gain = receiver_gain; scans = scans; spinlock_strength = spinlock_strength; relaxation_delay = relaxation_delay; x_offset = x_offset; x_sweep = x_sweep; x_points = data_points; END EXPERIMENT; VISUALIZE oned_roesy; VAR tmp_roesy : DATA; SET tmp_roesy = phase( ppm( machinephase( fft( sexp( oned_roesy, 2[Hz], 0[s] ) ) ) ), 180, 0, 50[%]); PROCESS tmp_roesy WITH "null.list" to processed_roesy SAVE AS "$(SAMPLE)_ONED_ROESY_$(excitation_offset)_FT"; PRESENTATION oned_roesy_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_roesy TO JOB PRINTER AND FILE "$(SAMPLE)_ONED_ROESY_$(excitation_offset).pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH oned_roesy AND oned_roesy_pdf; END METHOD "21. Selective ROESY 1D"; ------------------------------------------------------------------------------- METHOD "22. Presaturation" IS PURPOSE "Proton scout and Presaturation"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION proton + presaturation + (force_tune ? 60[s] : 0[s]) + (calculate_proton_90 ? 120[s] : 0[s]) + 120[s]; EXPOSE VAR calculate_proton_90 : BOOLEAN = FALSE, HELP "Calculate 90 degee pulse?"; EXPOSE VAR force_tune : BOOLEAN = FALSE, HELP "Retune RF coil(s)"; EXPOSE VAR dual_tuned : BOOLEAN = FALSE, HELP "Dual tuning for HFX probes"; EXPOSE VAR autogain : BOOLEAN = TRUE, HELP "Optimize gain value automatically"; EXPOSE VAR receiver_gain : Gain_Range = 0, DEPENDS ON autogain EVALUATE (autogain ? 0 : 46); EXPOSE VAR proton_scans : NUMBER = 16, HELP "Number of scans to perform"; EXPOSE VAR x_offset : NUMBER = 5[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 15[ppm], HELP "Sweep width"; EXPOSE VAR relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; EXPOSE VAR presat_scans : NUMBER = 16, HELP "Number of scans to perform"; EXPOSE VAR irr_attenuator : NUMBER = 40[dB], HELP "Power level for presaturation"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; IF autogain = TRUE AND receiver_gain = 0 THEN SET receiver_gain = 46; END IF; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL oneh_coil DOMAIN obs_domain OFFSET x_offset; INVOKE util.gs(); INVOKE util.Auto_1H_90_Degree( calculate_proton_90, autogain, receiver_gain, 90[deg], dual_tuned, before_tune_idler ); IF calculate_proton_90 THEN SET autogain = FALSE; END IF; VAR proton_90 : NUMBER = SAMPLE "proton_90"; VAR proton_atn : NUMBER = SAMPLE "proton_atn"; VAR proton_rg : NUMBER = SAMPLE "proton_rg"; IF proton_rg /= NULL THEN SET receiver_gain = proton_rg; END IF; CONCEAL EXPERIMENT proton IS SAVE AS "$(SAMPLE)_PROTON"; COLLECT "single_pulse"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; recvr_gain = receiver_gain; scans = proton_scans; x_offset = x_offset; x_sweep = x_sweep; relaxation_delay = relaxation_delay; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VAR processed_proton : DATA; VAR high : NUMBER; SET processed_proton = PROCESS proton WITH "scout.list"; high = CALL highest_peak( processed_proton ); INFORM "Setting irr_offset to $(high)"; CONCEAL EXPERIMENT presaturation IS SAVE AS "$(SAMPLE)_PRESATURATION"; COLLECT "single_pulse"; SET auto_gain = TRUE; comment = comment; force_dual_mode = dual_tuned; process = "proton_autophase.list"; x_offset = proton("x_offset"); x_sweep = proton("x_sweep_clipped"); relaxation_delay = relaxation_delay; x_prescans = 4; scans = presat_scans; irr_offset = high; irr_mode = "Presaturation"; irr_attenuator = irr_attenuator; x_90_width = proton_90; x_atn = proton_atn; END EXPERIMENT; VISUALIZE presaturation; PROCESS proton WITH "proton_autophase.list" TO processed_proton SAVE AS "$(SAMPLE)_PROTON_FT"; PROCESS presaturation WITH "proton_autophase.list" TO processed_presaturation SAVE AS "$(SAMPLE)_PRESATURATION_FT"; PRESENTATION presaturation_pdf TEMPLATE "presaturation_runtime_full" WITH DATA processed_proton and processed_presaturation TO JOB PRINTER AND FILE "$(SAMPLE)_Proton_Presaturation.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH proton AND presaturation AND presaturation_pdf; END METHOD "22. Presaturation"; ------------------------------------------------------------------------------- METHOD "23. Fluorine" IS PURPOSE "Routine Fluorine single pulse experiment"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION Fluorine + (force_tune ? 60[s] : 0[s]) + 120[s]; EXPOSE VAR force_tune : BOOLEAN = FALSE, HELP "Retune RF coil(s)"; EXPOSE VAR dual_tuned : BOOLEAN = FALSE, HELP "Dual tuning for HFX probes"; EXPOSE VAR autogain : BOOLEAN = TRUE, HELP "Optimize gain value automatically"; EXPOSE VAR scans : NUMBER = 16, HELP "Number of scans to perform"; EXPOSE VAR x_offset : NUMBER = -100[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 200[ppm], HELP "Sweep width"; EXPOSE VAR data_points : NUMBER = 32768, HELP "Number of data points"; EXPOSE VAR relaxation_delay : NUMBER = 4[s], HELP "Pre-pulse delay"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Fluorine19"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; --No need to determine coil for 19F as it is currently always on HF1 TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "HF1" DOMAIN obs_domain OFFSET x_offset; INVOKE util.Set_1H_90_Params( before_tune_idler ); INVOKE util.gs(); CONCEAL EXPERIMENT Fluorine IS SAVE AS "$(SAMPLE)_Fluorine"; COLLECT "single_pulse"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase.list"; scans = scans; relaxation_delay = relaxation_delay; x_domain = "Fluorine19"; x_offset = x_offset; x_sweep = x_sweep; x_points = data_points; END EXPERIMENT; VISUALIZE Fluorine; PROCESS fluorine WITH "carbon_autophase.list" TO processed_fluorine SAVE AS "$(SAMPLE)_FLUORINE_FT"; PRESENTATION fluorine_pdf TEMPLATE "params_right_runtime_proton_full" WITH DATA processed_fluorine TO JOB PRINTER AND FILE "$(SAMPLE)_FLUORINE.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH fluorine AND fluorine_pdf; END METHOD "23. Fluorine"; ------------------------------------------------------------------------------- METHOD "24. Phosphorus" IS PURPOSE "Routine Phosphorus single pulse experiment"; -- duration help "COLLECT statement experiment" + tune time + 90 degree calculation + padding for gradient shimming" DURATION phosphorus + (force_tune ? 60[s] : 0[s]) + 120[s]; EXPOSE VAR force_tune : BOOLEAN = FALSE, HELP "Retune RF coil(s)"; EXPOSE VAR dual_tuned : BOOLEAN = FALSE, HELP "Dual tuning for HFX probes"; EXPOSE VAR autogain : BOOLEAN = TRUE, HELP "Optimize gain value automatically"; EXPOSE VAR scans : NUMBER = 64, HELP "Number of scans to perform"; EXPOSE VAR sn_ratio : NUMBER = 0, HELP "Stop when s/n is achieved, 0 = skip test"; EXPOSE VAR x_offset : NUMBER = 0[ppm], HELP "Center of spectrum"; EXPOSE VAR x_sweep : NUMBER = 400[ppm], HELP "Sweep width"; EXPOSE VAR data_points : NUMBER = 32768; EXPOSE VAR relaxation_delay : NUMBER = 2[s], HELP "Pre-pulse delay"; VAR comment : TEXT = SAMPLE "comment"; VAR obs_domain : DOMS = "Phosphorus31"; VAR irr_domain : DOMS = "Proton"; VAR oneh_coil : TEXT = "hf1"; VAR before_tune_idler : TEXT = NAMESPACE "system.probe_id_idler" ELSE ""; INVOKE util.Determine_coil( oneh_coil ); TUNE PROBE FORCE force_tune DUAL dual_tuned COIL "LF1" DOMAIN obs_domain OFFSET x_offset COIL oneh_coil DOMAIN irr_domain OFFSET 5[ppm]; INVOKE util.Set_1H_90_Params( before_tune_idler ); INVOKE util.gs(); CONCEAL EXPERIMENT phosphorus IS SAVE AS "$(SAMPLE)_PHOSPHORUS"; COLLECT "single_pulse_dec"; SET auto_gain = autogain; comment = comment; force_dual_mode = dual_tuned; process = "carbon_autophase_p.list"; relaxation_delay = relaxation_delay; scans = scans; sn_ratio = sn_ratio; x_domain = "Phosphorus31"; x_offset = x_offset; x_sweep = x_sweep; x_points = data_points; END EXPERIMENT; VISUALIZE phosphorus; PROCESS phosphorus WITH "carbon_autophase_p.list" TO processed_phosphorus SAVE AS "$(SAMPLE)_PHOSPHORUS_FT"; PRESENTATION phosphorus_pdf TEMPLATE "params_right_runtime_carbon_full" WITH DATA processed_phosphorus TO JOB PRINTER AND FILE "$(SAMPLE)_PHOSPHORUS.pdf"; EMAIL USER SUBJECT "Raw Data for sample $(SAMPLE)" MESSAGE "Attached DATA and/or PDF. Finished collecting $(METHOD) with sample $(SAMPLE) on $(SITE)." ATTACH phosphorus AND phosphorus_pdf; END METHOD "24. Phosphorus"; -------------------------------------------------------------------------------