[AMBER-Developers] spaces in AMBERHOME

From: Eric Pettersen <pett.cgl.ucsf.edu>
Date: Thu, 2 Sep 2010 17:09:11 -0700

Hi all,
        It turns out that antechamber is very much not a happy camper if
there are spaces in the path given by the AMBERHOME environment
variable. It's extensive use of system() to execute subcommands means
that it really should put quotes around command names and file name
arguments that are constructed based on AMBERHOME. This particularly
comes into play for Chimera's inclusion of AmberTools on Windows,
where the default Chimera installation directory is C:\Program Files.
        Antechamber already has a function (build_exe_path) for building
executable path names from the AMBERHOME variable with string-length
bounds checking. I was able to leverage that to put quoting around
executable names when needed and desired (i.e. only when there is a
space in AMBERHOME and the path name is destined for a system() call
rather than an fopen() call). I also made a companion routine
(build_dat_path) for filename arguments and made the use of both
pervasive. I've attached a patch file will all the changes. I'm
hoping it can make it into the 1.5 release of AmberTools.
        My record with attachments to this list is not good, so I've cc'ed
Dave so that at least he will get it directly. If it doesn't show up
in the remailing and anyone else wants to look it over, send me a mail
and I'll send it to you directly.


                         Eric Pettersen

"And isn't sanity really just a one trick pony anyway? I mean
all you get is one trick, rational thinking, but when
you're good and crazy, oooh oooh oooh, the sky is the
limit!"-The Tick

AMBER-Developers mailing list
Received on Thu Sep 02 2010 - 17:30:03 PDT
Custom Search