Author: bugman
Date: Mon May 7 15:14:59 2012
New Revision: 16052
URL: http://svn.gna.org/viewcvs/relax?rev=16052&view=rev
Log:
Converted the angles user functions to the auto-generation design.
Added:
branches/uf_redesign/user_functions/angles.py
- copied, changed from r16050, branches/uf_redesign/prompt/angles.py
Removed:
branches/uf_redesign/prompt/angles.py
Modified:
branches/uf_redesign/prompt/interpreter.py
branches/uf_redesign/user_functions/__init__.py
Removed: branches/uf_redesign/prompt/angles.py
URL:
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/angles.py?rev=16051&view=auto
==============================================================================
--- branches/uf_redesign/prompt/angles.py (original)
+++ branches/uf_redesign/prompt/angles.py (removed)
@@ -1,55 +1,0 @@
-###############################################################################
-# #
-# Copyright (C) 2003-2012 Edward d'Auvergne #
-# #
-# This file is part of the program relax. #
-# #
-# relax is free software; you can redistribute it and/or modify #
-# it under the terms of the GNU General Public License as published by #
-# the Free Software Foundation; either version 2 of the License, or #
-# (at your option) any later version. #
-# #
-# relax is distributed in the hope that it will be useful, #
-# but WITHOUT ANY WARRANTY; without even the implied warranty of #
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
-# GNU General Public License for more details. #
-# #
-# You should have received a copy of the GNU General Public License #
-# along with relax; if not, write to the Free Software #
-# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA #
-# #
-###############################################################################
-
-# Module docstring.
-"""Module containing the 'angles' user function class."""
-__docformat__ = 'plaintext'
-
-# relax module imports.
-from generic_fns import angles
-from status import Status; status = Status()
-
-
-class Angles:
- """Class containing the function for calculating XH bond angles."""
-
- def angle_diff_frame(self):
- """Calculate the angles defining the XH bond vector within the
diffusion frame.
-
- Description
- ~~~~~~~~~~~
-
- If the diffusion tensor is isotropic, then nothing will be done.
-
- If the diffusion tensor is axially symmetric, then the angle alpha
will be calculated for
- each XH bond vector.
-
- If the diffusion tensor is asymmetric, then the three angles will be
calculated.
- """
-
- # Function intro text.
- if status.prompt_intro:
- text = status.ps3 + "angle_diff_frame()"
- print(text)
-
- # Execute the functional code.
- angles.angle_diff_frame()
Modified: branches/uf_redesign/prompt/interpreter.py
URL:
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/prompt/interpreter.py?rev=16052&r1=16051&r2=16052&view=diff
==============================================================================
--- branches/uf_redesign/prompt/interpreter.py (original)
+++ branches/uf_redesign/prompt/interpreter.py Mon May 7 15:14:59 2012
@@ -55,7 +55,6 @@
from status import Status; status = Status()
# User functions.
-from angles import Angles
from dx import OpenDX
from eliminate import Eliminate
from fix import Fix
@@ -196,7 +195,6 @@
objects['gpl'] = objects['GPL'] = GPL()
# Initialise the user functions (those not in user function classes)
- angles = Angles()
eliminate = Eliminate()
fix = Fix()
reset = Reset()
@@ -207,7 +205,6 @@
temp = Temp()
# Place the user functions in the local namespace.
- objects['angle_diff_frame'] = angles.angle_diff_frame
objects['calc'] = minimisation.calc
objects['eliminate'] = eliminate.eliminate
objects['fix'] = fix.fix
Modified: branches/uf_redesign/user_functions/__init__.py
URL:
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/__init__.py?rev=16052&r1=16051&r2=16052&view=diff
==============================================================================
--- branches/uf_redesign/user_functions/__init__.py (original)
+++ branches/uf_redesign/user_functions/__init__.py Mon May 7 15:14:59 2012
@@ -35,6 +35,7 @@
# The __all__ package list (user function modules).
__all__ += [
'align_tensor',
+ 'angles',
'bmrb',
'bruker',
'pipe',
@@ -44,6 +45,7 @@
# Import all the modules to set up the data.
import user_functions.align_tensor
+import user_functions.angles
import user_functions.bmrb
import user_functions.bruker
import user_functions.pipe
Copied: branches/uf_redesign/user_functions/angles.py (from r16050,
branches/uf_redesign/prompt/angles.py)
URL:
http://svn.gna.org/viewcvs/relax/branches/uf_redesign/user_functions/angles.py?p2=branches/uf_redesign/user_functions/angles.py&p1=branches/uf_redesign/prompt/angles.py&r1=16050&r2=16052&rev=16052&view=diff
==============================================================================
--- branches/uf_redesign/prompt/angles.py (original)
+++ branches/uf_redesign/user_functions/angles.py Mon May 7 15:14:59 2012
@@ -21,35 +21,32 @@
###############################################################################
# Module docstring.
-"""Module containing the 'angles' user function class."""
-__docformat__ = 'plaintext'
+"""Module containing the 'angles' user function data."""
# relax module imports.
from generic_fns import angles
-from status import Status; status = Status()
+from graphics import WIZARD_IMAGE_PATH
+from user_functions.data import Uf_info; uf_info = Uf_info()
-class Angles:
- """Class containing the function for calculating XH bond angles."""
+# The user function class.
+uf_class = uf_info.add_class('angles')
+uf_class.title = "Class containing the function for calculating XH bond
angles."
+uf_class.menu_text = "&angles"
- def angle_diff_frame(self):
- """Calculate the angles defining the XH bond vector within the
diffusion frame.
+# The angles.diff_frame user function.
+uf = uf_info.add_uf('angles.diff_frame')
+uf.title = "Calculate the angles defining the XH bond vector within the
diffusion frame."
+uf.title = "Diffusion frame XH vector angle calculation."
+uf.desc = """
+If the diffusion tensor is isotropic, then nothing will be done.
- Description
- ~~~~~~~~~~~
+If the diffusion tensor is axially symmetric, then the angle alpha will be
calculated for each XH bond vector.
- If the diffusion tensor is isotropic, then nothing will be done.
-
- If the diffusion tensor is axially symmetric, then the angle alpha
will be calculated for
- each XH bond vector.
-
- If the diffusion tensor is asymmetric, then the three angles will be
calculated.
- """
-
- # Function intro text.
- if status.prompt_intro:
- text = status.ps3 + "angle_diff_frame()"
- print(text)
-
- # Execute the functional code.
- angles.angle_diff_frame()
+If the diffusion tensor is asymmetric, then the three angles will be
calculated.
+"""
+uf.backend = angles.angle_diff_frame
+uf.menu_text = "&diff_frame"
+uf.wizard_size = (800, 400)
+uf.gui_icon = "oxygen.categories.applications-education"
+uf.wizard_height_desc = 250
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-commits mailing list
[email protected]
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-commits