Hi Christina,

I've had a look at your support request
(https://gna.org/support/?3303) and have tried to come up with a
solution:

    http://article.gmane.org/gmane.science.nmr.relax.scm/25842

For this, I had to reintroduce the "<mol name="GAB">" and "</mol>"
tags in the XML results file, otherwise relax cannot read the file
correctly.  The newly introduced sample script is quite simple:

    
http://svn.gna.org/viewcvs/relax/trunk/sample_scripts/model_free/back_calculate.py?view=markup&pathrev=28091

It is simply:

"""
# Load the results as a state file.
state.load('results')

# Loop over each relaxation data set.
for ri_id in cdp.ri_ids:
    # Back calculate the relaxation data.
    relax_data.back_calc(ri_id=ri_id, ri_type=cdp.ri_type[ri_id],
frq=cdp.spectrometer_frq[ri_id])

    # Write the data.
    relax_data.write(ri_id=ri_id, file='%s.out' % ri_id.lower(),
bc=True, force=True)
"""

This loads the results file and then uses the information in the
current data pipe to loop over and back-calculate each relaxation data
point.  Note the important bc=True flag used in the relax_data.write
user function (http://www.nmr-relax.com/manual/relax_data_write.html).
Is this script sufficient?

Regards,

Edward



On 20 November 2015 at 14:26, Troels Emtekær Linnet
<tlin...@nmr-relax.com> wrote:
> Dear Christina.
>
> Thank you for your contribution.
>
> I am sure this will be of benefits to other users, and a good reference for
> automatic back-calculation of spin relaxation data.
>
> Time is always precious and so the development of this can take some time.
>
> But it is essential that the support request is described and including a
> potential fix.
>
> This will make the solution easier.
>
> Thank you again. :)
>
> May the "good results" be with you and happy "relaxing".
>
> Best
> Troels
>
>
> 2015-11-20 11:36 GMT+01:00 Christina Möller <
> no-reply.invalid-addr...@gna.org>:
>
>> URL:
>>   <http://gna.org/support/?3303>
>>
>>                  Summary: Automatic back-calculation of spin relaxation
>> data
>>                  Project: relax
>>             Submitted by: cmoeller
>>             Submitted on: Fri 20 Nov 2015 10:36:06 AM UTC
>>                 Category: Feature request
>>                 Priority: 5 - Normal
>>                 Severity: 1 - Wish
>>                   Status: None
>>              Assigned to: None
>>         Originator Email:
>>              Open/Closed: Open
>>          Discussion Lock: Any
>>         Operating System: GNU/Linux
>>
>>     _______________________________________________________
>>
>> Details:
>>
>> After the full model-free analysis of relaxation data using the
>> dauvergne_protocol.py script it would be interesting to compare the
>> back-calculated values to the original experimental values.
>>
>> The generate_ri.py script back-calculates the relaxation data from given
>> residue-specific s2, s2f, s2s, te, tf, ts values that are obtained from the
>> model-free analysis. The generate_ri.py script that can be found in the
>> sample
>> scripts/model-free folder generates back-calculated data for just one
>> residue-specific set of parameters. To obtain the back-calculated data for
>> i.e. 80 residues the script has to be used 80 times. It would be more
>> efficient if the script is started only once and the residue-specific
>> parameters are loaded automatically for each residue in order to generate
>> the
>> back-calculated values for all residues.
>> Attached you can find some example data.
>>
>> A colleague who is more familiar with python than me tried to find a
>> solution
>> and edited the generate_ri.py script. Attached you can find the modified
>> script named generate_ri_mod.py. To run this script the results.py script
>> is
>> needed because it extracts the data from the results.bz2 file. This
>> modified
>> script back-calculates the values automatically and generates an output
>> file
>> named relaxation_data.dat containing back-calculated values for all
>> residues.
>> You will probably have a solution which is more consistent with your
>> programming of relax.
>>
>>
>>
>>
>>     _______________________________________________________
>>
>> File Attachments:
>>
>>
>> -------------------------------------------------------
>> Date: Fri 20 Nov 2015 10:36:06 AM UTC  Name: results.bz2  Size: 344kB   By:
>> cmoeller
>> Example data and used relax script
>> <http://gna.org/support/download.php?file_id=25821>
>> -------------------------------------------------------
>> Date: Fri 20 Nov 2015 10:36:06 AM UTC  Name: generate_ri.py  Size: 5kB
>>  By:
>> cmoeller
>> Example data and used relax script
>> <http://gna.org/support/download.php?file_id=25822>
>> -------------------------------------------------------
>> Date: Fri 20 Nov 2015 10:36:06 AM UTC  Name: generate_ri_mod.py  Size: 7kB
>> By: cmoeller
>> Example data and used relax script
>> <http://gna.org/support/download.php?file_id=25823>
>> -------------------------------------------------------
>> Date: Fri 20 Nov 2015 10:36:06 AM UTC  Name: results.py  Size: 4kB   By:
>> cmoeller
>> Example data and used relax script
>> <http://gna.org/support/download.php?file_id=25824>
>>
>>     _______________________________________________________
>>
>> Reply to this item at:
>>
>>   <http://gna.org/support/?3303>
>>
>> _______________________________________________
>>   Message sent via/by Gna!
>>   http://gna.org/
>>
>>
>> _______________________________________________
>> relax (http://www.nmr-relax.com)
>>
>> This is the relax-devel mailing list
>> relax-devel@gna.org
>>
>> 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
>>
> _______________________________________________
> relax (http://www.nmr-relax.com)
>
> This is the relax-devel mailing list
> relax-devel@gna.org
>
> 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

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

This is the relax-devel mailing list
relax-devel@gna.org

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

Reply via email to