Author: bugman Date: Tue Sep 30 15:50:08 2014 New Revision: 26097 URL: http://svn.gna.org/viewcvs/relax?rev=26097&view=rev Log: Implemented the structure.mean user function frontend. The backend is currently just a stub function. Modified: trunk/pipe_control/structure/main.py trunk/user_functions/structure.py Modified: trunk/pipe_control/structure/main.py URL: http://svn.gna.org/viewcvs/relax/trunk/pipe_control/structure/main.py?rev=26097&r1=26096&r2=26097&view=diff ============================================================================== --- trunk/pipe_control/structure/main.py (original) +++ trunk/pipe_control/structure/main.py Tue Sep 30 15:50:08 2014 @@ -599,6 +599,13 @@ # Print out. write_spin_data(file=sys.stdout, mol_names=mol_names, res_nums=res_nums, res_names=res_names, spin_nums=spin_nums, spin_names=spin_names) + + +def mean(): + """Calculate the mean structure from all models in the structural data object.""" + + # Test if the current data pipe exists. + check_pipe() def read_gaussian(file=None, dir=None, set_mol_name=None, set_model_num=None, verbosity=1, fail=True): Modified: trunk/user_functions/structure.py URL: http://svn.gna.org/viewcvs/relax/trunk/user_functions/structure.py?rev=26097&r1=26096&r2=26097&view=diff ============================================================================== --- trunk/user_functions/structure.py (original) +++ trunk/user_functions/structure.py Tue Sep 30 15:50:08 2014 @@ -654,6 +654,20 @@ uf.wizard_height_desc = 300 uf.wizard_size = (800, 600) uf.wizard_image = WIZARD_IMAGE_PATH + 'structure' + sep + 'load_spins.png' + + +# The structure.mean user function. +uf = uf_info.add_uf('structure.mean') +uf.title = "Calculate the mean structure from all loaded models." +uf.title_short = "Mean structure." +# Description. +uf.desc.append(Desc_container()) +uf.desc[-1].add_paragraph("This will calculate the mean structure from all loaded models. The mean structure will replace all the models in the internal structural object. This is provided as a structural aid, specifically for superimposition purposes.") +uf.backend = pipe_control.structure.main.mean +uf.menu_text = "&mean" +uf.gui_icon = "oxygen.categories.applications-education" +uf.wizard_size = (700, 400) +uf.wizard_image = WIZARD_IMAGE_PATH + 'structure' + sep + '2JK4.png' # The structure.read_gaussian user function.