Author: bugman Date: Wed Aug 31 16:23:38 2011 New Revision: 14550 URL: http://svn.gna.org/viewcvs/relax?rev=14550&view=rev Log: Fix for the reading of the sequence from generic formatted files with None in some of the columns. This second problem is for the non-integer columns as the text 'None' was being interpreted as the name. Modified: 1.3/generic_fns/mol_res_spin.py Modified: 1.3/generic_fns/mol_res_spin.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/mol_res_spin.py?rev=14550&r1=14549&r2=14550&view=diff ============================================================================== --- 1.3/generic_fns/mol_res_spin.py (original) +++ 1.3/generic_fns/mol_res_spin.py Wed Aug 31 16:23:38 2011 @@ -1565,7 +1565,7 @@ id = "" # Molecule data. - if mol_name_col and data[mol_name_col-1]: + if mol_name_col and data[mol_name_col-1] not in [None, 'None']: id = id + "#" + data[mol_name_col-1] # Residue data. @@ -1573,7 +1573,7 @@ id = id + ":" + str(data[res_num_col-1]) if (res_num_col and data[res_num_col-1] not in [None, 'None']) and (res_name_col and data[res_name_col-1]): id = id + "&:" + data[res_name_col-1] - elif res_name_col and data[res_name_col-1]: + elif res_name_col and data[res_name_col-1] not in [None, 'None']: id = id + ":" + data[res_name_col-1] # Spin data. @@ -1581,10 +1581,11 @@ id = id + "@" + str(data[spin_num_col-1]) if (spin_num_col and data[spin_num_col-1] not in [None, 'None']) and (spin_name_col and data[spin_name_col-1]): id = id + "&@" + data[spin_name_col-1] - elif spin_name_col and data[spin_name_col-1]: + elif spin_name_col and data[spin_name_col-1] not in [None, 'None']: id = id + "@" + data[spin_name_col-1] # Return the spin id string. + print `id` return id