Skip to main content

Auto-encoding NMR chemical shifts from their native vector space to a residue-level biophysical index

Project description


ShiftCrypt have been tested on Linux machines only. It may require additional installation steps in order to work on other operating systems. If you need support, please contact or

Please note that the PyPI package have limited functionalities. For the full shiftcrypt version, that allows custom encoding schemes and retraining of the neural network, please refer to:

to install the package simply run

sudo pip install shiftcrypt

The aforementioned command will install:

  • A command line based standalone (shiftcrypt)
  • A python2 package (shiftcrypt_pkg)


the following python packages are required:

  • python2.7
  • scipy (tested with version 0.19.1)
  • numpy (tested with version 1.14.3)
  • sklearn (tested with version 0.19.1)
  • pytorch (see for an easy installation guide. Tested with version 0.3.1)

@@ if you experience a memory error when installing pytorch, please use the --no-cache-dir installation option (for example pip --no-cache-dir install @@

all these packages are available using pip or anaconda. See also the requirements.txt file.


The tool takes as input NMR Exchange Format (NEF) or NMR-STAR v2.1 files.

ShiftCrypt Standaolne

shiftcrypt [options] -i inputFile

to test the example input, run

shiftcrypt -i TEST_SA

The tool should generate the results in a couple of seconds. @@@ please remember that if you have several missing chemical shift values, you should use the reduced model (option -m 2)

  • -h --> show the help
  • -i --> input nef file file
  • -o --> output file
  • -m --> model to use

ShiftCrypt can be used with different encoding schemes:

  • -m 1 --> the model that uses the full set of chemical shifts as described in the paper. It may fail to transform some of the residues due to missing chemical shifts data
  • -m 2 --> the model that uses only H,CA,N,CB,C chemical shifts data (H,CA,N and HA,CA,CB for Gly and Pro respectively). It is a good alternative when dealing with experiments wit ha lot of missing data
  • -m 3 --> the model that uses only N and H atoms (HA,CA,CB for Pro). It has not been used for this work

With the GIT version, it is possible to build a custom encoding scheme and to train a custom model

the output is made of two columns: the first one contains the residue name, the second one the ShiftCrypt index. If the ShiftCrypt output value is equal to -10, it means that the chemical shifts for that residues were not sufficient to perform the transformation

ShiftCrypt Python package

to use the python package, import ShiftCrypt with:

from shiftcrypt_pkg.main_class import shiftcript

The class has the followng args:

  • [optional] model= 1, 2 or 3 (default=2). The model to use

The class has the following Methods:

  • transform ( STAR_File ) : Calculates the ShiftCrypt values. Output: list. ith value corresponds to the ShiftCrypt value of ith residue. -10 means there are too many missing values for that specific residue
  • test() : Tests the package example:
from shiftcrypt_pkg.main_class import shiftcript

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for shiftcrypt, version 0.11
Filename, size File type Python version Upload date Hashes
Filename, size shiftcrypt-0.11-py2-none-any.whl (1.5 MB) File type Wheel Python version py2 Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page