Author: bugman Date: Thu Feb 21 16:22:18 2008 New Revision: 5114 URL: http://svn.gna.org/viewcvs/relax?rev=5114&view=rev Log: Modified the cone_edge() function to accept the residue name as an argument. Modified: 1.3/generic_fns/structure.py 1.3/specific_fns/n_state_model.py Modified: 1.3/generic_fns/structure.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/structure.py?rev=5114&r1=5113&r2=5114&view=diff ============================================================================== --- 1.3/generic_fns/structure.py (original) +++ 1.3/generic_fns/structure.py Thu Feb 21 16:22:18 2008 @@ -304,7 +304,7 @@ return R -def cone_edge(atomic_data=None, res_num=None, apex=None, axis=None, R=None, angle=None, length=None, inc=None): +def cone_edge(atomic_data=None, res_name='CON', res_num=None, apex=None, axis=None, R=None, angle=None, length=None, inc=None): """Add a residue to the atomic data representing a cone of the given angle. A series of vectors totalling the number of increments and starting at the origin are equally @@ -314,6 +314,8 @@ @param atomic_data: The dictionary to place the atomic data into. @type atomic_data: dict + @param res_name: The residue name. + @type res_name: str @param res_num: The residue number. @type res_num: int @param apex: The apex of the cone. @@ -334,7 +336,7 @@ """ # Add an atom for the cone apex. - atom_add(atomic_data=atomic_data, atom_id='Apex', record_name='HETATM', atom_name='APX', res_name='CON', res_num=res_num, pos=apex, element='H') + atom_add(atomic_data=atomic_data, atom_id='Apex', record_name='HETATM', atom_name='APX', res_name=res_name, res_num=res_num, pos=apex, element='H') # Initialise the rotation matrix, atom number, etc. if R == None: @@ -371,8 +373,8 @@ # The atom position. pos = apex+vector*length - # Add the vector as a H atom of the CON residue. - atom_add(atomic_data=atomic_data, atom_id=atom_id, record_name='HETATM', atom_name='H'+`atom_num`, res_name='CON', res_num=res_num, pos=pos, element='H') + # Add the vector as a H atom of the cone residue. + atom_add(atomic_data=atomic_data, atom_id=atom_id, record_name='HETATM', atom_name='H'+`atom_num`, res_name=res_name, res_num=res_num, pos=pos, element='H') # Connect across the radial array (to generate the circular cone edge). if i != 0: Modified: 1.3/specific_fns/n_state_model.py URL: http://svn.gna.org/viewcvs/relax/1.3/specific_fns/n_state_model.py?rev=5114&r1=5113&r2=5114&view=diff ============================================================================== --- 1.3/specific_fns/n_state_model.py (original) +++ 1.3/specific_fns/n_state_model.py Thu Feb 21 16:22:18 2008 @@ -235,7 +235,7 @@ angle = cdp.theta_diff_in_cone elif cone_type == 'diff on cone': angle = cdp.theta_diff_on_cone - generic_fns.structure.cone_edge(atomic_data=atomic_data, res_num=3, apex=cdp.pivot_point, R=R, angle=angle, length=norm(cdp.pivot_CoM), inc=inc) + generic_fns.structure.cone_edge(atomic_data=atomic_data, res_name='CON', res_num=3, apex=cdp.pivot_point, R=R, angle=angle, length=norm(cdp.pivot_CoM), inc=inc) # Generate the cone cap, and stitch it to the cone edge. if cone_type == 'diff in cone':