mailr9149 - /branches/frame_order/generic_fns/structure/geometric.py


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

Header


Content

Posted by edward on June 25, 2009 - 14:22:
Author: bugman
Date: Thu Jun 25 14:22:32 2009
New Revision: 9149

URL: http://svn.gna.org/viewcvs/relax?rev=9149&view=rev
Log:
Bug fix for generate_vector_residues() when the neg flag is False.

The atoms were incorrectly numbered.


Modified:
    branches/frame_order/generic_fns/structure/geometric.py

Modified: branches/frame_order/generic_fns/structure/geometric.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order/generic_fns/structure/geometric.py?rev=9149&r1=9148&r2=9149&view=diff
==============================================================================
--- branches/frame_order/generic_fns/structure/geometric.py (original)
+++ branches/frame_order/generic_fns/structure/geometric.py Thu Jun 25 
14:22:32 2009
@@ -596,14 +596,16 @@
     # Create the PDB residue representing the vector.
     mol.atom_add(pdb_record='HETATM', atom_num=atom_num, 
atom_name=atom_name, res_name=res_name_vect, chain_id=chain_id, 
res_num=res_num, pos=origin+vector*scale, segment_id=None, element='C')
     mol.atom_connect(index1=atom_num-1, index2=origin_num-1)
+    num = 1
     if neg:
         mol.atom_add(pdb_record='HETATM', atom_num=atom_neg_num, 
atom_name=atom_name, res_name=res_name_vect, chain_id=chain_id, 
res_num=res_num, pos=origin+vector*scale, segment_id=None, element='C')
         mol.atom_connect(index1=atom_neg_num-1, index2=origin_num-1)
+        num = 2
 
     # Add another atom to allow the axis labels to be shifted just outside 
of the vector itself.
-    mol.atom_add(pdb_record='HETATM', atom_num=atom_num+2, 
atom_name=atom_name, res_name=res_name_vect, chain_id=chain_id, 
res_num=res_num, pos=origin+label_placement*vector*scale, segment_id=None, 
element='N')
+    mol.atom_add(pdb_record='HETATM', atom_num=atom_num+num, 
atom_name=atom_name, res_name=res_name_vect, chain_id=chain_id, 
res_num=res_num, pos=origin+label_placement*vector*scale, segment_id=None, 
element='N')
     if neg:
-        mol.atom_add(pdb_record='HETATM', atom_num=atom_neg_num+2, 
atom_name=atom_name, res_name=res_name_vect, chain_id=chain_id, 
res_num=res_num, pos=origin-label_placement*vector*scale, segment_id=None, 
element='N')
+        mol.atom_add(pdb_record='HETATM', atom_num=atom_neg_num+num, 
atom_name=atom_name, res_name=res_name_vect, chain_id=chain_id, 
res_num=res_num, pos=origin-label_placement*vector*scale, segment_id=None, 
element='N')
 
     # Print out.
     print "    " + atom_name + " vector (scaled + shifted to origin): " + 
`origin+vector*scale`




Related Messages


Powered by MHonArc, Updated Thu Jun 25 14:40:03 2009