Author: bugman Date: Thu Oct 8 12:42:22 2009 New Revision: 9658 URL: http://svn.gna.org/viewcvs/relax?rev=9658&view=rev Log: Modified the structure.delete() user function to remove all spin specific structural data. Modified: 1.3/generic_fns/structure/main.py Modified: 1.3/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/main.py?rev=9658&r1=9657&r2=9658&view=diff ============================================================================== --- 1.3/generic_fns/structure/main.py (original) +++ 1.3/generic_fns/structure/main.py Thu Oct 8 12:42:22 2009 @@ -46,6 +46,18 @@ # Run the object method. cdp.structure.delete() + + # Then remove any spin specific structural info. + for spin in spin_loop(): + # Delete positional information. + if hasattr(spin, 'pos'): + del spin.pos + + # Delete bond vectors. + if hasattr(spin, 'bond_vect'): + del spin.bond_vect + if hasattr(spin, 'xh_vect'): + del spin.xh_vect def load_spins(spin_id=None, str_id=None, combine_models=True, ave_pos=False):