Skip to main content

Chemical shift prediction dataset

Project description

Data for NMR GNN

This contains the parsing scripts and data used for our GNN chemical shift predictor model.

Install

pip install nmrgnn-data

Numpy Error

If you see this error:

ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C header, got 80 from PyObject

Try re-install numpy

pip uninstall -y numpy && pip install numpy

Parsing Scripts

To install with the parsing functionality, use this

conda install -c omnia -c conda-forge rdkit openmm numpy==1.18.5
pip install nmrgnn-data[parse]

Working with Data

All commands below can have additional information printed using the --help argument.

Find pairs

Find pairs of atoms with chemical shifts that are neighbors and sort them based on distance.

nmrdata find-pairs structure-test.tfrecords-data.tfrecord ALA-H ALA-N

Count Names

Get class/atom name counts:

nmrdata count-names structure-test.tfrecords-data.tfrecord

Validate

Check that records are consistent with embeddings

nmrdata validate-embeddings structure-test.tfrecords-data.tfrecord

Check that neighbor lists are consistent with embeddings

nmrdata validate-nlist structure-test.tfrecords-data.tfrecord

Check that peaks are reasonable (no nans, no extreme values, no bad masks)

nmrdata validate-peaks structure-test.tfrecords-data.tfrecord

Output Lables

To extract labels ordered by PDB and residue:

nmrdata write-peak-labels test-structure-shift-data.tfrecord  test-structure-shift-record-info.txt labels.txt

Making New Data

See commands parse-shiftml, parse-metabolites, parse-shiftx which are parsers for various databases.

From RefDB Files

This requires a pickled python object called data.pb to be in the directory. It is a list of dicts containing pdb_file (path to PDB), pdb (PDB ID), corr (path to .corr file), and chain (which chain). chain can be _ to indicate use first chain.

nmrparse parse-refdb directory name --pdb_filter exclude_ids.txt

Citation

Please cite Predicting Chemical Shifts with Graph Neural Networks

@article{yang2021predicting,
  title={Predicting Chemical Shifts with Graph Neural Networks},
  author={Yang, Ziyue and Chakraborty, Maghesree and White, Andrew D},
  journal={Chemical Science},
  year={2021},
  publisher={Royal Society of Chemistry}
}

Project details


Download files

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

Source Distribution

nmrgnn-data-0.7.tar.gz (26.4 kB view hashes)

Uploaded Source

Built Distribution

nmrgnn_data-0.7-py3-none-any.whl (30.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page