------------------------------ GAMESS/NBO6 Installation Guide ------------------------------ [For GAMESS version 5-Dec-2014 R1] The following describes the steps required to build an NBO6-ready GAMESS executable. You must have access to the source distribution for GAMESS (www.msg.ameslab.gov/gamess/). You must also have either the source or binary distribution for NBO6 (nbo6.chem.wisc.edu). GAMESS and NBO6 are standalone programs that communicate via a message-passing protocol. The following instructions describe the installation of a small message-passing interface (gmsnbo) into the GAMESS executable. Once installed, this interface handles all communication between the GAMESS host and NBO6 client programs. The NBO6 distribution includes a gmsnbo interface that is compatible with the version of GAMESS listed above. This interface may also work with more recent versions of GAMESS, but not, most likely, with older versions. Please upgrade to a newer version of GAMESS if your older version doesn't work with NBO6. (We don't support older versions of GAMESS.) It is likely critical that GAMESS and the gmsnbo interface are compiled using the same Fortran compiler. If you have the NBO6 source distribution, choose from the compilers listed in nbo6/Make.config. If you have the NBO6 binary distribution, you should compile GAMESS using gfortran. The gfortran version used to compile the gmsnbo.i8.a (and gmsnbo.i4.a) linkable library of the binary distribution is noted in nbo6/bin/CONTENTS. It is also critical that GAMESS and NBO6 use a consistent integer length (either i4 or i8), otherwise message-passing will fail. If GAMESS is compiled with 32-bit integers (i4), the gmsnbo interface must likewise be compiled with 32-bit integers (for the source distribution) or you must link to the gmsnbo.i4.a library (for the binary distribution), and the NBOEXE environment variable must identify the full path to and filename of the 32-bit NBO6 executable (nbo6.i4.exe). If 64-bit integers are used instead, the 64-bit gmsnbo interface must be built or linked to the gmsnbo.i8.a library, and NBOEXE should identify the 64-bit NBO6 executable (nbo6.i8.exe). Try i8 first if you are uncertain which integer length should be employed. Build GAMESS (as described below), set the NBOEXE environment variable appropriately, and run a test calculation with NBO. If NBO fails (either with a segmentation fault or with an error message that specifically mentions an integer length issue), you've likely selected the wrong integer length. Switch to i4, and rebuild GAMESS. Complete the following steps: 1. Compile and link GAMESS. Ensure that GAMESS executes without error before attempting to install the NBO6 interface. 2. Edit rhfuhf.src in the gamess/source directory. [These edits are only required for performing NBO's NEDA with Grimme's dispersion corrections (DC=.TRUE.) or local response dispersion corrections (LRDFLG=.TRUE.).] The statement E0 = E0 + EDISP must be added in four places to rhfuhf.src. The first two of these are in routine RHFCL, as shown here: C C ----- DISPERSION CORRECTIONS C IF(DC) THEN CALL DFTD3(1,EDISP,DUMMY) ETOTD = ETOT IF(ETOT.NE.ZERO) ETOT = ETOT + EDISP E0 = E0 + EDISP ! Add this line ELSE EDISP=0 END IF C C ----- LOCAL RESPONSE DISPERSION CORRECTIONS C IF(DOLRD) THEN EDISP = ELRD6 + ELRD8 + ELRD10 + EMULT ETOTD = ETOT IF(ETOT.NE.ZERO) ETOT = ETOT + EDISP E0 = E0 + EDISP ! Add this line CALL PRTLRD END IF The second two are in UHFOP: C C ----- DISPERSION CORRECTIONS C IF(DC) THEN CALL DFTD3(1,EDISP,DUMMY) ETOTD = ETOT IF(ETOT.NE.ZERO) ETOT = ETOT + EDISP E0 = E0 + EDISP ! Add this line ELSE EDISP=0 END IF MPLEVL=MPLEVLS C C ----- LOCAL RESPONSE DISPERSION CORRECTIONS C IF(LRDFLG) THEN EDISP = ELRD6 + ELRD8 + ELRD10 + EMULT ETOTD = ETOT IF(ETOT.NE.ZERO) ETOT = ETOT + EDISP E0 = E0 + EDISP ! Add this line CALL PRTLRD END IF Then, recompile the GAMESS source. 3. (Skip to step 5 if you don't have the NBO6 source distribution.) Go to the top-level directory of the NBO6 source distribution. Edit Make.config, ensuring that the Fortran compiler and integer length are consistent with those used for the compilation of GAMESS. FC = gfortran ! same compiler used to build GAMESS FC_VERSION = 4.7 ! only needed if FC=gfortran CC = gcc INT = i8 ! i4 or i8 (if uncertain, try i8 first) OS = linux NBODIR = /path/to/nbo6 ! path to top-level directory LAPACK = false ! true, if you want NBO to use LAPACK LAPACKLIB = -L/path/to/lapack -llapack BLAS = false ! true, if you want NBO to use BLAS BLASLIB = -L/path/to/blas -lblas STATIC = false FTNCHEK = false FLUSH = false 4. Type 'make' in the top-level NBO6 directory to build the NBO6 client program and gmsnbo interface library. The executable and library will be written to the bin subdirectory. These will be named either nbo6.i4.exe and gmsnbo.i4.a (for i4 integer builds) or nbo6.i8.exe and gmsnbo.i8.a (for i8 builds). 5. Edit the lked script in the top-level directory of the GAMESS distribution. The NBO environment variable is set to 'false' by default. Change this variable to 'true'. set NBO=true Also, set the NBOLIB environment variable to specify the path to the interface library that you created in step 3. For example, set NBOLIB=/path/to/nbo6/bin/gmsnbo.i8.a 6. Rebuild GAMESS using the lked script. The resulting GAMESS executable is NBO6-ready. 7. Edit the rungms script in the top-level GAMESS directory. Modify the NBOEXE environment variable to specify the path to the NBO6 client program. For example, setenv NBOEXE /path/to/nbo6/bin/nbo6.i8.exe Note that the integer length (i4 or i8) specified for NBOEXE must be consistent with that specified for NBOLIB in step 4. 8. Run several test jobs to ensure that the interface is functioning correctly. There are sample input (.inp) files in the nbo6/tests/gamess directory of the NBO6 distribution, along with corresponding output (.arc) files. Eric Glendening (glendening@indstate.edu) maintains the GAMESS/NBO interface. Contact him if you encounter problems with this installation. Last updated: 1-Aug-2015