mailr7049 - in /1.3: generic_fns/grace.py generic_fns/value.py specific_fns/noe.py


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

Header


Content

Posted by sebastien . morin . 1 on July 31, 2008 - 23:39:
Author: semor
Date: Thu Jul 31 16:05:37 2008
New Revision: 7049

URL: http://svn.gna.org/viewcvs/relax?rev=7049&view=rev
Log:
More conversions of 'relax.IO' to 'relax_io'.

Old instances are now completely converted.


Modified:
    1.3/generic_fns/grace.py
    1.3/generic_fns/value.py
    1.3/specific_fns/noe.py

Modified: 1.3/generic_fns/grace.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/grace.py?rev=7049&r1=7048&r2=7049&view=diff
==============================================================================
--- 1.3/generic_fns/grace.py (original)
+++ 1.3/generic_fns/grace.py Thu Jul 31 16:05:37 2008
@@ -32,6 +32,7 @@
 from data import Relax_data_store; ds = Relax_data_store()
 from generic_fns.mol_res_spin import exists_mol_res_spin_data, spin_loop
 from relax_errors import RelaxError, RelaxNoPipeError, RelaxNoSequenceError, 
RelaxNoSimError, RelaxRegExpError
+from relax_io import get_file_path, open_write_file, test_binary
 
 
 
@@ -177,13 +178,13 @@
         """Function for running Grace."""
 
         # Test the binary file string corresponds to a valid executable.
-        self.relax.IO.test_binary(grace_exe)
+        test_binary(grace_exe)
 
         # File path.
-        self.file_path = self.relax.IO.file_path(file, dir)
+        self.get_file_path = get_file_path(file, dir)
 
         # Run Grace.
-        system(grace_exe + " " + self.file_path + " &")
+        system(grace_exe + " " + self.get_file_path + " &")
 
 
     def write(self, x_data_type='res', y_data_type=None, res_num=None, 
res_name=None, plot_data='value', norm=1, file=None, dir=None, force=False):
@@ -228,7 +229,7 @@
             raise RelaxNoSimError, self.run
 
         # Open the file for writing.
-        self.file = self.relax.IO.open_write_file(file, dir, force)
+        self.file = open_write_file(file, dir, force)
 
         # Function type.
         function_type = ds.run_types[ds.run_names.index(run)]

Modified: 1.3/generic_fns/value.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/value.py?rev=7049&r1=7048&r2=7049&view=diff
==============================================================================
--- 1.3/generic_fns/value.py (original)
+++ 1.3/generic_fns/value.py Thu Jul 31 16:05:37 2008
@@ -34,6 +34,7 @@
 from generic_fns.minimise import reset_min_stats
 from generic_fns.mol_res_spin import exists_mol_res_spin_data, spin_loop
 from relax_errors import RelaxError, RelaxFileEmptyError, RelaxNoResError, 
RelaxNoPipeError, RelaxNoSequenceError, RelaxParamSetError, RelaxRegExpError, 
RelaxUnknownParamError, RelaxValueError
+from relax_io import extract_data, open_write_file, strip
 from specific_fns.setup import get_specific_fn
 
 
@@ -459,7 +460,7 @@
                 raise RelaxValueError, (self.param, self.run)
 
         # Extract the data from the file.
-        file_data = self.relax.IO.extract_data(file)
+        file_data = extract_data(file)
 
         # Count the number of header lines.
         header_lines = 0
@@ -475,7 +476,7 @@
         file_data = file_data[header_lines:]
 
         # Strip the data.
-        file_data = self.relax.IO.strip(file_data)
+        file_data = strip(file_data)
 
         # Do nothing if the file does not exist.
         if not file_data:
@@ -574,7 +575,7 @@
             raise RelaxNoSequenceError
 
         # Open the file for writing.
-        file = self.relax.IO.open_write_file(file, dir, force)
+        file = open_write_file(file, dir, force)
 
         # Write the data.
         self.write_data(file, return_value)

Modified: 1.3/specific_fns/noe.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/specific_fns/noe.py?rev=7049&r1=7048&r2=7049&view=diff
==============================================================================
--- 1.3/specific_fns/noe.py (original)
+++ 1.3/specific_fns/noe.py Thu Jul 31 16:05:37 2008
@@ -27,6 +27,7 @@
 # relax module imports.
 from data import Relax_data_store; ds = Relax_data_store()
 from relax_errors import RelaxArgNotInListError, RelaxError, 
RelaxInvalidDataError, RelaxNoPipeError, RelaxNoSequenceError, 
RelaxRegExpError
+from relax_io import open_write_file
 
 
 class Noe:
@@ -392,7 +393,7 @@
             raise RelaxNoSequenceError
 
         # Open the file for writing.
-        noe_file = self.relax.IO.open_write_file(file, dir, force)
+        noe_file = open_write_file(file, dir, force)
 
         # Write the data.
         self.relax.generic.value.write_data(self.run, None, noe_file, 
return_value=self.return_value)




Related Messages


Powered by MHonArc, Updated Fri Aug 01 01:01:09 2008