Author: tlinnet Date: Wed Aug 20 21:06:31 2014 New Revision: 25122 URL: http://svn.gna.org/viewcvs/relax?rev=25122&view=rev Log: Implemented the special flag '1 - pA', when nesting parameters from models with fewer chemical sites. Modified: trunk/auto_analyses/relax_disp.py Modified: trunk/auto_analyses/relax_disp.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/relax_disp.py?rev=25122&r1=25121&r2=25122&view=diff ============================================================================== --- trunk/auto_analyses/relax_disp.py (original) +++ trunk/auto_analyses/relax_disp.py Wed Aug 20 21:06:31 2014 @@ -363,16 +363,23 @@ if param_conv == None: continue - else: - print("Copying parameter %s to %s." % (param, param_conv)) - - # Loop over the spins to copy the parameters. - for spin, spin_id in spin_loop(return_id=True, skip_desel=True): - # Get the nested spin. - nested_spin = return_spin(spin_id=spin_id, pipe=nested_pipe) - - # Set the attribute. - setattr(spin, param, deepcopy(getattr(nested_spin, param_conv))) + print("Copying from parameter '%s' to '%s'." % (param_conv, param)) + + # Loop over the spins to copy the parameters. + for spin, spin_id in spin_loop(return_id=True, skip_desel=True): + # Get the nested spin. + nested_spin = return_spin(spin_id=spin_id, pipe=nested_pipe) + + # Set value. + # Some special conversions. + if param_conv == '1 - pA': + val = 1.0 - getattr(nested_spin, 'pA') + + else: + val = deepcopy(getattr(nested_spin, param_conv)) + + # Set the attribute. + setattr(spin, param, val) # Determine if model is equivalent, and should not be Grid searched, or if nested, and some parameters are pre-set. Here Grid search should still be issued. return equivalent