GARANT TOPICS: syntax - syntax used to specify atoms, coherences and peaks

The following syntax is used to specify spectra, atoms, coherences and peaks.

Peak      = [Spectrum ':'] { Coherence ' ' }
Spectrum  = Name | '*'
Coherence = Atom
Atom      = AtName [ '(' Residue ')' ]
AtName    = Name | '*'
Residue   = ResName | ResNum | ResName ' ' ResNum
ResName   = Name | '*'
ResNum    = Number | '*' | [+,-] Number

A name is anything that has no delimiter in it. Delimiters are ' ()"'.
A number is anything that matches an integer number as defined in the
programming language C.

When comparing atoms, coherences or peaks to a specified template, the
asterisk '*' matches all names and numbers. Two atom names match if they are
the same or defined as equivalent in the atom name library. Using a '+' or
'-' sign in the specification of a residue number allows to select peaks
using differences of residue numbers (see examples).

Example: all HA, HN peaks in the NOESY spectrum
	"NOESY: HA HN"
Example: all COSY peaks of residue 20
	"COSY: *(20) *(20)"
Example: all defined sequential proton-proton peaks
	"H(*) H(-1)"
Example: all HN atoms of TYR residues
	"HN(TYR)"

Bugs: "HN HA(-1)" will match to all HN HA peaks in contrast to "HN(*) HA(-1)"
which will only match to sequential HN HA peaks.

see also: load atom name library, list atoms, list peaks
