Author: bugman Date: Tue Jan 3 18:26:54 2012 New Revision: 15135 URL: http://svn.gna.org/viewcvs/relax?rev=15135&view=rev Log: Fixes for the structure.superimpose and structure.displacement user functions. This is needed for the new atom_loop() API design. 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=15135&r1=15134&r2=15135&view=diff ============================================================================== --- branches/frame_order_testing/generic_fns/structure/main.py (original) +++ branches/frame_order_testing/generic_fns/structure/main.py Tue Jan 3 18:26:54 2012 @@ -1,6 +1,6 @@ ############################################################################### # # -# Copyright (C) 2003-2011 Edward d'Auvergne # +# Copyright (C) 2003-2012 Edward d'Auvergne # # # # This file is part of the program relax. # # # @@ -158,14 +158,14 @@ # Assemble the atomic coordinates. coord_from = [] for pos in cdp.structure.atom_loop(atom_id=atom_id, model_num=model_from[i], pos_flag=True): - coord_from.append(pos[0]) + coord_from.append(pos[0][0]) # Loop over the ending models. for j in range(len(model_to)): # Assemble the atomic coordinates. coord_to = [] for pos in cdp.structure.atom_loop(atom_id=atom_id, model_num=model_to[j], pos_flag=True): - coord_to.append(pos[0]) + coord_to.append(pos[0][0]) # Send to the base container for the calculations. cdp.structure.displacements._calculate(model_from=model_from[i], model_to=model_to[j], coord_from=array(coord_from), coord_to=array(coord_to), centroid=centroid) @@ -201,7 +201,7 @@ for model in models: coord.append([]) for pos in cdp.structure.atom_loop(atom_id=atom_id, model_num=model, pos_flag=True): - coord[-1].append(pos[0]) + coord[-1].append(pos[0][0]) coord[-1] = array(coord[-1]) coord = array(coord) @@ -594,7 +594,7 @@ for model in models: coord.append([]) for pos in cdp.structure.atom_loop(atom_id=atom_id, model_num=model, pos_flag=True): - coord[-1].append(pos[0]) + coord[-1].append(pos[0][0]) coord[-1] = array(coord[-1]) # The different algorithms.