yosi
From: Zdenek Tosner <tosner@...>
To: simpson-simmol@yahoogroups.com
Sent: Tuesday, June 9, 2009 7:23:03 PM
Subject: Re: [simpson-simmol] target function on OC greater than 1
Hello,
it was decided not to normalize target function. So don't be worried
when you get numbers higher than one. And how high the target function
can go? In your case the upper limit is 2.0. The input file below shows
that. Suppose that all of the polarization/ coherence represented by your
start operator is transferred to the detection operator by the
ideal/optimal pulse. We can assess the maximum of the target function
without the optimal pulse - just set start operator the same as detect
operator. In this way you actually calculate the norm of the operator.
In some cases it is not possible to transfer with 100% efficiency - see
papers on unitary bounds.
Best regards,
Zdenek
# test operator norm
spinsys {
channels 1H 13C
nuclei 1H 13C 13C
shift 3 2000 0 0 0 0 0
jcoupling 1 2 140 0 0 0 0 0
}
par {
# set up liquid state
spin_rate 0
crystal_file alpha0beta0
gamma_angles 1
# define operator of interest
start_operator I2x
detect_operator I2x
conjugate_fid false
}
proc pulseq {} {
global par
reset
oc_acq_hermit
}
proc main {} {
global par
# we acquire a single number
set par(np) 1
set f [fsimpson]
puts "Norm is [findex $f 1 -re]"
funload $f
}
zaphod_bi wrote:
>
>
> hello,
>
> i'm a new simpson user, and i was playing with the optimal control
> features.
>
> i was trying to create a simple coherence transfer from Ix1 to Ix2 on
> a 3 spin system. it seems that the target function outputs are greater
> than 1, which puzzles me. am i doing something wrong?
>
> yosi atia
> yosiat@.... ac.il <mailto:yosiat% 40cs.technion. ac.il>
>
> here is the *.in file:
>
> # 1 Coherence transfer through J coupling
> # 1.1 Variant without any restrictions
>
> spinsys {
>
> channels 1H 13C
> nuclei 1H 13C 13C
> shift 3 2000 0 0 0 0 0
> jcoupling 1 2 140 0 0 0 0 0
> }
>
> par {
> # set up liquid state
> spin_rate 0
> crystal_file alpha0beta0
> gamma_angles 1
>
> # define operators in transfer
> start_operator I1x
> detect_operator I2x
>
> # duration of the shaped pulse is 1/J
> variable duration 1.0e6/140.0
>
> # number of elements in the shape
> variable NOC 150
>
> # just limit number of iterations in oc_optimize
> oc_max_iter 1000
>
> # this MUST be used when working with optimal control!!!
> conjugate_fid false
> }
>
> proc pulseq {} {
> global par rfsh1 rfsh2
>
> reset
> pulse_shaped $par(duration) $rfsh1 $rfsh2
> oc_acq_hermit
> }
>
> proc gradient {} {
> global par
>
> # FID length with gradients is 2 channels x NOC
> set par(np) [expr 2*$par(NOC)]
> set f [fsimpson]
>
> return $f
> }
>
> proc target_function {} {
> global par
>
> # we acquire a single number
> set par(np) 1
> set f [fsimpson]
> set Res [findex $f 1 -re]
> funload $f
> return [format "%.20f" $Res]
> }
>
> proc main {} {
> global par rfsh1 rfsh2
>
> # generate initial pulse sequences
> set rfsh1 [rand_shape 1500 $par(NOC) 30]
> set rfsh2 [rand_shape 1000 $par(NOC) 30]
>
> # do optimization
> set tfopt [oc_optimize $rfsh1 $rfsh2]
>
> # save results
> save_shape $rfsh1 $par(name)\_ sol_H.dat
> save_shape $rfsh2 $par(name)\_ sol_C.dat
>
> free_all_shapes
> }
>
>