[bug #23933] 'RelaxWarning: comparison to `None` will result in an elementwise object comparison in the future' in modelfree

2015-10-20 Thread Edward d Auvergne
Update of bug #23933 (project relax):

 Assigned to:None => bugman 
Operating System:   64-bit MS Windows => All systems


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

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


[bug #23933] 'RelaxWarning: comparison to `None` will result in an elementwise object comparison in the future' in modelfree

2015-10-20 Thread Edward d Auvergne
Update of bug #23933 (project relax):

Category: GUI => relax's source code
  Status:None => Fixed  
 Open/Closed:Open => Closed 

___

Follow-up Comment #3:

This bug report consists of two issues:  1. The comparison to 'None' warning; 
2. The 'NameError: global name 'ids' is not defined' error.

=== Comparison to 'None' ===

Modified from
http://thread.gmane.org/gmane.science.nmr.relax.user/1839/focus=1842 :

This warning is due to something called a FutureWarning which was introduced
into numpy >= 1.9.  It looks like the numpy would like to change how '=='
operates on their numpy arrays.  So the previous relax code was of the form:

if vector == None:

This used to work and was good for checking if we had set a value.  However
the numpy people would like us to now instead use:

if vector is None:

To fix this, the suite was run with Python 3.5 and numpy 1.9.2, using:

$ python3.5 relax -x -d --tee test_suite.log --traceback

All these FutureWarnings were found and '==' and '=!' was replaced with 'is'
and 'is not' to silence them all.  This was also fixed in minfx
 and bmrblib
.


=== 'ids' is missing ===

The Mf.test_bug_23933_relax_data_read_ids system test was created based on the
attached data files, truncated to residues 329, 330, and 331.  It catches the
error:

relax> relax_data.read(ri_id='R1_600', ri_type='R1', frq=600402816.0,
file='r1_600.txt',
dir='/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids',
spin_id_col=None, mol_name_col=None, res_num_col=1, res_name_col=None,
spin_num_col=None, spin_name_col=None, data_col=2, error_col=3, sep=None,
spin_id=None)
Opening the file
'/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids/r1_600.txt'
for reading.
Traceback (most recent call last):
  File "/data/relax/relax-trunk/test_suite/system_tests/model_free.py", line
499, in test_bug_23933_relax_data_read_ids
self.interpreter.relax_data.read(ri_id='R1_600', ri_type='R1',
frq=600402816.0, file='r1_600.txt', dir=path, res_num_col=1, data_col=2,
error_col=3)
  File "/data/relax/relax-trunk/prompt/uf_objects.py", line 225, in __call__
self._backend(*new_args, **uf_kargs)
  File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 920, in
read
pack_data(ri_id, ri_type, frq, values, errors, mol_names=mol_names,
res_nums=res_nums, res_names=res_names, spin_nums=spin_nums,
spin_names=spin_names, spin_id=spin_id)
  File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 767, in
pack_data
if ids:
NameError: global name 'ids' is not defined


The problem was missing code that was planned to be added to relax, but never
was.  Now the correct behaviour occurs and the error is now seen correctly:

relax> relax_data.read(ri_id='R1_600', ri_type='R1', frq=600402816.0,
file='r1_600.txt',
dir='/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids',
spin_id_col=None, mol_name_col=None, res_num_col=1, res_name_col=None,
spin_num_col=None, spin_name_col=None, data_col=2, error_col=3, sep=None,
spin_id=None)
Opening the file
'/data/relax/relax-trunk/test_suite/shared_data/model_free/bug_23933_relax_data_read_ids/r1_600.txt'
for reading.
Traceback (most recent call last):
  File "/data/relax/relax-trunk/test_suite/system_tests/model_free.py", line
499, in test_bug_23933_relax_data_read_ids
self.interpreter.relax_data.read(ri_id='R1_600', ri_type='R1',
frq=600402816.0, file='r1_600.txt', dir=path, res_num_col=1, data_col=2,
error_col=3)
  File "/data/relax/relax-trunk/prompt/uf_objects.py", line 225, in __call__
self._backend(*new_args, **uf_kargs)
  File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 925, in
read
pack_data(ri_id, ri_type, frq, values, errors, mol_names=mol_names,
res_nums=res_nums, res_names=res_names, spin_nums=spin_nums,
spin_names=spin_names, spin_id=spin_id)
  File "/data/relax/relax-trunk/pipe_control/relax_data.py", line 773, in
pack_data
raise RelaxMultiSpinIDError(spin_ids[i], new_ids)
RelaxMultiSpinIDError: RelaxError: The spin ID
'#LARA_N_term_no_helixFH_reg_mol24:331' corresponds to multiple spins,
including '#LARA_N_term_no_helixFH_reg_mol24:331@N' and
'#LARA_N_term_no_helixFH_reg_mol24:331@H'.

The problem here is that the relaxation data needs to be loaded for either the
'N' or 'H' spins - the user function call is ambiguous and relax cannot work
out for which spin the data is for.


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
relax 

[bug #23933] 'RelaxWarning: comparison to `None` will result in an elementwise object comparison in the future' in modelfree

2015-10-16 Thread anonymous
Additional Item Attachment, bug #23933 (project relax):

File name: R1_600_test.txtSize:0 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

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


[bug #23933] 'RelaxWarning: comparison to `None` will result in an elementwise object comparison in the future' in modelfree

2015-10-16 Thread anonymous
Additional Item Attachment, bug #23933 (project relax):

File name: LARA_N_term_no_helixFH_reg.pdb Size:165 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

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


[bug #23933] 'RelaxWarning: comparison to `None` will result in an elementwise object comparison in the future' in modelfree

2015-10-15 Thread anonymous
Additional Item Attachment, bug #23933 (project relax):

File name: relax_warning.log  Size:109 KB


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

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


[bug #23933] 'RelaxWarning: comparison to `None` will result in an elementwise object comparison in the future' in modelfree

2015-10-12 Thread anonymous
URL:
  

 Summary:  'RelaxWarning: comparison to `None` will result in
an elementwise object comparison in the future' in modelfree
 Project: relax
Submitted by: None
Submitted on: Mon 12 Oct 2015 04:41:15 PM UTC
Category: GUI
Specific analysis category: Model-free analysis
Priority: 5 - Normal
Severity: 3 - Normal
  Status: None
 Assigned to: None
 Originator Name: Sam
Originator Email: samuelsw.c...@mail.utoronto.ca
 Open/Closed: Open
 Release: 3.3.9
 Discussion Lock: Any
Operating System: 64-bit MS Windows

___

Details:

I attached the logfile and my relax setup and dependices to help clarify the
problem.

Here is what I did in summary until I got to the relax warning and error:

Load my PDB structure in the spin viewer
Load my relaxation data from both fields, specifying to load @N spins because
I only have 15N information in the file using the free format settings
Complete the metadata for BMRB deposition for all the data
Set Dipolar relaxation (appearance of the first relax warning)
Set CSA relaxation for @N*, and sometimes when I do this it errors out (as
shown in the logfile), but other times it doesn't error out so I'm not sure
why this happens.

Hope this helps!

Sam



___

File Attachments:


---
Date: Mon 12 Oct 2015 04:41:15 PM UTC  Name: relax_warning_2.txt  Size: 109kB 
 By: None


---
Date: Mon 12 Oct 2015 04:41:15 PM UTC  Name: relax_system_properties.log 
Size: 5kB   By: None



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


___
relax (http://www.nmr-relax.com)

This is the relax-devel mailing list
relax-devel@gna.org

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