To install KovriginNMR Workflows on a spectrometer:
Step 1: Determine the path to the current installation of Topspin that will be used with KovriginNMR.
Typically, it looks like /opt/topspin[version and patchlevel]. Insert this path in knmr_constants.py as a string value of the variable topspin_path. If the Topspin receives upgrade you will need to update this variable again.
# Adjust this path to be the version of Topspin you are using the code with! topspin_path = '/opt/topspin3.5pl7/'The best practice is to create alias /opt/topspin pointing at the current installation. Then you would have topspin_path='/opt/topspin' at all times.
Step 2: Copy the AU code from au/ to /opt/topspin/exp/stan/nmr/au/src/user
Here /opt/topspin portion should be replaced with the path determined in Step 1 unless an alias has been created.
KNOWN PROBLEM The /opt/topspin/exp/stan/nmr/au/src/user is a common user folder for AU programs. However, due to a Topspin glitch, it becomes owned by the first user placing their code there, which subsequently prevents all others from adding their AU programs.
To fix this issue, do the following:
- cd /opt/topspin/prog/au/bin
- su root
- chmod 777 user
- chown nmrsu user
- chgrp nmrsu user
Step 2. Copy the Python code from Python to /opt/topspin/exp/stan/nmr/py/user
Here /opt/topspin portion should be replaced with the path determined in Step 1 unless an alias has been created.
Step 3. Determine what Linux command launches the web browser and update it in knmr_constants.py:
# A default web browser to use for a display of an HTML report default_browser='firefox'
Step 4. Display of KovriginNMR toolbar in Topspin must be done by each user individually. The procedure is described in Getting Started: Installation of KovriginNMR toolbar by a user.
Step 5. To confirm the current version of KovriginNMR, type knmr_version on the Topspin command line.
Problem: I updated KovriginNMR code on workstation to a newer version but it has no effect - old code still runs
There are two folders in Topspin where Python looks for a program code: /opt/topspin/exp/stan/nmr/py and /opt/topspin/exp/stan/nmr/py/user. Normal location for KovriginNMR is ..py/user. However, .../py is searched by Python first. Accidentally, the KovriginNMR code may be placed in .../py, then any subsequent updates to .../py/user will not be accessible to Python. Since .../py path has a priority, Topspin Python will use files from .../py even if newer files exist in .../py/user.
Solution: Delete all files starting with 'knmr_' from .../py and copy an updated KovriginNMR code to .../py/user.
Python errors
Errors triggered upon execution of Python scripts are discussed in Interpretation of Topspin Python errors messages.
KovriginNMR Workflows is spectrometer-independent, therefore, no adjustment for an individual instrument is required as long as Topspin is version >= 3.2. Lower versions of Topspin have not been tested.
Evgenii Kovrigin (C) 2022