Author: bugman Date: Mon Jan 2 22:38:24 2012 New Revision: 15125 URL: http://svn.gna.org/viewcvs/relax?rev=15125&view=rev Log: Fix for the structure.get_pos user function. This has been updated for the atom_loop() structural API method change. Modified: branches/frame_order_testing/generic_fns/structure/main.py Modified: branches/frame_order_testing/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/structure/main.py?rev=15125&r1=15124&r2=15125&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/structure/main.py (original) +++ branches/frame_order_testing/generic_fns/structure/main.py Mon Jan 2 22:38:24 2012 @@ -241,14 +241,7 @@ raise RelaxNoPdbError # Loop over all atoms of the spin_id selection. - model_index = -1 - last_model = None - for model_num, mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(atom_id=spin_id, str_id=str_id, model_num_flag=True, mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_num_flag=True, atom_name_flag=True, element_flag=True, pos_flag=True, ave=ave_pos): - # Update the model info. - if last_model != model_num: - model_index = model_index + 1 - last_model = model_num - + for mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(atom_id=spin_id, str_id=str_id, mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_num_flag=True, atom_name_flag=True, element_flag=True, pos_flag=True, ave=ave_pos): # Remove the '+' regular expression character from the mol, res, and spin names! if mol_name and search('\+', mol_name): mol_name = replace(mol_name, '+', '')