About CHARMM

CHARMM (Chemistry at HARvard Macromolecular Mechanics) is a versatile and widely used molecular simulation program with broad application to many-particle systems. The program can be utilized with various energy functions and models, from mixed quantum mechanical-molecular mechanical force fields, to all-atom classical potentials with explicit solvent and various boundary conditions, to implicit solvent and membrane models. The primary focus of CHARMM is on the study of molecules of biological interest, such as peptides, nucleic acids, lipids, crystals, and membrane environments. Furthermore, it has been ported to numerous platforms in serial and parallel architectures.

Official website: http://www.charmm.org

This document explains how to build CHARMM c35b1 on Opteron and Intel 64 bits architectures with Infiniband Network, using the next software:

  • PGI8.0
  • MVAPICH2 1.2*
  • Intel Compiler Suite 11.1.072 (Intel64)
  • OpenMPI-14.2** (Intel64)

*MVAPICH2 was build with PGI8.0 and OFED-1.4

**OpenMPI was build with ICS-11.1.072, OFED-1.4 and with Torque/PBS flags

Note that we use PGI compilers and MVAPICH2 layer for Opteron and Intel Compiler Suite and OpenMPI for Intel Nehalem, however, for instance, the executable obtained with PGI/MVAPICH2 compilers runs also on Intel 64 bits architectures using the correct options.

 

Environment Set Up

For long time compilations, use a screen session which allows to reattach a background session.

#screen -S charmm-compilation
#tar -xvf c35b1r1.tar.gz

Load the needed modules: PGI and MVAPICH2 or Intel Compilar and OpenMPI.

#./opt/modules/init/bash
#module load mvapich2-64/pgi8.0/1.2p1
#module load pgi/8.0-3

Or

#./opt/modules/init/bash
#module load openmpi-64/ics-11.1.072/1.4.2
#module load ics11.1.072_64

 

Configure and building

The building of charmm is controlled by install.com file. Check it to have more information about the different options.

Run the install.com with the next options to obtain and executable using PGI compiler and MVAPICH2 implementation of MPI.

#./install.com gnu xxlarge M PGF95 X86_64 MPICH

These options mean: gnu compilers for Linux, xxlarge memory size of the program (reduce, small, xsmall, medium, large, xlarge or huge are other options), M parallel compilation, PGF95 PGI compilers, X86_64 indicates the use of extra keywords for X86_64 architectures (AMD or Intel 64 bits) and MPICH adds special library options for MPICH.

The building consists in three phases. The first one consists in creating the build/gnu directory and the second one to install the preprocessor prefx_gnu. In the third phase, the program asks the absolute paths of mpi include files and the mpi lib files.

 

#install.com> Directory /tmp/c35b1r1/build/gnu does not exist
# Creating /tmp/c35b1r1/build/gnu ...
#install.com> Phase 1 completed#install.com> The preprocessor prefx_gnu installed.
#install.com> Phase 2 completed.# install.com> Processing CHARMM source on gnu...
#Enter the absolute path to the mpi include files (mpi.h, etc.)
#>> /opt/mvapich2-64-pgi8.0-1.2p1/include
#Enter the absolute path to the mpi lib files (e.g., libmpi.a(so))
#>> /opt/mvapich2-64-pgi8.0-1.2p1/lib

On the other hand, using Intel Compiler Suite and OpenMPI, specify the next options:

 

#./install.com em64t xxlarge M IFORT X86_64 MPISPECIAL

When the "Enter load line arguments for MPI library linking” question appears, add -lmpi_f90.

 

#Enter load line arguments for MPI library linking
#>> -lmpi_f90
#Adding to load line for linking: -Lmpi -lmpi_f90

 

Then, you have to introduce the absolute paths of mpi include and lib files.

Take into account that to replace the original QUANTUM part of CHARMM code with other packages (GAMESS, GAMESS-UK, CADPAC, SCCDFTB, Q-CHEM, SQUANTUM or MNDO97), you have to check the install.com file carefully and be aware that a compiled version of the particular quantum package is needed.

The charmm executable will be created in the exec/gnu (or em64t) directory if everything is correct.

 

#install.com> CHARMM installation is completed.
# The CHARMM executable is /tmp/c35b1r1/exec/gnu/charmm.
#install.com> Phase 3 completed.

NOTE: To avoid problems with charmm input name, you need to remove “FILEINPUT” at build/em63t/pref.dat file for the em64t building. Then, remove lib/em64t and exec/em64t directories and run again the install.com command:

#./install.com em64t xxlarge M IFORT X86_64 MPISPECIAL

 

Testing

There is the possibility to use your executable against several charmm input tests. You can download a benchmark output directory from:

http://www.charmm.org/develop/testcases.html

Extract the files to obtain a benchmark directory for your charmm version built whit GNU compilers. To run the charmm tests in parallel, access to test/ directory and execute test.com file as indicated:

#./test.com M 8 gnu output bench_dir all

M option indicates parallel, 8 or any number is the number of processors and gnu the host machine type (common Linux), output is the output directory and bench_dir the benchmark directory, all indicates that all the test will be perform.

Remember that to run the tests with MVAPICH2 layer, it is necessary to start a mpd process before.

Use compare.awk script to analyse the results:

#awk –f compare.awk –v verbose=0 -v tol=0.01 ouput.rpt > results

Unfortunately, charmm tests are only reliable to check if the jobs can run and not to compare or analyse the output with the tools offered by the developers. Around the 50% of the tests are considered FAILED with compare.awk script comparing PGI/MVAPICH2 and IFORT/OPENMPI compilations against the benchmark results compiled with gfortran (64 bits) from charmm.org webpage.

 

Setting Up The Module

First of all, notice that with CHARMM a sole executable file is obtained, so, you just need to put this file into your path.

#%Module#####################################################################
##
## modules modulefile
##
## modulefiles/modules. Generated from modules.in by configure.
##
proc ModulesHelp { } {
global version modroot
puts stderr "\tCHARMMc35b1_opteron inclou l'entorn per a CHARMMc35b1 64 bits"
module-whatis "Entorn per a CHARMM c35b1 versio x86_64" # for Tcl script use only set version 3.2.3 set modroot /opt/modules-3.2.3/Modules/3.2.3 append-path PATH /opt/charmm/c35b1r1/