Author: bugman Date: Thu Apr 10 11:09:03 2008 New Revision: 5518 URL: http://svn.gna.org/viewcvs/relax?rev=5518&view=rev Log: Made the call to the atom_loop() method in the centre_of_mass() function more robust. By setting all the flags, the returned tuple should always be the correct size, even if additional atomic data is specified in the API method. Modified: 1.3/generic_fns/structure/mass.py Modified: 1.3/generic_fns/structure/mass.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/mass.py?rev=5518&r1=5517&r2=5518&view=diff ============================================================================== --- 1.3/generic_fns/structure/mass.py (original) +++ 1.3/generic_fns/structure/mass.py Thu Apr 10 11:09:03 2008 @@ -59,7 +59,7 @@ M = 0.0 # Loop over all atoms. - for mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(): + for mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(mol_name=True, res_num=True, res_name=True, atom_num=True, atom_name=True, element=True, pos=True): # Get the corresponding molecule container. if mol_name == None: mol_cont = cdp.mol[0]