Author: bugman Date: Tue Oct 18 09:13:22 2011 New Revision: 14877 URL: http://svn.gna.org/viewcvs/relax?rev=14877&view=rev Log: The rdc and pcs display and write user functions now output mol, res, and spin name and num cols. Instead of the spin ID column, these user functions now output the molecule name, residue name, residue number, spin name and spin number columns. This is better to read back into relax as info such as the spin number can be ignored to allow different PDB files to be used. Modified: 1.3/generic_fns/pcs.py 1.3/generic_fns/rdc.py Modified: 1.3/generic_fns/pcs.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/pcs.py?rev=14877&r1=14876&r2=14877&view=diff ============================================================================== --- 1.3/generic_fns/pcs.py (original) +++ 1.3/generic_fns/pcs.py Tue Oct 18 09:13:22 2011 @@ -580,18 +580,26 @@ file = open_write_file(file, dir, force) # Loop over the spins and collect the data. - spin_ids = [] + mol_names = [] + res_nums = [] + res_names = [] + spin_nums = [] + spin_names = [] values = [] errors = [] - for spin, spin_id in spin_loop(return_id=True): + for spin, mol_name, res_num, res_name in spin_loop(full_info=True): # Skip spins with no PCSs. if not bc and (not hasattr(spin, 'pcs') or not align_id in spin.pcs.keys()): continue elif bc and (not hasattr(spin, 'pcs_bc') or align_id not in spin.pcs_bc.keys()): continue - # Store the spin ID. - spin_ids.append(spin_id) + # Append the spin data. + mol_names.append(mol_name) + res_nums.append(res_num) + res_names.append(res_name) + spin_nums.append(spin.num) + spin_names.append(spin.name) # The value. if bc: @@ -606,4 +614,4 @@ errors.append(None) # Write out. - write_spin_data(file=file, spin_ids=spin_ids, data=values, data_name='PCSs', error=errors, error_name='PCS_error') + write_spin_data(file=file, mol_names=mol_names, res_nums=res_nums, res_names=res_names, spin_nums=spin_nums, spin_names=spin_names, data=values, data_name='PCSs', error=errors, error_name='PCS_error') Modified: 1.3/generic_fns/rdc.py URL: http://svn.gna.org/viewcvs/relax/1.3/generic_fns/rdc.py?rev=14877&r1=14876&r2=14877&view=diff ============================================================================== --- 1.3/generic_fns/rdc.py (original) +++ 1.3/generic_fns/rdc.py Tue Oct 18 09:13:22 2011 @@ -556,22 +556,27 @@ # Open the file for writing. file = open_write_file(file, dir, force) - # The index. - index = cdp.rdc_ids.index(align_id) - # Loop over the spins and collect the data. - spin_ids = [] + mol_names = [] + res_nums = [] + res_names = [] + spin_nums = [] + spin_names = [] values = [] errors = [] - for spin, spin_id in spin_loop(return_id=True): + for spin, mol_name, res_num, res_name in spin_loop(full_info=True): # Skip spins with no RDCs. if not bc and (not hasattr(spin, 'rdc') or align_id not in spin.rdc.keys()): continue elif bc and (not hasattr(spin, 'rdc_bc') or align_id not in spin.rdc_bc.keys()): continue - # Store the spin ID. - spin_ids.append(spin_id) + # Append the spin data. + mol_names.append(mol_name) + res_nums.append(res_num) + res_names.append(res_name) + spin_nums.append(spin.num) + spin_names.append(spin.name) # The value. if bc: @@ -586,4 +591,4 @@ errors.append(None) # Write out. - write_spin_data(file=file, spin_ids=spin_ids, data=values, data_name='RDCs', error=errors, error_name='RDC_error') + write_spin_data(file=file, mol_names=mol_names, res_nums=res_nums, res_names=res_names, spin_nums=spin_nums, spin_names=spin_names, data=values, data_name='RDCs', error=errors, error_name='RDC_error')