mailr6225 - /1.3/generic_fns/monte_carlo.py


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

Header


Content

Posted by edward on May 21, 2008 - 23:46:
Author: bugman
Date: Wed May 21 23:46:37 2008
New Revision: 6225

URL: http://svn.gna.org/viewcvs/relax?rev=6225&view=rev
Log:
Updated the initial_values() function to the new design.


Modified:
    1.3/generic_fns/monte_carlo.py

Modified: 1.3/generic_fns/monte_carlo.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/generic_fns/monte_carlo.py?rev=6225&r1=6224&r2=6225&view=diff
==============================================================================
--- 1.3/generic_fns/monte_carlo.py (original)
+++ 1.3/generic_fns/monte_carlo.py Wed May 21 23:46:37 2008
@@ -251,25 +251,25 @@
             index = index + 1
 
 
-def initial_values(run=None):
-    """Function for setting the initial simulation parameter values."""
-
-    # Arguments.
-    self.run = run
-
-    # Test if the run exists.
-    if not self.run in relax_data_store.run_names:
-        raise RelaxNoPipeError, self.run
-
-    # Test if simulations have been set up.
-    if not hasattr(relax_data_store, 'sim_state'):
-        raise RelaxError, "Monte Carlo simulations for the run " + 
`self.run` + " have not been set up."
+def initial_values():
+    """Set the initial simulation parameter values."""
+
+    # Test if the current data pipe exists.
+    if not relax_data_store.current_pipe:
+        raise RelaxNoPipeError
+
+    # Alias the current data pipe.
+    cdp = relax_data_store[relax_data_store.current_pipe]
+
+    # Test if simulations have been set up.
+    if not hasattr(cdp, 'sim_state'):
+        raise RelaxError, "Monte Carlo simulations have not been set up."
 
     # Specific initial Monte Carlo parameter value function setup.
     init_sim_values = get_specific_fn('init_sim_values', cdp.pipe_type)
 
     # Set the initial parameter values.
-    init_sim_values(self.run)
+    init_sim_values()
 
 
 def off(run=None):




Related Messages


Powered by MHonArc, Updated Thu May 22 00:00:34 2008