[gmx-users] Checking Lincs Warnings

Anton Feenstra feenstra at chem.vu.nl
Mon Feb 18 15:49:57 CET 2002


Hi All,


I have found it useful at times to get a quick overview of the amount
of LINCS warnings generated during a run, and at which times they occur.
This hinges on the idea that e.g. during an equilibration run you might
not worry about warnings at the beginning, but you wouldn't want too
many warnings near the end of the run.

Anyway, I've just completed a very small script that produces xmgr
ready output from the md.log file. I'll attach it, for what it's
worth...
The input will also be read by xmgrace, but to actually produce 
bargraphs some trivial (but incompatible with xmgr) changes are needed.

-- 
Groetjes,

Anton
 ________ ___________________________________________________________
|        | Anton Feenstra                                            |
| .      | Dept. of Pharmacochemistry - Free University Amsterdam    |
| |----  | De Boelelaan 1083 - 1081 HV Amsterdam - The Netherlands   |
| |----  | Tel: +31 20 44 47608 - Fax: +31 20 44 47610               |
| ' __   | Feenstra at chem.vu.nl - http://www.chem.vu.nl/afdelingen/FAR|
|  /  \  |-----------------------------------------------------------|
| (    ) | Dept. of Biophysical Chemistry - University of Groningen  |
|  \__/  | Nijenborgh 4 - 9747 AG Groningen - The Netherlands        |
|   __   | Tel +31 50 363 4327 - Fax +31 50 363 4800                 |
|  /  \  | K.A.Feenstra at chem.rug.nl - http://md.chem.rug.nl/~anton   |
| (    ) |-----------------------------------------------------------|
|  \__/  | "Out Of Register Space (Ugh)" (Vi)                        |
|________|___________________________________________________________|
-------------- next part --------------
#!/usr/bin/awk -f

function min(a,b) {
  return a<b ? a : b;
}

function max(a,b) {
  return a>b ? a : b;
}

function bin2time(b) {
  return (b+0.5)*binw;
}

function time2bin(t) {
  return int(time/binw);
}

BEGIN {
  if ( !binw ) { binw=10 }
  printf("# Using binwidth %g\n", binw);
}

step {
  step=0;
  time   = $2;
  bin    = time2bin(time);
  minbin = min(minbin,bin);
  maxbin = max(maxbin,bin);
}

$1=="Step" && $2=="Time" {
  step=1;
}

/LINCS WARNING/ {
  time   = $4;
  bin    = time2bin(time);
  minbin = min(minbin,bin);
  maxbin = max(maxbin,bin);
  hist[bin]++;
}

END {
  for (bin=minbin; bin<=maxbin; bin++)
    maxhist = max(maxhist, hist[bin]);
  
  printf("@g0 type %s\n", "bar");
  printf("@    s0 fill %d\n", 1);
  printf("@    title \"%s\"\n", "LINCS Warnings");
  printf("@    subtitle \"%s\"\n", sprintf("with %g ps wide bins", binw) );
  printf("@    xaxis  label \"%s\"\n", "Time (ps)");
  printf("@    yaxis  label \"%s\"\n", sprintf("# warnings/%g ps", binw) );
  
  for (bin=minbin; bin<=maxbin; bin++)
    printf("%10g %10g\n", bin2time(bin), hist[bin]);
}

#last line


More information about the gromacs.org_gmx-users mailing list