Re: [AMBER-Developers] long path names

From: Eric Pettersen <>
Date: Thu, 18 Mar 2010 16:30:35 -0700

Forget to mention that the whole MAXCHAR issue is internal to
antechamber (defined in antechamber/define.h).


On Mar 18, 2010, at 4:27 PM, Eric Pettersen wrote:

> Hi all,
> I recently upgraded the version AmberTools that Chimera was using
> to 1.3 with all patches applied (please don't ask what version it
> was using before!). Compilation wasn't excessively difficult but I
> found I was getting random crashes with various charge calculations
> (e.g. bccharge() in antechamber/charge.c). Tracking down the cause
> was a headache. It turns out that string buffers used to compose
> commands to hand off to system() were only allocated as 256
> characters (MAXCHAR). Now, in Chimera on a mac, the Amber
> executables typically live in a directory like:
> /Users/pett/Applications/
> bin/amber11/bin
> and the input/output files are in temporary system folders like:
> /var/folders/VH/VHqktDJe2RWZSE+1YwqPE+++Hpc/-Tmp-/tmp4iniru
> So you can see how an executable, a couple of input files, and an
> output file could easily overflow 256 characters. When I recompiled
> with MAXCHAR set to 2048 all the mysterious crashes went away.
> I guess I'm proposing that either MAXCHAR be increased to at least
> 2K (most modern shells allocate 4K or more for commands) or that
> there be a separate macro (MAXCMD?) for strings that are supposed to
> be handed off to system().
> --Eric
> Eric Pettersen
> UCSF Computer Graphics Lab
> _______________________________________________
> AMBER-Developers mailing list

AMBER-Developers mailing list
Received on Thu Mar 18 2010 - 17:00:02 PDT
Custom Search