Wiki
Books
![](https://www.google.com/images/icons/product/drive-32.png)
Gromacs, Plumed etc
Install Plumed
./configure --prefix="/home/mb/softies/plumed235" --enable-mpi --disable-almost --enable-matheval CXX=mpiCC
make -j 8 && make install
**Plumed and gromacs should use the SAME mpi libraries
cd to gromacs source directory
export PLUMED_ROOT="/home/mb/softies/src/plumed-2.5.1"
In .bash_aliases add source ~/softies/src/plumed-2.5.1/sourceme.sh
source ~/.bash_aliases
/home/mb/softies/src/plumed-2.5.1/src/lib//plumed patch -p
mkdir build && cd build/
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX=/home/mb/softies/gro2018_cuda -DGMX_GPU=CUDA -DGMX_MPI=OFF -DCMAKE_C_COMPILER=/usr/bin/gcc-8 -DCMAKE_CXX_COMPILER=/usr/bin/g++-8
remove duplicate reference to Plumed.o from build-dir/src/gromacs/CMakeFiles/libgromacs.dir/link.txt
make -j 8 && make install
worked in the past: cmake -DGMX_MPI=ON .. -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX=/home/fr/fr_fr/fr_mb1148/progs/gro506_alt -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DGMX_THREAD_MPI=OFF
PARAM-shakti set up:
fftw
module load compiler/openmpi/4.0.2
./configure --enable-float --enable-threads --enable-openmp --enable-mpi --enable-shared MPICC=mpicc --prefix=/home/mbiswas.nitr/programs/fftw3 --enable-sse2 --enable-avx --enable-avx2
Loaded Modules:
1) compiler/openmpi/4.0.2 3) lib/fftw3/3.3.8/intel2018 5) compiler/cuda/10.2
2) compiler/gcc/8.3.0 4) mpich/3.3.1 6) compiler/cmake/3.15.4
gromacs18
cmake .. -DGMX_GPU=CUDA -DGMX_BUILD_OWN_FFTW=OFF -DCMAKE_PREFIX_PATH=/home/mbiswas.nitr/programs/fftw3 -DCMAKE_INSTALL_PREFIX=/home/mbiswas.nitr/programs/gro2018_mpi_cuda -DGMX_MPI=ON -DCMAKE_C_COMPILER=mpicc -DCMAKE_CXX_COMPILER=mpicxx -DBUILD_SHARED_LIBS=off
Ref. https://groups.google.com/forum/#!topic/plumed-users/stlK9-kaa6A https://www.archer.ac.uk/documentation/software/plumed/
Plumed with MATHEVAL:# Follow the procedure described in Davide's message to create a libmatheval distribution without Guile.https://groups.google.com/forum/#!msg/plumed-users/Zr21oQULcY0/K1v3CTSBCAAJ
# add the header and library paths to LD_LIBRARY_PATH otherwise plumed-2.0 won't find libmatheval.so.1export LD_LIBRARY_PATH=/PATH_TO/libmatheval/lib/:$LD_LIBRARY_PATH
configure plumedIn Makefile.conf change:
DYNAMIC_LIBS=-lstdc++ -llapack -lblas -lmatheval -L/PATH_TO_MATHEVAL_LIB
CPPFLAGS=-D__PLUMED_HAS_DLOPEN -D__PLUMED_MPI $(CHECK_BOUNDARIES) -I. $(PLUMED_INCLUDE) -D__PLUMED_HAS_MATHEVAL -I/lustre/jhome19/esmi19/esmi1901/Programs/libmatheval/lib
LDFLAGS=-rdynamic -L/lustre/jhome19/esmi19/esmi1901/Programs/libmatheval/lib/.libs
Ref: https://groups.google.com/forum/#!topic/plumed-users/BE3abBvsPOE
./configure --prefix=/home/fr/fr_fr/fr_mb1148/progs/plumed221 --enable-mpi CXX=mpiCC LDFLAGS=-L/home/fr/fr_fr/fr_mb1148/progs/matheval/lib CPPFLAGS=-I/home/fr/fr_fr/fr_mb1148/progs/matheval/include
NAMD
MPI Executable
Build Date: 03/03/10Compiler: Intel (10.1.015)Libraries: FFTW (2.1.5) MVAPICH (0.9.9) charm++ (6.1.3)Location: /apps/namd/2.7b2/Linux-x86_64-MPI-icc
Notes:
For charm++ build: ./build charm++ mpi-linux-amd64 For NAMD configuration: ./config Linux-x86_64-MPI-icc --charm-arch mpi-linux-amd64 Created a custom architecture file: arch/Linux-x86_64-MPI-icc.arch (below) To run this executable your MPI environment must be set by loading the intel/10.1 and mvapich/0.9.9 modules.
NAMD_ARCH = Linux-x86_64CHARMARCH = mpi-linux-amd64
CXX = mpiCCFLOATOPTS = -axW -ip -fno-rttiCXXOPTS = -i-static -static-libgcc -O2 $(FLOATOPTS)CXXNOALIASOPTS = -O3 -fno-alias $(FLOATOPTS)
CC = mpiccCOPTS = -i-static -static-libgcc -O2 $(FLOATOPTS)
Also modified Linux-x86_64.fftw to be...
FFTDIR=/opt/lib/fftw/2.1.5FFTINCL=-I$(FFTDIR)/includeFFTLIB=-L$(FFTDIR)/lib -lsrfftw -lsfftwFFTFLAGS=-DNAMD_FFTWFFT=$(FFTINCL) $(FFTFLAGS)
and Linux-x86_64.tcl to be...
TCLDIR=/usrTCLINCL=-I$(TCLDIR)/includeTCLLIB=-L$(TCLDIR)/lib64 -ltcl8.4 -ldlTCLFLAGS=-DNAMD_TCLTCL=$(TCLINCL) $(TCLFLAGS)
Gromacs output selected frames from trajectory
Gromacs replica runs with GPUs
https://mailman-1.sys.kth.se/pipermail/gromacs.org_gmx-users/2018-February/118715.html
https://sites.google.com/site/drammhto/methods-codes/1-method-of-replica-exchange-with-gromacs
GIT README
LATEX
\begin{document}\begin{figure}[htb]\centering \begin{tabular}{@{}cccc@{}} \includegraphics[width=.23\textwidth]{example-image-a} & \includegraphics[width=.23\textwidth]{example-image-b} & \includegraphics[width=.23\textwidth]{example-image-c} & \includegraphics[width=.23\textwidth]{example-image} \\ \includegraphics[width=.23\textwidth]{example-image-a} & \includegraphics[width=.23\textwidth]{example-image-b} & \includegraphics[width=.23\textwidth]{example-image-c} & \includegraphics[width=.23\textwidth]{example-image} \\ \includegraphics[width=.23\textwidth]{example-image-a} & \includegraphics[width=.23\textwidth]{example-image-b} & \includegraphics[width=.23\textwidth]{example-image-c} & \includegraphics[width=.23\textwidth]{example-image} \\ \multicolumn{4}{c}{\includegraphics[width=.23\textwidth]{example-image-a}} \end{tabular} \caption{This is some figure side by side}\end{figure}\end{document}with subfigure:
\documentclass[a4paper,12pt]{article}\usepackage{graphicx}\usepackage{subcaption}
\begin{document}\begin{figure}[htb]\centering \begin{subfigure}[b]{.24\linewidth} \centering \includegraphics[width=.99\textwidth]{example-image-a} \caption{A subfigure}\label{fig:1a} \end{subfigure}% \begin{subfigure}[b]{.24\linewidth} \centering \includegraphics[width=.99\textwidth]{example-image-b} \caption{A subfigure}\label{fig:1b} \end{subfigure}% \caption{This is lot of figures arranged side by side in matrix form with captions for each and a main caption}\label{fig:1}\end{figure}\end{document}Link: http://tex.stackexchange.com/questions/84889/combining-multiple-eps-files-into-a-single-figure
Gnuplot
gnuplot ternary operatorhttp://gnuplot.sourceforge.net/docs_4.2/node133.htmlhttp://www.phyast.pitt.edu/~zov1/gnuplot/html/statistics.html
Gnuplot contour :
set parametricset contour baseset view 0,0,1unset surfaceset cntrparam levels 5splot’results.dat’ using 1:2:3 with line
Some tricks with gnuplot:http://gnuplot-tricks.blogspot.de
Gnuplot 'every' keyword:
every I:J:K:L:M:N I Line increment J Data block increment K The first line L The first data block M The last line N The last data block every 2 plot every 2 line every ::3 plot from the 3-rd lines every ::3::5 plot from the 3-rd to 5-th lines every ::0::0 plot the first line only every 2::::6 plot the 1,3,5,7-th lines every :2 plot every 2 data block every :::5::8 plot from 5-th to 8-th data blocks
Ramacolor plots
for i in {1..71}; do ramacolor -d inner_5_8M.dih -s inner_5_8M.dih.cossin.clust/microstates --store ramastore/${i}.rc $i;done [can be parallelized]
ramacolor --load {1..30}.rc --export ramacolor_md.pdf
Olangevin install
make cleanmake make installgit commit -a -m "compiled b1"
Boost
#!/bin/bash
GCC_LOC="/home/biswasm/programs/gcc730/bin"
#export AR="${GCC_LOC}/ar"export CC="${GCC_LOC}/gcc_730"export CPP="${GCC_LOC}/gcc_730 -E"export CXX="${GCC_LOC}/g++_730"export CXXCPP="${GCC_LOC}/g++_730 -E"
pushd boost_${BOOST_DL_VERSION} > /dev/null
# add our compiler to the end of the boost jam config file
echo "using gcc : 7.3 : ${GCC_LOC}/g++_730 ; " >> ./tools/build/src/user-config.jam
#BOOST_LIBRARIES=filesystem,python,regex,system#CONFIGURE_OPTIONS="--with-python-version=2.7 --with-python-root=${PYTHON_LOC}/${OS}/${ARCH} --with-python=${PYTHON_LOC}/${OS}/${ARCH}/bin/python"
PREFIX="/home/biswasm/programs/boost168"
./bootstrap.sh --prefix=${PREFIX} #--with-libraries=${BOOST_LIBRARIES} ${CONFIGURE_OPTIONS}
./b2 $CPPFLAGS --toolset=gcc
cmake with boost:
#!/bin/bash
BUILDDIR="/home/biswasm/programs/src/Clustering/build"PREFIXDIR="/home/biswasm/programs/clustering"GCC_LOC="/home/biswasm/programs/gcc730/bin"
export CC="${GCC_LOC}/gcc_730"export CXX="${GCC_LOC}/g++_730"
export BOOST_ROOT="/home/biswasm/programs/boost168"export BOOST_INCLUDE="/home/biswasm/programs/boost168/include"export BOOST_LIBDIR="/home/biswasm/programs/boost168/lib"export BOOST_OPTS="-DBOOST_ROOT=${BOOST_ROOT} -DBOOST_INCLUDEDIR=${BOOST_INCLUDE} -DBOOST_LIBRARYDIR=${BOOST_LIBDIR} -DCMAKE_INSTALL_PREFIX=${PREFIXDIR}"# -DCMAKE_C_COMPILER=gcc_730 -DCMAKE_CXX_COMPILER=g++_730"(cd ${BUILDDIR} && cmake .. ${BOOST_OPTS} -DCMAKE_C_COMPILER=/home/biswasm/programs/gcc730/bin/gcc_730 -DCMAKE_CXX_COMPILER=/home/biswasm/programs/gcc730/bin/g++_730)
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/home/biswasm/programs/gcc730/lib64:/home/biswasm/programs/boost168/lib
Slurm job submission script
source /home/agburghardt/biswas/progs/Gromacs/bin/GMXRCmydir=`pwd`
# Every 12-task block will be run on a separate node.
for I in $(seq 12); do # This is the "global task number". Since we have an array of # 192 tasks, J will range from 1 to 192. J=$(($SLURM_ARRAY_TASK_ID+$I))
cd dir${J} # Put each task into background, so that tasks are executed # concurrently. mdrun -nt 1 -v -deffnm sim & #touch myfile cd $mydir
# Wait a little before starting the next one. #sleep 1done
# Wait for all child processes to terminate.wait
Multiple jobs:
#!/bin/bash#SBATCH --ntasks=16#SBATCH --time=01:10:00#SBATCH --mem-per-cpu=4096for i in `seq 1 $SLURM_NTASKS`dosrun --nodes=1 --ntasks=1 --cpus-per-task=1 sh SINGLEJOB.slurm &done# IMPORTANT must wait for all to finish, or all get killedwait
Scribbles
AWK split file examples: http://www.theunixschool.com/2012/06/awk-10-examples-to-split-file-into.html
HP driver install for Ubuntu 18.04: https://askubuntu.com/questions/1058742/how-to-install-hp-printer-in-ubuntu-18-04
GRUB rescue: http://www.linuxandubuntu.com/home/ways-to-rescue-or-recover-grub-menu
python multiprocessing: https://sebastianraschka.com/Articles/2014_multiprocessing.html , https://stackoverflow.com/questions/40217873/multiprocessing-use-only-the-physical-cores
visualizing clusters in VMD: https://gromacs.bioexcel.eu/t/visualizing-clusters-of-molecules-with-trjconv-with-pbc/2946
My gnuplot settings:
# enable macrosset macros# search for functions or data files in these directories#set loadpath '/usr/local/lib/gnuplot'
set pal defined ( 0 '#000096', 1.5 '#0004ff', 3.5 '#0090ff', \ 5.5 '#30ffc6', 6.0 '#94ff63', 7.5 '#ffe900', \ 9.0 '#ff6400' , 10.5 '#d10000', 12 '#840000' )
#set border lw 3
#ERRORBARS CAP LENGTHset bars 0.5
# add default line colors#set style line 1 lc rgb '#0060ad' lt 1 lw 3 pt 5 # blue#set style line 2 lc rgb '#dd181f' lt 1 lw 3 pt 7 # red
set style line 1 lc rgb "red" lt 1 lw 4set style line 2 lc rgb "green" lt 1 lw 4set style line 3 lc rgb "blue" lt 1 lw 4set style line 4 lc rgb "cyan" lt 1 lw 4set style line 5 lc rgb "violet" lt 1 lw 4set style line 6 lc rgb "orange" lt 1 lw 4set style line 7 lc rgb "black" lt 1 lw 4set style line 10 lc rgb "#696969" lt 2 lw 6# DOTTED
set style line 11 lc rgb "red" lt 2 lw 4 dt 3set style line 12 lc rgb "green" lt 2 lw 4 dt 3set style line 13 lc rgb "blue" lt 2 lw 4 dt 3set style line 14 lc rgb "cyan" lt 2 lw 4 dt 3set style line 15 lc rgb "violet" lt 2 lw 4 dt 3set style line 16 lc rgb "orange" lt 2 lw 4 dt 3set style line 17 lc rgb "black" lt 2 lw 4 dt 3# POINTS
set style line 21 lc rgb "red" lt 1 pt -1 lw 2set style line 22 lc rgb "green" lt 1 pt -1 lw 2set style line 23 lc rgb "blue" lt 1 pt -1 lw 2set style line 24 lc rgb "cyan" lt 1 pt -1 lw 2set style line 25 lc rgb "violet" lt 1 pt -1 lw 2set style line 26 lc rgb "orange" lt 1 pt -1 lw 2set style line 27 lc rgb "black" lt 1 pt -1 lw 2
# ARROWS
set style arrow 1 nohead lc rgb "red" lt 0 lw 4set style arrow 2 nohead lc rgb "green" lt 0 lw 4set style arrow 3 nohead lc rgb "blue" lt 0 lw 4set style arrow 4 nohead lc rgb "black" lt 0 lw 4
# add macros to select the desired line style#BLUE = "1"#RED = "2"
# points: 5/square, 7/circle, 9/triangle up
# add macros to select a desired terminalWXT = "set terminal wxt size 350,262 enhanced font 'Verdana,10' \ persist"EPS = "set terminal postscript eps enhanced color font 'Helvetica,24'"PNG = "set terminal pngcairo size 350,262 enhanced font 'Verdana,10'"SVG = "set terminal svg size 350,262 fname \ 'Verdana, Helvetica, Arial, sans-serif' fsize = 10"
GROMACS wrap trajectory or remove rotation/translation
gmx trjconv -fit rot+trans -s prod1.tpr -n index.ndx -f prod1.xtc -o output.xtc
gmx editconf -ndef -f prod1.gro -n index.ndx -o prot_chol.gro
gmx trjconv -pbc mol -s prod1.tpr -n index.ndx -ur compact -center -f prod1.xtc -o output.xtc