Changes

Jump to navigation Jump to search
Changed the section ordering.
The tutorial will follow the example of the addition of the models already present within relax, pointing to the relevant commits for reference. To see the commit message and the code changes in colour, click on the links found within these commit messages. The models in the reference commits sections are in reverse chronological order and therefore the top links will be the most recent and relevant.
 
== The test suite ==
 
This step is normally performed first. This is the most important part that makes sure that the code not only works now, but will continue working for the entire lifetime of the relax project.
 
The idea is that real or synthetic data, for example as Sparky peak lists, is obtained or created for the model and added to the test suite directory test_suite/shared_data/dispersion/. This is then used in a system test to check that the code in relax can reproduce the data.
 
=== Synthetic data ===
 
It is very important that the code added to the relax library is not used to create the synthetic data! This type of data is useful for checking that the known solution can be found by relax. The only issue is that the same mistake can be made in both relax and the script used to generated the synthetic data, in which case the buggy relax code will never be detected. To mitigate against this, testing against other software is recommended.
 
=== Measured data ===
 
An alternative is to use real measured relaxation dispersion data. This data should be added as peak lists containing peak intensities to test_suite/shared_data/dispersion/. As the real solution cannot be known a priori, the results from relax must be compared to results obtained from another software program (possibly directly from a publication). The steps required for using such data are:
 
* Create a new directory name for the test data.
 
* Add the original full peak lists to the directory.
 
* Make truncated versions of these files (ending in _trunc.*) and add these as well. These will be used for the system test instead of the full data to allow the test to finish in a reasonable amount of time.
 
* Add a script which performs the full analysis in relax for the model. Also a script which performs the analysis using only the R2eff model. See the test_suite/shared_data/dispersion/Hansen/*.py scripts for reference - these scripts should be copied to your data directory and modified. Once the scripts are functional, they can be copied and modified for the truncated data.
 
* Copy the full analysis script to test_suite/system_tests/scripts/relax_disp/ with an appropriate name. This can then be used in a new system test. Better still, the final save file from the r2eff_calc.py script for the truncated data can be used to start the script. This is again to save a lot of computation time in the test. See the test_tp02_data_to_ns_r1rho_2site() system test in the test_suite/system_tests/relax_disp.py file for a template.
 
If you are not a relax developer, a [https://gna.org/projects/relax support request] can be [https://gna.org/support/?func=additem&group=relax submitted]. You can attach files and add comments to that request for a relax developer to make the changes for you.
 
=== Reference commits ===
 
* The [[NS R1rho 2-site]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/18485 r20729] [http://article.gmane.org/gmane.science.nmr.relax.scm/18486 r20739] [http://article.gmane.org/gmane.science.nmr.relax.scm/18488 r20732]
* The [[TP02]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/18256 r20500] [http://article.gmane.org/gmane.science.nmr.relax.scm/18293 r20538] [http://article.gmane.org/gmane.science.nmr.relax.scm/18295 r20541] [http://article.gmane.org/gmane.science.nmr.relax.scm/18297 r20537]
* The [[M61]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/17647 r19891] [http://article.gmane.org/gmane.science.nmr.relax.scm/17648 r19892] [http://article.gmane.org/gmane.science.nmr.relax.scm/17649 r19893] [http://article.gmane.org/gmane.science.nmr.relax.scm/17662 r19906] [http://article.gmane.org/gmane.science.nmr.relax.scm/17663 r19907]
 
== Adding the model to the list ==
* The [[M61]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/17622 r19866]
* The [[No Rex]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/17592 r19836]
 
== The test suite ==
 
This step is normally performed first. This is the most important part that makes sure that the code not only works now, but will continue working for the entire lifetime of the relax project.
 
The idea is that real or synthetic data, for example as Sparky peak lists, is obtained or created for the model and added to the test suite directory test_suite/shared_data/dispersion/. This is then used in a system test to check that the code in relax can reproduce the data.
 
=== Synthetic data ===
 
It is very important that the code added to the relax library is not used to create the synthetic data! This type of data is useful for checking that the known solution can be found by relax. The only issue is that the same mistake can be made in both relax and the script used to generated the synthetic data, in which case the buggy relax code will never be detected. To mitigate against this, testing against other software is recommended.
 
=== Measured data ===
 
An alternative is to use real measured relaxation dispersion data. This data should be added as peak lists containing peak intensities to test_suite/shared_data/dispersion/. As the real solution cannot be known a priori, the results from relax must be compared to results obtained from another software program (possibly directly from a publication). The steps required for using such data are:
 
* Create a new directory name for the test data.
 
* Add the original full peak lists to the directory.
 
* Make truncated versions of these files (ending in _trunc.*) and add these as well. These will be used for the system test instead of the full data to allow the test to finish in a reasonable amount of time.
 
* Add a script which performs the full analysis in relax for the model. Also a script which performs the analysis using only the R2eff model. See the test_suite/shared_data/dispersion/Hansen/*.py scripts for reference - these scripts should be copied to your data directory and modified. Once the scripts are functional, they can be copied and modified for the truncated data.
 
* Copy the full analysis script to test_suite/system_tests/scripts/relax_disp/ with an appropriate name. This can then be used in a new system test. Better still, the final save file from the r2eff_calc.py script for the truncated data can be used to start the script. This is again to save a lot of computation time in the test. See the test_tp02_data_to_ns_r1rho_2site() system test in the test_suite/system_tests/relax_disp.py file for a template.
 
If you are not a relax developer, a [https://gna.org/projects/relax support request] can be [https://gna.org/support/?func=additem&group=relax submitted]. You can attach files and add comments to that request for a relax developer to make the changes for you.
 
=== Reference commits ===
 
* The [[NS R1rho 2-site]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/18485 r20729] [http://article.gmane.org/gmane.science.nmr.relax.scm/18486 r20739] [http://article.gmane.org/gmane.science.nmr.relax.scm/18488 r20732]
* The [[TP02]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/18256 r20500] [http://article.gmane.org/gmane.science.nmr.relax.scm/18293 r20538] [http://article.gmane.org/gmane.science.nmr.relax.scm/18295 r20541] [http://article.gmane.org/gmane.science.nmr.relax.scm/18297 r20537]
* The [[M61]] model at [http://article.gmane.org/gmane.science.nmr.relax.scm/17647 r19891] [http://article.gmane.org/gmane.science.nmr.relax.scm/17648 r19892] [http://article.gmane.org/gmane.science.nmr.relax.scm/17649 r19893] [http://article.gmane.org/gmane.science.nmr.relax.scm/17662 r19906] [http://article.gmane.org/gmane.science.nmr.relax.scm/17663 r19907]
== Comparing to other software ==
Trusted, Bureaucrats
4,228

edits

Navigation menu