Author: bugman Date: Tue Mar 19 17:04:24 2013 New Revision: 18889 URL: http://svn.gna.org/viewcvs/relax?rev=18889&view=rev Log: Lots of fixes for the change to the structural API atom_loop() method. This method when returning a single item now returns a single item rather than a tuple of length 1. Modified: trunk/generic_fns/structure/main.py trunk/generic_fns/structure/scientific.py Modified: trunk/generic_fns/structure/main.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/main.py?rev=18889&r1=18888&r2=18889&view=diff ============================================================================== --- trunk/generic_fns/structure/main.py (original) +++ trunk/generic_fns/structure/main.py Tue Mar 19 17:04:24 2013 @@ -198,14 +198,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) # 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) # 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) @@ -248,7 +248,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) coord[-1] = array(coord[-1]) coord = array(coord) @@ -655,7 +655,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) coord[-1] = array(coord[-1]) # Calculate the RMSD. @@ -745,7 +745,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) coord[-1] = array(coord[-1]) # The different algorithms. Modified: trunk/generic_fns/structure/scientific.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/structure/scientific.py?rev=18889&r1=18888&r2=18889&view=diff ============================================================================== --- trunk/generic_fns/structure/scientific.py (original) +++ trunk/generic_fns/structure/scientific.py Tue Mar 19 17:04:24 2013 @@ -168,7 +168,7 @@ for pos1 in self.atom_loop(atom_id=atom_id1, pos_flag=True): for pos2 in self.atom_loop(atom_id=atom_id2, pos_flag=True): # The interatomic distance. - dist = linalg.norm(pos2[0]-pos1[0]) + dist = linalg.norm(pos2-pos1) # The atom is within the radius of 2.0 Angstrom. if dist < 2.0: