Pages

31 January 2014

546. NMR on Debian Wheezy: ACD/LABS NMR under Wine

I'm currently exploring options for processing NMR data on linux (see e.g. here for nmrnotebook). There are four categories of programs:
* proprietary/for-cost running natively on linux

* proprietary/non-open source but gratis running natively on linux
* gratis and open source running natively on linux

* windows programs that happen to run ok in wine

ACD/LABS belongs to the last category, and as such is not an ideal solution. However, at this point I'm willing to try just about anything.

So yes, this relies on you having wine installed, but sometimes we need to be pragmatic like Torvalds rather than dogmatic like Stallman (the world needs both of them).


Either way:

First register at http://www.acdlabs.com/account/register.php?redirect=/account/logout.php


Then download



Installation:

Install by running
wine ~/Downloads/nmrproc_academia12.exe

Go through the installation steps:











Running the software

For most of the steps below there's little need to provide a commentary:










I could only get it to fit by hitting 'Auto'

However, 'Auto' did respect my choice of function e.g. lorentzian vs mixed.


You can export the data as simple ascii files


In conclusion I must say that I'm fairly happy with this piece of software. I haven't used it for production purposes, so I can't vouch for it spitting out reliable data though. It's definitely worth exploring though.

545. NMR on Debian Wheezy: NMRNotebook by NMRTec

While it's possible -- even easy -- to write your own scripts for processing NMR data (e.g. here and here) there's still a value in having a GUI handy.


Either way, this entry is about NMRNotebook, which ultimately derives from another gratis program called Gifa which I experimented with in the early 00s. Apparently after Gifa v4 (article), NMRTec developed Gifa v5. After that there seems to have been a split in efforts (not a fork) where NMRTec developed NMRNotebook, and other people involved in Gifa developed NPK. NMRNotebook appears to use NPK as the underlying engine, but provides a nice GUI which is written in tk/tcl, java and python.

Note that Gifa 4 and Gifa 5 are still available for download, but require license files to run. I don't know if it's still possible to get licenses for Gifa. Based on my memory of running Gifa (4?) the interface was quite slick, and it had a terminal at the bottom, similar to xwinnmr.

License
Either way, NMRNotebook can be downloaded for free from NMRTec for academic users. You will need to register and then get a license, which can be had by following the instructions on their website and sending off an email with your details.

So I did that.

NOTE that the 1D line fitter is not included in the free version  -- it's priced at 1,000 Euro, which sounds a bit insane to me, in particular if you compare with the price of the software (Euro 100 for a student license, 750 for an industry one). Either way, you can write your own fitter in octave in fifteen minutes..


Installation

There are two files to download: NMRnotebook.sh and NNBMACROS.zip

Run NMRnotebook.sh

sh NMRnotebook.sh
NMRnotebook installer - starting installation... please wait NMRnotebook will be installed in your home directory. Unpacking ... Running post-install script ... done !! To run NMRnotebook, type '~/NMRnotebook/NMRnotebook' to create a shortcut named nnb in your home directory, type 'ln -s ~/NMRnotebook/NMRnotebook ~/nnb' To uninstall simply erase the directory ~/NMRnotebook and ~/.nmrnotebook Some examples can be found in the '~/NMRnotebook/examples' directory Thank you for using NMRnotebook. NMRtec software team
Run nmrnotebook as indicated:
~/NMRnotebook/NMRnotebook









Import the license by going to File/Open and select the nnb file you got via email.

Close the program and start it again.

Unzip the macros by
mkdir ~/work/nnbmacros -p
cp ~/Downloads/NNBMACROS.zip ~/work/nnbmacros
cd ~/work/nnbmacros
unzip NNBMACROS.zip

To run a macro, select it and run it:
To be able to launch nmrnotebook from GNOME create ~/.local/share/applications/nmrnotebook.desktop
[Desktop Entry] Name=NMRnotebook GenericName=nmrnotebook Comment=Software for processing of NMR data Exec=/home/me/NMRnotebook/NMRnotebook Terminal=false Type=Application Categories=Science Version=0.27

Overview
NMRNotebook can open varian, bruker etc. files. Bruker shown here


Window functions, showing EM and interative LB


Several different types of fourier transforms are available

My first spectrum

Zoom works similar to mestrec

Right-clicking brings up a menu that allows you to integrate, label, draw boxes, lines etc.

Normalised integral

NMRnotebook can accept SR values for calibration

Spectrum overview

NMRnotebook only has a few features available, but is sufficient for basic NMR processing. Line-fitting is the most serious omission.
 Overall I find NMRnotebook perfectly adequate for what I would see myself using it for -- simple processing of NMR spectra. Anything more serious and I'd use my own scripts -- but I'd do that anyway in order to be able to trust the data.

25 January 2014

544. rehash: making gnome 3 usable on debian

This post is meant to help a specific person leaving ubuntu's unity for debian's gnome. He finds unity easier to use then stock debian gnome 3.

While I agree that gnome 3 without any modifications isn't very good, by installing the right set of extensions you can make it very usable.
I'll be showing Jessie/gnome 3.8 in all the screenshots below. Setting up gnome 3.4 is pretty much the same though.

I've made a few similar posts before:
 http://verahill.blogspot.com.au/2012/01/debian-testing-64-wheezy-installing.html
http://verahill.blogspot.com.au/2012/06/gnome-34-frippery-extensions-in-debian.html
http://verahill.blogspot.com.au/2013/03/367-some-post-install-steps-on-debian.html
http://verahill.blogspot.com.au/2013/05/435-briefly-frippery-extensions-for.html


What I don't like about Stock Gnome 3:
For a first time user there's no obvious first action when greeted by a gnome 3/shell desktop
 

1. Everything opens as full screen and 2. you can't resize the windows (look at the top right corner of the title bar of the program). The feeling is claustrophobic.

The menu for each program is located on the top panel. This is only the case for programs which are specifically written for gnome 3 though, like gedit, nautilus, epiphany etc.

Power Off -- there's no way of choosing between hibernate, power off, restart, suspend etc.




Fixing gnome 3:

1. First hit the terminal

I think gnome-tweak-tool is installed by default these days, but by all means do
sudo apt-get install gnome-tweak-tool

Next, get the frippery extensions for your version of debian/gnome: Wheezy:
cd ~
wget http://intgat.tigress.co.uk/rmy/extensions/gnome-shell-frippery-0.4.1.tgz
tar xvf gnome-shell-frippery-0.4.1.tgz

Jessie:
cd ~
wget http://intgat.tigress.co.uk/rmy/extensions/gnome-shell-frippery-0.6.3.tgz
tar xvf gnome-shell-frippery-0.6.3.tgz

Now, log out and log in again in gnome (alt+f2, r didn't work for me).



2. Tweak Tools
Then move your mouse to the top left 'activities' corner and open Tweak Tools:


Go to Shell and change 'Arrangement of buttons on the titlebar' from 'Close Only' to 'All'.
Now you can close and resize applications the 'normal' way
Note how the titlebar changes to include both minimize and close buttons.

Next turn off dynamic workspaces and pick a reasonable number of virtual desktops (e.g. 4-6).
You won't see any visible changes just yet, but that'll come.


Now it's time to activate the frippery extensions. Go to Shell Extensions:
Activate the extensions one by one.

Note how there's an application menu in the top left corner now:

 Note the bottom panel:

Note the location of the clock:

Note the 'favourites' group of icons:



And note the appearance of a shutdown menu item:



Other changes
Other changes that I've made to my desktop are

* installing the faenza icon set: link here
It comes with it's own installation script.

* installing conky
conky is in the debian repos.  Here's my /etc/conky/conky.conf:
background no
own_window yes
own_window_type normal
own_window_argb_visual true
own_window_transparent yes
own_window_hints undecorated,below,sticky,skip_taskbar,skip_pager
double_buffer yes


alignment top_right
background yes
border_width 1
cpu_avg_samples 2
default_color white
default_outline_color white
default_shade_color white
default_graph_size 20 200
draw_borders no
draw_graph_borders yes
draw_outline no
draw_shades no
use_xft yes
xftfont DejaVu Sans Mono:size=12
gap_x 20
gap_y 60
minimum_size 5 5
net_avg_samples 2
no_buffers yes
out_to_console no
out_to_stderr no
extra_newline no
own_window_class Conky
own_window_transparent yes
stippled_borders 0
update_interval 1.0
uppercase no
use_spacer none
show_graph_scale no

TEXT
${exec lsb_release -ds}
${execi 5 acpi|gawk '{print $3,$4}'}
${addr eth0}/${addr wlan0}
$hr
${color grey}Uptime:$color $uptime
CPU:$alignc $cpu%
$alignc$color ${cpugraph 10,200 ffff00 ff0000 -t}  
RAM:$alignc $mem/$memmax 
$alignc$color ${memgraph 10,200 ffff00 ff0000 -t}
I/O:$alignc $diskio_read/$diskio_write
$alignc$color ${diskiograph 10,200 ffff00 ff0000 -t}
${color grey}Frequency (in GHz):$color
        ${freq_g 1}, ${freq_g freq_g2}
${color grey}Temperature:
$color CPU: ${acpitemp}°C
$hr
${color grey}File systems:$alignr $color/ ${fs_used /}/${fs_size /}
$alignr /home $color${fs_used /home}/${fs_size /home}
${color grey}Networking:
${color grey}eth0 ${color red} ${upspeed eth0}/${color green} ${downspeed eth0} ${color grey}
${color grey} ${upspeedgraph eth0 10,100 ffff00 ff0000 -t} ${color grey} ${downspeedgraph eth0 10,100 0000ff 00ff00 -t} ${color grey}
${color grey}wlan0 ${color red} ${upspeed wlan0}/${color green} ${downspeed wlan0} ${color grey}
${color grey} ${upspeedgraph wlan0 10,100 ffff00 ff0000 } ${color grey} ${downspeedgraph wlan0 10,100 0000ff 00ff00 } ${color grey}
$hr
${color grey}Name                       CPU%   MEM%
${color} ${top name 1} ${top cpu 1} ${top mem 1}
${color} ${top name 2} ${top cpu 2} ${top mem 2}
${color} ${top name 3} ${top cpu 3} ${top mem 3}
$hr
${color}City            Ping $alignr Time  
$font${color}Google $alignr${execi 60 ping -c 1 google.com -n|grep icmp_seq|sed 's/=/\t/g'|gawk '{print $10,$11}'}       $alignr${tztime America/Los_Angeles %a %H:%M}
$font${color}Melbourne   $alignr${tztime Australia/Melbourne %a %H:%M}