TinkerTools / tinker

Tinker: Software Tools for Molecular Design
https://dasher.wustl.edu/tinker/
Other
129 stars 61 forks source link

Compile Tinker with APBS support #97

Closed rwxayheee closed 2 years ago

rwxayheee commented 2 years ago

Dear Tinker experts,

I was trying to compile a copy of Tinker with APBS support. I was able to build the current version (3.2.1) of APBS from source with "ENABLE_TINKER=ON", and Tinker from this repository, separately. But I need a bit help on how to link the two programs. When I tried to do a test run in apbs/example, I got:

PBSINITIAL -- APBS Not Supported by This Tinker Version

I'm using the gfortran compiler of GNU 8.4.0 on the Linux x86_64 OS. Any comments/suggestions would be really appreciated. Thank you for your time and kind advice in advance.

Many thanks, Amy H

jayponder commented 2 years ago

Hi, We just in the past couple of weeks made various small modifications and fixes to make building Tinker with APBS easier, so I'm absolutely sure you can get it to work:

(1) First, the current Tinker is only verified to work with the old APBS 1.3. We have checked that the results of the APBS calculations with this old version are identical or essentially identical to those from current APBS versions. You should get the old APBS 1.3 by pointing a browser to the link:

https://dasher.wustl.edu/apbs-1.3.tar.gz

Once you have this version of APBS, unpack it and build it for Tinker support following the instructions in the file "0README-1st" of the APBS distribution. One possible issue is that this old APBS requires Python 2, and not the more recent Python 3. Most recent Linux versions still have Python 2 available as the command "python2". The use of Python 2 can be set in the "configure" command prior to compiling APBS. Note that you do not need the actual APBS executables, but only four static APBS libraries that Tinker will link against.

(2) Get the very latest version of Tinker 8.10.1 from the Github repo at https://github.com/TinkerTools/tinker/. Unpack this Tinker distribution.

(3) Copy the four APBS libraries you built above (libapbsmainroutines.a, libapbs.a, libmaloc.a and libapbsblas.a) into the /apbs/lib/linux area of the Tinker distribution.

(4) Copy the file "Makefile-apbs" from the /make directory of the Tinker distribution into the /source directory and rename it as "Makefile".

(5) Then go to the /source directory of the Tinker distribution and just type "make". This should build a full set of Tinker executables, and the appropriate Tinker programs will be APBS-capable.

(6) You can test the executables using the five protein test cases in the /apbs/test directory of the Tinker distribution.

Let me know if this works, or alternatively if you are still having trouble...

rwxayheee commented 2 years ago

Dear @jayponder,

Thank you so much for the reply. That is super helpful!! I built Tinker with your guidance and I was able to run a test calculation with "crn.xyz" from apbs/test. Thank you again for your kind support!!


In case anyone else might/will be reading this thread:

  1. Two of the four library files needed in step (3) -- libapbsblas.a and libmaloc.a, are located in: apbs-1.3/contrib/lib

  2. Build fftw at apbs/fftw before making Tinker executables in step (5)

  3. It's really convenient to run the test calculation. Make sure to add tinker/bin to PATH, then go to apbs/test, do: analyze crn -k tinker I used tinker/params/amoebapro04.prm as the parameter file. Enter "E" as the "Desired Analysis Types". The output is printed as "Electrostatics" in the "Implicit Solvation Energy Components" section, and the value is the same as in "0README".