Author: bugman Date: Mon Jul 7 21:37:47 2008 New Revision: 6807 URL: http://svn.gna.org/viewcvs/relax?rev=6807&view=rev Log: Fix for the Scientific PDB structural object atom_loop() method. Empty molecule, residue, and spin names and numbers are now replaced with None before being returned. Modified: 1.3/generic_fns/structure/scientific.py Modified: 1.3/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/scientific.py?rev=6807&r1=6806&r2=6807&view=diff ============================================================================== --- 1.3/generic_fns/structure/scientific.py (original) +++ 1.3/generic_fns/structure/scientific.py Mon Jul 7 21:37:47 2008 @@ -273,6 +273,18 @@ if sel_obj and not sel_obj.contains_spin(atom_num, atom_name, res_num, res_name, mol_name): continue + # Replace empty variables with None. + if not mol_name: + mol_name = None + if not res_num: + res_num = None + if not res_name: + res_name = None + if not atom_num: + atom_num = None + if not atom_name: + atom_name = None + # Build the tuple to be yielded. atomic_tuple = () if model_num_flag: