Hi,
For this 'point' argument to the dx.map user function, the best would
be to model it on the 'R' argument for the structure.rotate user
function. Here 'R' is a rotation matrix, and you can see that it is
added as:
uf.add_keyarg(
name = "R",
py_type = "float_matrix",
default = eye(3),
dim = (3, 3),
desc_short = "rotation matrix",
desc = "The rotation matrix in forwards rotation notation."
)
The py_type 'float_matrix' is defined in the 2D sequence types in the
add_contents() method in the gui.uf_objects module. However when I
start the GUI, open the structure.rotation user function window via
the menus, then click on the button to change the rotation matrix, I
see:
Traceback (most recent call last):
File "/data/relax/relax-trunk/gui/input_elements/sequence_2D.py",
line 111, in open_dialog
win = Sequence_window_2D(name=self.name, seq_type=self.seq_type,
value_type=self.value_type, titles=self.titles, dim=self.dim)
File "/data/relax/relax-trunk/gui/input_elements/sequence_2D.py",
line 165, in __init__
Sequence_window.__init__(self, name=name, seq_type=seq_type,
value_type=value_type, dim=dim)
File "/data/relax/relax-trunk/gui/input_elements/sequence.py", line
498, in __init__
self.add_list(sizer)
File "/data/relax/relax-trunk/gui/input_elements/sequence_2D.py",
line 257, in add_list
self.append_row(None)
AttributeError: 'Sequence_window_2D' object has no attribute 'append_row'
I'll have to fix this! The problem is that I do not know how to
create GUI tests for the different 'Sequence_window',
'Sequence_window_2D', etc. objects. Therefore they are constantly
breaking :S Anyway, please convert the dx.map 'point' argument to be
a 2D sequence element rather than the current 1D sequence element in
gui/uf_objects.py, and I'll look after the rest.
Cheers,
Edward
On 28 May 2014 10:37, Troels Emtekær Linnet <[email protected]> wrote:
> I would happen anyway.
>
> It is only when I use the GUI.
>
> I don't know how to alter the Mf GUI test to show it.
> relax --gui-tests Mf.test_opendx_s2_te_rex
>
>
> Best
> Troels
>
>
> 2014-05-28 10:29 GMT+02:00 Edward d'Auvergne <[email protected]>:
>> Hi,
>>
>> Do you have changes not committed to the repository? I don't see this
>> in the trunk on my Linux system.
>>
>> Regards,
>>
>> Edward
>>
>>
>>
>> On 28 May 2014 10:26, Troels Emtekær Linnet <[email protected]> wrote:
>>> Hi Edward.
>>>
>>> When I try the GUI and set the point, it says:
>>>
>>>
>>>
>>> Traceback (most recent call last):
>>> File "/Users/tlinnet/software/relax_trunk/gui/input_elements/sequence.py",
>>> line 352, in open_dialog
>>> self.selection_win_show()
>>> File "/Users/tlinnet/software/relax_trunk/gui/input_elements/sequence.py",
>>> line 388, in selection_win_show
>>> self.sel_win.Close()
>>> File
>>> "/Library/Frameworks/Python.framework/Versions/7.3/lib/python2.7/site-packages/wx/_core.py",
>>> line 14564, in __getattr__
>>> raise PyDeadObjectError(self.attrStr % self._name)
>>> wx._core.PyDeadObjectError: The C++ part of the Sequence_window object
>>> has been deleted, attribute access no longer allowed.
>>>
>>> 2014-05-27 19:07 GMT+02:00 Edward d'Auvergne <[email protected]>:
>>>> Hi Troels,
>>>>
>>>> This is close to the correct fix, but not quite right. The
>>>> 'list_val_or_list_of_list_val' fits into the "2D sequence types"
>>>> below. Have a look at what it does for the GUI - just search for user
>>>> functions with other 2D sequence types, and open those up. You will
>>>> probably need to modify the user function argument options in
>>>> user_functions.dx to set it up correctly. Again see the other user
>>>> functions with these 2D sequence arguments for inspiration.
>>>>
>>>> Cheers!
>>>>
>>>> Edward
>>>>
>>>>
>>>>
>>>> On 27 May 2014 18:47, <[email protected]> wrote:
>>>>> Author: tlinnet
>>>>> Date: Tue May 27 18:47:30 2014
>>>>> New Revision: 23481
>>>>>
>>>>> URL: http://svn.gna.org/viewcvs/relax?rev=23481&view=rev
>>>>> Log:
>>>>> Added py_type "list_val_or_list_of_list_val" to be handled in GUI
>>>>> uf_objects.
>>>>>
>>>>> Bug #22035: (https://gna.org/bugs/?22035) The dx.map user function is
>>>>> broken in the GUI.
>>>>>
>>>>> Modified:
>>>>> trunk/gui/uf_objects.py
>>>>>
>>>>> Modified: trunk/gui/uf_objects.py
>>>>> URL:
>>>>> http://svn.gna.org/viewcvs/relax/trunk/gui/uf_objects.py?rev=23481&r1=23480&r2=23481&view=diff
>>>>> ==============================================================================
>>>>> --- trunk/gui/uf_objects.py (original)
>>>>> +++ trunk/gui/uf_objects.py Tue May 27 18:47:30 2014
>>>>> @@ -565,15 +565,15 @@
>>>>> self.uf_args[arg['name']] =
>>>>> Selector_bool(name=arg['name'], parent=self,
>>>>> element_type=arg['wiz_element_type'], sizer=sizer, desc=desc,
>>>>> tooltip=arg['desc'], default=arg['default'], divider=self._div_left,
>>>>> height_element=self.height_element)
>>>>>
>>>>> # Sequence types.
>>>>> - elif arg['py_type'] in ['float_list', 'int_list',
>>>>> 'num_list', 'str_list', 'float_tuple', 'int_tuple', 'num_tuple',
>>>>> 'str_tuple', 'float_array', 'int_array', 'float_or_float_list',
>>>>> 'int_or_int_list', 'num_or_num_list', 'str_or_str_list',
>>>>> 'float_or_float_tuple', 'int_or_int_tuple', 'num_or_num_tuple',
>>>>> 'str_or_str_tuple', 'val_or_list', 'float_object']:
>>>>> + elif arg['py_type'] in ['float_list', 'int_list',
>>>>> 'num_list', 'str_list', 'float_tuple', 'int_tuple', 'num_tuple',
>>>>> 'str_tuple', 'float_array', 'int_array', 'float_or_float_list',
>>>>> 'int_or_int_list', 'num_or_num_list', 'str_or_str_list',
>>>>> 'float_or_float_tuple', 'int_or_int_tuple', 'num_or_num_tuple',
>>>>> 'str_or_str_tuple', 'val_or_list', 'float_object',
>>>>> 'list_val_or_list_of_list_val']:
>>>>> # The sequence type.
>>>>> - if arg['py_type'] in ['float_list', 'int_list',
>>>>> 'num_list', 'str_list', 'float_array', 'int_array',
>>>>> 'float_or_float_list', 'int_or_int_list', 'num_or_num_list',
>>>>> 'str_or_str_list', 'val_or_list', 'float_object']:
>>>>> + if arg['py_type'] in ['float_list', 'int_list',
>>>>> 'num_list', 'str_list', 'float_array', 'int_array',
>>>>> 'float_or_float_list', 'int_or_int_list', 'num_or_num_list',
>>>>> 'str_or_str_list', 'val_or_list', 'float_object',
>>>>> 'list_val_or_list_of_list_val']:
>>>>> seq_type = 'list'
>>>>> else:
>>>>> seq_type = 'tuple'
>>>>>
>>>>> # The value type.
>>>>> - if arg['py_type'] in ['float_list', 'num_list',
>>>>> 'float_tuple', 'num_tuple', 'float_array', 'float_or_float_list',
>>>>> 'num_or_num_list', 'float_or_float_tuple', 'num_or_num_tuple',
>>>>> 'float_object']:
>>>>> + if arg['py_type'] in ['float_list', 'num_list',
>>>>> 'float_tuple', 'num_tuple', 'float_array', 'float_or_float_list',
>>>>> 'num_or_num_list', 'float_or_float_tuple', 'num_or_num_tuple',
>>>>> 'float_object', 'list_val_or_list_of_list_val']:
>>>>> value_type = 'float'
>>>>> elif arg['py_type'] in ['int_list', 'int_tuple',
>>>>> 'int_array', 'int_or_int_list', 'int_or_int_tuple']:
>>>>> value_type = 'int'
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>
>>>> _______________________________________________
>>>> relax (http://www.nmr-relax.com)
>>>>
>>>> This is the relax-devel 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-devel
_______________________________________________
relax (http://www.nmr-relax.com)
This is the relax-devel 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-devel