The iAPBS interface is implemented as a single wrapper function to the APBS C library. This function (apbsdrv) can be called from a C, C++ or Fortran code. The function accepts several input parameters - coordinates of atoms, their charges and radii and APBS calculation parameters. The function returns calculated electrostatic energies and forces. Various calculated properties like electrostatic potential, solvent accessible surface and charge can also be written to files and subsequently visualized by external applications.
For detailed description of required input and output parameters please see src/apbs_driver.h and src/wrapper_inc.f and iAPBS Programmer's Guide.
The iAPBS distribution also includes a simple reference Fortran code (src/wrapper.f) which reads input data from an external file, calls the apbsdrv wrapper function and prints out calculated electrostatic energy.
If you plan to include APBS functionality in your C, C++ or Fortran code through iAPBS interface the following steps are required:
Write a C, C++ or Fortran code which prepares all necessary APBS input parameters (for example by parsing an input file). When all input parameters are set in the code call the apbsdrv function and process the output data.
Compile your code and link it with the APBS, MALOC, BLAS and iAPBS libraries.
For example, if you have a code called application.f the following would compile and link it with the iAPBS and other required libraries:
ifort -o application application.f -L${IAPBS_LIB} -liapbs \
-L${APBS_LIB} -lapbsmainroutines -lapbs -lmaloc -lapbsblas
|