[gmx-users] angles without bonds - SegFault

Marcin Wojdyr wojdyr at unipress.waw.pl
Thu Dec 2 23:25:18 CET 2004


Hi,
I tried to run simulation where the only bonded interactions are 
angles and noticed that mdrun segfaults. 
It can be reproduced with methanol tutorial. When I remove bonds
from methanol.itp, it also segfaults. I tried to debug it, and 
it seems to me that the program tries to access graph->ishift[some_index],
but graph is empty (graph structure is not filled when there are no bonds):

(gdb) p *graph
$3 = {maxedge = 6, nnodes = 0, nbound = 0, start = 648, end = 0, nedge = 0x0,
  edge = 0x0, ishift = 0x0, negc = 0, egc = 0x0}

Is this a bug or bonds are required by design? 


(gdb) bt
#0  0x080a0bcd in rvec_inc (a=0xa853090, b=0xbfffe710) at vec.h:252
#1  0x0809d74f in angles (nbonds=864, forceatoms=0x81fa140,
    forceparams=0x81f9f58, x=0x81fc9f8, f=0x820be50, fshift=0x82136d8,
    pbc=0x0, g=0x81db8c8, lambda=0, dvdlambda=0xbfffe834, md=0x81db7b0,
    fcd=0x81db6a8) at bondfree.c:613
#2  0x0809bd03 in calc_bonds (fplog=0x81db058, cr=0x81db008, mcr=0x0,
    idef=0x81dccbc, x=0x81fc9f8, f=0x820be50, fr=0x82123b0, pbc=0xbfffe8d0,
    g=0x81db8c8, epot=0x81db5c8, nrnb=0xbfffefb0, lambda=0, md=0x81db7b0,
    ngrp=1, egnb=0x81db8b8, egcoul=0x81db8a8, fcd=0x81db6a8, step=0,
    bSepDVDL=0) at bondfree.c:117
#3  0x0806a90d in force (fplog=0x81db058, step=0, fr=0x82123b0, ir=0x81ebb58,
    idef=0x81dccbc, nsb=0x81dbc98, cr=0x81db008, mcr=0x0, nrnb=0xbfffefb0,
    grps=0x81db1c0, md=0x81db7b0, ngener=1, opts=0x81ebd28, x=0x81fc9f8,
    f=0x820be50, epot=0x81db5c8, fcd=0x81db6a8, bVerbose=0, box=0x81db20c,
    lambda=0, graph=0x81db8c8, excl=0x81eaaac, bNBFonly=0, mu_tot=0xbfffeb10,
    bGatherOnly=0) at force.c:1006

MW

PS. I added gromacs to Freshmeat, but it's not yet visible on website.

-- 
Marcin Wojdyr  |  http://www.unipress.waw.pl/~wojdyr/



More information about the gromacs.org_gmx-users mailing list