Package test_suite :: Package system_tests :: Module frame_order
[hide private]
[frames] | no frames]

Source Code for Module test_suite.system_tests.frame_order

   1  ############################################################################### 
   2  #                                                                             # 
   3  # Copyright (C) 2006-2014 Edward d'Auvergne                                   # 
   4  #                                                                             # 
   5  # This file is part of the program relax (http://www.nmr-relax.com).          # 
   6  #                                                                             # 
   7  # This program is free software: you can redistribute it and/or modify        # 
   8  # it under the terms of the GNU General Public License as published by        # 
   9  # the Free Software Foundation, either version 3 of the License, or           # 
  10  # (at your option) any later version.                                         # 
  11  #                                                                             # 
  12  # This program is distributed in the hope that it will be useful,             # 
  13  # but WITHOUT ANY WARRANTY; without even the implied warranty of              # 
  14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the               # 
  15  # GNU General Public License for more details.                                # 
  16  #                                                                             # 
  17  # You should have received a copy of the GNU General Public License           # 
  18  # along with this program.  If not, see <http://www.gnu.org/licenses/>.       # 
  19  #                                                                             # 
  20  ############################################################################### 
  21   
  22  # Python module imports. 
  23  from math import pi 
  24  import platform 
  25  import numpy 
  26  from os import sep 
  27  from tempfile import mkdtemp 
  28   
  29  # relax module imports. 
  30  from data_store import Relax_data_store; ds = Relax_data_store() 
  31  import dep_check 
  32  from status import Status; status = Status() 
  33  from test_suite.system_tests.base_classes import SystemTestCase 
  34   
  35   
  36  # Get the platform information. 
  37  SYSTEM = platform.system() 
  38  RELEASE = platform.release() 
  39  VERSION = platform.version() 
  40  WIN32_VER = platform.win32_ver() 
  41  DIST = platform.dist() 
  42  ARCH = platform.architecture() 
  43  MACH = platform.machine() 
  44  PROC = platform.processor() 
  45  PY_VER = platform.python_version() 
  46  NUMPY_VER = numpy.__version__ 
  47  LIBC_VER = platform.libc_ver() 
  48   
  49  # Windows system name pain. 
  50  if SYSTEM == 'Windows' or SYSTEM == 'Microsoft': 
  51      # Set the system to 'Windows' no matter what. 
  52      SYSTEM = 'Windows' 
  53   
  54   
  55   
56 -class Frame_order(SystemTestCase):
57 """TestCase class for the functional tests of the frame order theories.""" 58
59 - def __init__(self, methodName='runTest', skip_tests=True):
60 """Skip the tests if scipy is not installed. 61 62 @keyword methodName: The name of the test. 63 @type methodName: str 64 @keyword skip_tests: A flag which if True will cause a large number of redundant tests to be skipped. 65 @type skip_tests: bool 66 """ 67 68 # Execute the base class method. 69 super(Frame_order, self).__init__(methodName) 70 71 # Tests to skip. 72 blacklist = [ 73 'test_cam_double_rotor', # FIXME, this test needs to be reactived and fixed. 74 'test_cam_double_rotor_pcs', 75 'test_cam_double_rotor_rdc', 76 'test_cam_free_rotor_pcs', 77 'test_cam_free_rotor_rdc', 78 'test_cam_free_rotor2_pcs', 79 'test_cam_free_rotor2_rdc', 80 'test_cam_iso_cone_pcs', 81 'test_cam_iso_cone_rdc', 82 'test_cam_iso_cone_free_rotor_pcs', 83 'test_cam_iso_cone_free_rotor_rdc', 84 'test_cam_iso_cone_free_rotor2_pcs', 85 'test_cam_iso_cone_free_rotor2_rdc', 86 'test_cam_iso_cone_torsionless_pcs', 87 'test_cam_iso_cone_torsionless_rdc', 88 'test_cam_pseudo_ellipse2_pcs', 89 'test_cam_pseudo_ellipse2_rdc', 90 'test_cam_pseudo_ellipse_free_rotor_pcs', 91 'test_cam_pseudo_ellipse_free_rotor_rdc', 92 'test_cam_pseudo_ellipse_torsionless_pcs', 93 'test_cam_pseudo_ellipse_torsionless_rdc', 94 'test_cam_rigid_pcs', 95 'test_cam_rigid_rdc', 96 'test_cam_rotor_pcs', 97 'test_cam_rotor_rdc', 98 'test_cam_rotor_2_state_pcs', 99 'test_cam_rotor_2_state_rdc', 100 'test_cam_rotor2_pcs', 101 'test_cam_rotor2_rdc' 102 ] 103 104 # Skip the blacklisted tests. 105 if skip_tests and methodName in blacklist: 106 status.skipped_tests.append([methodName, None, self._skip_type]) 107 108 # Missing module. 109 if not dep_check.scipy_module: 110 # Store in the status object. 111 status.skipped_tests.append([methodName, 'Scipy', self._skip_type])
112 113
114 - def setUp(self):
115 """Set up for all the functional tests.""" 116 117 # The path to the CaM scripts. 118 self.cam_path = status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'cam'+sep 119 120 # Create a temporary directory for dumping files. 121 ds.tmpdir = mkdtemp()
122 123
124 - def tearDown(self):
125 """Clean up after the tests.""" 126 127 # Reset the relax data store. 128 self.interpreter.reset() 129 130 # Remove flags from the status object. 131 if hasattr(status, 'flag_rdc'): 132 del status.flag_rdc 133 if hasattr(status, 'flag_pcs'): 134 del status.flag_pcs
135 136
137 - def check_chi2(self, chi2=0.0, places=1):
138 """Check the function evaluation.""" 139 140 # Switch back to the original pipe. 141 self.interpreter.pipe.switch('frame order') 142 143 # Get the debugging message. 144 self.mesg = self.mesg_opt_debug() 145 146 # Scale the chi2 values down. 147 if chi2 > 1000.0: 148 chi2 = chi2 / 1000.0 149 chi2_fit = cdp.chi2 / 1000.0 150 elif chi2 > 100.0: 151 chi2 = chi2 / 100.0 152 chi2_fit = cdp.chi2 / 100.0 153 elif chi2 > 10.0: 154 chi2 = chi2 / 10.0 155 chi2_fit = cdp.chi2 / 10.0 156 else: 157 chi2 = chi2 158 chi2_fit = cdp.chi2 159 160 # Check the chi2 value. 161 self.assertAlmostEqual(chi2_fit, chi2, places, msg=self.mesg)
162 163
164 - def flags(self, rdc=True, pcs=True, opt=False):
165 """Set a number of flags for the scripts.""" 166 167 # Store the flags. 168 status.flag_rdc = rdc 169 status.flag_pcs = pcs 170 status.flag_opt = opt
171 172
173 - def mesg_opt_debug(self):
174 """Method for returning a string to help debug the minimisation. 175 176 @return: The debugging string. 177 @rtype: str 178 """ 179 180 # Initialise the string. 181 string = 'Optimisation failure.\n\n' 182 183 # Create the string. 184 string = string + "%-18s%-25s\n" % ("System: ", SYSTEM) 185 string = string + "%-18s%-25s\n" % ("Release: ", RELEASE) 186 string = string + "%-18s%-25s\n" % ("Version: ", VERSION) 187 string = string + "%-18s%-25s\n" % ("Win32 version: ", (WIN32_VER[0] + " " + WIN32_VER[1] + " " + WIN32_VER[2] + " " + WIN32_VER[3])) 188 string = string + "%-18s%-25s\n" % ("Distribution: ", (DIST[0] + " " + DIST[1] + " " + DIST[2])) 189 string = string + "%-18s%-25s\n" % ("Architecture: ", (ARCH[0] + " " + ARCH[1])) 190 string = string + "%-18s%-25s\n" % ("Machine: ", MACH) 191 string = string + "%-18s%-25s\n" % ("Processor: ", PROC) 192 string = string + "%-18s%-25s\n" % ("Python version: ", PY_VER) 193 string = string + "%-18s%-25s\n" % ("Numpy version: ", NUMPY_VER) 194 string = string + "%-18s%-25s\n" % ("Libc version: ", (LIBC_VER[0] + " " + LIBC_VER[1])) 195 196 197 # Minimisation info. 198 string = string + "\n" 199 for param in ['ave_pos_alpha', 'ave_pos_beta', 'ave_pos_gamma', 'eigen_alpha', 'eigen_beta', 'eigen_gamma', 'axis_theta', 'axis_phi', 'cone_theta_x', 'cone_theta_y', 'cone_theta', 'cone_s1', 'cone_sigma_max']: 200 if hasattr(cdp, param): 201 obj = getattr(cdp, param) 202 string = string + "%-15s %30.17g\n" % (param, obj) 203 204 string = string + "%-15s %30.17g\n" % ('chi2:', cdp.chi2) 205 if hasattr(cdp, 'num_int_pts'): 206 string = string + "%-15s %30i\n" % ('num_int_pts:', cdp.num_int_pts) 207 if hasattr(cdp, 'iter') and cdp.iter != None: 208 string = string + "%-15s %30i\n" % ('iter:', cdp.iter) 209 if hasattr(cdp, 'f_count') and cdp.f_count != None: 210 string = string + "%-15s %30i\n" % ('f_count:', cdp.f_count) 211 if hasattr(cdp, 'g_count') and cdp.g_count != None: 212 string = string + "%-15s %30i\n" % ('g_count:', cdp.g_count) 213 if hasattr(cdp, 'h_count') and cdp.h_count != None: 214 string = string + "%-15s %30i\n" % ('h_count:', cdp.h_count) 215 if hasattr(cdp, 'warning'): 216 string = string + "%-15s %30s\n" % ('warning:', cdp.warning) 217 218 # Return the string. 219 return string
220 221
222 - def space_probe(self, ref_chi2=None, params=None, delta=3.0 / 360.0 * 2.0 * pi):
223 """Probe the space around the supposed minimum.""" 224 225 # No function intros. 226 self.interpreter.intro_off() 227 228 # Check the minimum. 229 self.interpreter.calc() 230 print("%-20s %10.5f" % ("chi2 minimum", cdp.chi2)) 231 self.assertAlmostEqual(cdp.chi2, ref_chi2) 232 233 # Test around the minimum using small deviations. 234 for param in params: 235 print("\n\nParam: %s" % param) 236 print("%-20s %10.5f" % ("chi2 orig", ref_chi2)) 237 238 # Get the current value. 239 curr = getattr(cdp, param) 240 241 # Deviate upwards. 242 setattr(cdp, param, curr+delta) 243 self.interpreter.calc() 244 print("%-20s %10.5f" % ("chi2 up", cdp.chi2)) 245 self.assert_(cdp.chi2 > ref_chi2) 246 247 # Deviate downwards. 248 setattr(cdp, param, curr-delta) 249 self.interpreter.calc() 250 print("%-20s %10.5f" % ("chi2 down", cdp.chi2)) 251 self.assert_(cdp.chi2 > ref_chi2) 252 253 # Reset. 254 setattr(cdp, param, curr)
255 256
257 - def test_cam_double_rotor(self):
258 """Test the double rotor frame order model of CaM.""" 259 260 # The flags, execute the script, and then check the chi2 value. 261 self.flags() 262 self.interpreter.run(script_file=self.cam_path+'double_rotor.py') 263 self.check_chi2(0.081769384900455433)
264 265
266 - def test_cam_double_rotor_pcs(self):
267 """Test the double rotor frame order model of CaM (with only PCS data).""" 268 269 # The flags, execute the script, and then check the chi2 value. 270 self.flags(rdc=False) 271 self.interpreter.run(script_file=self.cam_path+'double_rotor.py') 272 self.check_chi2(0.0010998457430728529, places=4)
273 274
275 - def test_cam_double_rotor_rdc(self):
276 """Test the double rotor frame order model of CaM (with only RDC data).""" 277 278 # The flags, execute the script, and then check the chi2 value. 279 self.flags(pcs=False) 280 self.interpreter.run(script_file=self.cam_path+'double_rotor.py') 281 self.check_chi2(0.080669539157379247)
282 283
284 - def test_cam_free_rotor(self):
285 """Test the free rotor frame order model of CaM.""" 286 287 # The flags, execute the script, and then check the chi2 value. 288 self.flags() 289 self.interpreter.run(script_file=self.cam_path+'free_rotor.py') 290 self.check_chi2(26.111745902046135)
291 292
294 """Test the free rotor frame order model of CaM.""" 295 296 # The flags, execute the script, and then check the chi2 value. 297 self.flags() 298 self.interpreter.run(script_file=self.cam_path+'free_rotor_missing_data.py') 299 self.check_chi2(19.769652316529044)
300 301
302 - def test_cam_free_rotor_pcs(self):
303 """Test the free rotor frame order model of CaM (with only PCS data).""" 304 305 # The flags, execute the script, and then check the chi2 value. 306 self.flags(rdc=False) 307 self.interpreter.run(script_file=self.cam_path+'free_rotor.py') 308 self.check_chi2(26.0561429411961)
309 310
311 - def test_cam_free_rotor_rdc(self):
312 """Test the free rotor frame order model of CaM (with only RDC data).""" 313 314 # The flags, execute the script, and then check the chi2 value. 315 self.flags(pcs=False) 316 self.interpreter.run(script_file=self.cam_path+'free_rotor.py') 317 self.check_chi2(0.055602960850032274)
318 319
320 - def test_cam_free_rotor2(self):
321 """Test the second free rotor frame order model of CaM.""" 322 323 # The flags, execute the script, and then check the chi2 value. 324 self.flags() 325 self.interpreter.run(script_file=self.cam_path+'free_rotor2.py') 326 self.check_chi2(20.036591746561481)
327 328
329 - def test_cam_free_rotor2_pcs(self):
330 """Test the second free rotor frame order model of CaM (with only PCS data).""" 331 332 # The flags, execute the script, and then check the chi2 value. 333 self.flags(rdc=False) 334 self.interpreter.run(script_file=self.cam_path+'free_rotor2.py') 335 self.check_chi2(19.974062558612736)
336 337
338 - def test_cam_free_rotor2_rdc(self):
339 """Test the second free rotor frame order model of CaM (with only RDC data).""" 340 341 # The flags, execute the script, and then check the chi2 value. 342 self.flags(pcs=False) 343 self.interpreter.run(script_file=self.cam_path+'free_rotor2.py') 344 self.check_chi2(0.062529187948743833)
345 346
347 - def test_cam_iso_cone(self):
348 """Test the isotropic cone, free rotor frame order model of CaM.""" 349 350 # The flags, execute the script, and then check the chi2 value. 351 self.flags(opt=True) 352 self.interpreter.run(script_file=self.cam_path+'iso_cone.py') 353 self.check_chi2(4.4891048094666539)
354 355
356 - def test_cam_iso_cone_pcs(self):
357 """Test the isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 358 359 # The flags, execute the script, and then check the chi2 value. 360 self.flags(rdc=False) 361 self.interpreter.run(script_file=self.cam_path+'iso_cone.py') 362 self.check_chi2(4.4418007653570815)
363 364
365 - def test_cam_iso_cone_rdc(self):
366 """Test the isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 367 368 # The flags, execute the script, and then check the chi2 value. 369 self.flags(pcs=False) 370 self.interpreter.run(script_file=self.cam_path+'iso_cone.py') 371 self.check_chi2(0.047304044109578447)
372 373
375 """Test the isotropic cone, free rotor frame order model of CaM.""" 376 377 # The flags, execute the script, and then check the chi2 value. 378 self.flags() 379 self.interpreter.run(script_file=self.cam_path+'iso_cone_free_rotor.py') 380 self.check_chi2(31.400316262936347)
381 382
384 """Test the isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 385 386 # The flags, execute the script, and then check the chi2 value. 387 self.flags(rdc=False) 388 self.interpreter.run(script_file=self.cam_path+'iso_cone_free_rotor.py') 389 self.check_chi2(31.340571886727734)
390 391
393 """Test the isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 394 395 # The flags, execute the script, and then check the chi2 value. 396 self.flags(pcs=False) 397 self.interpreter.run(script_file=self.cam_path+'iso_cone_free_rotor.py') 398 self.check_chi2(0.058871004304276831)
399 400
402 """Test the second isotropic cone, free rotor frame order model of CaM.""" 403 404 # The flags, execute the script, and then check the chi2 value. 405 self.flags() 406 self.interpreter.run(script_file=self.cam_path+'iso_cone_free_rotor2.py') 407 self.check_chi2(25.367430594567658)
408 409
411 """Test the second isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 412 413 # The flags, execute the script, and then check the chi2 value. 414 self.flags(rdc=False) 415 self.interpreter.run(script_file=self.cam_path+'iso_cone_free_rotor2.py') 416 self.check_chi2(25.326543785930376)
417 418
420 """Test the second isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 421 422 # The flags, execute the script, and then check the chi2 value. 423 self.flags(pcs=False) 424 self.interpreter.run(script_file=self.cam_path+'iso_cone_free_rotor2.py') 425 self.check_chi2(0.034276292191227402)
426 427
429 """Test the second isotropic cone, free rotor frame order model of CaM.""" 430 431 # The flags, execute the script, and then check the chi2 value. 432 self.flags() 433 self.interpreter.run(script_file=self.cam_path+'iso_cone_torsionless.py') 434 self.check_chi2(0.18003434152054845)
435 436
438 """Test the second isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 439 440 # The flags, execute the script, and then check the chi2 value. 441 self.flags(rdc=False) 442 self.interpreter.run(script_file=self.cam_path+'iso_cone_torsionless.py') 443 self.check_chi2(0.13111619461084989)
444 445
447 """Test the second isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 448 449 # The flags, execute the script, and then check the chi2 value. 450 self.flags(pcs=False) 451 self.interpreter.run(script_file=self.cam_path+'iso_cone_torsionless.py') 452 self.check_chi2(0.04891814690969206)
453 454
455 - def test_cam_pseudo_ellipse(self):
456 """Test the second isotropic cone, free rotor frame order model of CaM.""" 457 458 # The flags, execute the script, and then check the chi2 value. 459 self.flags(opt=True) 460 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse.py') 461 self.check_chi2(1.8246387150578596)
462 463
465 """Test the second isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 466 467 # The flags, execute the script, and then check the chi2 value. 468 self.flags(rdc=False) 469 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse.py') 470 self.check_chi2(1.7291771910814087)
471 472
474 """Test the second isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 475 476 # The flags, execute the script, and then check the chi2 value. 477 self.flags(pcs=False) 478 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse.py') 479 self.check_chi2(0.095461523976414595)
480 481
482 - def test_cam_pseudo_ellipse2(self):
483 """Test the second isotropic cone, free rotor frame order model of CaM.""" 484 485 # The flags, execute the script, and then check the chi2 value. 486 self.flags() 487 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse2.py') 488 self.check_chi2(1.3234054898860625)
489 490
492 """Test the second isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 493 494 # The flags, execute the script, and then check the chi2 value. 495 self.flags(rdc=False) 496 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse2.py') 497 self.check_chi2(1.2924141815581189)
498 499
501 """Test the second isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 502 503 # The flags, execute the script, and then check the chi2 value. 504 self.flags(pcs=False) 505 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse2.py') 506 self.check_chi2(0.030991308327923742)
507 508
510 """Test the second isotropic cone, free rotor frame order model of CaM.""" 511 512 # The flags, execute the script, and then check the chi2 value. 513 self.flags() 514 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse_free_rotor.py') 515 self.check_chi2(3.1209520727818716)
516 517
519 """Test the second isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 520 521 # The flags, execute the script, and then check the chi2 value. 522 self.flags(rdc=False) 523 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse_free_rotor.py') 524 self.check_chi2(3.0780325068058922)
525 526
528 """Test the second isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 529 530 # The flags, execute the script, and then check the chi2 value. 531 self.flags(pcs=False) 532 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse_free_rotor.py') 533 self.check_chi2(0.042919565975988075)
534 535
537 """Test the second isotropic cone, free rotor frame order model of CaM.""" 538 539 # The flags, execute the script, and then check the chi2 value. 540 self.flags() 541 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse_torsionless.py') 542 self.check_chi2(4.0391154988414177)
543 544
546 """Test the second isotropic cone, free rotor frame order model of CaM (with only PCS data).""" 547 548 # The flags, execute the script, and then check the chi2 value. 549 self.flags(rdc=False) 550 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse_torsionless.py') 551 self.check_chi2(4.0006946519066426)
552 553
555 """Test the second isotropic cone, free rotor frame order model of CaM (with only RDC data).""" 556 557 # The flags, execute the script, and then check the chi2 value. 558 self.flags(pcs=False) 559 self.interpreter.run(script_file=self.cam_path+'pseudo_ellipse_torsionless.py') 560 self.check_chi2(0.038420846934775092)
561 562
563 - def test_cam_rigid(self):
564 """Test the rigid frame order model of CaM.""" 565 566 # The flags, execute the script, and then check the chi2 value. 567 self.flags() 568 self.interpreter.run(script_file=self.cam_path+'rigid.py') 569 self.check_chi2(0.081177248776880595)
570 571
572 - def test_cam_rigid_pcs(self):
573 """Test the rigid frame order model of CaM (with only PCS data).""" 574 575 # The flags, execute the script, and then check the chi2 value. 576 self.flags(rdc=False) 577 self.interpreter.run(script_file=self.cam_path+'rigid.py') 578 self.check_chi2(1.61966778375118e-06)
579 580
581 - def test_cam_rigid_rdc(self):
582 """Test the rigid frame order model of CaM (with only RDC data).""" 583 584 # The flags, execute the script, and then check the chi2 value. 585 self.flags(pcs=False) 586 self.interpreter.run(script_file=self.cam_path+'rigid.py') 587 self.check_chi2(0.081175629109096842)
588 589
590 - def test_cam_rotor(self):
591 """Test the rotor frame order model of CaM.""" 592 593 # The flags, execute the script, and then check the chi2 value. 594 self.flags() 595 self.interpreter.run(script_file=self.cam_path+'rotor.py') 596 self.check_chi2(0.51092299791624041)
597 598
599 - def test_cam_rotor_pcs(self):
600 """Test the rotor frame order model of CaM (with only PCS data).""" 601 602 # The flags, execute the script, and then check the chi2 value. 603 self.flags(rdc=False) 604 self.interpreter.run(script_file=self.cam_path+'rotor.py') 605 self.check_chi2(0.00073477528703013134)
606 607
608 - def test_cam_rotor_rdc(self):
609 """Test the rotor frame order model of CaM (with only RDC data).""" 610 611 # The flags, execute the script, and then check the chi2 value. 612 self.flags(pcs=False) 613 self.interpreter.run(script_file=self.cam_path+'rotor.py') 614 self.check_chi2(0.080805860707837754)
615 616
617 - def test_cam_rotor_2_state(self):
618 """Test the 2-state rotor frame order model of CaM.""" 619 620 # The flags, execute the script, and then check the chi2 value. 621 self.flags() 622 self.interpreter.run(script_file=self.cam_path+'rotor_2_state.py') 623 self.check_chi2(1.0043926000277981)
624 625
626 - def test_cam_rotor_2_state_pcs(self):
627 """Test the 2-state rotor frame order model of CaM (with only PCS data).""" 628 629 # The flags, execute the script, and then check the chi2 value. 630 self.flags(rdc=False) 631 self.interpreter.run(script_file=self.cam_path+'rotor_2_state.py') 632 self.check_chi2(0.019243235025296658)
633 634
635 - def test_cam_rotor_2_state_rdc(self):
636 """Test the 2-state rotor frame order model of CaM (with only RDC data).""" 637 638 # The flags, execute the script, and then check the chi2 value. 639 self.flags(pcs=False) 640 self.interpreter.run(script_file=self.cam_path+'rotor_2_state.py') 641 self.check_chi2(0.98514936500256733)
642 643
644 - def test_cam_rotor2(self):
645 """Test the second rotor frame order model of CaM.""" 646 647 # The flags, execute the script, and then check the chi2 value. 648 self.flags(opt=True) 649 self.interpreter.run(script_file=self.cam_path+'rotor2.py') 650 self.check_chi2(0.24293662685639067)
651 652
653 - def test_cam_rotor2_pcs(self):
654 """Test the second rotor frame order model of CaM (with only PCS data).""" 655 656 # The flags, execute the script, and then check the chi2 value. 657 self.flags(rdc=False) 658 self.interpreter.run(script_file=self.cam_path+'rotor2.py') 659 self.check_chi2(0.0010998457430728529)
660 661
662 - def test_cam_rotor2_rdc(self):
663 """Test the second rotor frame order model of CaM (with only RDC data).""" 664 665 # The flags, execute the script, and then check the chi2 value. 666 self.flags(pcs=False) 667 self.interpreter.run(script_file=self.cam_path+'rotor2.py') 668 self.check_chi2(0.080669539157379247)
669 670
672 """Generate the rotor2 distribution of CaM.""" 673 674 # Execute the script. 675 self.interpreter.run(script_file=self.cam_path+'generate_rotor2_distribution.py')
676 677
679 """Test the free rotor frame order model.""" 680 681 # Execute the script. 682 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'free_rotor.py') 683 684 # Check the calculated chi2 value. 685 self.assertAlmostEqual(ds.chi2, 0.0216067401326)
686 687
689 """Test the free rotor frame order model in the eigenframe.""" 690 691 # Execute the script. 692 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'free_rotor_eigenframe.py') 693 694 # Check the calculated chi2 value. 695 self.assertAlmostEqual(ds.chi2, 0.00673210578744)
696 697
698 - def fixme_test_model_iso_cone(self):
699 """Test the isotropic cone frame order model.""" 700 701 # Execute the script. 702 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'iso_cone.py') 703 704 # The reference chi2 values. 705 chi2_ref = [] 706 chi2_ref.append(0.131890484593) 707 chi2_ref.append(0.0539383731611) 708 chi2_ref.append(0.0135056297016) 709 chi2_ref.append(0.0163432453475) 710 chi2_ref.append(0.0775570503917) 711 chi2_ref.append(0.0535055367493) 712 chi2_ref.append(0.0994746492483) 713 chi2_ref.append(0.174830826376) 714 chi2_ref.append(0.193036744906) 715 chi2_ref.append(0.181480810794) 716 chi2_ref.append(0.215863920824) 717 chi2_ref.append(0.170088692559) 718 chi2_ref.append(0.152634493383) 719 chi2_ref.append(0.168711907446) 720 chi2_ref.append(0.168405354086) 721 chi2_ref.append(0.247439860108) 722 chi2_ref.append(0.143487410228) 723 chi2_ref.append(0.148318989268) 724 725 # Check the calculated chi2 values. 726 for i in range(18): 727 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
728 729
731 """Test the free rotor isotropic cone frame order model.""" 732 733 # Execute the script. 734 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'iso_cone_free_rotor.py') 735 736 # The reference chi2 values. 737 chi2_ref = [] 738 chi2_ref.append(0.0177292447567 ) 739 chi2_ref.append(0.0187585146766 ) 740 chi2_ref.append(0.0440519894909 ) 741 chi2_ref.append(0.0225223798489 ) 742 chi2_ref.append(0.0239979046491 ) 743 chi2_ref.append(0.0161048633259 ) 744 chi2_ref.append(0.0267310958091 ) 745 chi2_ref.append(0.0219820914478 ) 746 chi2_ref.append(0.0194880630576 ) 747 chi2_ref.append(0.0348242343833 ) 748 chi2_ref.append(0.0401631858563 ) 749 chi2_ref.append(0.0327461783858 ) 750 chi2_ref.append(0.0391082177884 ) 751 chi2_ref.append(0.0467056691507 ) 752 chi2_ref.append(0.0407175857557 ) 753 chi2_ref.append(0.0441514158832 ) 754 chi2_ref.append(0.042078718831 ) 755 chi2_ref.append(0.0403856796359 ) 756 757 # Check the calculated chi2 values. 758 for i in range(18): 759 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
760 761
763 """Test the free rotor isotropic cone frame order model in the eigenframe.""" 764 765 # Execute the script. 766 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'iso_cone_free_rotor_eigenframe.py') 767 768 # The reference chi2 values. 769 chi2_ref = [] 770 chi2_ref.append(0.115175446978 ) 771 chi2_ref.append(0.156911214374 ) 772 chi2_ref.append(0.209198723492 ) 773 chi2_ref.append(0.155297079942 ) 774 chi2_ref.append(0.0684780584219) 775 chi2_ref.append(0.0781922435531) 776 chi2_ref.append(0.103777394815 ) 777 chi2_ref.append(0.173740596864 ) 778 chi2_ref.append(0.199867814969 ) 779 chi2_ref.append(0.297587241555 ) 780 chi2_ref.append(0.308539214325 ) 781 chi2_ref.append(0.2543934866 ) 782 chi2_ref.append(0.168985365277 ) 783 chi2_ref.append(0.190780393086 ) 784 chi2_ref.append(0.186482798104 ) 785 chi2_ref.append(0.153839910288 ) 786 chi2_ref.append(0.160863854198 ) 787 chi2_ref.append(0.157029368992 ) 788 789 # Check the calculated chi2 values. 790 for i in range(18): 791 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
792 793
795 """Test the pseudo-ellipse frame order model.""" 796 797 # Execute the script. 798 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'pseudo_ellipse.py') 799 800 # The reference chi2 values. 801 chi2_ref = [] 802 chi2_ref.append(0.0208490007203) 803 chi2_ref.append(0.00958146486076) 804 chi2_ref.append(0.0405488536626) 805 chi2_ref.append(0.0370142845551) 806 chi2_ref.append(0.0204537537661) 807 chi2_ref.append(0.0186122056988) 808 chi2_ref.append(0.0177783016875) 809 chi2_ref.append(0.0311747995923) 810 chi2_ref.append(0.0225532898175) 811 chi2_ref.append(0.0212562065194) 812 chi2_ref.append(0.018939663528) 813 chi2_ref.append(0.0224686987165) 814 chi2_ref.append(0.0201247095045) 815 chi2_ref.append(0.0215343817478) 816 chi2_ref.append(0.016509302331) 817 chi2_ref.append(0.0101988814638) 818 chi2_ref.append(0.00989431182393) 819 chi2_ref.append(0.0123400971524) 820 821 # Check the calculated chi2 values. 822 for i in range(18): 823 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
824 825
827 """Test the free rotor pseudo-elliptic cone frame order model.""" 828 829 # Execute the script. 830 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'pseudo_ellipse_free_rotor.py') 831 832 # The reference chi2 values. 833 chi2_ref = [[], []] 834 chi2_ref[0].append(0.0493245760341) 835 chi2_ref[0].append(0.0322727678945) 836 chi2_ref[0].append(0.0399505883966) 837 chi2_ref[0].append(0.0122539315721) 838 chi2_ref[0].append(0.0263840505182) 839 chi2_ref[0].append(0.0324871952484) 840 chi2_ref[0].append(0.0247369735031) 841 chi2_ref[0].append(0.0231896861006) 842 chi2_ref[0].append(0.0285947802273) 843 chi2_ref[0].append(0.0345542627808) 844 chi2_ref[0].append(0.0289869422491) 845 chi2_ref[0].append(0.0243038470127) 846 chi2_ref[0].append(0.0226686034191) 847 chi2_ref[0].append(0.0215714556045) 848 chi2_ref[0].append(0.0173836730495) 849 chi2_ref[0].append(0.0182530810025) 850 chi2_ref[0].append(0.0212669211551) 851 chi2_ref[0].append(0.0194359136977) 852 853 chi2_ref[1].append(0.0205287391277) 854 chi2_ref[1].append(0.0246463829816) 855 chi2_ref[1].append(0.0590186061204) 856 chi2_ref[1].append(0.0441193978727) 857 chi2_ref[1].append(0.0424299319779) 858 chi2_ref[1].append(0.032589994611) 859 chi2_ref[1].append(0.0523532207508) 860 chi2_ref[1].append(0.0488535879384) 861 chi2_ref[1].append(0.0424063218455) 862 chi2_ref[1].append(0.0553525984677) 863 chi2_ref[1].append(0.0495587286781) 864 chi2_ref[1].append(0.0446625345909) 865 chi2_ref[1].append(0.0470718361239) 866 chi2_ref[1].append(0.0493615476721) 867 chi2_ref[1].append(0.0492208206006) 868 chi2_ref[1].append(0.0429966323771) 869 chi2_ref[1].append(0.0442849187057) 870 chi2_ref[1].append(0.0436756306414) 871 872 # Check the calculated chi2 values. 873 for j in range(2): 874 for i in range(18): 875 self.assertAlmostEqual(ds.chi2[j][i], chi2_ref[j][i])
876 877
879 """Test the pseudo-ellipse frame order model.""" 880 881 # Execute the script. 882 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'pseudo_ellipse_torsionless.py') 883 884 # The reference chi2 values. 885 chi2_ref = [] 886 chi2_ref.append(0.340228489225) 887 chi2_ref.append(0.260847963487) 888 chi2_ref.append(0.250610744982) 889 chi2_ref.append(0.228947619476) 890 chi2_ref.append(0.251996758815) 891 chi2_ref.append(0.238724080817) 892 chi2_ref.append(0.182383602599) 893 chi2_ref.append(0.172830852017) 894 chi2_ref.append(0.159757813028) 895 chi2_ref.append(0.173833227524) 896 chi2_ref.append(0.156168102428) 897 chi2_ref.append(0.171406869781) 898 chi2_ref.append(0.202653838515) 899 chi2_ref.append(0.198919351788) 900 chi2_ref.append(0.169463187543) 901 chi2_ref.append(0.156867571611) 902 chi2_ref.append(0.146139931983) 903 chi2_ref.append(0.13307108095 ) 904 905 # Check the calculated chi2 values. 906 for i in range(18): 907 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
908 909
910 - def fixme_test_model_rotor(self):
911 """Test the rotor frame order model.""" 912 913 # Execute the script. 914 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'rotor.py') 915 916 # The reference chi2 values. 917 chi2_ref = [] 918 chi2_ref.append(0.00410277546707 ) 919 chi2_ref.append(0.00112443204411 ) 920 chi2_ref.append(0.00759196190331 ) 921 chi2_ref.append(0.0956596925692 ) 922 chi2_ref.append(0.223717470059 ) 923 chi2_ref.append(0.136723330704 ) 924 chi2_ref.append(0.0588253217034 ) 925 chi2_ref.append(0.0774693384156 ) 926 chi2_ref.append(0.0855477856492 ) 927 chi2_ref.append(0.198089516589 ) 928 chi2_ref.append(0.227537351664 ) 929 chi2_ref.append(0.202005777915 ) 930 chi2_ref.append(0.192550395736 ) 931 chi2_ref.append(0.126007906472 ) 932 chi2_ref.append(0.124053264662 ) 933 chi2_ref.append(0.18203965973 ) 934 chi2_ref.append(0.191062017006 ) 935 chi2_ref.append(0.13580013153 ) 936 937 # Check the calculated chi2 values. 938 for i in range(18): 939 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
940 941
943 """Test the rotor frame order model in the eigenframe.""" 944 945 # Execute the script. 946 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'model_calcs'+sep+'rotor_eigenframe.py') 947 948 # The reference chi2 values. 949 chi2_ref = [] 950 chi2_ref.append(0.00308229284128) 951 chi2_ref.append(0.0117874014708 ) 952 chi2_ref.append(0.0016108171487 ) 953 chi2_ref.append(0.00532862954549) 954 chi2_ref.append(0.097784753109 ) 955 chi2_ref.append(0.157147901966 ) 956 chi2_ref.append(0.182397051711 ) 957 chi2_ref.append(0.338977916543 ) 958 chi2_ref.append(0.208516866654 ) 959 chi2_ref.append(0.137660115226 ) 960 chi2_ref.append(0.0580816149373 ) 961 chi2_ref.append(0.0476543367845 ) 962 chi2_ref.append(0.0360689584006 ) 963 chi2_ref.append(0.0118024492136 ) 964 chi2_ref.append(0.0824307041139 ) 965 chi2_ref.append(0.0920614159956 ) 966 chi2_ref.append(0.0936464288916 ) 967 chi2_ref.append(0.0823025718101 ) 968 969 # Check the calculated chi2 values. 970 for i in range(18): 971 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
972 973
974 - def fixme_test_opendx_map(self):
975 """Test the mapping of the Euler angle parameters for OpenDx viewing.""" 976 977 # Execute the script. 978 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'opendx_euler_angle_map.py')
979 980
982 """Test the 'rigid' model for unrotated tensors with no motion.""" 983 984 # Execute the script. 985 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'opt_rigid_no_rot.py') 986 987 # Get the debugging message. 988 self.mesg = self.mesg_opt_debug() 989 990 # Test the values. 991 self.assertEqual(cdp.iter, 92, msg=self.mesg) 992 self.assertEqual(cdp.chi2, 0.0, msg=self.mesg) 993 self.assertEqual(cdp.ave_pos_alpha, 0.0, msg=self.mesg) 994 self.assertEqual(cdp.ave_pos_beta, 0.0, msg=self.mesg) 995 self.assertEqual(cdp.ave_pos_gamma, 0.0, msg=self.mesg)
996 997
999 """Test the 'rigid' model for randomly rotated tensors with no motion.""" 1000 1001 # Execute the script. 1002 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'opt_rigid_rand_rot.py') 1003 1004 # Get the debugging message. 1005 self.mesg = self.mesg_opt_debug() 1006 1007 # Test the values. 1008 self.assertAlmostEqual(cdp.chi2, 3.085356555118994e-26, msg=self.mesg) 1009 self.assertAlmostEqual(cdp.ave_pos_alpha, 5.0700283197712777, msg=self.mesg) 1010 self.assertAlmostEqual(cdp.ave_pos_beta, 2.5615753919522359, msg=self.mesg) 1011 self.assertAlmostEqual(cdp.ave_pos_gamma, 0.64895449611163691, msg=self.mesg)
1012 1013
1015 """Parametric restriction of the isotropic cone to the free rotor isotropic cone frame order model.""" 1016 1017 # Execute the script. 1018 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'parametric_restriction'+sep+'iso_cone_to_iso_cone_free_rotor.py') 1019 1020 # The reference chi2 values. 1021 chi2_ref = [] 1022 chi2_ref.append(0.0177292447567 ) 1023 chi2_ref.append(0.0187585146766 ) 1024 chi2_ref.append(0.0440519894909 ) 1025 chi2_ref.append(0.0225223798489 ) 1026 chi2_ref.append(0.0239979046491 ) 1027 chi2_ref.append(0.0161048633259 ) 1028 chi2_ref.append(0.0267310958091 ) 1029 chi2_ref.append(0.0219820914478 ) 1030 chi2_ref.append(0.0194880630576 ) 1031 chi2_ref.append(0.0348242343833 ) 1032 chi2_ref.append(0.0401631858563 ) 1033 chi2_ref.append(0.0327461783858 ) 1034 chi2_ref.append(0.0391082177884 ) 1035 chi2_ref.append(0.0467056691507 ) 1036 chi2_ref.append(0.0407175857557 ) 1037 chi2_ref.append(0.0441514158832 ) 1038 chi2_ref.append(0.042078718831 ) 1039 chi2_ref.append(0.0403856796359 ) 1040 1041 # Check the calculated chi2 values. 1042 for i in range(18): 1043 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
1044 1045
1047 """Parametric restriction of the pseudo-ellipse to the isotropic cone frame order model.""" 1048 1049 # Execute the script. 1050 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'parametric_restriction'+sep+'pseudo_ellipse_to_iso_cone.py') 1051 1052 # The reference chi2 values. 1053 chi2_ref = [] 1054 chi2_ref.append(0.131890484593) 1055 chi2_ref.append(0.0539383731611) 1056 chi2_ref.append(0.0135056297016) 1057 chi2_ref.append(0.0163432453475) 1058 chi2_ref.append(0.0775570503917) 1059 chi2_ref.append(0.0535055367493) 1060 chi2_ref.append(0.0994746492483) 1061 chi2_ref.append(0.174830826376) 1062 chi2_ref.append(0.193036744906) 1063 chi2_ref.append(0.181480810794) 1064 chi2_ref.append(0.215863920824) 1065 chi2_ref.append(0.170088692559) 1066 chi2_ref.append(0.152634493383) 1067 chi2_ref.append(0.168711907446) 1068 chi2_ref.append(0.168405354086) 1069 chi2_ref.append(0.247439860108) 1070 chi2_ref.append(0.143487410228) 1071 chi2_ref.append(0.148318989268) 1072 1073 # Check the calculated chi2 values. 1074 for i in range(18): 1075 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
1076 1077
1079 """Parametric restriction of the pseudo-ellipse to the free rotor isotropic cone frame order model.""" 1080 1081 # Execute the script. 1082 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'parametric_restriction'+sep+'pseudo_ellipse_to_iso_cone_free_rotor.py') 1083 1084 # The reference chi2 values. 1085 chi2_ref = [] 1086 chi2_ref.append(0.0177292447567 ) 1087 chi2_ref.append(0.0187585146766 ) 1088 chi2_ref.append(0.0440519894909 ) 1089 chi2_ref.append(0.0225223798489 ) 1090 chi2_ref.append(0.0239979046491 ) 1091 chi2_ref.append(0.0161048633259 ) 1092 chi2_ref.append(0.0267310958091 ) 1093 chi2_ref.append(0.0219820914478 ) 1094 chi2_ref.append(0.0194880630576 ) 1095 chi2_ref.append(0.0348242343833 ) 1096 chi2_ref.append(0.0401631858563 ) 1097 chi2_ref.append(0.0327461783858 ) 1098 chi2_ref.append(0.0391082177884 ) 1099 chi2_ref.append(0.0467056691507 ) 1100 chi2_ref.append(0.0407175857557 ) 1101 chi2_ref.append(0.0441514158832 ) 1102 chi2_ref.append(0.042078718831 ) 1103 chi2_ref.append(0.0403856796359 ) 1104 1105 # Check the calculated chi2 values. 1106 for i in range(18): 1107 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
1108 1109
1111 """Parametric restriction of the pseudo-ellipse to the isotropic cone frame order model.""" 1112 1113 # Execute the script. 1114 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'parametric_restriction'+sep+'pseudo_ellipse_free_rotor_to_iso_cone.py') 1115 1116 # The reference chi2 values. 1117 chi2_ref = [] 1118 chi2_ref.append(16957.4964577) 1119 chi2_ref.append(15727.13869) 1120 chi2_ref.append(13903.0982799) 1121 chi2_ref.append(11719.9390681) 1122 chi2_ref.append(9488.44060873) 1123 chi2_ref.append(7425.57820642) 1124 chi2_ref.append(5713.6467735) 1125 chi2_ref.append(4393.3273949) 1126 chi2_ref.append(3452.97770868) 1127 chi2_ref.append(2771.90973598) 1128 chi2_ref.append(2247.44444894) 1129 chi2_ref.append(1788.58977266) 1130 chi2_ref.append(1348.38250916) 1131 chi2_ref.append(921.060703519) 1132 chi2_ref.append(539.03217075) 1133 chi2_ref.append(244.341444558) 1134 chi2_ref.append(58.4566671195) 1135 chi2_ref.append(0.148318989268) 1136 1137 # Check the calculated chi2 values. 1138 for i in range(18): 1139 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
1140 1141
1143 """Parametric restriction of the free rotor pseudo-ellipse to the free rotor isotropic cone frame order model.""" 1144 1145 # Execute the script. 1146 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'parametric_restriction'+sep+'pseudo_ellipse_free_rotor_to_iso_cone_free_rotor.py') 1147 1148 # The reference chi2 values. 1149 chi2_ref = [] 1150 chi2_ref.append(0.0177292447567 ) 1151 chi2_ref.append(0.0187585146766 ) 1152 chi2_ref.append(0.0440519894909 ) 1153 chi2_ref.append(0.0225223798489 ) 1154 chi2_ref.append(0.0239979046491 ) 1155 chi2_ref.append(0.0161048633259 ) 1156 chi2_ref.append(0.0267310958091 ) 1157 chi2_ref.append(0.0219820914478 ) 1158 chi2_ref.append(0.0194880630576 ) 1159 chi2_ref.append(0.0348242343833 ) 1160 chi2_ref.append(0.0401631858563 ) 1161 chi2_ref.append(0.0327461783858 ) 1162 chi2_ref.append(0.0391082177884 ) 1163 chi2_ref.append(0.0467056691507 ) 1164 chi2_ref.append(0.0407175857557 ) 1165 chi2_ref.append(0.0441514158832 ) 1166 chi2_ref.append(0.042078718831 ) 1167 chi2_ref.append(0.0403856796359 ) 1168 1169 # Check the calculated chi2 values. 1170 for i in range(18): 1171 self.assertAlmostEqual(ds.chi2[i], chi2_ref[i])
1172 1173
1174 - def fixme_test_pseudo_ellipse(self):
1175 """Test the pseudo-ellipse target function.""" 1176 1177 # Execute the script. 1178 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'pseudo_ellipse.py') 1179 1180 # The reference chi2 value. 1181 chi2 = 0.015865464136741975 1182 1183 # Check the surrounding space. 1184 self.space_probe(ref_chi2=chi2, params=['ave_pos_alpha', 'ave_pos_beta', 'ave_pos_gamma', 'eigen_alpha', 'eigen_beta', 'eigen_gamma', 'cone_theta_x', 'cone_theta_y', 'cone_sigma_max'])
1185 1186
1188 """Test the torsionless pseudo-ellipse target function.""" 1189 1190 # Execute the script. 1191 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'pseudo_ellipse_torsionless.py') 1192 1193 # The reference chi2 value. 1194 chi2 = 2.8393866813588198 1195 1196 # Check the surrounding space. 1197 self.space_probe(ref_chi2=chi2, params=['ave_pos_alpha', 'ave_pos_beta', 'ave_pos_gamma', 'eigen_alpha', 'eigen_beta', 'eigen_gamma', 'cone_theta_x', 'cone_theta_y'])
1198 1199
1201 """Test the free rotor target function for the data from a rigid test molecule.""" 1202 1203 # Set the model. 1204 ds.model = 'free rotor' 1205 1206 # Execute the script. 1207 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1208 1209 # Check the chi2 value. 1210 self.assertAlmostEqual(cdp.chi2, 94337.620142880114)
1211 1212
1214 """Test the iso cone target function for the data from a rigid test molecule.""" 1215 1216 # Set the model. 1217 ds.model = 'iso cone' 1218 1219 # Execute the script. 1220 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1221 1222 # Check the chi2 value. 1223 self.assertAlmostEqual(cdp.chi2, 176.21076150431688, 5)
1224 1225
1227 """Test the iso cone, free rotor target function for the data from a rigid test molecule.""" 1228 1229 # Set the model. 1230 ds.model = 'iso cone, free rotor' 1231 1232 # Execute the script. 1233 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1234 1235 # Check the chi2 value. 1236 self.assertAlmostEqual(cdp.chi2, 101218.55718817962)
1237 1238
1240 """Test the iso cone, torsionless target function for the data from a rigid test molecule.""" 1241 1242 # Set the model. 1243 ds.model = 'iso cone, torsionless' 1244 1245 # Execute the script. 1246 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1247 1248 # Check the chi2 value. 1249 self.assertAlmostEqual(cdp.chi2, 0.60329473329566086, 5)
1250 1251
1253 """Test the rigid target function for the data from a rigid test molecule.""" 1254 1255 # Set the model. 1256 ds.model = 'rigid' 1257 1258 # Execute the script. 1259 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1260 1261 # Check the chi2 value. 1262 self.assertAlmostEqual(cdp.chi2, 0.0113763520134, 5)
1263 1264
1266 """Test the rotor target function for the data from a rigid test molecule.""" 1267 1268 # Set the model. 1269 ds.model = 'rotor' 1270 1271 # Execute the script. 1272 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1273 1274 # Check the chi2 value. 1275 self.assertAlmostEqual(cdp.chi2, 0.125368731409432, 5)
1276 1277
1279 """Test the pseudo-ellipse target function for the data from a rigid test molecule.""" 1280 1281 # Set the model. 1282 ds.model = 'pseudo-ellipse' 1283 1284 # Execute the script. 1285 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1286 1287 # Check the chi2 value. 1288 self.assertAlmostEqual(cdp.chi2, 176.7605562647316, 5)
1289 1290
1292 """Test the pseudo-ellipse, torsionless target function for the data from a rigid test molecule.""" 1293 1294 # Set the model. 1295 ds.model = 'pseudo-ellipse, torsionless' 1296 1297 # Execute the script. 1298 self.script_exec(status.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'frame_order'+sep+'rigid_test.py') 1299 1300 # Check the chi2 value. 1301 self.assertAlmostEqual(cdp.chi2, 2.7993179077540522)
1302