Author: bugman Date: Thu Feb 21 09:19:33 2008 New Revision: 5066 URL: http://svn.gna.org/viewcvs/relax?rev=5066&view=rev Log: Merged revisions 5065 via svnmerge from svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3 ........ r5065 | bugman | 2008-02-21 09:18:42 +0100 (Thu, 21 Feb 2008) | 3 lines Completed the cone_pdb() function. ........ Modified: branches/N_state_model/ (props changed) branches/N_state_model/generic_fns/structure.py Propchange: branches/N_state_model/ ------------------------------------------------------------------------------ Binary property 'svnmerge-integrated' - no diff available. Modified: branches/N_state_model/generic_fns/structure.py URL: http://svn.gna.org/viewcvs/relax/branches/N_state_model/generic_fns/structure.py?rev=5066&r1=5065&r2=5066&view=diff ============================================================================== --- branches/N_state_model/generic_fns/structure.py (original) +++ branches/N_state_model/generic_fns/structure.py Thu Feb 21 09:19:33 2008 @@ -22,7 +22,7 @@ # Python module imports. from math import sqrt, cos, pi, sin -from numpy import arccos, dot, float64, zeros +from numpy import arccos, array, dot, float64, zeros from os import F_OK, access from re import compile, match import Scientific.IO.PDB @@ -329,8 +329,9 @@ @type inc: int """ - # Initialise the rotation matrix. + # Initialise the rotation matrix, atom number, etc. R = zeros((3,3), float64) + atom_num = 1 # Get the rotation matrix. R_2vect(R, array([0,0,1], float64), axis) @@ -355,8 +356,19 @@ # Rotate the vector. vector = dot(R, vector) + # The atom id. + atom_id = 'T' + `i` + # 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') + + # Connect across the radial arrays (to generate the latitudinal lines). + if i != 0: + neighbour_id = 'T' + `i-1` + atom_connect(atomic_data=atomic_data, atom_id=atom_id, bonded_id=neighbour_id) + + # Increment the atom number. + atom_num = atom_num + 1 def create_diff_tensor_pdb(scale=1.8e-6, file=None, dir=None, force=False):