Protein Backbone Panel - CONNJUR/CONNJUR_widgets GitHub Wiki
The Protein Backbone Panel is a GTK/cairo widget for highlighting the atoms observed in a given NMR experiment.
The drawing code is broken into four blocks.
- Data structures for the backbone atoms are created.
- Coordinates for each atom are calculated keeping the HN in the center.
- The backbone scaffold is drawn.
- Atoms are drawn on top of scaffold.
Coloring of the atoms is customized by passing a data structure for that purpose.
Example code is shown below:
AtomColor myColor = getAtomColors(varianPars.seqfil);
GtkWidget *drawArea;
drawArea = GTK_WIDGET(gtk_builder_get_object(builder,"drawingarea1"));
g_signal_connect (G_OBJECT(drawArea), "draw", G_CALLBACK(backbone_callback), &myColor);
Code for this widget is found at: https://github.com/gryk/CONNJUR_spike/tree/master/cjrShowVarian