Author: bugman Date: Fri Mar 22 17:15:19 2013 New Revision: 18994 URL: http://svn.gna.org/viewcvs/relax?rev=18994&view=rev Log: Next block of the manual merger of the frame_order_testing branch. The commands used were: svn merge -r18552:18553 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . svn merge -r18563:18564 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . svn merge -r18564:18565 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . svn merge -r18565:18566 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . svn merge -r18566:18567 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . svn merge -r18568:18569 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . svn merge -r18569:18570 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . The console messages were: [edau@localhost relax-trunk]$ svn merge -r18552:18553 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18553 into '.': U generic_fns/align_tensor.py [edau@localhost relax-trunk]$ svn merge -r18563:18564 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18564 into '.': U specific_fns/frame_order.py [edau@localhost relax-trunk]$ svn merge -r18564:18565 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18565 into '.': U maths_fns/frame_order/__init__.py [edau@localhost relax-trunk]$ svn merge -r18565:18566 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18566 into '.': G specific_fns/frame_order.py [edau@localhost relax-trunk]$ svn merge -r18566:18567 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18567 into '.': G specific_fns/frame_order.py [edau@localhost relax-trunk]$ svn merge -r18568:18569 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18569 into '.': U auto_analyses/frame_order.py [edau@localhost relax-trunk]$ svn merge -r18569:18570 svn+ssh://bugman@xxxxxxxxxxx/svn/relax/branches/frame_order_testing . --- Merging r18570 into '.': G specific_fns/frame_order.py [edau@localhost relax-trunk]$ Modified: trunk/auto_analyses/frame_order.py trunk/generic_fns/align_tensor.py trunk/maths_fns/frame_order/__init__.py trunk/specific_fns/frame_order.py Modified: trunk/auto_analyses/frame_order.py URL: http://svn.gna.org/viewcvs/relax/trunk/auto_analyses/frame_order.py?rev=18994&r1=18993&r2=18994&view=diff ============================================================================== --- trunk/auto_analyses/frame_order.py (original) +++ trunk/auto_analyses/frame_order.py Fri Mar 22 17:15:19 2013 @@ -209,39 +209,49 @@ @param model: The frame order model. @type model: str - """ + @return: The list of increment values. + @rtype: list of int and None + """ + + # Initialise the structure. + incs = [] + if hasattr(cdp, 'pivot_fixed') and not cdp.pivot_fixed: + incs += [None, None, None] # The rotor model. if model == 'rotor': - return [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc] + incs += [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc] # The free rotor model. if model == 'free rotor': - return [None, None, self.grid_inc, self.grid_inc] + incs += [None, None, self.grid_inc, self.grid_inc] # The torsionless isotropic cone model. if model == 'iso cone, torsionless': - return [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc] + incs += [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc] # The free rotor isotropic cone model. if model == 'iso cone, free rotor': - return [None, None, None, None, self.grid_inc] + incs += [None, None, None, None, self.grid_inc] # The isotropic cone model. if model == 'iso cone': - return [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, None] + incs += [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, None] # The torsionless pseudo-elliptic cone model. if model == 'pseudo-ellipse, torsionless': - return [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, self.grid_inc, None] + incs += [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, self.grid_inc, None] # The free rotor pseudo-elliptic cone model. if model == 'pseudo-ellipse, free rotor': - return [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, self.grid_inc, None] + incs += [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, self.grid_inc, None] # The pseudo-elliptic cone model. if model == 'pseudo-ellipse': - return [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, self.grid_inc, None, None] + incs += [None, None, None, self.grid_inc, self.grid_inc, self.grid_inc, self.grid_inc, None, None] + + # Return the increment list. + return incs def nested_params(self, model): Modified: trunk/generic_fns/align_tensor.py URL: http://svn.gna.org/viewcvs/relax/trunk/generic_fns/align_tensor.py?rev=18994&r1=18993&r2=18994&view=diff ============================================================================== --- trunk/generic_fns/align_tensor.py (original) +++ trunk/generic_fns/align_tensor.py Fri Mar 22 17:15:19 2013 @@ -1157,12 +1157,18 @@ # The table header. table.append(['']) for i in range(tensor_num): - table[0].append(cdp.align_tensors[i].name) + if cdp.align_tensors[i].name == None: + table[0].append(repr(i)) + else: + table[0].append(cdp.align_tensors[i].name) # First loop over the rows. for i in range(tensor_num): # Add the tensor name. - table.append([cdp.align_tensors[i].name]) + if cdp.align_tensors[i].name == None: + table.append([repr(i)]) + else: + table.append([cdp.align_tensors[i].name]) # Second loop over the columns. for j in range(tensor_num): Modified: trunk/maths_fns/frame_order/__init__.py URL: http://svn.gna.org/viewcvs/relax/trunk/maths_fns/frame_order/__init__.py?rev=18994&r1=18993&r2=18994&view=diff ============================================================================== --- trunk/maths_fns/frame_order/__init__.py (original) +++ trunk/maths_fns/frame_order/__init__.py Fri Mar 22 17:15:19 2013 @@ -193,8 +193,8 @@ if err: self.pcs_error = pcs_errors else: - # Missing errors (the values need to be small, close to ppm units, so the chi-squared value is comparable to the RDC). - self.pcs_error = 0.03 * 1e-6 * ones((self.num_align, self.num_spins), float64) + # Missing errors (default to 0.1 ppm errors). + self.pcs_error = 0.1 * 1e-6 * ones((self.num_align, self.num_spins), float64) # RDC errors. if self.rdc_flag_sum: @@ -206,7 +206,7 @@ if err: self.rdc_error = rdc_errors else: - # Missing errors. + # Missing errors (default to 1 Hz errors). self.rdc_error = ones((self.num_align, self.num_interatom), float64) # Missing data matrices (RDC). Modified: trunk/specific_fns/frame_order.py URL: http://svn.gna.org/viewcvs/relax/trunk/specific_fns/frame_order.py?rev=18994&r1=18993&r2=18994&view=diff ============================================================================== --- trunk/specific_fns/frame_order.py (original) +++ trunk/specific_fns/frame_order.py Fri Mar 22 17:15:19 2013 @@ -241,13 +241,13 @@ list = [] # RDC search. - for interatom in interatomic_loop(): + for interatom in interatomic_loop(selection1=self._domain_moving()): if hasattr(interatom, 'rdc'): list.append('rdc') break # PCS search. - for spin in spin_loop(): + for spin in spin_loop(selection=self._domain_moving()): if hasattr(spin, 'pcs'): list.append('pcs') break @@ -517,9 +517,9 @@ def _domain_moving(self): - """Return the domain ID of the moving domain. - - @return: The domain ID of the moving domain. + """Return the spin ID string corresponding to the moving domain. + + @return: The spin ID string defining the moving domain. @rtype: str """ @@ -530,6 +530,10 @@ # Only support for 2 domains. if len(list(cdp.domain.keys())) > 2: raise RelaxError("Only two domains are supported in the frame order analysis.") + + # Reference domain not set yet, so return nothing. + if not hasattr(cdp, 'ref_domain'): + return None # Loop over the domains. for id in list(cdp.domain.keys()): @@ -538,7 +542,7 @@ continue # Return the ID. - return id + return cdp.domain[id] def _domain_to_pdb(self, domain=None, pdb=None): @@ -629,7 +633,7 @@ atomic_pos = [] # Store the atomic positions. - for spin, spin_id in spin_loop(return_id=True): + for spin, spin_id in spin_loop(selection=self._domain_moving(), return_id=True): # Skip deselected spins. if not spin.select: continue @@ -728,9 +732,8 @@ raise RelaxError("The spectrometer frequency for the alignment ID '%s' has not been set." % align_id) # Spin loop over the domain. - id = cdp.domain[self._domain_moving()] j = 0 - for spin in spin_loop(id): + for spin in spin_loop(selection=self._domain_moving()): # Skip deselected spins. if not spin.select: continue @@ -800,7 +803,7 @@ absolute = [] # The unit vectors and RDC constants. - for interatom in interatomic_loop(): + for interatom in interatomic_loop(selection1=self._domain_moving()): # Get the spins. spin1 = return_spin(interatom.spin_id1) spin2 = return_spin(interatom.spin_id2) @@ -874,8 +877,7 @@ absolute.append([]) # Interatom loop over the domain. - id = cdp.domain[self._domain_moving()] - for interatom in interatomic_loop(id): + for interatom in interatomic_loop(self._domain_moving()): # Get the spins. spin1 = return_spin(interatom.spin_id1) spin2 = return_spin(interatom.spin_id2) @@ -1274,9 +1276,8 @@ pcs_flag = True # Spin loop over the domain. - id = cdp.domain[self._domain_moving()] pcs_index = 0 - for spin in spin_loop(id): + for spin in spin_loop(self._domain_moving()): # Skip deselected spins. if not spin.select: continue @@ -1295,7 +1296,7 @@ # Interatomic data container loop. rdc_index = 0 - for interatom in interatomic_loop(id): + for interatom in interatomic_loop(self._domain_moving()): # Get the spins. spin1 = return_spin(interatom.spin_id1) spin2 = return_spin(interatom.spin_id2) @@ -1648,17 +1649,14 @@ @rtype: list of str """ - # The moving domain ID. - id = cdp.domain[self._domain_moving()] - # Loop over the interatomic data containers for the moving domain (for the RDC data). - for interatom in interatomic_loop(id): - # Skip deselected containers. - if not interatom.select: - continue - - # No RDC, so skip. - if not hasattr(interatom, 'rdc'): + for interatom in interatomic_loop(selection1=self._domain_moving()): + # Get the spins. + spin1 = return_spin(interatom.spin_id1) + spin2 = return_spin(interatom.spin_id2) + + # RDC checks. + if not self._check_rdcs(interatom, spin1, spin2): continue # Loop over the alignment IDs. @@ -1667,7 +1665,7 @@ yield ['rdc', interatom.spin_id1, interatom.spin_id2, align_id] # Loop over the spin containers for the moving domain (for the PCS data). - for spin, spin_id in spin_loop(id, return_id=True): + for spin, spin_id in spin_loop(selection=self._domain_moving(), return_id=True): # Skip deselected spins. if not spin.select: continue @@ -2033,8 +2031,13 @@ for j in range(n): # Fixed parameter. if grid[j] == None: - # Get the current parameter value. - pts[i, j] = getattr(cdp, cdp.params[j]) / scaling_matrix[j, j] + # Get the current parameter value (pivot, assuming the pivot point is always at the start of the parameter array). + if cdp.params[j] in ['pivot_x', 'pivot_y', 'pivot_z']: + pts[i, j] = cdp.pivot[j] / scaling_matrix[j, j] + + # Get the current parameter value (normal parameter). + else: + pts[i, j] = getattr(cdp, cdp.params[j]) / scaling_matrix[j, j] # Add the point coordinate. else: