1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 from math import pi
25
26
27 from data import Relax_data_store; ds = Relax_data_store()
28 from generic_fns import diffusion_tensor, pipes
29 from relax_errors import RelaxError, RelaxParamSetError, RelaxUnknownParamCombError
30 from test_suite.unit_tests.base_classes import UnitTestCase
31
32
34 """Base class for the tests of both the 'prompt.value' and 'generic_fns.value' modules.
35
36 This base class also contains many shared unit tests.
37 """
38
40 """Set up for all the value unit tests."""
41
42
43 ds.add(pipe_name='ct', pipe_type='ct')
44
45
46 ds.add(pipe_name='mf', pipe_type='mf')
47
48
49 ds.add(pipe_name='mf2', pipe_type='mf')
50
51
52 ds.add(pipe_name='jw', pipe_type='jw')
53
54
55 ds.add(pipe_name='relax_fit', pipe_type='relax_fit')
56
57
58 ds.add(pipe_name='n_state', pipe_type='N-state')
59
60
61 self.set_up_spins(pipe_name='ct')
62 self.set_up_spins(pipe_name='mf')
63 self.set_up_spins(pipe_name='jw')
64 self.set_up_spins(pipe_name='relax_fit')
65
66
67 N = 4
68 ds['n_state'].N = N
69 ds['n_state'].alpha = [0.0] * N
70 ds['n_state'].beta = [0.0] * N
71 ds['n_state'].gamma = [0.0] * N
72
73
96
97
98
99
100
101
102
103
104
106 """Set the consistency testing parameter J(0) for all spins.
107
108 The functions tested are both generic_fns.value.set() and prompt.value.set().
109 """
110
111
112 pipes.switch('ct')
113
114
115 self.value_fns.set(param='j0', val=4.5e-9)
116
117
118 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 4.5e-9)
119 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
120
121
123 """Set the consistency testing parameter F_eta for all spins.
124
125 The functions tested are both generic_fns.value.set() and prompt.value.set().
126 """
127
128
129 pipes.switch('ct')
130
131
132 self.value_fns.set(param='f_eta', val=2.3e-10)
133
134
135 self.assertEqual(cdp.mol[0].res[0].spin[0].f_eta, 2.3e-10)
136 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 2.3e-10)
137
138
140 """Set the consistency testing parameter F_R2 for all spins.
141
142 The functions tested are both generic_fns.value.set() and prompt.value.set().
143 """
144
145
146 pipes.switch('ct')
147
148
149 self.value_fns.set(param='f_r2', val=1.7e-12)
150
151
152 self.assertEqual(cdp.mol[0].res[0].spin[0].f_r2, 1.7e-12)
153 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.7e-12)
154
155
157 """Set the consistency testing bond length parameter for all spins.
158
159 The functions tested are both generic_fns.value.set() and prompt.value.set().
160 """
161
162
163 pipes.switch('ct')
164
165
166 self.value_fns.set(param='r', val=1.04e-10)
167
168
169 self.assertEqual(cdp.mol[0].res[0].spin[0].r, 1.04e-10)
170 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.04e-10)
171
172
174 """Set the consistency testing CSA parameter for all spins.
175
176 The functions tested are both generic_fns.value.set() and prompt.value.set().
177 """
178
179
180 pipes.switch('ct')
181
182
183 self.value_fns.set(param='csa', val=-160e-6)
184
185
186 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -160e-6)
187 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
188
189
191 """Set the consistency testing heteronucleus type for all spins.
192
193 The functions tested are both generic_fns.value.set() and prompt.value.set().
194 """
195
196
197 pipes.switch('ct')
198
199
200 self.value_fns.set(param='heteronuc_type', val='13C')
201
202
203 self.assertEqual(cdp.mol[0].res[0].spin[0].heteronuc_type, '13C')
204 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '13C')
205
206
208 """Set the consistency testing theta angle for all spins.
209
210 The functions tested are both generic_fns.value.set() and prompt.value.set().
211 """
212
213
214 pipes.switch('ct')
215
216
217 self.value_fns.set(param='orientation', val=17)
218
219
220 self.assertEqual(cdp.mol[0].res[0].spin[0].orientation, 17)
221 self.assertEqual(cdp.mol[0].res[1].spin[0].orientation, 17)
222
223
225 """Set the consistency testing approximate correlation time for all spins.
226
227 The functions tested are both generic_fns.value.set() and prompt.value.set().
228 """
229
230
231 pipes.switch('ct')
232
233
234 self.value_fns.set(param='tc', val=10)
235
236
237 self.assertEqual(cdp.mol[0].res[0].spin[0].tc, 10)
238 self.assertEqual(cdp.mol[0].res[1].spin[0].tc, 10)
239
240
242 """Set different consistency tests parameters J(0), F_eta, F_R2 for all spins.
243
244 The functions tested are both generic_fns.value.set() and prompt.value.set().
245 """
246
247
248 pipes.switch('ct')
249
250
251 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=[6.4e-9, 3.5e-10, 2.3e-12])
252
253
254 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 6.4e-9)
255 self.assertEqual(cdp.mol[0].res[0].spin[0].f_eta, 3.5e-10)
256 self.assertEqual(cdp.mol[0].res[0].spin[0].f_r2, 2.3e-12)
257 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9)
258 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 3.5e-10)
259 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 2.3e-12)
260
261
263 """Set consistency tests parameters J(0), F_eta, F_R2 for all spins to the same value.
264
265 The functions tested are both generic_fns.value.set() and prompt.value.set().
266 """
267
268
269 pipes.switch('ct')
270
271
272 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=1.9e-10)
273
274
275 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 1.9e-10)
276 self.assertEqual(cdp.mol[0].res[0].spin[0].f_eta, 1.9e-10)
277 self.assertEqual(cdp.mol[0].res[0].spin[0].f_r2, 1.9e-10)
278 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10)
279 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 1.9e-10)
280 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.9e-10)
281
282
284 """Set the consistency testing parameter J(0) to the default value (there is none!).
285
286 The functions tested are both generic_fns.value.set() and prompt.value.set().
287 """
288
289
290 pipes.switch('ct')
291
292
293 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='j0')
294
295
297 """Set the consistency tests parameter F_eta to the default value (there is none!).
298
299 The functions tested are both generic_fns.value.set() and prompt.value.set().
300 """
301
302
303 pipes.switch('ct')
304
305
306 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='f_eta')
307
308
310 """Set the consistency tests parameter F_R2 to the default value (there is none!).
311
312 The functions tested are both generic_fns.value.set() and prompt.value.set().
313 """
314
315
316 pipes.switch('ct')
317
318
319 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='f_r2')
320
321
323 """Set the consistency testing bond length parameter to the default value.
324
325 The functions tested are both generic_fns.value.set() and prompt.value.set().
326 """
327
328
329 pipes.switch('ct')
330
331
332 self.value_fns.set(param='r')
333
334
335 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].r, 1.02e-10)
336 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].r, 1.02e-10)
337
338
340 """Set the consistency testing CSA parameter to the default value.
341
342 The functions tested are both generic_fns.value.set() and prompt.value.set().
343 """
344
345
346 pipes.switch('ct')
347
348
349 self.value_fns.set(param='csa')
350
351
352 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].csa, -172e-6)
353 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
354
355
357 """Set the consistency testing heteronucleus type to the default value.
358
359 The functions tested are both generic_fns.value.set() and prompt.value.set().
360 """
361
362
363 pipes.switch('ct')
364
365
366 self.value_fns.set(param='heteronuc_type')
367
368
369 self.assertEqual(cdp.mol[0].res[0].spin[0].heteronuc_type, '15N')
370 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '15N')
371
372
374 """Set the consistency testing theta angle parameter to the default value.
375
376 The functions tested are both generic_fns.value.set() and prompt.value.set().
377 """
378
379
380 pipes.switch('ct')
381
382
383 self.value_fns.set(param='orientation')
384
385
386 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].orientation, 15.7)
387 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].orientation, 15.7)
388
389
391 """Set the consistency testing approximate correlation time parameter to the default value.
392
393 The functions tested are both generic_fns.value.set() and prompt.value.set().
394 """
395
396
397 pipes.switch('ct')
398
399
400 self.value_fns.set(param='tc')
401
402
403 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].tc, 13 * 1e-9)
404 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].tc, 13 * 1e-9)
405
406
408 """Set different consistency testing parameters J(0), F_eta, F_R2 to the default values (there are none!).
409
410 The functions tested are both generic_fns.value.set() and prompt.value.set().
411 """
412
413
414 pipes.switch('ct')
415
416
417 self.assertRaises(RelaxParamSetError, self.value_fns.set, param=['j0', 'f_eta', 'f_r2'])
418
419
421 """Set the consistency tests parameter J(0) for a single spin.
422
423 The functions tested are both generic_fns.value.set() and prompt.value.set().
424 """
425
426
427 pipes.switch('ct')
428
429
430 self.value_fns.set(param='j0', val=4.5e-9, spin_id='@112')
431
432
433 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0'))
434 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
435
436
438 """Set the consistency tests parameter F_eta for a single spin.
439
440 The functions tested are both generic_fns.value.set() and prompt.value.set().
441 """
442
443
444 pipes.switch('ct')
445
446
447 self.value_fns.set(param='f_eta', val=2.3e-10, spin_id='@112')
448
449
450 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_eta'))
451 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 2.3e-10)
452
453
455 """Set the consistency tests parameter F_R2 for a single spin.
456
457 The functions tested are both generic_fns.value.set() and prompt.value.set().
458 """
459
460
461 pipes.switch('ct')
462
463
464 self.value_fns.set(param='f_r2', val=1.7e-12, spin_id='@112')
465
466
467 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_r2'))
468 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.7e-12)
469
470
472 """Set the consistency tests bond length parameter for a single spin.
473
474 The functions tested are both generic_fns.value.set() and prompt.value.set().
475 """
476
477
478 pipes.switch('ct')
479
480
481 self.value_fns.set(param='r', val=1.04e-10, spin_id='@112')
482
483
484 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'r'))
485 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.04e-10)
486
487
489 """Set the consistency tests CSA parameter for a single spin.
490
491 The functions tested are both generic_fns.value.set() and prompt.value.set().
492 """
493
494
495 pipes.switch('ct')
496
497
498 self.value_fns.set(param='csa', val=-160e-6, spin_id='@112')
499
500
501 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'csa'))
502 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
503
504
506 """Set the consistency testing heteronucleus type for a single spin.
507
508 The functions tested are both generic_fns.value.set() and prompt.value.set().
509 """
510
511
512 pipes.switch('ct')
513
514
515 self.value_fns.set(param='heteronuc_type', val='13C', spin_id='@112')
516
517
518 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'heteronuc_type'))
519 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '13C')
520
521
523 """Set the consistency tests theta angle parameter for a single spin.
524
525 The functions tested are both generic_fns.value.set() and prompt.value.set().
526 """
527
528
529 pipes.switch('ct')
530
531
532 self.value_fns.set(param='orientation', val=17, spin_id='@112')
533
534
535 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'orientation'))
536 self.assertEqual(cdp.mol[0].res[1].spin[0].orientation, 17)
537
538
540 """Set the consistency tests approximate correlation time parameter for a single spin.
541
542 The functions tested are both generic_fns.value.set() and prompt.value.set().
543 """
544
545
546 pipes.switch('ct')
547
548
549 self.value_fns.set(param='tc', val=10, spin_id='@112')
550
551
552 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'tc'))
553 self.assertEqual(cdp.mol[0].res[1].spin[0].tc, 10)
554
555
557 """Set different consistency tests parameters J(0), F_eta, F_R2 for a single spin.
558
559 The functions tested are both generic_fns.value.set() and prompt.value.set().
560 """
561
562
563 pipes.switch('ct')
564
565
566 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=[6.4e-9, 3.5e-10, 2.3e-12], spin_id='@112')
567
568
569 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0'))
570 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_eta'))
571 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_r2'))
572 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9)
573 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 3.5e-10)
574 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 2.3e-12)
575
576
578 """Set consistency tests parameters J(0), F_eta, F_R2 for a single spin to the same value.
579
580 The functions tested are both generic_fns.value.set() and prompt.value.set().
581 """
582
583
584 pipes.switch('ct')
585
586
587 self.value_fns.set(param=['j0', 'f_eta', 'f_r2'], val=1.9e-10, spin_id='@112')
588
589
590 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0'))
591 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_eta'))
592 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'f_r2'))
593 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10)
594 self.assertEqual(cdp.mol[0].res[1].spin[0].f_eta, 1.9e-10)
595 self.assertEqual(cdp.mol[0].res[1].spin[0].f_r2, 1.9e-10)
596
597
598
599
600
601
602
603
604
606 """Set the spherical diffusion tensor tm parameter to the default value.
607
608 The functions tested are both generic_fns.value.set() and prompt.value.set().
609 """
610
611
612 pipes.switch('mf')
613
614
615 diffusion_tensor.init(1e-9)
616
617
618 self.value_fns.set(param='tm')
619
620
621 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
622
623
625 """Set the spherical diffusion tensor Diso parameter to the default value.
626
627 The functions tested are both generic_fns.value.set() and prompt.value.set().
628 """
629
630
631 pipes.switch('mf')
632
633
634 diffusion_tensor.init(1e-9)
635
636
637 self.value_fns.set(param='Diso')
638
639
640 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7)
641
642
644 """Try to set the spherical diffusion tensor Da parameter to the default value.
645
646 The functions tested are both generic_fns.value.set() and prompt.value.set().
647 """
648
649
650 pipes.switch('mf')
651
652
653 diffusion_tensor.init(1e-9)
654
655
656 self.assertRaises(RelaxError, self.value_fns.set, param='Da')
657
658
660 """Try to set the spherical diffusion tensor Dr parameter to the default value.
661
662 The functions tested are both generic_fns.value.set() and prompt.value.set().
663 """
664
665
666 pipes.switch('mf')
667
668
669 diffusion_tensor.init(1e-9)
670
671
672 self.assertRaises(RelaxError, self.value_fns.set, param='Dr')
673
674
676 """Try to set the spherical diffusion tensor Dx parameter to the default value.
677
678 The functions tested are both generic_fns.value.set() and prompt.value.set().
679 """
680
681
682 pipes.switch('mf')
683
684
685 diffusion_tensor.init(1e-9)
686
687
688 self.assertRaises(RelaxError, self.value_fns.set, param='Dx')
689
690
692 """Try to set the spherical diffusion tensor Dy parameter to the default value.
693
694 The functions tested are both generic_fns.value.set() and prompt.value.set().
695 """
696
697
698 pipes.switch('mf')
699
700
701 diffusion_tensor.init(1e-9)
702
703
704 self.assertRaises(RelaxError, self.value_fns.set, param='Dy')
705
706
708 """Try to set the spherical diffusion tensor Dz parameter to the default value.
709
710 The functions tested are both generic_fns.value.set() and prompt.value.set().
711 """
712
713
714 pipes.switch('mf')
715
716
717 diffusion_tensor.init(1e-9)
718
719
720 self.assertRaises(RelaxError, self.value_fns.set, param='Dz')
721
722
724 """Try to set the spherical diffusion tensor Dpar parameter to the default value.
725
726 The functions tested are both generic_fns.value.set() and prompt.value.set().
727 """
728
729
730 pipes.switch('mf')
731
732
733 diffusion_tensor.init(1e-9)
734
735
736 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar')
737
738
740 """Try to set the spherical diffusion tensor Dper parameter to the default value.
741
742 The functions tested are both generic_fns.value.set() and prompt.value.set().
743 """
744
745
746 pipes.switch('mf')
747
748
749 diffusion_tensor.init(1e-9)
750
751
752 self.assertRaises(RelaxError, self.value_fns.set, param='Dper')
753
754
756 """Try to set the spherical diffusion tensor Dratio parameter to the default value.
757
758 The functions tested are both generic_fns.value.set() and prompt.value.set().
759 """
760
761
762 pipes.switch('mf')
763
764
765 diffusion_tensor.init(1e-9)
766
767
768 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio')
769
770
772 """Try to set the spherical diffusion tensor alpha parameter to the default value.
773
774 The functions tested are both generic_fns.value.set() and prompt.value.set().
775 """
776
777
778 pipes.switch('mf')
779
780
781 diffusion_tensor.init(1e-9)
782
783
784 self.assertRaises(RelaxError, self.value_fns.set, param='alpha')
785
786
788 """Try to set the spherical diffusion tensor beta parameter to the default value.
789
790 The functions tested are both generic_fns.value.set() and prompt.value.set().
791 """
792
793
794 pipes.switch('mf')
795
796
797 diffusion_tensor.init(1e-9)
798
799
800 self.assertRaises(RelaxError, self.value_fns.set, param='beta')
801
802
804 """Try to set the spherical diffusion tensor gamma parameter to the default value.
805
806 The functions tested are both generic_fns.value.set() and prompt.value.set().
807 """
808
809
810 pipes.switch('mf')
811
812
813 diffusion_tensor.init(1e-9)
814
815
816 self.assertRaises(RelaxError, self.value_fns.set, param='gamma')
817
818
820 """Try to set the spherical diffusion tensor theta parameter to the default value.
821
822 The functions tested are both generic_fns.value.set() and prompt.value.set().
823 """
824
825
826 pipes.switch('mf')
827
828
829 diffusion_tensor.init(1e-9)
830
831
832 self.assertRaises(RelaxError, self.value_fns.set, param='theta')
833
834
836 """Try to set the spherical diffusion tensor phi parameter to the default value.
837
838 The functions tested are both generic_fns.value.set() and prompt.value.set().
839 """
840
841
842 pipes.switch('mf')
843
844
845 diffusion_tensor.init(1e-9)
846
847
848 self.assertRaises(RelaxError, self.value_fns.set, param='phi')
849
850
852 """Set the spheroidal diffusion tensor tm parameter to the default value.
853
854 The functions tested are both generic_fns.value.set() and prompt.value.set().
855 """
856
857
858 pipes.switch('mf')
859
860
861 diffusion_tensor.init((1e-9, 2e6, 0, 0))
862
863
864 self.value_fns.set(param='tm')
865
866
867 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
868
869
871 """Set the spheroidal diffusion tensor Diso parameter to the default value.
872
873 The functions tested are both generic_fns.value.set() and prompt.value.set().
874 """
875
876
877 pipes.switch('mf')
878
879
880 diffusion_tensor.init((1e-9, 2e6, 0, 0))
881
882
883 self.value_fns.set(param='Diso')
884
885
886 self.assertEqual(cdp.diff_tensor.tm, 1./(6*1.666e7))
887
888
890 """Set the spheroidal diffusion tensor Da parameter to the default value.
891
892 The functions tested are both generic_fns.value.set() and prompt.value.set().
893 """
894
895
896 pipes.switch('mf')
897
898
899 diffusion_tensor.init((1e-9, 2e6, 0, 0))
900
901
902 self.value_fns.set(param='Da')
903
904
905 self.assertEqual(cdp.diff_tensor.Da, 0.0)
906
907
909 """Set the spheroidal diffusion tensor Dr parameter to the default value.
910
911 The functions tested are both generic_fns.value.set() and prompt.value.set().
912 """
913
914
915 pipes.switch('mf')
916
917
918 diffusion_tensor.init((1e-9, 2e6, 0, 0))
919
920
921 self.assertRaises(RelaxError, self.value_fns.set, param='Dr')
922
923
925 """Set the spheroidal diffusion tensor Dx parameter to the default value.
926
927 The functions tested are both generic_fns.value.set() and prompt.value.set().
928 """
929
930
931 pipes.switch('mf')
932
933
934 diffusion_tensor.init((1e-9, 2e6, 0, 0))
935
936
937 self.assertRaises(RelaxError, self.value_fns.set, param='Dx')
938
939
941 """Set the spheroidal diffusion tensor Dy parameter to the default value.
942
943 The functions tested are both generic_fns.value.set() and prompt.value.set().
944 """
945
946
947 pipes.switch('mf')
948
949
950 diffusion_tensor.init((1e-9, 2e6, 0, 0))
951
952
953 self.assertRaises(RelaxError, self.value_fns.set, param='Dy')
954
955
957 """Set the spheroidal diffusion tensor Dz parameter to the default value.
958
959 The functions tested are both generic_fns.value.set() and prompt.value.set().
960 """
961
962
963 pipes.switch('mf')
964
965
966 diffusion_tensor.init((1e-9, 2e6, 0, 0))
967
968
969 self.assertRaises(RelaxError, self.value_fns.set, param='Dz')
970
971
973 """Try to set the spheroidal diffusion tensor Dpar parameter to the default value (this should not be possible).
974
975 The functions tested are both generic_fns.value.set() and prompt.value.set().
976 """
977
978
979 pipes.switch('mf')
980
981
982 diffusion_tensor.init((1e-9, 2e6, 0, 0))
983
984
985 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar')
986
987
989 """Try to set the spheroidal diffusion tensor Dper parameter to the default value (this should not be possible).
990
991 The functions tested are both generic_fns.value.set() and prompt.value.set().
992 """
993
994
995 pipes.switch('mf')
996
997
998 diffusion_tensor.init((1e-9, 2e6, 0, 0))
999
1000
1001 self.assertRaises(RelaxError, self.value_fns.set, param='Dper')
1002
1003
1005 """Set the spheroidal diffusion tensor Dratio parameter to the default value.
1006
1007 The functions tested are both generic_fns.value.set() and prompt.value.set().
1008 """
1009
1010
1011 pipes.switch('mf')
1012
1013
1014 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1015
1016
1017 self.value_fns.set(param='Dratio')
1018
1019
1020 self.assertEqual(cdp.diff_tensor.Dratio, 1.0)
1021
1022
1024 """Try to set the spheroidal diffusion tensor alpha parameter to the default value.
1025
1026 The functions tested are both generic_fns.value.set() and prompt.value.set().
1027 """
1028
1029
1030 pipes.switch('mf')
1031
1032
1033 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1034
1035
1036 self.assertRaises(RelaxError, self.value_fns.set, param='alpha')
1037
1038
1040 """Try to set the spheroidal diffusion tensor beta parameter to the default value.
1041
1042 The functions tested are both generic_fns.value.set() and prompt.value.set().
1043 """
1044
1045
1046 pipes.switch('mf')
1047
1048
1049 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1050
1051
1052 self.assertRaises(RelaxError, self.value_fns.set, param='beta')
1053
1054
1056 """Try to set the spheroidal diffusion tensor gamma parameter to the default value.
1057
1058 The functions tested are both generic_fns.value.set() and prompt.value.set().
1059 """
1060
1061
1062 pipes.switch('mf')
1063
1064
1065 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1066
1067
1068 self.assertRaises(RelaxError, self.value_fns.set, param='gamma')
1069
1070
1072 """Set the spheroidal diffusion tensor theta parameter to the default value.
1073
1074 The functions tested are both generic_fns.value.set() and prompt.value.set().
1075 """
1076
1077
1078 pipes.switch('mf')
1079
1080
1081 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1082
1083
1084 self.value_fns.set(param='theta')
1085
1086
1087 self.assertEqual(cdp.diff_tensor.theta, 0.0)
1088
1089
1091 """Set the spheroidal diffusion tensor phi parameter to the default value.
1092
1093 The functions tested are both generic_fns.value.set() and prompt.value.set().
1094 """
1095
1096
1097 pipes.switch('mf')
1098
1099
1100 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1101
1102
1103 self.value_fns.set(param='phi')
1104
1105
1106 self.assertEqual(cdp.diff_tensor.phi, 0.0)
1107
1108
1110 """Set the spheroidal diffusion tensor parameters {tm, Da} to the default values.
1111
1112 The functions tested are both generic_fns.value.set() and prompt.value.set().
1113 """
1114
1115
1116 pipes.switch('mf')
1117
1118
1119 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1120
1121
1122 self.value_fns.set(param=['tm', 'Da'])
1123
1124
1125 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1126 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1127
1128
1130 """Set the spheroidal diffusion tensor parameters {Diso, Da} to the default values.
1131
1132 The functions tested are both generic_fns.value.set() and prompt.value.set().
1133 """
1134
1135
1136 pipes.switch('mf')
1137
1138
1139 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1140
1141
1142 self.value_fns.set(param=['Diso', 'Da'])
1143
1144
1145 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7)
1146 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1147
1148
1150 """Set the spheroidal diffusion tensor parameters {tm, Dratio} to the default values.
1151
1152 The functions tested are both generic_fns.value.set() and prompt.value.set().
1153 """
1154
1155
1156 pipes.switch('mf')
1157
1158
1159 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1160
1161
1162 self.value_fns.set(param=['tm', 'Dratio'])
1163
1164
1165 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1166 self.assertEqual(cdp.diff_tensor.Dratio, 1.0)
1167
1168
1170 """Set the spheroidal diffusion tensor parameters {Dpar, Dper} to the default values.
1171
1172 The functions tested are both generic_fns.value.set() and prompt.value.set().
1173 """
1174
1175
1176 pipes.switch('mf')
1177
1178
1179 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1180
1181
1182 self.value_fns.set(param=['Dpar', 'Dper'])
1183
1184
1185 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 1.666e7)
1186 self.assertAlmostEqual(cdp.diff_tensor.Dper, 1.666e7)
1187
1188
1190 """Set the spheroidal diffusion tensor parameters {Dper, Dpar} to the default values.
1191
1192 The functions tested are both generic_fns.value.set() and prompt.value.set().
1193 """
1194
1195
1196 pipes.switch('mf')
1197
1198
1199 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1200
1201
1202 self.value_fns.set(param=['Dper', 'Dpar'])
1203
1204
1205 self.assertAlmostEqual(cdp.diff_tensor.Dper, 1.666e7)
1206 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 1.666e7)
1207
1208
1210 """Set the spheroidal diffusion tensor parameters {Diso, Dratio} to the default values.
1211
1212 The functions tested are both generic_fns.value.set() and prompt.value.set().
1213 """
1214
1215
1216 pipes.switch('mf')
1217
1218
1219 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1220
1221
1222 self.value_fns.set(param=['Diso', 'Dratio'])
1223
1224
1225 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7)
1226 self.assertEqual(cdp.diff_tensor.Dratio, 1.0)
1227
1228
1230 """Set the spheroidal diffusion tensor parameters {Dpar, Dratio} to the default values (this should not be possible).
1231
1232 The functions tested are both generic_fns.value.set() and prompt.value.set().
1233 """
1234
1235
1236 pipes.switch('mf')
1237
1238
1239 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1240
1241
1242 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['Dpar', 'Dratio'])
1243
1244
1246 """Set the ellipsoidal diffusion tensor tm parameter to the default value.
1247
1248 The functions tested are both generic_fns.value.set() and prompt.value.set().
1249 """
1250
1251
1252 pipes.switch('mf')
1253
1254
1255 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1256
1257
1258 self.value_fns.set(param='tm')
1259
1260
1261 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1262
1263
1265 """Set the ellipsoidal diffusion tensor Diso parameter to the default value.
1266
1267 The functions tested are both generic_fns.value.set() and prompt.value.set().
1268 """
1269
1270
1271 pipes.switch('mf')
1272
1273
1274 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1275
1276
1277 self.value_fns.set(param='Diso')
1278
1279
1280 self.assertEqual(cdp.diff_tensor.tm, 1./(6*1.666e7))
1281
1282
1284 """Set the ellipsoidal diffusion tensor Da parameter to the default value.
1285
1286 The functions tested are both generic_fns.value.set() and prompt.value.set().
1287 """
1288
1289
1290 pipes.switch('mf')
1291
1292
1293 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1294
1295
1296 self.value_fns.set(param='Da')
1297
1298
1299 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1300
1301
1303 """Set the ellipsoidal diffusion tensor Dr parameter to the default value.
1304
1305 The functions tested are both generic_fns.value.set() and prompt.value.set().
1306 """
1307
1308
1309 pipes.switch('mf')
1310
1311
1312 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1313
1314
1315 self.value_fns.set(param='Dr')
1316
1317
1318 self.assertEqual(cdp.diff_tensor.Dr, 0.0)
1319
1320
1322 """Set the ellipsoidal diffusion tensor Dx parameter to the default value.
1323
1324 The functions tested are both generic_fns.value.set() and prompt.value.set().
1325 """
1326
1327
1328 pipes.switch('mf')
1329
1330
1331 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1332
1333
1334 self.assertRaises(RelaxError, self.value_fns.set, param='Dx')
1335
1336
1338 """Set the ellipsoidal diffusion tensor Dy parameter to the default value.
1339
1340 The functions tested are both generic_fns.value.set() and prompt.value.set().
1341 """
1342
1343
1344 pipes.switch('mf')
1345
1346
1347 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1348
1349
1350 self.assertRaises(RelaxError, self.value_fns.set, param='Dy')
1351
1352
1354 """Set the ellipsoidal diffusion tensor Dz parameter to the default value.
1355
1356 The functions tested are both generic_fns.value.set() and prompt.value.set().
1357 """
1358
1359
1360 pipes.switch('mf')
1361
1362
1363 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1364
1365
1366 self.assertRaises(RelaxError, self.value_fns.set, param='Dz')
1367
1368
1370 """Try to set the ellipsoidal diffusion tensor Dpar parameter to the default value (this should not be possible).
1371
1372 The functions tested are both generic_fns.value.set() and prompt.value.set().
1373 """
1374
1375
1376 pipes.switch('mf')
1377
1378
1379 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1380
1381
1382 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar')
1383
1384
1386 """Try to set the ellipsoidal diffusion tensor Dper parameter to the default value (this should not be possible).
1387
1388 The functions tested are both generic_fns.value.set() and prompt.value.set().
1389 """
1390
1391
1392 pipes.switch('mf')
1393
1394
1395 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1396
1397
1398 self.assertRaises(RelaxError, self.value_fns.set, param='Dper')
1399
1400
1402 """Set the ellipsoidal diffusion tensor Dratio parameter to the default value.
1403
1404 The functions tested are both generic_fns.value.set() and prompt.value.set().
1405 """
1406
1407
1408 pipes.switch('mf')
1409
1410
1411 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1412
1413
1414 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio')
1415
1416
1418 """Try to set the ellipsoidal diffusion tensor alpha parameter to the default value.
1419
1420 The functions tested are both generic_fns.value.set() and prompt.value.set().
1421 """
1422
1423
1424 pipes.switch('mf')
1425
1426
1427 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1428
1429
1430 self.value_fns.set(param='alpha')
1431
1432
1433 self.assertEqual(cdp.diff_tensor.alpha, 0.0)
1434
1435
1437 """Try to set the ellipsoidal diffusion tensor beta parameter to the default value.
1438
1439 The functions tested are both generic_fns.value.set() and prompt.value.set().
1440 """
1441
1442
1443 pipes.switch('mf')
1444
1445
1446 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1447
1448
1449 self.value_fns.set(param='beta')
1450
1451
1452 self.assertEqual(cdp.diff_tensor.beta, 0.0)
1453
1454
1456 """Try to set the ellipsoidal diffusion tensor gamma parameter to the default value.
1457
1458 The functions tested are both generic_fns.value.set() and prompt.value.set().
1459 """
1460
1461
1462 pipes.switch('mf')
1463
1464
1465 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1466
1467
1468 self.value_fns.set(param='gamma')
1469
1470
1471 self.assertEqual(cdp.diff_tensor.gamma, 0.0)
1472
1473
1475 """Set the ellipsoidal diffusion tensor theta parameter to the default value.
1476
1477 The functions tested are both generic_fns.value.set() and prompt.value.set().
1478 """
1479
1480
1481 pipes.switch('mf')
1482
1483
1484 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1485
1486
1487 self.assertRaises(RelaxError, self.value_fns.set, param='theta')
1488
1489
1491 """Set the ellipsoidal diffusion tensor phi parameter to the default value.
1492
1493 The functions tested are both generic_fns.value.set() and prompt.value.set().
1494 """
1495
1496
1497 pipes.switch('mf')
1498
1499
1500 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
1501
1502
1503 self.assertRaises(RelaxError, self.value_fns.set, param='phi')
1504
1505
1507 """Set the ellipsoidal diffusion tensor parameters {tm, Da, Dr} to the default values.
1508
1509 The functions tested are both generic_fns.value.set() and prompt.value.set().
1510 """
1511
1512
1513 pipes.switch('mf')
1514
1515
1516 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1517
1518
1519 self.value_fns.set(param=['tm', 'Da', 'Dr'])
1520
1521
1522 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1523 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1524 self.assertEqual(cdp.diff_tensor.Dr, 0.0)
1525
1526
1528 """Set the ellipsoidal diffusion tensor parameters {Diso, Da, Dr} to the default values.
1529
1530 The functions tested are both generic_fns.value.set() and prompt.value.set().
1531 """
1532
1533
1534 pipes.switch('mf')
1535
1536
1537 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1538
1539
1540 self.value_fns.set(param=['Diso', 'Da', 'Dr'])
1541
1542
1543 self.assertAlmostEqual(cdp.diff_tensor.Diso, 1.666e7)
1544 self.assertEqual(cdp.diff_tensor.Da, 0.0)
1545 self.assertEqual(cdp.diff_tensor.Dr, 0.0)
1546
1547
1549 """Set the ellipsoidal diffusion tensor parameters {Dx, Dy, Dz} to the default values.
1550
1551 The functions tested are both generic_fns.value.set() and prompt.value.set().
1552 """
1553
1554
1555 pipes.switch('mf')
1556
1557
1558 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1559
1560
1561 self.value_fns.set(param=['Dx', 'Dy', 'Dz'])
1562
1563
1564 self.assertAlmostEqual(cdp.diff_tensor.Dx, 1.666e7)
1565 self.assertAlmostEqual(cdp.diff_tensor.Dy, 1.666e7)
1566 self.assertAlmostEqual(cdp.diff_tensor.Dz, 1.666e7)
1567
1568
1570 """Try to set the ellipsoidal diffusion tensor parameters {tm, Diso, Dr} to the default values (this should not be possible).
1571
1572 The functions tested are both generic_fns.value.set() and prompt.value.set().
1573 """
1574
1575
1576 pipes.switch('mf')
1577
1578
1579 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
1580
1581
1582 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['tm', 'Diso', 'Dr'])
1583
1584
1586 """Set the spherical diffusion tensor tm parameter.
1587
1588 The functions tested are both generic_fns.value.set() and prompt.value.set().
1589 """
1590
1591
1592 pipes.switch('mf')
1593
1594
1595 diffusion_tensor.init(1e-9)
1596
1597
1598 self.value_fns.set(param='tm', val=1e-8)
1599
1600
1601 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1602
1603
1605 """Set the spherical diffusion tensor Diso parameter.
1606
1607 The functions tested are both generic_fns.value.set() and prompt.value.set().
1608 """
1609
1610
1611 pipes.switch('mf')
1612
1613
1614 diffusion_tensor.init(1e-9)
1615
1616
1617 self.value_fns.set(param='Diso', val=5e7)
1618
1619
1620 self.assertEqual(cdp.diff_tensor.Diso, 5e7)
1621
1622
1624 """Try to set the spherical diffusion tensor Da parameter.
1625
1626 The functions tested are both generic_fns.value.set() and prompt.value.set().
1627 """
1628
1629
1630 pipes.switch('mf')
1631
1632
1633 diffusion_tensor.init(1e-9)
1634
1635
1636 self.assertRaises(RelaxError, self.value_fns.set, param='Da', val=2e6)
1637
1638
1640 """Try to set the spherical diffusion tensor Dr parameter.
1641
1642 The functions tested are both generic_fns.value.set() and prompt.value.set().
1643 """
1644
1645
1646 pipes.switch('mf')
1647
1648
1649 diffusion_tensor.init(1e-9)
1650
1651
1652 self.assertRaises(RelaxError, self.value_fns.set, param='Dr', val=2e6)
1653
1654
1656 """Try to set the spherical diffusion tensor Dx parameter.
1657
1658 The functions tested are both generic_fns.value.set() and prompt.value.set().
1659 """
1660
1661
1662 pipes.switch('mf')
1663
1664
1665 diffusion_tensor.init(1e-9)
1666
1667
1668 self.assertRaises(RelaxError, self.value_fns.set, param='Dx', val=2e6)
1669
1670
1672 """Try to set the spherical diffusion tensor Dy parameter.
1673
1674 The functions tested are both generic_fns.value.set() and prompt.value.set().
1675 """
1676
1677
1678 pipes.switch('mf')
1679
1680
1681 diffusion_tensor.init(1e-9)
1682
1683
1684 self.assertRaises(RelaxError, self.value_fns.set, param='Dy', val=2e6)
1685
1686
1688 """Try to set the spherical diffusion tensor Dz parameter.
1689
1690 The functions tested are both generic_fns.value.set() and prompt.value.set().
1691 """
1692
1693
1694 pipes.switch('mf')
1695
1696
1697 diffusion_tensor.init(1e-9)
1698
1699
1700 self.assertRaises(RelaxError, self.value_fns.set, param='Dz', val=2e6)
1701
1702
1704 """Try to set the spherical diffusion tensor Dpar parameter.
1705
1706 The functions tested are both generic_fns.value.set() and prompt.value.set().
1707 """
1708
1709
1710 pipes.switch('mf')
1711
1712
1713 diffusion_tensor.init(1e-9)
1714
1715
1716 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar', val=2e6)
1717
1718
1720 """Try to set the spherical diffusion tensor Dper parameter.
1721
1722 The functions tested are both generic_fns.value.set() and prompt.value.set().
1723 """
1724
1725
1726 pipes.switch('mf')
1727
1728
1729 diffusion_tensor.init(1e-9)
1730
1731
1732 self.assertRaises(RelaxError, self.value_fns.set, param='Dper', val=2e6)
1733
1734
1736 """Try to set the spherical diffusion tensor Dratio parameter.
1737
1738 The functions tested are both generic_fns.value.set() and prompt.value.set().
1739 """
1740
1741
1742 pipes.switch('mf')
1743
1744
1745 diffusion_tensor.init(1e-9)
1746
1747
1748 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio', val=1.2)
1749
1750
1752 """Try to set the spherical diffusion tensor alpha parameter.
1753
1754 The functions tested are both generic_fns.value.set() and prompt.value.set().
1755 """
1756
1757
1758 pipes.switch('mf')
1759
1760
1761 diffusion_tensor.init(1e-9)
1762
1763
1764 self.assertRaises(RelaxError, self.value_fns.set, param='alpha', val=pi/2)
1765
1766
1768 """Try to set the spherical diffusion tensor beta parameter.
1769
1770 The functions tested are both generic_fns.value.set() and prompt.value.set().
1771 """
1772
1773
1774 pipes.switch('mf')
1775
1776
1777 diffusion_tensor.init(1e-9)
1778
1779
1780 self.assertRaises(RelaxError, self.value_fns.set, param='beta', val=pi/2)
1781
1782
1784 """Try to set the spherical diffusion tensor gamma parameter.
1785
1786 The functions tested are both generic_fns.value.set() and prompt.value.set().
1787 """
1788
1789
1790 pipes.switch('mf')
1791
1792
1793 diffusion_tensor.init(1e-9)
1794
1795
1796 self.assertRaises(RelaxError, self.value_fns.set, param='gamma', val=pi/2)
1797
1798
1800 """Try to set the spherical diffusion tensor theta parameter.
1801
1802 The functions tested are both generic_fns.value.set() and prompt.value.set().
1803 """
1804
1805
1806 pipes.switch('mf')
1807
1808
1809 diffusion_tensor.init(1e-9)
1810
1811
1812 self.assertRaises(RelaxError, self.value_fns.set, param='theta', val=pi/2)
1813
1814
1816 """Try to set the spherical diffusion tensor phi parameter.
1817
1818 The functions tested are both generic_fns.value.set() and prompt.value.set().
1819 """
1820
1821
1822 pipes.switch('mf')
1823
1824
1825 diffusion_tensor.init(1e-9)
1826
1827
1828 self.assertRaises(RelaxError, self.value_fns.set, param='phi', val=pi/2)
1829
1830
1832 """Set the spheroidal diffusion tensor tm parameter.
1833
1834 The functions tested are both generic_fns.value.set() and prompt.value.set().
1835 """
1836
1837
1838 pipes.switch('mf')
1839
1840
1841 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1842
1843
1844 self.value_fns.set(param='tm', val=1e-8)
1845
1846
1847 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
1848
1849
1851 """Set the spheroidal diffusion tensor Diso parameter.
1852
1853 The functions tested are both generic_fns.value.set() and prompt.value.set().
1854 """
1855
1856
1857 pipes.switch('mf')
1858
1859
1860 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1861
1862
1863 self.value_fns.set(param='Diso', val=5e7)
1864
1865
1866 self.assertEqual(cdp.diff_tensor.tm, 1./(6*5e7))
1867
1868
1870 """Set the spheroidal diffusion tensor Da parameter.
1871
1872 The functions tested are both generic_fns.value.set() and prompt.value.set().
1873 """
1874
1875
1876 pipes.switch('mf')
1877
1878
1879 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1880
1881
1882 self.value_fns.set(param='Da', val=1e6)
1883
1884
1885 self.assertEqual(cdp.diff_tensor.Da, 1e6)
1886
1887
1889 """Set the spheroidal diffusion tensor Dr parameter.
1890
1891 The functions tested are both generic_fns.value.set() and prompt.value.set().
1892 """
1893
1894
1895 pipes.switch('mf')
1896
1897
1898 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1899
1900
1901 self.assertRaises(RelaxError, self.value_fns.set, param='Dr', val=0.2)
1902
1903
1905 """Set the spheroidal diffusion tensor Dx parameter.
1906
1907 The functions tested are both generic_fns.value.set() and prompt.value.set().
1908 """
1909
1910
1911 pipes.switch('mf')
1912
1913
1914 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1915
1916
1917 self.assertRaises(RelaxError, self.value_fns.set, param='Dx', val=1e6)
1918
1919
1921 """Set the spheroidal diffusion tensor Dy parameter.
1922
1923 The functions tested are both generic_fns.value.set() and prompt.value.set().
1924 """
1925
1926
1927 pipes.switch('mf')
1928
1929
1930 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1931
1932
1933 self.assertRaises(RelaxError, self.value_fns.set, param='Dy', val=1e6)
1934
1935
1937 """Set the spheroidal diffusion tensor Dz parameter.
1938
1939 The functions tested are both generic_fns.value.set() and prompt.value.set().
1940 """
1941
1942
1943 pipes.switch('mf')
1944
1945
1946 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1947
1948
1949 self.assertRaises(RelaxError, self.value_fns.set, param='Dz', val=1e6)
1950
1951
1953 """Try to set the spheroidal diffusion tensor Dpar parameter (this should not be possible).
1954
1955 The functions tested are both generic_fns.value.set() and prompt.value.set().
1956 """
1957
1958
1959 pipes.switch('mf')
1960
1961
1962 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1963
1964
1965 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar', val=1e6)
1966
1967
1969 """Try to set the spheroidal diffusion tensor Dper parameter (this should not be possible).
1970
1971 The functions tested are both generic_fns.value.set() and prompt.value.set().
1972 """
1973
1974
1975 pipes.switch('mf')
1976
1977
1978 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1979
1980
1981 self.assertRaises(RelaxError, self.value_fns.set, param='Dper', val=1e6)
1982
1983
1985 """Set the spheroidal diffusion tensor Dratio parameter.
1986
1987 The functions tested are both generic_fns.value.set() and prompt.value.set().
1988 """
1989
1990
1991 pipes.switch('mf')
1992
1993
1994 diffusion_tensor.init((1e-9, 2e6, 0, 0))
1995
1996
1997 self.value_fns.set(param='Dratio', val=1.2)
1998
1999
2000 self.assertAlmostEqual(cdp.diff_tensor.Dratio, 1.2)
2001
2002
2004 """Try to set the spheroidal diffusion tensor alpha parameter.
2005
2006 The functions tested are both generic_fns.value.set() and prompt.value.set().
2007 """
2008
2009
2010 pipes.switch('mf')
2011
2012
2013 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2014
2015
2016 self.assertRaises(RelaxError, self.value_fns.set, param='alpha', val=pi/2)
2017
2018
2020 """Try to set the spheroidal diffusion tensor beta parameter.
2021
2022 The functions tested are both generic_fns.value.set() and prompt.value.set().
2023 """
2024
2025
2026 pipes.switch('mf')
2027
2028
2029 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2030
2031
2032 self.assertRaises(RelaxError, self.value_fns.set, param='beta', val=pi/2)
2033
2034
2036 """Try to set the spheroidal diffusion tensor gamma parameter.
2037
2038 The functions tested are both generic_fns.value.set() and prompt.value.set().
2039 """
2040
2041
2042 pipes.switch('mf')
2043
2044
2045 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2046
2047
2048 self.assertRaises(RelaxError, self.value_fns.set, param='gamma', val=pi/2)
2049
2050
2052 """Set the spheroidal diffusion tensor theta parameter.
2053
2054 The functions tested are both generic_fns.value.set() and prompt.value.set().
2055 """
2056
2057
2058 pipes.switch('mf')
2059
2060
2061 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2062
2063
2064 self.value_fns.set(param='theta', val=pi/2)
2065
2066
2067 self.assertEqual(cdp.diff_tensor.theta, pi/2)
2068
2069
2071 """Set the spheroidal diffusion tensor phi parameter.
2072
2073 The functions tested are both generic_fns.value.set() and prompt.value.set().
2074 """
2075
2076
2077 pipes.switch('mf')
2078
2079
2080 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2081
2082
2083 self.value_fns.set(param='phi', val=pi/2)
2084
2085
2086 self.assertEqual(cdp.diff_tensor.phi, pi/2)
2087
2088
2090 """Set the spheroidal diffusion tensor parameters {tm, Da}.
2091
2092 The functions tested are both generic_fns.value.set() and prompt.value.set().
2093 """
2094
2095
2096 pipes.switch('mf')
2097
2098
2099 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2100
2101
2102 self.value_fns.set(param=['tm', 'Da'], val=[1e-8, 1e6])
2103
2104
2105 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
2106 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2107
2108
2110 """Set the spheroidal diffusion tensor parameters {Diso, Da}.
2111
2112 The functions tested are both generic_fns.value.set() and prompt.value.set().
2113 """
2114
2115
2116 pipes.switch('mf')
2117
2118
2119 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2120
2121
2122 self.value_fns.set(param=['Diso', 'Da'], val=[1e7, 1e6])
2123
2124
2125 self.assertEqual(cdp.diff_tensor.Diso, 1e7)
2126 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2127
2128
2130 """Set the spheroidal diffusion tensor parameters {tm, Dratio}.
2131
2132 The functions tested are both generic_fns.value.set() and prompt.value.set().
2133 """
2134
2135
2136 pipes.switch('mf')
2137
2138
2139 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2140
2141
2142 self.value_fns.set(param=['tm', 'Dratio'], val=[1e-8, 1.6])
2143
2144
2145 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
2146 self.assertEqual(cdp.diff_tensor.Dratio, 1.6)
2147
2148
2150 """Set the spheroidal diffusion tensor parameters {Dpar, Dper}.
2151
2152 The functions tested are both generic_fns.value.set() and prompt.value.set().
2153 """
2154
2155
2156 pipes.switch('mf')
2157
2158
2159 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2160
2161
2162 self.value_fns.set(param=['Dpar', 'Dper'], val=[1e7, 2e7])
2163
2164
2165 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 1e7)
2166 self.assertAlmostEqual(cdp.diff_tensor.Dper, 2e7)
2167
2168
2170 """Set the spheroidal diffusion tensor parameters {Dper, Dpar}.
2171
2172 The functions tested are both generic_fns.value.set() and prompt.value.set().
2173 """
2174
2175
2176 pipes.switch('mf')
2177
2178
2179 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2180
2181
2182 self.value_fns.set(param=['Dper', 'Dpar'], val=[1e7, 2e7])
2183
2184
2185 self.assertAlmostEqual(cdp.diff_tensor.Dper, 1e7)
2186 self.assertAlmostEqual(cdp.diff_tensor.Dpar, 2e7)
2187
2188
2190 """Set the spheroidal diffusion tensor parameters {Diso, Dratio}.
2191
2192 The functions tested are both generic_fns.value.set() and prompt.value.set().
2193 """
2194
2195
2196 pipes.switch('mf')
2197
2198
2199 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2200
2201
2202 self.value_fns.set(param=['Diso', 'Dratio'], val=[1e7, 1.2])
2203
2204
2205 self.assertEqual(cdp.diff_tensor.Diso, 1e7)
2206 self.assertEqual(cdp.diff_tensor.Dratio, 1.2)
2207
2208
2210 """Set the spheroidal diffusion tensor parameters {Dpar, Dratio} (this should not be possible).
2211
2212 The functions tested are both generic_fns.value.set() and prompt.value.set().
2213 """
2214
2215
2216 pipes.switch('mf')
2217
2218
2219 diffusion_tensor.init((1e-9, 2e6, 0, 0))
2220
2221
2222 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['Dpar', 'Dratio'], val=[1e7, 1.2])
2223
2224
2226 """Set the ellipsoidal diffusion tensor tm parameter.
2227
2228 The functions tested are both generic_fns.value.set() and prompt.value.set().
2229 """
2230
2231
2232 pipes.switch('mf')
2233
2234
2235 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2236
2237
2238 self.value_fns.set(param='tm', val=1e-8)
2239
2240
2241 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
2242
2243
2245 """Set the ellipsoidal diffusion tensor Diso parameter.
2246
2247 The functions tested are both generic_fns.value.set() and prompt.value.set().
2248 """
2249
2250
2251 pipes.switch('mf')
2252
2253
2254 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2255
2256
2257 self.value_fns.set(param='Diso', val=5e7)
2258
2259
2260 self.assertEqual(cdp.diff_tensor.tm, 1./(6*5e7))
2261
2262
2264 """Set the ellipsoidal diffusion tensor Da parameter.
2265
2266 The functions tested are both generic_fns.value.set() and prompt.value.set().
2267 """
2268
2269
2270 pipes.switch('mf')
2271
2272
2273 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2274
2275
2276 self.value_fns.set(param='Da', val=1e6)
2277
2278
2279 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2280
2281
2283 """Set the ellipsoidal diffusion tensor Dr parameter.
2284
2285 The functions tested are both generic_fns.value.set() and prompt.value.set().
2286 """
2287
2288
2289 pipes.switch('mf')
2290
2291
2292 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2293
2294
2295 self.value_fns.set(param='Dr', val=0.3)
2296
2297
2298 self.assertEqual(cdp.diff_tensor.Dr, 0.3)
2299
2300
2302 """Set the ellipsoidal diffusion tensor Dx parameter.
2303
2304 The functions tested are both generic_fns.value.set() and prompt.value.set().
2305 """
2306
2307
2308 pipes.switch('mf')
2309
2310
2311 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2312
2313
2314 self.assertRaises(RelaxError, self.value_fns.set, param='Dx', val=1e6)
2315
2316
2318 """Set the ellipsoidal diffusion tensor Dy parameter.
2319
2320 The functions tested are both generic_fns.value.set() and prompt.value.set().
2321 """
2322
2323
2324 pipes.switch('mf')
2325
2326
2327 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2328
2329
2330 self.assertRaises(RelaxError, self.value_fns.set, param='Dy', val=1e6)
2331
2332
2334 """Set the ellipsoidal diffusion tensor Dz parameter.
2335
2336 The functions tested are both generic_fns.value.set() and prompt.value.set().
2337 """
2338
2339
2340 pipes.switch('mf')
2341
2342
2343 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2344
2345
2346 self.assertRaises(RelaxError, self.value_fns.set, param='Dz', val=1e6)
2347
2348
2350 """Try to set the ellipsoidal diffusion tensor Dpar parameter (this should not be possible).
2351
2352 The functions tested are both generic_fns.value.set() and prompt.value.set().
2353 """
2354
2355
2356 pipes.switch('mf')
2357
2358
2359 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2360
2361
2362 self.assertRaises(RelaxError, self.value_fns.set, param='Dpar', val=1e6)
2363
2364
2366 """Try to set the ellipsoidal diffusion tensor Dper parameter (this should not be possible).
2367
2368 The functions tested are both generic_fns.value.set() and prompt.value.set().
2369 """
2370
2371
2372 pipes.switch('mf')
2373
2374
2375 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2376
2377
2378 self.assertRaises(RelaxError, self.value_fns.set, param='Dper', val=1e6)
2379
2380
2382 """Set the ellipsoidal diffusion tensor Dratio parameter.
2383
2384 The functions tested are both generic_fns.value.set() and prompt.value.set().
2385 """
2386
2387
2388 pipes.switch('mf')
2389
2390
2391 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2392
2393
2394 self.assertRaises(RelaxError, self.value_fns.set, param='Dratio', val=1.2)
2395
2396
2398 """Try to set the ellipsoidal diffusion tensor alpha parameter.
2399
2400 The functions tested are both generic_fns.value.set() and prompt.value.set().
2401 """
2402
2403
2404 pipes.switch('mf')
2405
2406
2407 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2408
2409
2410 self.value_fns.set(param='alpha', val=pi/2)
2411
2412
2413 self.assertEqual(cdp.diff_tensor.alpha, pi/2)
2414
2415
2417 """Try to set the ellipsoidal diffusion tensor beta parameter.
2418
2419 The functions tested are both generic_fns.value.set() and prompt.value.set().
2420 """
2421
2422
2423 pipes.switch('mf')
2424
2425
2426 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2427
2428
2429 self.value_fns.set(param='beta', val=pi/2)
2430
2431
2432 self.assertEqual(cdp.diff_tensor.beta, pi/2)
2433
2434
2436 """Try to set the ellipsoidal diffusion tensor gamma parameter.
2437
2438 The functions tested are both generic_fns.value.set() and prompt.value.set().
2439 """
2440
2441
2442 pipes.switch('mf')
2443
2444
2445 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2446
2447
2448 self.value_fns.set(param='gamma', val=pi/2)
2449
2450
2451 self.assertEqual(cdp.diff_tensor.gamma, pi/2)
2452
2453
2455 """Set the ellipsoidal diffusion tensor theta parameter.
2456
2457 The functions tested are both generic_fns.value.set() and prompt.value.set().
2458 """
2459
2460
2461 pipes.switch('mf')
2462
2463
2464 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2465
2466
2467 self.assertRaises(RelaxError, self.value_fns.set, param='theta', val=pi/2)
2468
2469
2471 """Set the ellipsoidal diffusion tensor phi parameter.
2472
2473 The functions tested are both generic_fns.value.set() and prompt.value.set().
2474 """
2475
2476
2477 pipes.switch('mf')
2478
2479
2480 diffusion_tensor.init((1e-9, 2e6, 0.2, 0, 0, 0))
2481
2482
2483 self.assertRaises(RelaxError, self.value_fns.set, param='phi', val=pi/2)
2484
2485
2487 """Set the ellipsoidal diffusion tensor parameters {tm, Da, Dr}.
2488
2489 The functions tested are both generic_fns.value.set() and prompt.value.set().
2490 """
2491
2492
2493 pipes.switch('mf')
2494
2495
2496 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2497
2498
2499 self.value_fns.set(param=['tm', 'Da', 'Dr'], val=[1e-8, 1e6, 0.2])
2500
2501
2502 self.assertEqual(cdp.diff_tensor.tm, 1e-8)
2503 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2504 self.assertEqual(cdp.diff_tensor.Dr, 0.2)
2505
2506
2508 """Set the ellipsoidal diffusion tensor parameters {Diso, Da, Dr}.
2509
2510 The functions tested are both generic_fns.value.set() and prompt.value.set().
2511 """
2512
2513
2514 pipes.switch('mf')
2515
2516
2517 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2518
2519
2520 self.value_fns.set(param=['Diso', 'Da', 'Dr'], val=[1e7, 1e6, 0.2])
2521
2522
2523 self.assertEqual(cdp.diff_tensor.Diso, 1e7)
2524 self.assertEqual(cdp.diff_tensor.Da, 1e6)
2525 self.assertEqual(cdp.diff_tensor.Dr, 0.2)
2526
2527
2529 """Set the ellipsoidal diffusion tensor parameters {Dx, Dy, Dz}.
2530
2531 The functions tested are both generic_fns.value.set() and prompt.value.set().
2532 """
2533
2534
2535 pipes.switch('mf')
2536
2537
2538 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2539
2540
2541 self.value_fns.set(param=['Dx', 'Dy', 'Dz'], val=[1e7, 2e7, 3e7])
2542
2543
2544 self.assertEqual(cdp.diff_tensor.Dx, 1e7)
2545 self.assertEqual(cdp.diff_tensor.Dy, 2e7)
2546 self.assertEqual(cdp.diff_tensor.Dz, 3e7)
2547
2548
2550 """Set the ellipsoidal diffusion tensor parameters {Dx, Dy, Dz} all to the same value.
2551
2552 The functions tested are both generic_fns.value.set() and prompt.value.set().
2553 """
2554
2555
2556 pipes.switch('mf')
2557
2558
2559 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2560
2561
2562 self.value_fns.set(param=['Dx', 'Dy', 'Dz'], val=1e7)
2563
2564
2565 self.assertEqual(cdp.diff_tensor.Dx, 1e7)
2566 self.assertEqual(cdp.diff_tensor.Dy, 1e7)
2567 self.assertEqual(cdp.diff_tensor.Dz, 1e7)
2568
2569
2571 """Try to set the ellipsoidal diffusion tensor parameters {tm, Diso, Dr} (this should not be possible).
2572
2573 The functions tested are both generic_fns.value.set() and prompt.value.set().
2574 """
2575
2576
2577 pipes.switch('mf')
2578
2579
2580 diffusion_tensor.init((1e-9, 2e6, 0.4, 0, 0, 0))
2581
2582
2583 self.assertRaises(RelaxUnknownParamCombError, self.value_fns.set, param=['tm', 'Diso', 'Dr'], val=[1e-8, 1e6, 0.2])
2584
2585
2586
2587
2588
2589
2590
2591
2592
2594 """Set the RSDM parameter J(0) for all spins.
2595
2596 The functions tested are both generic_fns.value.set() and prompt.value.set().
2597 """
2598
2599
2600 pipes.switch('jw')
2601
2602
2603 self.value_fns.set(param='j0', val=4.5e-9)
2604
2605
2606 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 4.5e-9)
2607 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
2608
2609
2611 """Set the RSDM parameter J(wX) for all spins.
2612
2613 The functions tested are both generic_fns.value.set() and prompt.value.set().
2614 """
2615
2616
2617 pipes.switch('jw')
2618
2619
2620 self.value_fns.set(param='jwx', val=2.3e-10)
2621
2622
2623 self.assertEqual(cdp.mol[0].res[0].spin[0].jwx, 2.3e-10)
2624 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 2.3e-10)
2625
2626
2628 """Set the RSDM parameter J(wH) for all spins.
2629
2630 The functions tested are both generic_fns.value.set() and prompt.value.set().
2631 """
2632
2633
2634 pipes.switch('jw')
2635
2636
2637 self.value_fns.set(param='jwh', val=1.7e-12)
2638
2639
2640 self.assertEqual(cdp.mol[0].res[0].spin[0].jwh, 1.7e-12)
2641 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.7e-12)
2642
2643
2645 """Set the RSDM bond length parameter for all spins.
2646
2647 The functions tested are both generic_fns.value.set() and prompt.value.set().
2648 """
2649
2650
2651 pipes.switch('jw')
2652
2653
2654 self.value_fns.set(param='r', val=1.04e-10)
2655
2656
2657 self.assertEqual(cdp.mol[0].res[0].spin[0].r, 1.04e-10)
2658 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.04e-10)
2659
2660
2662 """Set the RSDM CSA parameter for all spins.
2663
2664 The functions tested are both generic_fns.value.set() and prompt.value.set().
2665 """
2666
2667
2668 pipes.switch('jw')
2669
2670
2671 self.value_fns.set(param='csa', val=-160e-6)
2672
2673
2674 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -160e-6)
2675 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
2676
2677
2679 """Set the RSDM heteronucleus type for all spins.
2680
2681 The functions tested are both generic_fns.value.set() and prompt.value.set().
2682 """
2683
2684
2685 pipes.switch('jw')
2686
2687
2688 self.value_fns.set(param='heteronuc_type', val='13C')
2689
2690
2691 self.assertEqual(cdp.mol[0].res[0].spin[0].heteronuc_type, '13C')
2692 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '13C')
2693
2694
2696 """Set different RSDM parameters J(0), J(wX), J(wH) for all spins.
2697
2698 The functions tested are both generic_fns.value.set() and prompt.value.set().
2699 """
2700
2701
2702 pipes.switch('jw')
2703
2704
2705 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=[6.4e-9, 3.5e-10, 2.3e-12])
2706
2707
2708 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 6.4e-9)
2709 self.assertEqual(cdp.mol[0].res[0].spin[0].jwx, 3.5e-10)
2710 self.assertEqual(cdp.mol[0].res[0].spin[0].jwh, 2.3e-12)
2711 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9)
2712 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 3.5e-10)
2713 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 2.3e-12)
2714
2715
2717 """Set RSDM parameters J(0), J(wX), J(wH) for all spins to the same value.
2718
2719 The functions tested are both generic_fns.value.set() and prompt.value.set().
2720 """
2721
2722
2723 pipes.switch('jw')
2724
2725
2726 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=1.9e-10)
2727
2728
2729 self.assertEqual(cdp.mol[0].res[0].spin[0].j0, 1.9e-10)
2730 self.assertEqual(cdp.mol[0].res[0].spin[0].jwx, 1.9e-10)
2731 self.assertEqual(cdp.mol[0].res[0].spin[0].jwh, 1.9e-10)
2732 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10)
2733 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 1.9e-10)
2734 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.9e-10)
2735
2736
2738 """Set the RSDM parameter J(0) to the default value (there is none!).
2739
2740 The functions tested are both generic_fns.value.set() and prompt.value.set().
2741 """
2742
2743
2744 pipes.switch('jw')
2745
2746
2747 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='j0')
2748
2749
2751 """Set the RSDM parameter J(wX) to the default value (there is none!).
2752
2753 The functions tested are both generic_fns.value.set() and prompt.value.set().
2754 """
2755
2756
2757 pipes.switch('jw')
2758
2759
2760 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='jwx')
2761
2762
2764 """Set the RSDM parameter J(wH) to the default value (there is none!).
2765
2766 The functions tested are both generic_fns.value.set() and prompt.value.set().
2767 """
2768
2769
2770 pipes.switch('jw')
2771
2772
2773 self.assertRaises(RelaxParamSetError, self.value_fns.set, param='jwh')
2774
2775
2777 """Set the RSDM bond length parameter to the default value.
2778
2779 The functions tested are both generic_fns.value.set() and prompt.value.set().
2780 """
2781
2782
2783 pipes.switch('jw')
2784
2785
2786 self.value_fns.set(param='r')
2787
2788
2789 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].r, 1.02e-10)
2790 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].r, 1.02e-10)
2791
2792
2794 """Set the RSDM CSA parameter to the default value.
2795
2796 The functions tested are both generic_fns.value.set() and prompt.value.set().
2797 """
2798
2799
2800 pipes.switch('jw')
2801
2802
2803 self.value_fns.set(param='csa')
2804
2805
2806 self.assertAlmostEqual(cdp.mol[0].res[0].spin[0].csa, -172e-6)
2807 self.assertAlmostEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
2808
2809
2811 """Set the RSDM heteronucleus type to the default value.
2812
2813 The functions tested are both generic_fns.value.set() and prompt.value.set().
2814 """
2815
2816
2817 pipes.switch('jw')
2818
2819
2820 self.value_fns.set(param='heteronuc_type')
2821
2822
2823 self.assertEqual(cdp.mol[0].res[0].spin[0].heteronuc_type, '15N')
2824 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '15N')
2825
2826
2828 """Set different RSDM parameters J(0), J(wX), J(wH) to the default values (there are none!).
2829
2830 The functions tested are both generic_fns.value.set() and prompt.value.set().
2831 """
2832
2833
2834 pipes.switch('jw')
2835
2836
2837 self.assertRaises(RelaxParamSetError, self.value_fns.set, param=['j0', 'jwx', 'jwh'])
2838
2839
2841 """Set the RSDM parameter J(0) for a single spin.
2842
2843 The functions tested are both generic_fns.value.set() and prompt.value.set().
2844 """
2845
2846
2847 pipes.switch('jw')
2848
2849
2850 self.value_fns.set(param='j0', val=4.5e-9, spin_id='@112')
2851
2852
2853 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0'))
2854 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 4.5e-9)
2855
2856
2858 """Set the RSDM parameter J(wX) for a single spin.
2859
2860 The functions tested are both generic_fns.value.set() and prompt.value.set().
2861 """
2862
2863
2864 pipes.switch('jw')
2865
2866
2867 self.value_fns.set(param='jwx', val=2.3e-10, spin_id='@112')
2868
2869
2870 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwx'))
2871 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 2.3e-10)
2872
2873
2875 """Set the RSDM parameter J(wH) for a single spin.
2876
2877 The functions tested are both generic_fns.value.set() and prompt.value.set().
2878 """
2879
2880
2881 pipes.switch('jw')
2882
2883
2884 self.value_fns.set(param='jwh', val=1.7e-12, spin_id='@112')
2885
2886
2887 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwh'))
2888 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.7e-12)
2889
2890
2892 """Set the RSDM bond length parameter for a single spin.
2893
2894 The functions tested are both generic_fns.value.set() and prompt.value.set().
2895 """
2896
2897
2898 pipes.switch('jw')
2899
2900
2901 self.value_fns.set(param='r', val=1.04e-10, spin_id='@112')
2902
2903
2904 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'r'))
2905 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.04e-10)
2906
2907
2909 """Set the RSDM CSA parameter for a single spin.
2910
2911 The functions tested are both generic_fns.value.set() and prompt.value.set().
2912 """
2913
2914
2915 pipes.switch('jw')
2916
2917
2918 self.value_fns.set(param='csa', val=-160e-6, spin_id='@112')
2919
2920
2921 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'csa'))
2922 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -160e-6)
2923
2924
2926 """Set the RSDM heteronucleus type for a single spin.
2927
2928 The functions tested are both generic_fns.value.set() and prompt.value.set().
2929 """
2930
2931
2932 pipes.switch('jw')
2933
2934
2935 self.value_fns.set(param='heteronuc_type', val='13C', spin_id='@112')
2936
2937
2938 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'heteronuc_type'))
2939 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '13C')
2940
2941
2943 """Set different RSDM parameters J(0), J(wX), J(wH) for a single spin.
2944
2945 The functions tested are both generic_fns.value.set() and prompt.value.set().
2946 """
2947
2948
2949 pipes.switch('jw')
2950
2951
2952 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=[6.4e-9, 3.5e-10, 2.3e-12], spin_id='@112')
2953
2954
2955 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0'))
2956 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwx'))
2957 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwh'))
2958 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 6.4e-9)
2959 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 3.5e-10)
2960 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 2.3e-12)
2961
2962
2964 """Set RSDM parameters J(0), J(wX), J(wH) for a single spin to the same value.
2965
2966 The functions tested are both generic_fns.value.set() and prompt.value.set().
2967 """
2968
2969
2970 pipes.switch('jw')
2971
2972
2973 self.value_fns.set(param=['j0', 'jwx', 'jwh'], val=1.9e-10, spin_id='@112')
2974
2975
2976 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'j0'))
2977 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwx'))
2978 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'jwh'))
2979 self.assertEqual(cdp.mol[0].res[1].spin[0].j0, 1.9e-10)
2980 self.assertEqual(cdp.mol[0].res[1].spin[0].jwx, 1.9e-10)
2981 self.assertEqual(cdp.mol[0].res[1].spin[0].jwh, 1.9e-10)
2982
2983
2984
2985
2986
2987
2988
2989
2991 """Set the model-free local tm parameter for all spins.
2992
2993 The functions tested are both generic_fns.value.set() and prompt.value.set().
2994 """
2995
2996
2997 pipes.switch('mf')
2998
2999
3000 self.value_fns.set(param='local_tm', val=1e-8)
3001
3002
3003 self.assertEqual(cdp.mol[0].res[0].spin[0].local_tm, 1e-8)
3004 self.assertEqual(cdp.mol[0].res[1].spin[0].local_tm, 1e-8)
3005
3006
3008 """Set the model-free S2 parameter for all spins.
3009
3010 The functions tested are both generic_fns.value.set() and prompt.value.set().
3011 """
3012
3013
3014 pipes.switch('mf')
3015
3016
3017 self.value_fns.set(param='s2', val=0.8)
3018
3019
3020 self.assertEqual(cdp.mol[0].res[0].spin[0].s2, 0.8)
3021 self.assertEqual(cdp.mol[0].res[1].spin[0].s2, 0.8)
3022
3023
3025 """Set the model-free S2f parameter for all spins.
3026
3027 The functions tested are both generic_fns.value.set() and prompt.value.set().
3028 """
3029
3030
3031 pipes.switch('mf')
3032
3033
3034 self.value_fns.set(param='s2f', val=0.45)
3035
3036
3037 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.45)
3038 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.45)
3039
3040
3042 """Set the model-free S2s parameter for all spins.
3043
3044 The functions tested are both generic_fns.value.set() and prompt.value.set().
3045 """
3046
3047
3048 pipes.switch('mf')
3049
3050
3051 self.value_fns.set(param='s2s', val=0.1)
3052
3053
3054 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.1)
3055 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.1)
3056
3057
3059 """Set the model-free te parameter for all spins.
3060
3061 The functions tested are both generic_fns.value.set() and prompt.value.set().
3062 """
3063
3064
3065 pipes.switch('mf')
3066
3067
3068 self.value_fns.set(param='te', val=12.5e-12)
3069
3070
3071 self.assertEqual(cdp.mol[0].res[0].spin[0].te, 12.5e-12)
3072 self.assertEqual(cdp.mol[0].res[1].spin[0].te, 12.5e-12)
3073
3074
3076 """Set the model-free tf parameter for all spins.
3077
3078 The functions tested are both generic_fns.value.set() and prompt.value.set().
3079 """
3080
3081
3082 pipes.switch('mf')
3083
3084
3085 self.value_fns.set(param='tf', val=20.1e-12)
3086
3087
3088 self.assertEqual(cdp.mol[0].res[0].spin[0].tf, 20.1e-12)
3089 self.assertEqual(cdp.mol[0].res[1].spin[0].tf, 20.1e-12)
3090
3091
3093 """Set the model-free ts parameter for all spins.
3094
3095 The functions tested are both generic_fns.value.set() and prompt.value.set().
3096 """
3097
3098
3099 pipes.switch('mf')
3100
3101
3102 self.value_fns.set(param='ts', val=1.23e-9)
3103
3104
3105 self.assertEqual(cdp.mol[0].res[0].spin[0].ts, 1.23e-9)
3106 self.assertEqual(cdp.mol[0].res[1].spin[0].ts, 1.23e-9)
3107
3108
3110 """Set the model-free Rex parameter for all spins.
3111
3112 The functions tested are both generic_fns.value.set() and prompt.value.set().
3113 """
3114
3115
3116 pipes.switch('mf')
3117
3118
3119 self.value_fns.set(param='rex', val=2.34)
3120
3121
3122 self.assertEqual(cdp.mol[0].res[0].spin[0].rex, 2.34)
3123 self.assertEqual(cdp.mol[0].res[1].spin[0].rex, 2.34)
3124
3125
3127 """Set the model-free bond length parameter for all spins.
3128
3129 The functions tested are both generic_fns.value.set() and prompt.value.set().
3130 """
3131
3132
3133 pipes.switch('mf')
3134
3135
3136 self.value_fns.set(param='r', val=1.02e-10)
3137
3138
3139 self.assertEqual(cdp.mol[0].res[0].spin[0].r, 1.02e-10)
3140 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.02e-10)
3141
3142
3144 """Set the model-free CSA parameter for all spins.
3145
3146 The functions tested are both generic_fns.value.set() and prompt.value.set().
3147 """
3148
3149
3150 pipes.switch('mf')
3151
3152
3153 self.value_fns.set(param='csa', val=-172e-6)
3154
3155
3156 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -172e-6)
3157 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
3158
3159
3161 """Set the model-free heteronucleus type for all spins.
3162
3163 The functions tested are both generic_fns.value.set() and prompt.value.set().
3164 """
3165
3166
3167 pipes.switch('mf')
3168
3169
3170 self.value_fns.set(param='heteronuc_type', val='13C')
3171
3172
3173 self.assertEqual(cdp.mol[0].res[0].spin[0].heteronuc_type, '13C')
3174 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '13C')
3175
3176
3178 """Set the model-free S2f and S2s parameters for all spins to different values.
3179
3180 The functions tested are both generic_fns.value.set() and prompt.value.set().
3181 """
3182
3183
3184 pipes.switch('mf')
3185
3186
3187 self.value_fns.set(param=['s2f', 's2s'], val=[0.7, 0.9])
3188
3189
3190 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.7)
3191 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.9)
3192 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7)
3193 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.9)
3194
3195
3197 """Set the model-free S2f and S2s parameters for all spins to the same value.
3198
3199 The functions tested are both generic_fns.value.set() and prompt.value.set().
3200 """
3201
3202
3203 pipes.switch('mf')
3204
3205
3206 self.value_fns.set(param=['s2f', 's2s'], val=0.7)
3207
3208
3209 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.7)
3210 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.7)
3211 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7)
3212 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.7)
3213
3214
3216 """Set the model-free local tm parameter to the default value.
3217
3218 The functions tested are both generic_fns.value.set() and prompt.value.set().
3219 """
3220
3221
3222 pipes.switch('mf')
3223
3224
3225 self.value_fns.set(param='local_tm')
3226
3227
3228 self.assertEqual(cdp.mol[0].res[0].spin[0].local_tm, 10 * 1e-9)
3229 self.assertEqual(cdp.mol[0].res[1].spin[0].local_tm, 10 * 1e-9)
3230
3231
3233 """Set the model-free S2 parameter to the default value.
3234
3235 The functions tested are both generic_fns.value.set() and prompt.value.set().
3236 """
3237
3238
3239 pipes.switch('mf')
3240
3241
3242 self.value_fns.set(param='s2')
3243
3244
3245 self.assertEqual(cdp.mol[0].res[0].spin[0].s2, 0.8)
3246 self.assertEqual(cdp.mol[0].res[1].spin[0].s2, 0.8)
3247
3248
3250 """Set the model-free S2f parameter to the default value.
3251
3252 The functions tested are both generic_fns.value.set() and prompt.value.set().
3253 """
3254
3255
3256 pipes.switch('mf')
3257
3258
3259 self.value_fns.set(param='s2f')
3260
3261
3262 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.8)
3263 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.8)
3264
3265
3267 """Set the model-free S2s parameter to the default value.
3268
3269 The functions tested are both generic_fns.value.set() and prompt.value.set().
3270 """
3271
3272
3273 pipes.switch('mf')
3274
3275
3276 self.value_fns.set(param='s2s')
3277
3278
3279 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.8)
3280 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.8)
3281
3282
3284 """Set the model-free te parameter to the default value.
3285
3286 The functions tested are both generic_fns.value.set() and prompt.value.set().
3287 """
3288
3289
3290 pipes.switch('mf')
3291
3292
3293 self.value_fns.set(param='te')
3294
3295
3296 self.assertEqual(cdp.mol[0].res[0].spin[0].te, 100 * 1e-12)
3297 self.assertEqual(cdp.mol[0].res[1].spin[0].te, 100 * 1e-12)
3298
3299
3301 """Set the model-free tf parameter to the default value.
3302
3303 The functions tested are both generic_fns.value.set() and prompt.value.set().
3304 """
3305
3306
3307 pipes.switch('mf')
3308
3309
3310 self.value_fns.set(param='tf')
3311
3312
3313 self.assertEqual(cdp.mol[0].res[0].spin[0].tf, 10 * 1e-12)
3314 self.assertEqual(cdp.mol[0].res[1].spin[0].tf, 10 * 1e-12)
3315
3316
3318 """Set the model-free ts parameter to the default value.
3319
3320 The functions tested are both generic_fns.value.set() and prompt.value.set().
3321 """
3322
3323
3324 pipes.switch('mf')
3325
3326
3327 self.value_fns.set(param='ts')
3328
3329
3330 self.assertEqual(cdp.mol[0].res[0].spin[0].ts, 1000 * 1e-12)
3331 self.assertEqual(cdp.mol[0].res[1].spin[0].ts, 1000 * 1e-12)
3332
3333
3335 """Set the model-free Rex parameter to the default value.
3336
3337 The functions tested are both generic_fns.value.set() and prompt.value.set().
3338 """
3339
3340
3341 pipes.switch('mf')
3342
3343
3344 self.value_fns.set(param='rex')
3345
3346
3347 self.assertEqual(cdp.mol[0].res[0].spin[0].rex, 0.0)
3348 self.assertEqual(cdp.mol[0].res[1].spin[0].rex, 0.0)
3349
3350
3352 """Set the model-free bond length parameter to the default value.
3353
3354 The functions tested are both generic_fns.value.set() and prompt.value.set().
3355 """
3356
3357
3358 pipes.switch('mf')
3359
3360
3361 self.value_fns.set(param='r')
3362
3363
3364 self.assertEqual(cdp.mol[0].res[0].spin[0].r, 1.02 * 1e-10)
3365 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.02 * 1e-10)
3366
3367
3369 """Set the model-free CSA parameter to the default value.
3370
3371 The functions tested are both generic_fns.value.set() and prompt.value.set().
3372 """
3373
3374
3375 pipes.switch('mf')
3376
3377
3378 self.value_fns.set(param='csa')
3379
3380
3381 self.assertEqual(cdp.mol[0].res[0].spin[0].csa, -172 * 1e-6)
3382 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -172 * 1e-6)
3383
3384
3386 """Set the model-free heteronucleus type to the default value.
3387
3388 The functions tested are both generic_fns.value.set() and prompt.value.set().
3389 """
3390
3391
3392 pipes.switch('mf')
3393
3394
3395 self.value_fns.set(param='heteronuc_type')
3396
3397
3398 self.assertEqual(cdp.mol[0].res[0].spin[0].heteronuc_type, '15N')
3399 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '15N')
3400
3401
3403 """Set the model-free S2f and S2s parameters to the default values.
3404
3405 The functions tested are both generic_fns.value.set() and prompt.value.set().
3406 """
3407
3408
3409 pipes.switch('mf')
3410
3411
3412 self.value_fns.set(param=['s2f', 's2s'])
3413
3414
3415 self.assertEqual(cdp.mol[0].res[0].spin[0].s2f, 0.8)
3416 self.assertEqual(cdp.mol[0].res[0].spin[0].s2s, 0.8)
3417 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.8)
3418 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.8)
3419
3420
3422 """Set the model-free local tm parameter for a single spin.
3423
3424 The functions tested are both generic_fns.value.set() and prompt.value.set().
3425 """
3426
3427
3428 pipes.switch('mf')
3429
3430
3431 self.value_fns.set(param='local_tm', val=1e-8, spin_id='@112')
3432
3433
3434 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'local_tm'))
3435 self.assertEqual(cdp.mol[0].res[1].spin[0].local_tm, 1e-8)
3436
3437
3439 """Set the model-free S2 parameter for a single spin.
3440
3441 The functions tested are both generic_fns.value.set() and prompt.value.set().
3442 """
3443
3444
3445 pipes.switch('mf')
3446
3447
3448 self.value_fns.set(param='s2', val=0.8, spin_id='@112')
3449
3450
3451 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2'))
3452 self.assertEqual(cdp.mol[0].res[1].spin[0].s2, 0.8)
3453
3454
3456 """Set the model-free S2f parameter for a single spin.
3457
3458 The functions tested are both generic_fns.value.set() and prompt.value.set().
3459 """
3460
3461
3462 pipes.switch('mf')
3463
3464
3465 self.value_fns.set(param='s2f', val=0.45, spin_id='@112')
3466
3467
3468 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2f'))
3469 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.45)
3470
3471
3473 """Set the model-free S2s parameter for a single spin.
3474
3475 The functions tested are both generic_fns.value.set() and prompt.value.set().
3476 """
3477
3478
3479 pipes.switch('mf')
3480
3481
3482 self.value_fns.set(param='s2s', val=0.1, spin_id='@112')
3483
3484
3485 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2s'))
3486 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.1)
3487
3488
3490 """Set the model-free te parameter for a single spin.
3491
3492 The functions tested are both generic_fns.value.set() and prompt.value.set().
3493 """
3494
3495
3496 pipes.switch('mf')
3497
3498
3499 self.value_fns.set(param='te', val=12.5e-12, spin_id='@112')
3500
3501
3502 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'te'))
3503 self.assertEqual(cdp.mol[0].res[1].spin[0].te, 12.5e-12)
3504
3505
3507 """Set the model-free tf parameter for a single spin.
3508
3509 The functions tested are both generic_fns.value.set() and prompt.value.set().
3510 """
3511
3512
3513 pipes.switch('mf')
3514
3515
3516 self.value_fns.set(param='tf', val=20.1e-12, spin_id='@112')
3517
3518
3519 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'tf'))
3520 self.assertEqual(cdp.mol[0].res[1].spin[0].tf, 20.1e-12)
3521
3522
3524 """Set the model-free ts parameter for a single spin.
3525
3526 The functions tested are both generic_fns.value.set() and prompt.value.set().
3527 """
3528
3529
3530 pipes.switch('mf')
3531
3532
3533 self.value_fns.set(param='ts', val=1.23e-9, spin_id='@112')
3534
3535
3536 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'ts'))
3537 self.assertEqual(cdp.mol[0].res[1].spin[0].ts, 1.23e-9)
3538
3539
3541 """Set the model-free Rex parameter for a single spin.
3542
3543 The functions tested are both generic_fns.value.set() and prompt.value.set().
3544 """
3545
3546
3547 pipes.switch('mf')
3548
3549
3550 self.value_fns.set(param='rex', val=2.34, spin_id='@112')
3551
3552
3553 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'rex'))
3554 self.assertEqual(cdp.mol[0].res[1].spin[0].rex, 2.34)
3555
3556
3558 """Set the model-free bond length parameter for a single spin.
3559
3560 The functions tested are both generic_fns.value.set() and prompt.value.set().
3561 """
3562
3563
3564 pipes.switch('mf')
3565
3566
3567 self.value_fns.set(param='r', val=1.02e-10, spin_id='@112')
3568
3569
3570 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'r'))
3571 self.assertEqual(cdp.mol[0].res[1].spin[0].r, 1.02e-10)
3572
3573
3575 """Set the model-free CSA parameter for a single spin.
3576
3577 The functions tested are both generic_fns.value.set() and prompt.value.set().
3578 """
3579
3580
3581 pipes.switch('mf')
3582
3583
3584 self.value_fns.set(param='csa', val=-172e-6, spin_id='@112')
3585
3586
3587 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'csa'))
3588 self.assertEqual(cdp.mol[0].res[1].spin[0].csa, -172e-6)
3589
3590
3592 """Set the model-free heteronucleus type for a single spin.
3593
3594 The functions tested are both generic_fns.value.set() and prompt.value.set().
3595 """
3596
3597
3598 pipes.switch('mf')
3599
3600
3601 self.value_fns.set(param='heteronuc_type', val='13C', spin_id='@112')
3602
3603
3604 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'heteronuc_type'))
3605 self.assertEqual(cdp.mol[0].res[1].spin[0].heteronuc_type, '13C')
3606
3607
3609 """Set the model-free S2f and S2s parameters for a single spin to different values.
3610
3611 The functions tested are both generic_fns.value.set() and prompt.value.set().
3612 """
3613
3614
3615 pipes.switch('mf')
3616
3617
3618 self.value_fns.set(param=['s2f', 's2s'], val=[0.7, 0.9], spin_id='@112')
3619
3620
3621 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2f'))
3622 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2s'))
3623 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7)
3624 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.9)
3625
3626
3628 """Set the model-free S2f and S2s parameters for a single spin to the same value.
3629
3630 The functions tested are both generic_fns.value.set() and prompt.value.set().
3631 """
3632
3633
3634 pipes.switch('mf')
3635
3636
3637 self.value_fns.set(param=['s2f', 's2s'], val=0.7, spin_id='@112')
3638
3639
3640 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2f'))
3641 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 's2s'))
3642 self.assertEqual(cdp.mol[0].res[1].spin[0].s2f, 0.7)
3643 self.assertEqual(cdp.mol[0].res[1].spin[0].s2s, 0.7)
3644
3645
3646
3647
3648
3649
3650
3651
3653 """Set the N-state model curve fitting alpha2 parameter.
3654
3655 The functions tested are both generic_fns.value.set() and prompt.value.set().
3656 """
3657
3658
3659 pipes.switch('n_state')
3660
3661
3662 self.value_fns.set(param='alpha2', val=pi)
3663
3664
3665 self.assertEqual(cdp.alpha[0], 0.0)
3666 self.assertEqual(cdp.alpha[1], 0.0)
3667 self.assertEqual(cdp.alpha[2], pi)
3668 self.assertEqual(cdp.alpha[3], 0.0)
3669
3670
3671
3672
3673
3674
3675
3676
3678 """Set the relaxation curve fitting Rx parameter for all spins.
3679
3680 The functions tested are both generic_fns.value.set() and prompt.value.set().
3681 """
3682
3683
3684 pipes.switch('relax_fit')
3685
3686
3687 self.value_fns.set(param='rx', val=1.2)
3688
3689
3690 self.assertEqual(cdp.mol[0].res[0].spin[0].rx, 1.2)
3691 self.assertEqual(cdp.mol[0].res[1].spin[0].rx, 1.2)
3692
3693
3695 """Set the relaxation curve fitting I0 parameter for all spins.
3696
3697 The functions tested are both generic_fns.value.set() and prompt.value.set().
3698 """
3699
3700
3701 pipes.switch('relax_fit')
3702
3703
3704 self.value_fns.set(param='i0', val=520)
3705
3706
3707 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 520)
3708 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 520)
3709
3710
3712 """Set the relaxation curve fitting Iinf parameter for all spins.
3713
3714 The functions tested are both generic_fns.value.set() and prompt.value.set().
3715 """
3716
3717
3718 pipes.switch('relax_fit')
3719
3720
3721 self.value_fns.set(param='iinf', val=-1.7)
3722
3723
3724 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, -1.7)
3725 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3726
3727
3729 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to different values.
3730
3731 The functions tested are both generic_fns.value.set() and prompt.value.set().
3732 """
3733
3734
3735 pipes.switch('relax_fit')
3736
3737
3738 self.value_fns.set(param=['i0', 'iinf'], val=[123456, -1.7])
3739
3740
3741 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 123456)
3742 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, -1.7)
3743 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 123456)
3744 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3745
3746
3748 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to the same value.
3749
3750 The functions tested are both generic_fns.value.set() and prompt.value.set().
3751 """
3752
3753
3754 pipes.switch('relax_fit')
3755
3756
3757 self.value_fns.set(param=['i0', 'iinf'], val=0.0)
3758
3759
3760 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 0.0)
3761 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, 0.0)
3762 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 0.0)
3763 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3764
3765
3767 """Set the relaxation curve fitting Rx parameter to the default value.
3768
3769 The functions tested are both generic_fns.value.set() and prompt.value.set().
3770 """
3771
3772
3773 pipes.switch('relax_fit')
3774
3775
3776 self.value_fns.set(param='rx')
3777
3778
3779 self.assertEqual(cdp.mol[0].res[0].spin[0].rx, 8.0)
3780 self.assertEqual(cdp.mol[0].res[1].spin[0].rx, 8.0)
3781
3782
3784 """Set the relaxation curve fitting I0 parameter to the default value.
3785
3786 The functions tested are both generic_fns.value.set() and prompt.value.set().
3787 """
3788
3789
3790 pipes.switch('relax_fit')
3791
3792
3793 self.value_fns.set(param='i0')
3794
3795
3796 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 10000.0)
3797 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 10000.0)
3798
3799
3801 """Set the relaxation curve fitting Iinf parameter to the default value.
3802
3803 The functions tested are both generic_fns.value.set() and prompt.value.set().
3804 """
3805
3806
3807 pipes.switch('relax_fit')
3808
3809
3810 self.value_fns.set(param='iinf')
3811
3812
3813 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, 0.0)
3814 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3815
3816
3818 """Set the relaxation curve fitting parameters {I0, Iinf} to the default values.
3819
3820 The functions tested are both generic_fns.value.set() and prompt.value.set().
3821 """
3822
3823
3824 pipes.switch('relax_fit')
3825
3826
3827 self.value_fns.set(param=['i0', 'iinf'])
3828
3829
3830 self.assertEqual(cdp.mol[0].res[0].spin[0].i0, 10000.0)
3831 self.assertEqual(cdp.mol[0].res[0].spin[0].iinf, 0.0)
3832 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 10000.0)
3833 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3834
3835
3837 """Set the relaxation curve fitting Rx parameter for all spins.
3838
3839 The functions tested are both generic_fns.value.set() and prompt.value.set().
3840 """
3841
3842
3843 pipes.switch('relax_fit')
3844
3845
3846 self.value_fns.set(param='rx', val=1.2, spin_id='@112')
3847
3848
3849 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'rx'))
3850 self.assertEqual(cdp.mol[0].res[1].spin[0].rx, 1.2)
3851
3852
3854 """Set the relaxation curve fitting I0 parameter for all spins.
3855
3856 The functions tested are both generic_fns.value.set() and prompt.value.set().
3857 """
3858
3859
3860 pipes.switch('relax_fit')
3861
3862
3863 self.value_fns.set(param='i0', val=520, spin_id='@112')
3864
3865
3866 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'i0'))
3867 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 520)
3868
3869
3871 """Set the relaxation curve fitting Iinf parameter for all spins.
3872
3873 The functions tested are both generic_fns.value.set() and prompt.value.set().
3874 """
3875
3876
3877 pipes.switch('relax_fit')
3878
3879
3880 self.value_fns.set(param='iinf', val=-1.7, spin_id='@112')
3881
3882
3883 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'iinf'))
3884 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3885
3886
3888 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to different values.
3889
3890 The functions tested are both generic_fns.value.set() and prompt.value.set().
3891 """
3892
3893
3894 pipes.switch('relax_fit')
3895
3896
3897 self.value_fns.set(param=['i0', 'iinf'], val=[123456, -1.7], spin_id='@112')
3898
3899
3900 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'i0'))
3901 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'iinf'))
3902 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 123456)
3903 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, -1.7)
3904
3905
3907 """Set the relaxation curve fitting parameters {I0, Iinf} for all spins to the same value.
3908
3909 The functions tested are both generic_fns.value.set() and prompt.value.set().
3910 """
3911
3912
3913 pipes.switch('relax_fit')
3914
3915
3916 self.value_fns.set(param=['i0', 'iinf'], val=0.0, spin_id='@112')
3917
3918
3919 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'i0'))
3920 self.assert_(not hasattr(cdp.mol[0].res[0].spin[0], 'iinf'))
3921 self.assertEqual(cdp.mol[0].res[1].spin[0].i0, 0.0)
3922 self.assertEqual(cdp.mol[0].res[1].spin[0].iinf, 0.0)
3923