Author: bugman Date: Thu Sep 25 18:30:20 2008 New Revision: 7309 URL: http://svn.gna.org/viewcvs/relax?rev=7309&view=rev Log: Merged revisions 6837,6839,6841-6857,6859-6878,6880,6882-6938,6941-6945,6952,6957-6992,7021,7029,7076-7077,7080-7093,7106-7121,7130-7146,7148-7189,7191-7208,7226-7227,7230-7231,7307 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/rdc_analysis ........ r6837 | bugman | 2008-07-08 16:23:35 +0200 (Tue, 08 Jul 2008) | 3 lines Created the framework for a user function class for handling RDCs (by copying the relax_data code). ........ r6839 | bugman | 2008-07-08 20:30:14 +0200 (Tue, 08 Jul 2008) | 3 lines Removed a test for the model setup in the set_non_spin_params() method. ........ r6841 | bugman | 2008-07-08 21:02:19 +0200 (Tue, 08 Jul 2008) | 3 lines Fix for the return_data_name() method when no match occurs and the index flag is True. ........ r6842 | bugman | 2008-07-08 21:03:21 +0200 (Tue, 08 Jul 2008) | 5 lines Added a number of new parameters to the return_data_name() method. This include the bond length, and heteronucleus and proton types. ........ r6843 | bugman | 2008-07-08 21:12:31 +0200 (Tue, 08 Jul 2008) | 3 lines Fix for the return_data_name() method when no match occurs and the index flag is True. ........ r6844 | bugman | 2008-07-08 21:17:05 +0200 (Tue, 08 Jul 2008) | 3 lines Removed some debugging code. ........ r6845 | bugman | 2008-07-08 21:24:29 +0200 (Tue, 08 Jul 2008) | 3 lines Converted the rdc.read() user function from the relax_data.read() code. ........ r6846 | bugman | 2008-07-08 21:25:41 +0200 (Tue, 08 Jul 2008) | 3 lines Converted all instances of 'ri_label' to 'id'. ........ r6847 | bugman | 2008-07-08 21:26:26 +0200 (Tue, 08 Jul 2008) | 3 lines Converted all instances of 'relax_data' to 'rdc'. ........ r6848 | bugman | 2008-07-08 21:36:00 +0200 (Tue, 08 Jul 2008) | 3 lines Converted all of the rdc user functions from the relax_data code. ........ r6849 | bugman | 2008-07-08 21:37:46 +0200 (Tue, 08 Jul 2008) | 3 lines Created a generic_fns rdc module by copying the relax_data module. ........ r6850 | bugman | 2008-07-08 21:54:07 +0200 (Tue, 08 Jul 2008) | 3 lines Created 2 new error classes, RelaxNoRDCError and RelaxRDCError. ........ r6851 | bugman | 2008-07-08 22:03:09 +0200 (Tue, 08 Jul 2008) | 3 lines Converted the read() function from the relax_data code. ........ r6852 | bugman | 2008-07-08 22:20:28 +0200 (Tue, 08 Jul 2008) | 3 lines Made the error column optional in the loading of RDCs. ........ r6853 | bugman | 2008-07-08 22:25:44 +0200 (Tue, 08 Jul 2008) | 3 lines Fixes for the read() function to allow the error column to be missing. ........ r6854 | bugman | 2008-07-09 10:59:43 +0200 (Wed, 09 Jul 2008) | 8 lines Split up the n_state_model.model() user function. The new user functions are: n_state_model.number_of_states() n_state_model.ref_domain() n_state_model.setup_model() ........ r6855 | bugman | 2008-07-09 11:02:23 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed the unit tests broken by the split up of n_state_model.model(). ........ r6856 | bugman | 2008-07-09 11:04:15 +0200 (Wed, 09 Jul 2008) | 3 lines Wrote the model arg unit test for the n_state_model.setup_model() user function. ........ r6857 | bugman | 2008-07-09 11:06:51 +0200 (Wed, 09 Jul 2008) | 3 lines Fixes for the N-state model system test. ........ r6859 | bugman | 2008-07-09 11:18:53 +0200 (Wed, 09 Jul 2008) | 3 lines Split up the model_setup() method into number_of_states(), ref_domain(), and setup_model(). ........ r6860 | bugman | 2008-07-09 11:20:29 +0200 (Wed, 09 Jul 2008) | 3 lines Created the new error class RelaxNoModelError. ........ r6861 | bugman | 2008-07-09 11:21:18 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for the n_state_model.select_model() user function. ........ r6862 | bugman | 2008-07-09 11:23:36 +0200 (Wed, 09 Jul 2008) | 3 lines Docstring and print out fixes for the n_state_model.select_model() user function. ........ r6863 | bugman | 2008-07-09 11:26:09 +0200 (Wed, 09 Jul 2008) | 5 lines Renamed the n_state_model.setup_model() user function to n_state_model.select_model(). This is to match the convention of the other analyses. ........ r6864 | bugman | 2008-07-09 11:26:58 +0200 (Wed, 09 Jul 2008) | 3 lines System test fix for the renaming of n_state_model.setup_model(). ........ r6865 | bugman | 2008-07-09 11:29:10 +0200 (Wed, 09 Jul 2008) | 3 lines Added some error checking for the validity of the selected model type. ........ r6866 | bugman | 2008-07-09 11:41:10 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed the model checking in the minimise() method. ........ r6867 | bugman | 2008-07-09 11:51:05 +0200 (Wed, 09 Jul 2008) | 3 lines Created the setup_model() method so that the model parameters can be set up by numerous methods. ........ r6868 | bugman | 2008-07-09 11:52:45 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for the model arg of the n_state_model.select_model() user function. ........ r6869 | bugman | 2008-07-09 13:29:21 +0200 (Wed, 09 Jul 2008) | 3 lines Spun out some of the minimisation code into the minimise_setup_tensors() method. ........ r6870 | bugman | 2008-07-09 13:33:29 +0200 (Wed, 09 Jul 2008) | 3 lines Renamed setup_model() to the private __update_model() method. ........ r6871 | bugman | 2008-07-09 13:34:46 +0200 (Wed, 09 Jul 2008) | 3 lines Made a call to __update_model() from select_model(). ........ r6872 | bugman | 2008-07-09 13:37:45 +0200 (Wed, 09 Jul 2008) | 3 lines Made the __update_model() method less fatal. ........ r6873 | bugman | 2008-07-09 13:38:55 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed the call to __update_model() from number_of_states(). ........ r6874 | bugman | 2008-07-09 13:39:18 +0200 (Wed, 09 Jul 2008) | 3 lines Added a call to __update_model() from ref_domain(). ........ r6875 | bugman | 2008-07-09 13:40:26 +0200 (Wed, 09 Jul 2008) | 3 lines Added an alias to the current data pipe in minimise_setup_tensors(). ........ r6876 | bugman | 2008-07-09 13:43:57 +0200 (Wed, 09 Jul 2008) | 3 lines Passed the param_vector into minimise_setup_tensors() and fixed the variable of the returned data. ........ r6877 | bugman | 2008-07-09 13:53:23 +0200 (Wed, 09 Jul 2008) | 3 lines Fixes for the __update_model() to prevent the model data being overwritten or too many params added. ........ r6878 | bugman | 2008-07-09 14:40:41 +0200 (Wed, 09 Jul 2008) | 3 lines Created the minimise_setup_rdcs() method. ........ r6880 | bugman | 2008-07-09 15:05:46 +0200 (Wed, 09 Jul 2008) | 3 lines Modified minimise_setup_rdcs() to throw a warning if RDCs exist but XH bond vectors are missing. ........ r6882 | bugman | 2008-07-09 15:11:47 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for minimise_setup_rdcs(). The spin id is now generated for the warning. ........ r6883 | bugman | 2008-07-09 15:18:36 +0200 (Wed, 09 Jul 2008) | 3 lines The N_state_opt class now accepts the model, rdcs, and xh_vect arguments. ........ r6884 | bugman | 2008-07-09 15:35:23 +0200 (Wed, 09 Jul 2008) | 3 lines Modified the N_state_opt class to handle both alignment tensor and RDC optimisation. ........ r6885 | bugman | 2008-07-09 15:40:54 +0200 (Wed, 09 Jul 2008) | 6 lines Changed the N_state_opt functions to be model dependent. The func_rdcs() method is now func_population(), and the func_tensors() method is now func_2domain(). ........ r6886 | bugman | 2008-07-09 15:42:16 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for the N_state_opt class set up for the tensor optimisation. ........ r6887 | bugman | 2008-07-09 15:49:39 +0200 (Wed, 09 Jul 2008) | 3 lines Created an empty module to dump RDC related computational functions into. ........ r6888 | bugman | 2008-07-09 16:13:45 +0200 (Wed, 09 Jul 2008) | 6 lines Created the average_rdc_5D() function. This calculates the average RDC for an ensemble set of XH bond vectors, using the 5D alignment tensor notation. ........ r6889 | bugman | 2008-07-09 16:19:13 +0200 (Wed, 09 Jul 2008) | 6 lines Created the average_rdc_tensor() function. This is equivalent to the average_rdc_5D() function but takes the full tensor in numpy matrix form rather than the elements of the 5D vector. ........ r6890 | bugman | 2008-07-09 16:20:01 +0200 (Wed, 09 Jul 2008) | 3 lines Docstring fix for average_rdc_5D(). The XH vectors must be unit vectors! ........ r6891 | bugman | 2008-07-09 16:25:57 +0200 (Wed, 09 Jul 2008) | 3 lines Created the to_tensor() function to convert from 5D vector to 3D matrix. ........ r6892 | bugman | 2008-07-09 16:28:49 +0200 (Wed, 09 Jul 2008) | 3 lines Some fixes for the to_tensor() function. The elements Ayx, Azx, and Azy were being referenced! ........ r6893 | bugman | 2008-07-09 16:36:25 +0200 (Wed, 09 Jul 2008) | 3 lines Created the to_5D() function for converting from matrix form to 5D vector form. ........ r6894 | bugman | 2008-07-09 16:39:11 +0200 (Wed, 09 Jul 2008) | 3 lines Modified the to_tensor() to be more efficient by working only with numpy arrays. ........ r6895 | bugman | 2008-07-09 16:42:14 +0200 (Wed, 09 Jul 2008) | 3 lines Fixes for the to_tensor() function. The tensor was completely wrong. ........ r6896 | bugman | 2008-07-09 16:49:43 +0200 (Wed, 09 Jul 2008) | 3 lines Created maxA() for finding the maximal alignment or the Azz component in the alignment frame. ........ r6897 | bugman | 2008-07-09 16:50:31 +0200 (Wed, 09 Jul 2008) | 3 lines Imported some of the RDC functions. ........ r6898 | bugman | 2008-07-09 16:54:09 +0200 (Wed, 09 Jul 2008) | 3 lines Renamed the invalid variable name 5D_vector to vector_5D. ........ r6899 | bugman | 2008-07-09 17:28:28 +0200 (Wed, 09 Jul 2008) | 3 lines Implemented the core of the func_population() method. ........ r6900 | bugman | 2008-07-09 17:35:01 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for the average_rdc_5D() function. The unit XH bond vector indecies were still in Mathematica format. ........ r6901 | bugman | 2008-07-09 17:40:12 +0200 (Wed, 09 Jul 2008) | 6 lines Fix for the func_population() method. The RDC errors are now set to 1.0 if no errors are supplied, converting the chi2 value to a SSE value. ........ r6902 | bugman | 2008-07-09 18:03:07 +0200 (Wed, 09 Jul 2008) | 5 lines Fixes for the __update_model() method. The probabilities and Euler angle parameter arrays are only created for the relevant N-state model. ........ r6903 | bugman | 2008-07-09 18:09:14 +0200 (Wed, 09 Jul 2008) | 3 lines Spun out some of the minimise() code to create the __determine_data_type() method. ........ r6904 | bugman | 2008-07-09 18:22:10 +0200 (Wed, 09 Jul 2008) | 3 lines Updated the assemble_param_vector() method to return the correct parameter vector. ........ r6905 | bugman | 2008-07-09 18:23:04 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for a missing cdp alias. ........ r6906 | bugman | 2008-07-09 18:26:09 +0200 (Wed, 09 Jul 2008) | 5 lines Complete change of the __determine_data_type() method. The alignment tensors should be present when RDCs are loaded - they are part of the optimised model! ........ r6907 | bugman | 2008-07-09 18:33:20 +0200 (Wed, 09 Jul 2008) | 5 lines Modified the __update_model() method to create empty alignment tensors as necessary. This is for the RDC based analysis were the tensors are optimised. ........ r6908 | bugman | 2008-07-09 18:35:38 +0200 (Wed, 09 Jul 2008) | 5 lines Fix for the __determine_data_type() method. The flags were not correctly checked. ........ r6909 | bugman | 2008-07-09 18:41:40 +0200 (Wed, 09 Jul 2008) | 3 lines Created the tensor_5D automatically generated object to AlignTensorData. ........ r6910 | bugman | 2008-07-09 18:43:34 +0200 (Wed, 09 Jul 2008) | 3 lines Fix for the addition of alignment tensor parameters in assemble_param_vector(). ........ r6911 | bugman | 2008-07-09 18:55:11 +0200 (Wed, 09 Jul 2008) | 3 lines Fixes for the func_population() method. ........ r6912 | bugman | 2008-07-09 19:04:20 +0200 (Wed, 09 Jul 2008) | 6 lines Changed the initialisation of the N_state_opt class. The rdcs, rdc_errors, and xh_vect args are now all expected to be numpy matricies. The rdcs and rdc_errors matricies have also been transposed! ........ r6913 | bugman | 2008-07-09 19:13:45 +0200 (Wed, 09 Jul 2008) | 3 lines Converted the RDC and unit vector lists in minimise_setup_rdcs() to numpy matrices. ........ r6914 | bugman | 2008-07-09 19:15:11 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed the incorrect testing for the presence of RDC errors. ........ r6915 | bugman | 2008-07-09 19:15:33 +0200 (Wed, 09 Jul 2008) | 3 lines Missing import. ........ r6916 | bugman | 2008-07-09 19:16:32 +0200 (Wed, 09 Jul 2008) | 3 lines Initialised the back calculated RDC array. ........ r6917 | bugman | 2008-07-09 19:18:04 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed all the broken references to self.rdcs_back_calc. ........ r6918 | bugman | 2008-07-09 19:21:47 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed the calculation of the total number of spins and alignments. ........ r6919 | bugman | 2008-07-09 19:23:48 +0200 (Wed, 09 Jul 2008) | 3 lines Fixed the setting up of RDC errors when missing. These should be 1.0, not 0.0! ........ r6920 | bugman | 2008-07-09 19:35:48 +0200 (Wed, 09 Jul 2008) | 5 lines Fixed the setting up of self.rdc_errors when no errors are present. Retard, 1.0 times another matrix does not make a matrix of ones! ........ r6921 | bugman | 2008-07-09 19:40:11 +0200 (Wed, 09 Jul 2008) | 3 lines The population weights are now taken into account in the func_population() target function. ........ r6922 | bugman | 2008-07-09 19:40:53 +0200 (Wed, 09 Jul 2008) | 3 lines Added some more comments. ........ r6923 | bugman | 2008-07-09 19:41:54 +0200 (Wed, 09 Jul 2008) | 3 lines The weights are passed into average_rdc_5D() as a keyword to make them optional. ........ r6924 | bugman | 2008-07-09 19:44:35 +0200 (Wed, 09 Jul 2008) | 3 lines Converted average_rdc_5D() to expect a numpy array for the 5D tensor. ........ r6925 | bugman | 2008-07-09 19:45:05 +0200 (Wed, 09 Jul 2008) | 3 lines The 5D tensor is passed directly into average_rdc_5D() from func_population(). ........ r6926 | bugman | 2008-07-09 19:52:22 +0200 (Wed, 09 Jul 2008) | 3 lines Added weights to the average_rdc_5D() function. ........ r6927 | bugman | 2008-07-09 19:53:41 +0200 (Wed, 09 Jul 2008) | 3 lines Added weights to the average_rdc_tensor() function. ........ r6928 | bugman | 2008-07-09 19:54:24 +0200 (Wed, 09 Jul 2008) | 3 lines Docstring fixes. ........ r6929 | bugman | 2008-07-10 09:43:16 +0200 (Thu, 10 Jul 2008) | 3 lines Redesigned the disassemble_param_vector() method for the multiple N-state model types. ........ r6930 | bugman | 2008-07-10 10:06:29 +0200 (Thu, 10 Jul 2008) | 3 lines Updated the param_num() method to take the various models into account. ........ r6931 | bugman | 2008-07-10 10:54:29 +0200 (Thu, 10 Jul 2008) | 3 lines Fix for the counting of header lines. The residue or spin number need not be supplied. ........ r6932 | bugman | 2008-07-10 13:26:51 +0200 (Thu, 10 Jul 2008) | 3 lines Wrote the __assemble_scaling_matrix() method for creating a scaling matrix for the N-state model. ........ r6933 | bugman | 2008-07-10 13:30:26 +0200 (Thu, 10 Jul 2008) | 3 lines Made diagonal scaling optional. ........ r6934 | bugman | 2008-07-10 13:42:41 +0200 (Thu, 10 Jul 2008) | 3 lines Made some more use of the scaling matrix. ........ r6935 | bugman | 2008-07-10 13:43:36 +0200 (Thu, 10 Jul 2008) | 3 lines Unscaled the parameter vector after optimisation. ........ r6936 | bugman | 2008-07-10 13:44:25 +0200 (Thu, 10 Jul 2008) | 3 lines Missing import fix. ........ r6937 | bugman | 2008-07-10 13:51:21 +0200 (Thu, 10 Jul 2008) | 3 lines The minimisation code now uses the scaling matrix. ........ r6938 | bugman | 2008-07-10 14:46:35 +0200 (Thu, 10 Jul 2008) | 3 lines Inverted the population scaling factor in __assemble_scaling_matrix(). ........ r6941 | bugman | 2008-07-23 11:27:38 +0200 (Wed, 23 Jul 2008) | 3 lines Started to add the framework for the addition of gradients and Hessians. ........ r6942 | bugman | 2008-07-23 11:47:41 +0200 (Wed, 23 Jul 2008) | 3 lines Split the rdc module in half, shifting the alignment tensor components into their own module. ........ r6943 | bugman | 2008-07-23 11:48:36 +0200 (Wed, 23 Jul 2008) | 3 lines Import fixes. ........ r6944 | bugman | 2008-07-23 13:33:22 +0200 (Wed, 23 Jul 2008) | 3 lines Wrote functions for all the alignment tensor gradients. ........ r6945 | bugman | 2008-07-23 13:36:31 +0200 (Wed, 23 Jul 2008) | 3 lines Fixes for the alignment tensor gradient function code. ........ r6952 | bugman | 2008-07-24 14:49:13 +0200 (Thu, 24 Jul 2008) | 3 lines A lot of modifications to the population N-state model optimisation code. ........ r6957 | bugman | 2008-07-24 15:22:13 +0200 (Thu, 24 Jul 2008) | 3 lines Spelling fix for the word 'indices'. ........ r6958 | bugman | 2008-07-24 16:54:46 +0200 (Thu, 24 Jul 2008) | 3 lines Fixed the setting up of optimisation of the population N-state model. ........ r6959 | bugman | 2008-07-24 16:55:09 +0200 (Thu, 24 Jul 2008) | 3 lines Fixed the call to to_tensor(). ........ r6960 | bugman | 2008-07-24 17:00:43 +0200 (Thu, 24 Jul 2008) | 3 lines Fixes for the func_population() target function. ........ r6961 | bugman | 2008-07-24 17:02:21 +0200 (Thu, 24 Jul 2008) | 3 lines Fixes for the setup of the N-state model optimisation code. ........ r6962 | bugman | 2008-07-24 17:03:06 +0200 (Thu, 24 Jul 2008) | 3 lines Missing import. ........ r6963 | bugman | 2008-07-24 17:07:34 +0200 (Thu, 24 Jul 2008) | 3 lines Fixed a call to the non-existant chi2_element() function (should be to chi2()). ........ r6964 | bugman | 2008-07-24 17:07:59 +0200 (Thu, 24 Jul 2008) | 3 lines Fixed some index names. ........ r6965 | bugman | 2008-07-24 17:31:20 +0200 (Thu, 24 Jul 2008) | 3 lines Large expansion of the dfunc_population() docstring. ........ r6966 | bugman | 2008-07-25 10:04:15 +0200 (Fri, 25 Jul 2008) | 3 lines More rewriting of the population N-state model optimisation code. ........ r6967 | bugman | 2008-07-25 11:19:15 +0200 (Fri, 25 Jul 2008) | 5 lines Wrote the average_rdc_tensor_dDij_dAmn() function. This calculates the ensemble averaged RDC gradient element for the Amn partial derivative. ........ r6968 | bugman | 2008-07-25 11:21:34 +0200 (Fri, 25 Jul 2008) | 3 lines Fixed the N-state model code to use the renamed averaged RDC functions. ........ r6969 | bugman | 2008-07-25 11:27:44 +0200 (Fri, 25 Jul 2008) | 3 lines Added a missing import. ........ r6970 | bugman | 2008-07-25 11:47:49 +0200 (Fri, 25 Jul 2008) | 9 lines Wrote the dipolar_constant() function for calculating the dipolar constant. The constant is defined as: mu0 gI.gS.h_bar d = - --- ----------- 4pi r**3 ........ r6971 | bugman | 2008-07-25 11:49:58 +0200 (Fri, 25 Jul 2008) | 3 lines Pre-calculated the dipolar constants prior to optimisation. ........ r6972 | bugman | 2008-07-25 11:51:42 +0200 (Fri, 25 Jul 2008) | 3 lines Updated a comment describing why the dipolar constant is multiplied by 3/(2pi). ........ r6973 | bugman | 2008-07-25 12:03:53 +0200 (Fri, 25 Jul 2008) | 3 lines [... 738 lines stripped ...]