Chris, Good idea to pop the empty data out after the fact. It's a nice and simple fix. There will, however, probably be a problem with the residue specific data structure 'noe_r1_table[]'. As the pop commands are run, the indexes in 'noe_r1_table' will need to be changed to a different integer or to None. This structure is essential for minimisation. It may be easier to shift your code into the file 'specific_fns/relax_data.py' and into the bizarrely named function 'add_residue()', probably around line 90 but before the 'num_ri' and 'num_frq' assignment. The the 'noe_r1_table' structure will then be correctly constructed and you won't need an algorithm to fix the structure post construction. What do you think?