Gnom error nonrandom residuals after smoothing

Interactive and automated data processing and analysis tools: PRIMUS, CHROMIXS, GNOM, AUTORG, DATCMP, DATOP etc.
Post Reply
Message
Author
sammahdi
Active member
Posts: 23
Joined: 2023.02.01 20:51

Gnom error nonrandom residuals after smoothing

#1 Post by sammahdi » 2023.06.03 04:16

Hello,

I am attempting to get the p(r) plots for my theoretical profiles generated by crysol (.int files, not .fit). When attempting to generate distribution plot via Primus, I get an error in autorg

"No Rg found", even though Crysol gives an Rg right in the header. I then tried to calculate it via Gnom in the terminal using a small alpha for good quality

gnom file.int --rmax 100 --alpha .001 > p_r_file.out

While this works and I get my p(r) plots, I get this error

ERREST ---W- Nonrandom residuals after smoothing!
Relative errors of 3 percent are assigned
ERREST ---W- Nonrandom residuals after smoothing!
Relative errors of 3 percent are assigned

Furthermore, while this works, the plot is very rough. I assume due to the above error. I can't find anything in the manual regarding this however, so I don't know what this is or where it comes from.

Any help would be greatly appreciated!

User avatar
AL
Administrator
Posts: 809
Joined: 2007.08.03 18:55
Location: Hamburg, Germany
Contact:

DATRG and DATFT

#2 Post by AL » 2023.06.05 17:24

AUTORG and GNOM expect experimental data with some noise and uncertainties in the third column. Both programs will add some relative uncertainties if there were none in the input file, that's what the "ERREST" warning in GNOM is about.

AUTORG may not fit the Guinier part of your simulated data if there are too few data points or the ln(I(q)) vs. q2 data are non-linear.
In PRIMUS you can use the Radius of Gyration tool to manually find the Guinier Rg. Or use the DATRG command line tool like this:

Code: Select all

datrg --last=3 *.abs

Instead of fitting the simulated data with GNOM you can use the direct Fourier transform tool DATFT like this:

Code: Select all

datft data-calculated-from-model.abs --stop-at-zero --output pddf.dat
You may want to set the Dmax manually, increase the number of points in the p(r) and add a "tail" to your input data to make the p(r) smoother using these options:

Code: Select all

datft --help
Usage: datft <DATFILE> [OPTION]

Direct Fourier transform of experimental data to a pseudo pair distance distribution function.

Known Options:
      --rmax=<VALUE> maximum distance (Dmax)
      --nr=<N>       number of points in real space
      --stop-at-zero cut p(r) at the first negative point
      --first=<N>    first point of the data file to use (default: 1)
      --tail=<VALUE> number of points to extrapolate to high angles as I(s)=s^-M
      --decay=<M>    tail intensity decay (default: 4.0)
      --i0=<VALUE>   experimental forward scattering
      --rg=<VALUE>   experimental radius of gyration
  -o, --output=FILE  write the output to this file instead of stdout
  -v, --version      print version information and exit
  -h, --help         print this help and exit

sammahdi
Active member
Posts: 23
Joined: 2023.02.01 20:51

Re: Gnom error nonrandom residuals after smoothing

#3 Post by sammahdi » 2023.06.05 22:39

Where can I find the manual for DATFT (such as where you got the options posted here)? I can't find it in the list https://www.embl-hamburg.de/biosaxs/dattools.html

sammahdi
Active member
Posts: 23
Joined: 2023.02.01 20:51

Re: Gnom error nonrandom residuals after smoothing

#4 Post by sammahdi » 2023.06.05 23:38

A follow up quick question, A previous student had generated p(r) distribution figures, and they stated they had done this through Crysol (although from my understanding, Crysol does not calculate nor display p(r) distribution plots). These figures look very nice, and do look like they were generated by some program, was curious if you know if there is anything in ATSAS that generates figures like these? This is the link to the figure https://imgur.com/a/ytS28nv (it was generated from PDB: 1mmi).

I ask because I was also attempting to generate p(r) plots using DATFT, but my looks different from theirs (this is using the same crysol profile, so the plots should look identical) https://imgur.com/a/yVZ2d7y
I used options -stop-at-zero --nr=500000

User avatar
AL
Administrator
Posts: 809
Joined: 2007.08.03 18:55
Location: Hamburg, Germany
Contact:

Re: DATFT manual

#5 Post by AL » 2023.06.06 09:36

Unfortunately, there is no standard manual for DATFT but section 3.3 of the ATSAS 3.0 paper describes DATFT concisely and in detail. As with all ATSAS command line programs, you'll get a brief description of the available options by typing 'datft --help'.

No idea what program was used for these figures, it could be matplotlib, R or gnuplot.
I usually just do screenshots from PRIMUS and combine them in anything that can handle images.

sammahdi
Active member
Posts: 23
Joined: 2023.02.01 20:51

Re: Gnom error nonrandom residuals after smoothing

#6 Post by sammahdi » 2023.06.06 16:02

Any idea why my p(r) are so rough/bumpy compared to theirs then? I had assumed I had used DATFT incorrectly, or calculated the p(r) wrong. They have 2 very clear defined smooth peaks, whereas my plots look rough with multiple peaks and shoulders. When looking at SAXS figures online, p(r) plots are always smooth, they are never bumpy like mine?

User avatar
AL
Administrator
Posts: 809
Joined: 2007.08.03 18:55
Location: Hamburg, Germany
Contact:

datft --tail=10000

#7 Post by AL » 2023.06.06 17:54

To reduce termination effects – artificial oscillations in the p(r) function, which are caused by the absence of scattering data at higher angles – add a tail, something like

datft --tail=10000 --rmax=120 --nr=1201 --stop-at-zero data-calculated-from-model.abs --output pddf.dat

sammahdi
Active member
Posts: 23
Joined: 2023.02.01 20:51

Re: Gnom error nonrandom residuals after smoothing

#8 Post by sammahdi » 2023.06.06 18:32

ah thank you, that resolved the issue. Now my plots are smooth as well!

Post Reply