Hi Troels, For this, I was thinking of adding a simple function to the pipe_control.mol_res_spin module in the trunk called format_info(). This would have the arguments:
def format_info(mol_name=None, res_num=None, res_name=None, spin_num=None, spin_name=None): Let's say that: mol_name = 'Ubi' res_name = 'Ala' res_num = '10' spin_num = None spin_name = 'N' Then the returned string could be: string = "Molecule Ubi, residue Ala 10, spin N" Each part is only added if it is not None. This string could then be used in the title of your grace plots here: "Relaxation dispersion plot for: %s" % string To end up with: "Relaxation dispersion plot for: Molecule Ubi, residue Ala 10, spin N" This will then work for all systems and you won't be restricting these plot titles to only protein and only backbone data. Do you have ideas for this? Cheers, Edward On 28 July 2014 12:44, Edward d'Auvergne <[email protected]> wrote: > Another way to think of this is to consider an imaginary system consisting of: > > - A DNA molecule of 10 bases, where 15N and 13C data has been > collected for all bases, and 13C data collected for the ribose. > - A promoter protein, which is a dimer, attached to the DNA. Here you > have collected backbone 15N data and sidechain methyl 13C data. > - A drug binding between the two proteins. Here you have collected > natural abundance 13C dispersion data. > > In relax you can currently analyse this all together. You can cluster > spins in the drug with spins in the protein (and also the DNA if you > wish). The infrastructure already exists for this in the dispersion > analysis. If you keep such 'exotic' systems in mind while designing, > as well as keeping in mind that all parts will be independent of R1rho > vs. CPMG, then the resultant code will be just as flexible as the rest > of the dispersion analysis. > > Cheers, > > Edward > > On 28 July 2014 12:17, Edward d'Auvergne <[email protected]> wrote: >> Hi Troels, >> >> I have a problem with this title as it is far too protein-centric. I >> know you are using the residue name here because the spin ID does not >> contain that information. But you need to consider that this analysis >> will be applied to different systems, for example things that might >> look like this ensemble: >> http://www.nmr-relax.com/manual/phthalic_acid_ens_600x600.png. In >> these cases the residue name will be None. In other cases the residue >> number will be None but a residue name will exist and will be in the >> spin ID string. >> >> Therefore I would suggest creating a special function in >> pipe_control.mol_res_spin that will create a nicely formatted string >> of the molecule name, residue name and number, and spin name and >> number. This would need to be flexible in that any of these 5 >> elements can be None and hence should not be included. You pass in >> the mol_name, res_name, res_num, spin.name, and spin.num values and it >> returns a formatted string. One needs to always keep in mind that all >> analyses in relax can be applied to proteins, RNA/DNA, >> polysaccharides, and small organic molecules. Flexibility is one of >> relax's strong points. >> >> Cheers, >> >> Edward >> >> >> >> >> >> On 26 July 2014 13:34, <[email protected]> wrote: >>> Author: tlinnet >>> Date: Sat Jul 26 13:34:09 2014 >>> New Revision: 24772 >>> >>> URL: http://svn.gna.org/viewcvs/relax?rev=24772&view=rev >>> Log: >>> Added the spin specific residue name and spin_id to the title of the >>> dispersion plots. >>> >>> This is handy, since it is often of interest to have this information at >>> hand, when looking through many graphs. >>> >>> sr #3124(https://gna.org/support/?3124): Grace graphs production for R1rho >>> analysis with R2_eff as function of Omega_eff. >>> sr #3138(https://gna.org/support/?3138): Interpolating theta through >>> spin-lock offset [Omega], rather than spin-lock field strength [w1]. >>> >>> Modified: >>> branches/r1rho_plotting/specific_analyses/relax_disp/data.py >>> >>> Modified: branches/r1rho_plotting/specific_analyses/relax_disp/data.py >>> URL: >>> http://svn.gna.org/viewcvs/relax/branches/r1rho_plotting/specific_analyses/relax_disp/data.py?rev=24772&r1=24771&r2=24772&view=diff >>> ============================================================================== >>> --- branches/r1rho_plotting/specific_analyses/relax_disp/data.py >>> (original) >>> +++ branches/r1rho_plotting/specific_analyses/relax_disp/data.py Sat >>> Jul 26 13:34:09 2014 >>> @@ -1607,7 +1607,7 @@ >>> >>> # Loop over each spin. Initialise spin counter. >>> si = 0 >>> - for spin, spin_id in spin_loop(return_id=True, skip_desel=True): >>> + for spin, mol_name, res_num, res_name, spin_id in >>> spin_loop(full_info=True, return_id=True, skip_desel=True): >>> # Skip protons for MMQ data. >>> if spin.model in MODEL_LIST_MMQ and spin.isotope == '1H': >>> continue >>> @@ -1681,7 +1681,7 @@ >>> data[i][j][k][l] = 0.0 >>> >>> # Write the header. >>> - title = "Relaxation dispersion plot" >>> + title = "Relaxation dispersion plot for: %s %s"%(res_name, >>> spin_id) >>> graph_num = len(data) >>> sets = [] >>> legend = [] >>> @@ -1725,7 +1725,7 @@ >>> >>> # Loop over each spin. Initialise spin counter. >>> si = 0 >>> - for spin, spin_id in spin_loop(return_id=True, skip_desel=True): >>> + for spin, mol_name, res_num, res_name, spin_id in >>> spin_loop(full_info=True, return_id=True, skip_desel=True): >>> # Skip protons for MMQ data. >>> if spin.model in MODEL_LIST_MMQ and spin.isotope == '1H': >>> continue >>> @@ -1808,7 +1808,7 @@ >>> data[i][j][k][l] = 0.0 >>> >>> # Write the header. >>> - title = "Relaxation dispersion plot" >>> + title = "Relaxation dispersion plot for: %s %s"%(res_name, >>> spin_id) >>> subtitle = "Interpolated through Spin-lock field strength >>> \\xw\\B\\s1\\N" >>> graph_num = len(data) >>> sets = [] >>> >>> >>> _______________________________________________ >>> relax (http://www.nmr-relax.com) >>> >>> This is the relax-commits mailing list >>> [email protected] >>> >>> 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 _______________________________________________ relax (http://www.nmr-relax.com) This is the relax-devel mailing list [email protected] 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-devel

