mailr5064 - in /branches/N_state_model: ./ generic_fns/structure.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on February 21, 2008 - 09:13:
Author: bugman
Date: Thu Feb 21 09:13:32 2008
New Revision: 5064

URL: http://svn.gna.org/viewcvs/relax?rev=5064&view=rev
Log:
Merged revisions 5063 via svnmerge from 
svn+ssh://bugman@xxxxxxxxxxx/svn/relax/1.3

........
  r5063 | bugman | 2008-02-21 09:11:55 +0100 (Thu, 21 Feb 2008) | 3 lines
  
  Added the missing import of the rotation matrix R_2vect() 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=5064&r1=5063&r2=5064&view=diff
==============================================================================
--- branches/N_state_model/generic_fns/structure.py (original)
+++ branches/N_state_model/generic_fns/structure.py Thu Feb 21 09:13:32 2008
@@ -34,6 +34,7 @@
 from generic_fns import molmol
 from generic_fns.sequence import load_PDB_sequence
 from generic_fns.selection import exists_mol_res_spin_data, return_molecule, 
return_residue, return_spin, spin_loop
+from maths_fns.rotation_matrix import R_2vect
 from physical_constants import ArH, ArC, ArN, ArO, ArS
 from relax_errors import RelaxError, RelaxFileError, RelaxNoPdbChainError, 
RelaxNoPdbError, RelaxNoResError, RelaxNoPipeError, RelaxNoSequenceError, 
RelaxNoTensorError, RelaxNoVectorsError, RelaxPdbError, RelaxPdbLoadError, 
RelaxRegExpError
 from relax_io import get_file_path, open_write_file
@@ -303,7 +304,7 @@
         return R
 
 
-def cone_edge(atomic_data=None, apex=None, axis=None, angle=None, 
length=None, inc=None):
+def cone_edge(atomic_data=None, res_num=None, apex=None, axis=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
@@ -313,6 +314,8 @@
 
     @param atomic_data:     The dictionary to place the atomic data into.
     @type atomic_data:      dict
+    @param res_num:         The residue number.
+    @type res_num:          int
     @param apex:            The apex of the cone.
     @type apex:             numpy array, len 3
     @param axis:            The central axis of the cone.
@@ -348,6 +351,12 @@
 
         # The vector in the unrotated frame.
         vector = array([x, y, z], float64)
+
+        # Rotate the vector.
+        vector = dot(R, vector)
+
+        # 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')
 
 
 def create_diff_tensor_pdb(scale=1.8e-6, file=None, dir=None, force=False):




Related Messages


Powered by MHonArc, Updated Thu Feb 21 09:20:38 2008