Re: [AMBER-Developers] sander.APBS broken

From: Jason Swails <>
Date: Sun, 21 Mar 2010 19:09:52 -0400

Hey Mark,

The "difficult" part about getting sander.APBS built correctly is
simply getting apbs and iapbs properly built (iapbs is what actually
provides the library necessary to make APBS functions available to MD
engines, so if you haven't built this, that is why the link is failing
with undefined references to apbs functions).

The instructions on are
quite good there. I usually use apbs version 1.2 which can be found
on sourceforge. I also passed --disable-openmp as an apbs configure
flag rather than an iapbs configure flag, since I was really only
building that apbs for sander.APBS and had no need for openmp support.

Next, just make sure that, according to the APBS_PREFIX set in the
above guide, the environment variable APBS_LIB is set to
$APBS_PREFIX/lib prior to building. I typically attempt a sander.APBS
build right after a serial build so that all other parts of the code
(i.e. sqm?) that sander may link to have just been built in a
compatible fashion. I don't know if it's necessary, but it's what I
do. Then, go to $AMBERHOME/src/sander and run a make -e
AMBERBUILDFLAGS="-DAPBS" sander.APBS and it should work. It does for
me on my mac os x 10.6 with gnu compilers (so obviously I didn't
follow the setting of the intel compilers in the iapbs directions


On Sun, Mar 21, 2010 at 6:51 PM, Mark Williamson <> wrote:
> Jason Swails wrote:
>> Hello,
>> The sander.APBS build has recently been broken as a result of the new
>> ener array structure (which, consequently, was a heck of a lot easier
>> to figure out than when I tried to learn ene/ener in runmd.f/force.f,
>> so thanks for that Mark).
> Hi Jason,
> Glad to hear... I never want anyone else to go through the ene/ener pain
> again :)
>> However, I ran into an issue building sander.APBS which is not a
>> typical, default build so it's quite understandable why it slipped
>> through.  The call to apbs_force within force.f passes "ener%vdw"
>> which, to my understanding, doesn't exist.  It appears that this
>> should be changed to "pot%vdw" as pot is used locally for these
>> variables in force.f (or at the very least, changed to ener%pot%vdw).
>> Both of these changes result in test failures in the iapbs_radi, even
>> though they fix the compilation errors I was getting.  However, the
>> numbers appear similar, though misplaced (EEL, EPB), but some appear
>> slightly off, which is why I copied Robert on this as well.
> Yes, I think this missed the checking since APBS is not built by default,
> hence it is not tested. Your suggestion is correct; the fragment of code
> that is there presently is an artifact of a previous local iteration of my
> attempt and I've just updated the code to fix this.
> However, I've not tested it since I don't know how to build sander.APBS (and
> I don't know much of that part of the code either). Can you send me some
> instructions on how to build this version of sander; a "make sander.APBS" in
> sander's dir is failing in the final linking stage with:
> apbs.APBS.o(.text+0x60ae): In function `apbs_mp_apbs_spenergy_':
> : undefined reference to `apbsdrv_'
> apbs.APBS.o(.text+0x88d0): In function `apbs_mp_apbs_force_':
> : undefined reference to `apbsdrv_'
> apbs.APBS.o(.text+0x91e1): In function `apbs_mp_apbs_force_':
> : undefined reference to `apbsdrv_'
> make: *** [sander.APBS] Error 1
> I'm probably doing something wrong here or missed something.
> With reference to the incorrect values after fixing the compile issue, I'm
> taking a total guess here, but it *could* be a result of the fact that
> historically the array position ener(26), ene(4) was used for the hbond
> energy when igb=0 for gb when and this may not be totally
> consistent with the printing in printe.f .
> If I can get a APBS build working locally, I will work on this and hopefully
> have a fix soon.
> --
> Mark Williamson, Post Doc
> Walker Molecular Dynamics Group
> Room 395E
> San Diego Supercomputer Center
> 9500 Gilman Drive
> La Jolla, CA 92093-0505
> Email:  mjw at
> Office: 858-246-0827
> _______________________________________________
> AMBER-Developers mailing list

Jason M. Swails
Quantum Theory Project,
University of Florida
Ph.D. Graduate Student
AMBER-Developers mailing list
Received on Sun Mar 21 2010 - 16:30:03 PDT
Custom Search