spacer

linkResonances

The linkResonances script is central to the format conversion. It determines to which atom(s) the information from the NMR data files belongs, and in doing so validates these data. For documentation on the Python code for this script, click here.

The Resonance object in the data model links all NMR information. This makes it possible to assign chemical shifts, peak assignments, constraints, ... to an object without knowing which atom(s) this object corresponds to. In this way the assignment of the NMR data and the assignment to atoms are separated (see Figure 1). This means that, when the atom assignment for a Resonance is changed (e.g. a different stereospecific assignment), all NMR information also automatically 'knows' about this new atom assignment state.


Figure 1: The 'Resonance' is the central object connecting
the NMR data assignment and the assignment to atoms.

The linkResonances script works in several stages (see Figure 2 for a simplified representation). In the first step, checks are performed to see whether a valid molecular system is defined in the data model, whether there are any resonances that are not yet linked to atoms, and whether these resonances have information about their 'original' name (this 'original' name is a string derived from the original file that was read in). In the second step, a 'naming system' is chosen - this could be different from the original format (e.g. Sparky allows any name for an atom, so it is a format, not a naming system. XEasy, on the other hand, has a fixed atom naming system so is both a format and a naming system). Then, using this naming system, the strings describing the atoms from the original files are interpreted. If it is clear which atom(s) they refer to, the link is made automatically. If this is not clear, then a popup appears that allows the user to select the correct atom(s). At the end of this process, all resonances are linked to atoms.


Figure 2: The workflow of the linkResonances script.

Following is a list of links to schemas that describe how the resonances are linked to atoms in particular cases:





spacer
spacer