[gmx-users] How to use ambconv package...
tomas.kubar at uochb.cas.cz
Fri Jun 18 12:10:02 CEST 2004
> There is also a bug in ambconv.c -- (thanks to Anton Feenstra for
> pointing this out).
> - s_atop* atop; */
> +/* DAE Insert Anton Feenstra's suggestion on memory allocation */
> +s_atop satop; /* static */
> +s_atop* atop; /* pointer */
> +atop = &satop; /* set atop to point to satop's adress */
Yes, this is a possibility. Instead, my version includes
s_atop* atop = (s_atop*) xmalloc(sizeof(s_atop));
Futhermore, I have slightly different util.c, line 74 and following 9
#anything#_filename = (char*) malloc(strlen(argv[i+1])*sizeof(char)+1);
Another problem may arise, if your system contains 1000 atoms or more.
Should this be your case, I would recommend to modify the file
write_grotop.c to write 'longer' atom numbers when printing the bonds,
angles and dihedrals, e.g. line 396
fprintf(grotop, " %4d%4d%s%12.5f%12.0f%s", ++atom1, ++atom2, " 1",
fprintf(grotop, " %6d%6d%s%12.5f%12.0f%s", ++atom1, ++atom2, " 1",
More information about the gromacs.org_gmx-users