# NMR Restraints Grid

This README describes the content of zip files downloaded from the NMR Restraints Grid at the BMRB.

## Content

- Organization
- Using downloaded data
- Using the index file
- List of file extensions
- List of columns in index file

## Organization

File name | Description
readme.html | This file
index.csv | Index file used for looking up mr_block_id(s) for specific entries or data types
errors.txt | An optional file that describes any errors that might have been encountered downloading the data from the database. It is possible that modifications to the database during download removed requested blocks. That is one example that would be documented in this file.
block_123.txt | File with data on the block with mr_block_id equal to e.g. 123
block_124.tgz | File with binary data of a gzipped tar file with for example XML files. A full list of possible file extensions is detailed below.
block_125.txt | Etc.

## Using downloaded data

The data is split up into one or more blocks each in their own file called block_XXXX.txt. In order to use the data you will need the index file: index.csv. Each row contains information specific for a data file. One of the columns in the index file lists the mrblock_id.

## Using the index file

Most spreadsheet programs, e.g. Gnumeric and MS Excel, can read csv formatted files such as the index files. Alternatively, you might want to use a scripting language such as gawk to access subsets of the data. The meaning of the all columns is documented below.

For example, to locate the block ids with the data on a specific PDB entry, the Unix tool gawk could be used with the PDB code on the index file. E.g., replacing XXXX by the PDB code of interest in:

    gawk -F',' '{if($4=="XXXX")print $2}' index.csv > block_ids.txt

Note that the field number of the PDB code might be 3 in stead of 4 depending on whether or not any BMRB codes are listed.

## List of file extensions

Alphabetically sorted by filename extension.

Filename extension | Explanation
aco | DYANA/DIANA for dihedral angle restraints
csv | Comma Separate Values
lol | DYANA/DIANA upper limits for distance restraints
mtf | CNS Molecular Topology File
pdb | Protein DataBank
seq | DYANA/DIANA sequence
str | STAR: Self-defining Text Archive and Retrieval
tbl | XPLOR/CNS tables of data
tgz | Gzipped tar
txt | General text
upl | DYANA/DIANA upper limits for distance restraints
xml | EXtensible Markup Language

## List of columns in index file

Alphabetically sorted by column label.

Column | Explanation
bmrb_id | BMRB accession number
format | Format of the data e.g. "ambi" for ambiguous distance restraints
image | Molecular image of the PDB entry
in_dress | True if the structure has been recalculated in DRESS
in_recoord | True if the structure has been recalculated in RECOORD
item_count | Total number of distance, dihedral angle, and RDC restraints. Currently only STAR formatted files generated at BMRB are counted.
mrblock_id | Numeric id in the database for this block (may change over time)
mrfile_id | Numeric id in the database for the file this block is part of
other_prop | Other type of information e.g. "LOWER_ONLY=true" for CYANA data
pdb_id | PDB code being a numeral followed by three alphanumericals
position | Position of this block in the file (the first block is numbered 0)
program | Program or software format, e.g. XPLOR/CNS, STAR
stage | Data flows from original, parsed, converted, to filtered, see the NMR Restraint Grid paper
subtype | Subtype of the data such as "NOE" for distance restraints
type | Type of the data such as "distance" for distance restraints

Note: The list of allowed data in the NMR Restraints Grid is available with the Wattos documentation.