mailRe: Running scripts inside relax


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by Edward d'Auvergne on August 26, 2013 - 16:54:
In such a case you would have a state.save user function call at the
end.  You could then open the state file in the relax prompt user
interface (UI) or graphical interface (GUI) for more manual
interaction.  But the scripting UI does not have the ability to switch
into the prompt UI, or the GUI for that matter, while relax is
running.  In general, the relationship between all UIs are:

Scripting UI - the prompt UI and GUI are not available.

Prompt UI - the scripting UI is partly available via the 'script' user
function.  The GUI is unavailable.

GUI - the scripting UI is again partly available via the 'script' user
function, this time from the menus.  The prompt UI is replicated in
the relax prompt window (via 'View->relax prompt', 'Ctrl+P', or the
toolbar button).  But note that this prompt is not the same as the
prompt UI and may not have all of the features of a true Python
interpreter, which is the backbone of the relax prompt.

I hope this makes things clearer.  Maybe this text should go into the
intro chapter of the manual.

Regards,

Edward


On 26 August 2013 16:43, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
If I run:

relax_disp relax_1_ini.py

relax runs through the script and exit.
Is there a way to stop after reading?

Best

Troels Emtekær Linnet


2013/8/26 Edward d'Auvergne <edward@xxxxxxxxxxxxx>:
Hi Troels,

You should find the answer you are after in the following link:

http://www.nmr-relax.com/manual/Scripting.html

There is also the 'script' user function which you might find useful,
but this is not how relax scripts are made to be run.  This is mainly
so you can run a script in the GUI, especially the Mac OS X
application where command line arguments are not possible.

Regards,

Edward



On 26 August 2013 15:56, Troels Emtekær Linnet <tlinnet@xxxxxxxxx> wrote:
What is the correct way to run script commands ?

If I start relax, and I want to run a script with basic setup and then
spin commands.

Would the correct way be:
execfile('./relax_ini.py')
execfile('./spectrometer_data_processed/relax_spins.py')

Or is there a better way for relax?


Troels Emtekær Linnet

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

This is the relax-users mailing list
relax-users@xxxxxxx

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-users



Related Messages


Powered by MHonArc, Updated Mon Aug 26 17:20:06 2013