[gmx-developers] do_dssp bugfix

Carsten Kutzner ckutzne at gwdg.de
Mon Apr 27 17:46:45 CEST 2009


Hi,

we have recently detected a memory problem in do_dssp.

When do_dssp is given an input pdb containing more than 10 chains,
memory corruption is likely to appear. This happens because the
strip_dssp function assumes that the number of lines in the file written
by the dssp program is equal to the number of residues. However,
the dssp output file also contains chain separators in separate lines,
resulting in an extra line per chain.

For some reason, the affected arrays are currently snewed with (nres+10)
elements, allowing for 10 separate chains at most. I would suggest to
snew them with 2*nres-1 elements, allowing each residue to be a
separate chain at most.

The allocations that have to be extended are for the variables bb,
average_area, av_area, norm_av_area, and accri[i].

Should I immediately fix that in the head and 40 branch?

Carsten



--
Dr. Carsten Kutzner
Max Planck Institute for Biophysical Chemistry
Theoretical and Computational Biophysics
Am Fassberg 11, 37077 Goettingen, Germany
Tel. +49-551-2012313, Fax: +49-551-2012302
http://www.mpibpc.mpg.de/home/grubmueller/ihp/ckutzne







More information about the gromacs.org_gmx-developers mailing list