Sorry, I completely missed this set of patches! :S I will try to apply as may as possible - manually now - and report what happens! Ok, here are the patches and results: set_imported_settings_patch: (not applied) This is not necessary as these values will come through the GUI via the relax data store. remove_relaxrunok_patch: (not applied) This code was eliminated when I switched to using the auto_analyses.dauvergne_protocol module for performing the automatic model-free calculation. redirect_patch: (applied) I have copied and pasted this class at the bottom of gui_bieri.execution.calc_modelfree. Classes come after functions in the same module (in most cases). I also converted the comment above your class into the class docstring! more_imput_start_modelfree: (applied) model_selection_mode_patch: (not applied) There is nothing wrong with the code. But in my protocol, that was encoded into full_analysis.py and now the automatic model-free frame, BIC model selection cannot be used. The user should not be allowed to change this. In the custom mode where they can design or reimplement a different protocol, they can. But in the search for the minimum simultaneously within one space or universe (optimisation) and across trillions of universes, AIC or equivalents must be used. import_wx_math: (applied) This was not cleanly applied though. I alphabetically ordered the imports. import_global_settings: (applied, I think?!?) I applied this manually to the start of the start_model_free() function. Note that most of this will change when switched to the relax data store. Also, please do not use the 'global' statement. For things like the progress meter, you could pass in a progress object (a class instance) that the function modifies. This object could hold a lot of information - user function names that could be displayed, the model-free model currently optimised, etc. feedback_after_calc_patch: (applied) What about showing something in the progress meter instead? This could be communicated by the progress object described above. create_empty_unresolved_file: (applied) The indentation was incorrect!! This should be avoided. I've also converted the comment to sentence form. As a general design, you do not need to physically create this file. You can create a pseudo file-like object (relax_io.DummyFileObject) and pass this into the analysis instead of a file name. convert_string_to_float: (applied) This was stuck at the start of gui_bieri.execution.calc_modelfree. The following changes were made though: converttofloat was renamed to convert_to_float to match relax' standards; ''' was replaced with """ (again a relax standard); the single space at the start of the docstring header line was removed and a full stop added (both are needed to meet the standard); the docstring expanded; comments were added and the lines with '######################' removed. Another point is that this may introduce a bug. Maybe you could try: try: float(string) except ValueError: # The rest of the code. I would also suggest you use float for both sides (both entries[0] and entries[1]) and then multiply them together. The fixed 'b[2:len(b)]' notation is dangerous and bug prone. Try the string '1.2345 * 1e-18', or maybe even '1.2345*10^18' as some people might write it. changed_parameter_file_settings: (partly applied) The RELAX_DATA variable was the only part changed. The SEQ_DATA change was whitespace at the end, which should not be there anyway (note that there is trailing whitespace in most of these patches that should not be there). The other changes are not of use as the code was eliminated and replaced with a call to dAuvergne_protocol. Ok, that was an effort. Now for the next set of patches. Hopefully these apply cleanly. Cheers, Edward 2010/1/22 Michael Bieri <NO-REPLY.INVALID-ADDRESS@xxxxxxx>:
Follow-up Comment #31, task #6847 (project relax): Patches for the calc_modelfree.py script: changed_parameter_file_settings: This patch fixed assignment of columns of parameter file. Note, this is only for testing the OMP data (https://gna.org/task/?6847#comment1). In future, this can be set in a Settings Window (not included yet). ____________________________________________ convert_string_to_float: An additional function is added, that converts a string (such as 'xxx * e-1') into a float. This function is used to read in bond length or csa values set in settings window as float values. (Docstrings will be added later) _____________________________________________ create_empty_unresolved_file: If no residues are selected to get excluded from analysis (modelfree), en empty file will be created. ----------------------------------------------- feedback_after_calc: Successful relax calculation will be displaid in relaxGUI Log Window and not as a pop-up. replaced: relax_run_ok() to print '' -------------------------------------------- import_global_settings: Values set in the Settings Window are now imported into model-free calculation. Settings are: Bond length, CSA value, Proton (specify label of proton in PDB file), minimisation algorithm, size of grid inc. In addition, system output is redirected to Log Window -------------------------------------------- import_wx_math: Python modules wx and math are imported inti calc_modelfree.py. The wx module is required to update the Log Window and the math to make exponential calculations. ------------------------------------------ model_selection_mode: The mode of model selection (AIC or BIC) is set during the calculation of model-free models. ---------------------------------------------- more_imput_start_modelfree: Another variable is imported in start_model_free definition to update Log Window. Replace: def start_model_free(self, model, automatic, global_setting, file_setting, sequencefile): to def start_model_free(self, model, automatic, global_setting, file_setting, sequencefile, logpanel): ------------------------------------------------ redirect_patch: A class to redirect system output to log window is included into model-free calculation. New Class: RedirectText(object) see http://svn.gna.org/viewcvs/relax?rev=10264&view=rev for NOE and http://svn.gna.org/viewcvs/relax?rev=10263&view=rev for Rx calculation. ------------------------------------------------ remove_reluxrunok: The module relax_run_ok is not required anymore, as feedback of successful calculation is in Log Window. See previous patch (feedback_after_calc_patch) ------------------------------------------------ set_import_patch: Imported values from global settings window are set for the calculation. -------------------------------------------------- Cheers and have a nice weeken (file #7750) _______________________________________________________ Additional Item Attachment: File name: calc_modelfree.py_patch.tar.gz Size:3 KB _______________________________________________________ Reply to this item at: <http://gna.org/task/?6847> _______________________________________________ Nachricht geschickt von/durch Gna! http://gna.org/ _______________________________________________ relax (http://nmr-relax.com) This is the relax-devel mailing list relax-devel@xxxxxxx To unsubscribe from this list, get a password reminder, or change your subscription options, visit the list information page at https://mail.gna.org/listinfo/relax-devel