Author: bugman Date: Thu Aug 21 14:55:19 2008 New Revision: 7216 URL: http://svn.gna.org/viewcvs/relax?rev=7216&view=rev Log: Fixes for the cone_edge() function for the structural API changes. Modified: 1.3/generic_fns/structure/geometric.py 1.3/generic_fns/structure/mass.py Modified: 1.3/generic_fns/structure/geometric.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/geometric.py?rev=7216&r1=7215&r2=7216&view=diff ============================================================================== --- 1.3/generic_fns/structure/geometric.py (original) +++ 1.3/generic_fns/structure/geometric.py Thu Aug 21 14:55:19 2008 @@ -89,8 +89,11 @@ @type inc: int """ + # The atom numbers (and indices). + atom_num = structure.structural_data[0].atom_num[-1]+1 + # Add an atom for the cone apex. - structure.atom_add(pdb_record='HETATM', atom_num=apex, atom_name='APX', res_name=res_name, res_num=res_num, pos=apex, segment_id=None, element='H', struct_index=None) + structure.atom_add(pdb_record='HETATM', atom_num=atom_num, atom_name='APX', res_name=res_name, res_num=res_num, pos=apex, segment_id=None, element='H', struct_index=None) # Initialise the rotation matrix, atom number, etc. if R == None: @@ -103,6 +106,9 @@ # Loop over each vector. for i in xrange(inc): + # Increment the atom number. + atom_num = atom_num + 1 + # The azimuthal angle theta. theta = 2.0 * pi * float(i) / float(inc) @@ -128,7 +134,7 @@ pos = apex+vector*length # Add the vector as a H atom of the cone residue. - structure.atom_add(pdb_record='HETATM', atom_num=atom_id, atom_name='H'+`atom_num`, res_name=res_name, res_num=res_num, pos=pos, segment_id=None, element='H', struct_index=None) + structure.atom_add(pdb_record='HETATM', atom_num=atom_num, atom_name='H'+`atom_num`, res_name=res_name, res_num=res_num, pos=pos, segment_id=None, element='H', struct_index=None) # Connect across the radial array (to generate the circular cone edge). if i != 0: Modified: 1.3/generic_fns/structure/mass.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure/mass.py?rev=7216&r1=7215&r2=7216&view=diff ============================================================================== --- 1.3/generic_fns/structure/mass.py (original) +++ 1.3/generic_fns/structure/mass.py Thu Aug 21 14:55:19 2008 @@ -60,6 +60,7 @@ # Loop over all atoms. for mol_name, res_num, res_name, atom_num, atom_name, element, pos in cdp.structure.atom_loop(mol_name_flag=True, res_num_flag=True, res_name_flag=True, atom_num_flag=True, atom_name_flag=True, element_flag=True, pos_flag=True): + print mol_name, res_num, res_name, atom_num, atom_name, element, pos # Get the corresponding molecule container. if mol_name == None: mol_cont = cdp.mol[0]