mailr8589 - /branches/multi_structure/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 January 22, 2009 - 14:59:
Author: bugman
Date: Thu Jan 22 14:59:41 2009
New Revision: 8589

URL: http://svn.gna.org/viewcvs/relax?rev=8589&view=rev
Log:
Fixes for create_vector_dist() for the new structural data design.

The atoms are added to the single molecule, and the struct_index has been 
eliminated.


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

Modified: branches/multi_structure/generic_fns/structure/geometric.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/multi_structure/generic_fns/structure/geometric.py?rev=8589&r1=8588&r2=8589&view=diff
==============================================================================
--- branches/multi_structure/generic_fns/structure/geometric.py (original)
+++ branches/multi_structure/generic_fns/structure/geometric.py Thu Jan 22 
14:59:41 2009
@@ -353,6 +353,9 @@
     # Add a structure.
     structure.add_molecule(name='vector_dist')
 
+    # Alias the single molecule from the single model.
+    mol = structure.structural_data[0].mol[0]
+
     # Initialise the residue and atom numbers.
     res_num = 1
     atom_num = 1
@@ -385,13 +388,13 @@
         vector = spin.xh_vect * length * 1e10
 
         # Add the central X atom.
-        structure.atom_add(pdb_record='ATOM', atom_num=atom_num, 
atom_name=spin.name, res_name=res_name, chain_id='A', res_num=res_num, pos=R, 
segment_id=None, element=spin.element, struct_index=None)
+        mol.atom_add(pdb_record='ATOM', atom_num=atom_num, 
atom_name=spin.name, res_name=res_name, chain_id='A', res_num=res_num, pos=R, 
segment_id=None, element=spin.element)
 
         # Add the H atom.
-        structure.atom_add(pdb_record='ATOM', atom_num=atom_num+1, 
atom_name='H', res_name=res_name, chain_id='A', res_num=res_num, 
pos=R+vector, segment_id=None, element='H', struct_index=None)
+        mol.atom_add(pdb_record='ATOM', atom_num=atom_num+1, atom_name='H', 
res_name=res_name, chain_id='A', res_num=res_num, pos=R+vector, 
segment_id=None, element='H')
 
         # Connect the two atoms.
-        structure.atom_connect(index1=atom_num-1, index2=atom_num)
+        mol.atom_connect(index1=atom_num-1, index2=atom_num)
 
         # Increment the atom number.
         atom_num = atom_num + 2
@@ -412,13 +415,13 @@
             vector = spin.xh_vect * length * 1e10
 
             # Add the central X atom.
-            structure.atom_add(pdb_record='ATOM', atom_num=atom_num, 
atom_name=spin.name, res_name=res_name, chain_id='B', res_num=res_num, pos=R, 
segment_id=None, element=spin.element, struct_index=None)
+            mol.atom_add(pdb_record='ATOM', atom_num=atom_num, 
atom_name=spin.name, res_name=res_name, chain_id='B', res_num=res_num, pos=R, 
segment_id=None, element=spin.element)
 
             # Add the H atom.
-            structure.atom_add(pdb_record='ATOM', atom_num=atom_num+1, 
atom_name='H', res_name=res_name, chain_id='B', res_num=res_num, 
pos=R-vector, segment_id=None, element='H', struct_index=None)
+            mol.atom_add(pdb_record='ATOM', atom_num=atom_num+1, 
atom_name='H', res_name=res_name, chain_id='B', res_num=res_num, 
pos=R-vector, segment_id=None, element='H')
 
             # Connect the two atoms.
-            structure.atom_connect(index1=atom_num-1, index2=atom_num)
+            mol.atom_connect(index1=atom_num-1, index2=atom_num)
 
             # Increment the atom number.
             atom_num = atom_num + 2




Related Messages


Powered by MHonArc, Updated Thu Jan 22 15:20:05 2009