mailRe: r23074 - /trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py


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

Header


Content

Posted by Edward d'Auvergne on May 08, 2014 - 10:47:
Hi Troels,

If you add this OpenDX mapping functionally to a new system test -
which would be awesome as it is not currently tested - then you might
want to set ds.dx_inc to 2 or 3.  Keeping the tests as fast as
possible would be the goal.  You can not load the files into OpenDX to
check them in the system test, but you can check for their exact
contents.

Cheers,

Edward



On 8 May 2014 02:44,  <tlinnet@xxxxxxxxxxxxx> wrote:
Author: tlinnet
Date: Thu May  8 02:44:16 2014
New Revision: 23074

URL: http://svn.gna.org/viewcvs/relax?rev=23074&view=rev
Log:
Fix for script for the visualising the spin dynamics point which generated 
the data.

This is to the script, which can visualize the synthetic CPMG data.

sr #3154: (https://gna.org/support/?3154) Implementation of Baldwin (2014) 
B14 model - 2-site exact solution model for all time scales.

This follows the tutorial for adding relaxation dispersion models at:
http://wiki.nmr-relax.com/Tutorial_for_adding_relaxation_dispersion_models_to_relax#Debugging

Modified:
    trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py

Modified: trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py?rev=23074&r1=23073&r2=23074&view=diff
==============================================================================
--- trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py  
(original)
+++ trunk/test_suite/system_tests/scripts/relax_disp/cpmg_synthetic.py  Thu 
May  8 02:44:16 2014
@@ -1,3 +1,23 @@
+###############################################################################
+#                                                                          
   #
+# Copyright (C) 2013-2014 Troels E. Linnet                                 
   #
+#                                                                          
   #
+# This file is part of the program relax (http://www.nmr-relax.com).       
   #
+#                                                                          
   #
+# This program is free software: you can redistribute it and/or modify     
   #
+# it under the terms of the GNU General Public License as published by     
   #
+# the Free Software Foundation, either version 3 of the License, or        
   #
+# (at your option) any later version.                                      
   #
+#                                                                          
   #
+# This program is distributed in the hope that it will be useful,          
   #
+# but WITHOUT ANY WARRANTY; without even the implied warranty of           
   #
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the            
   #
+# GNU General Public License for more details.                             
   #
+#                                                                          
   #
+# You should have received a copy of the GNU General Public License        
   #
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.    
   #
+#                                                                          
   #
+###############################################################################
 # Script for calculating synthetics CPMG data.

 # Python module imports.
@@ -147,7 +167,7 @@
     ds.opendx = True

 if not hasattr(ds, 'dx_inc'):
-    ds.dx_inc = 70
+    ds.dx_inc = 50

 # The set r2eff err.
 if not hasattr(ds, 'r2eff_err'):
@@ -311,20 +331,34 @@
 if ds.opendx:
     # First switch pipe, since dx.map will go through parameters and end 
up a "bad" place. :-)
     pipe_name_MODEL_MAP = "%s_%s_map"%(pipe_name, model_analyse)
-    pipe.copy(pipe_from=pipe_name_r2eff, pipe_to=pipe_name_MODEL_MAP, 
bundle_to = pipe_bundle)
+    pipe.copy(pipe_from=pipe_name, pipe_to=pipe_name_MODEL_MAP, bundle_to 
= pipe_bundle)
     pipe.switch(pipe_name=pipe_name_MODEL_MAP)

+    # Copy R2eff, but not the original parameters
+    value.copy(pipe_from=pipe_name_r2eff, pipe_to=pipe_name_MODEL_MAP, 
param='r2eff')
+
+    # Then select model.
+    relax_disp.select_model(model=model_analyse)
+
+    # Define dx parameters
     dx_params = ['dw', 'pA', 'kex']
-    for cur_spin, mol_name, resi, resn, spin_id in 
spin_loop(full_info=True, return_id=True, skip_desel=True):
-        cur_spin_id = spin_id
+    for res_name, res_num, spin_name, params in cur_spins:
+        cur_spin_id = ":%i@%s"%(res_num, spin_name)
+        cur_spin = return_spin(cur_spin_id)
         dx_point = []
+
+        # Now get the parameters.
         for dx_param in dx_params:
-            set_val = getattr(cur_spin, dx_param)
-            dx_point.append( set_val )
-
+            set_value = float(params[dx_param ])
+            dx_point.append(set_value)
+
+        print("Params for dx map is")
+        print(dx_params)
+        print("Point param for dx map is")
+        print(dx_point)
         file_name_map = "map%s" % (cur_spin_id .replace('#', 
'_').replace(':', '_').replace('@', '_'))
         file_name_point = "point%s" % (cur_spin_id .replace('#', 
'_').replace(':', '_').replace('@', '_'))
-        dx.map(params=dx_params, map_type='Iso3D', spin_id=":1@N", 
inc=ds.dx_inc, lower=None, upper=None, axis_incs=5, 
file_prefix=file_name_map, dir=ds.resdir, point=dx_point, 
point_file=file_name_point, remap=None)
+        dx.map(params=dx_params, map_type='Iso3D', spin_id=cur_spin_id, 
inc=ds.dx_inc, lower=None, upper=None, axis_incs=5, 
file_prefix=file_name_map, dir=ds.resdir, point=dx_point, 
point_file=file_name_point, remap=None)
         #vp_exec:  A flag specifying whether to execute the visual program 
automatically at start-up.
         #dx.execute(file_prefix=file_name, dir=ds.resdir, dx_exe='dx', 
vp_exec=True)



_______________________________________________
relax (http://www.nmr-relax.com)

This is the relax-commits mailing list
relax-commits@xxxxxxx

To unsubscribe from this list, get a password
reminder, or change your subscription options,
visit the list information page at
https://mail.gna.org/listinfo/relax-commits



Related Messages


Powered by MHonArc, Updated Thu May 08 11:00:11 2014