mailr18016 - /branches/frame_order_testing/generic_fns/structure/api_base.py


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

Header


Content

Posted by edward on November 22, 2012 - 10:20:
Author: bugman
Date: Thu Nov 22 10:20:35 2012
New Revision: 18016

URL: http://svn.gna.org/viewcvs/relax?rev=18016&view=rev
Log:
The structural API base pack_structs() method has been modified to add the 
absolute file path.

This will be used as a fall back mechanism for loading PDB or XYZ files from 
old state or results
files if the file cannot be found on the relative path.  This is useful for 
the PyMOL and Molmol
user functions.


Modified:
    branches/frame_order_testing/generic_fns/structure/api_base.py

Modified: branches/frame_order_testing/generic_fns/structure/api_base.py
URL: 
http://svn.gna.org/viewcvs/relax/branches/frame_order_testing/generic_fns/structure/api_base.py?rev=18016&r1=18015&r2=18016&view=diff
==============================================================================
--- branches/frame_order_testing/generic_fns/structure/api_base.py (original)
+++ branches/frame_order_testing/generic_fns/structure/api_base.py Thu Nov 22 
10:20:35 2012
@@ -477,7 +477,7 @@
         return len(self.structural_data[0].mol)
 
 
-    def pack_structs(self, data_matrix, orig_model_num=None, 
set_model_num=None, orig_mol_num=None, set_mol_name=None, file_name=None, 
file_path=None):
+    def pack_structs(self, data_matrix, orig_model_num=None, 
set_model_num=None, orig_mol_num=None, set_mol_name=None, file_name=None, 
file_path=None, file_path_abs=None):
         """From the given structural data, expand the structural data data 
structure.
 
         @param data_matrix:         A matrix of structural objects.
@@ -490,11 +490,12 @@
         @type orig_mol_num:         list of int
         @keyword set_mol_name:      The new molecule names.
         @type set_mol_name:         list of str
-        @keyword file_name:         The name of the file from which the 
molecular data has been
-                                    extracted.
+        @keyword file_name:         The name of the file from which the 
molecular data has been extracted.
         @type file_name:            None or str
         @keyword file_path:         The full path to the file specified by 
'file_name'.
         @type file_path:            None or str
+        @keyword file_path_abs:     The absolute path to the file specified 
by 'file_name'.  This is a fallback mechanism in case results or save files 
are located somewhere other than the working directory.
+        @type file_path_abs:        None or str
         """
 
         # Test the number of models.
@@ -562,6 +563,7 @@
                 model.mol[-1].mol_name = set_mol_name[j]
                 model.mol[-1].file_name = file_name
                 model.mol[-1].file_path = file_path
+                model.mol[-1].file_path_abs = file_path_abs
                 model.mol[-1].file_mol_num = orig_mol_num[j]
                 model.mol[-1].file_model = orig_model_num[i]
 




Related Messages


Powered by MHonArc, Updated Thu Nov 22 10:40:02 2012