Author: bugman Date: Tue Apr 27 18:03:40 2010 New Revision: 11156 URL: http://svn.gna.org/viewcvs/relax?rev=11156&view=rev Log: Forked the test_lactose_n_state() system test for both the 'population' and 'fixed' models. The 2 new system tests are test_lactose_n_state_fixed() and test_lactose_n_state_population(). Modified: 1.3/test_suite/system_tests/n_state_model.py 1.3/test_suite/system_tests/scripts/n_state_model/lactose_n_state.py Modified: 1.3/test_suite/system_tests/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/n_state_model.py?rev=11156&r1=11155&r2=11156&view=diff ============================================================================== --- 1.3/test_suite/system_tests/n_state_model.py (original) +++ 1.3/test_suite/system_tests/n_state_model.py Tue Apr 27 18:03:40 2010 @@ -220,8 +220,21 @@ self.assertAlmostEqual(cdp.q_rdc, 0.078460000413257444) # Pales (Q Saupe): 0.079 - def test_lactose_n_state(self): + def test_lactose_n_state_fixed(self): """The 4-state model analysis of lactose using RDCs and PCSs.""" + + # The model. + ds.model = 'fixed' + + # Execute the script. + self.interpreter.run(script_file=__main__.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'lactose_n_state.py') + + + def test_lactose_n_state_population(self): + """The 4-state model analysis of lactose using RDCs and PCSs.""" + + # The model. + ds.model = 'population' # Execute the script. self.interpreter.run(script_file=__main__.install_path + sep+'test_suite'+sep+'system_tests'+sep+'scripts'+sep+'n_state_model'+sep+'lactose_n_state.py') Modified: 1.3/test_suite/system_tests/scripts/n_state_model/lactose_n_state.py URL: http://svn.gna.org/viewcvs/relax/1.3/test_suite/system_tests/scripts/n_state_model/lactose_n_state.py?rev=11156&r1=11155&r2=11156&view=diff ============================================================================== --- 1.3/test_suite/system_tests/scripts/n_state_model/lactose_n_state.py (original) +++ 1.3/test_suite/system_tests/scripts/n_state_model/lactose_n_state.py Tue Apr 27 18:03:40 2010 @@ -16,6 +16,10 @@ # Create the data pipe. pipe.create('lactose', 'N-state') + +# The population model for free operation of this script. +if not hasattr(ds, 'model'): + ds.model = 'population' # Load the structures. NUM_STR = 4 @@ -79,11 +83,12 @@ pcs.centre(atom_id=':4@C1', pipe='tag') # Set up the model. -n_state_model.select_model(model='population') +n_state_model.select_model(model=ds.model) # Set to equal probabilities. -for j in xrange(NUM_STR): - value.set(1.0/NUM_STR, 'p'+repr(j)) +if ds.model == 'population': + for j in xrange(NUM_STR): + value.set(1.0/NUM_STR, 'p'+repr(j)) # Minimisation. minimise('bfgs', constraints=True, max_iter=5)