Write a report in Latex:
format: example.tex
A.B. Pippard - The Elements of Classical Thermodynamics
Andrew R. Leach - Molecular Modelling: Principles and Applications
Arfken, Weber, Harris - Mathematical Methods for Physicists
Attila Szabo - Modern Quantum Chemistry: Introduction to Advanced Electronic Structure Theory
Ben Lambert - A Student’s Guide to Bayesian Statistics
Biman Bagchi - Statistical Mechanics for Chemistry and Material Science
David Chandler - Introduction to Modern Statistical Mechanics
David J. Griffiths - Introduction to Electrodynamics
David M. Bishop - Group Theory and Chemistry
D.N. Sathyanarayana - Handbook of Molecular Spectroscopy
Edward M. Purcell - Electricity and Magnetism
E. Balaguruswamy - Object-Oriented Programming with C++
E.T. Jaynes - Probability Theory: The Logic of Science
Feynman, Leighton, and Sands - The Feynman Lectures on Physics - Volume I, II, and III
F. Reif - Statistical Physics
George F. Simmons - Differential Equations with Applications and Historical Notes
Goldstein - Classical Mechanics
Greiner, Neise, Stocker - Thermodynamics and Statistical Mechanics
Herman J.C. Berendsen - A Student’s Guide to Data and Error Analysis
Ilya Prigogine - Non-equilibrium Statistical Mechanics
Jacob Millman, Christos C. Halkias - Integrated Electronics
James P. Sethna - Statistical Mechanics: Entropy, Order Parameters, and Complexity
John David Jackson - Classical Electrodynamics (An Indian Adaptation)
Ken A. Dill, Sarina Bromberg - Molecular Driving Forces: Statistical Thermodynamics in Biology, Chemistry, Physics, and Nanoscience
Kerson Huang - Statistical Mechanics
Kurt Binder, Dieter W. Heermann - Monte Carlo Simulation in Statistical Physics
Landau and Lifshitz - Theory of Elasticity
Mark W. Zemansky, Richard H. Dittman - Heat and Thermodynamics
Mehran Kardar - Statistical Physics of Particles
Michael P. Allen, Dominic J. Tildesley - Computer Simulation of Liquids
Palash B. Pal - An Introductory Course of Statistical Mechanics
Paul C. Hiemenz - Polymer Chemistry (The Basic Concepts)
Philip R. Benington, D. Keith Robinson - Data Reduction and Error Analysis for the Physical Sciences
R.K. Pathria - Statistical Mechanics
R. Shankar - Principles of Quantum Mechanics
Steven C. Chapra, Raymond P. Canale - Numerical Methods for Engineers
Terrell L. Hill - Statistical Mechanics: Principles and Selected Applications
V. Rajaraman - Computer Programming in Fortran 90 and 95
To install PLUMED, use the following commands:
./configure --prefix="/home/mb/softies/plumed235" --enable-mpi --disable-almost --enable-matheval CXX=mpiCC
make -j 8 && make install
Note: PLUMED and GROMACS should use the same MPI libraries.
Navigate to the GROMACS source directory:
cd /path/to/gromacs/source
export PLUMED_ROOT="/home/mb/softies/src/plumed-2.5.1"
In your ~/.bash_aliases file, add:
source ~/softies/src/plumed-2.5.1/sourceme.sh
Then, apply the changes:
source ~/.bash_aliases
Patch GROMACS with PLUMED:
/home/mb/softies/src/plumed-2.5.1/src/lib//plumed patch -p
Create a build directory and compile GROMACS:
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 references to Plumed.o from:
build-dir/src/gromacs/CMakeFiles/libgromacs.dir/link.txt
Finally, compile and install GROMACS:
make -j 8 && make install
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
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
compiler/openmpi/4.0.2
compiler/gcc/8.3.0
lib/fftw3/3.3.8/intel2018
mpich/3.3.1
compiler/cuda/10.2
compiler/cmake/3.15.4
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
Follow the procedure described in Davide’s message to create a libmatheval distribution without Guile:
🔗 Google Groups: libmatheval Setup
Set the library path so that PLUMED finds libmatheval.so.1:
export LD_LIBRARY_PATH=/PATH_TO/libmatheval/lib/:$LD_LIBRARY_PATH
Modify Makefile.conf:
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
Compile PLUMED with libmatheval:
./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
Extract the compressed files for PLUMED and GROMACS.
tar -xvzf plumed-2.9.3.tgz
tar -xvzf gromacs-2024.5.tar.gz
cd /path/to/plumed-2.9.3
./configure --prefix="/home/mb/softies/plumed293" --enable-mpi --disable-almost --enable-matheval CXX=mpiCC
make -j 32 && make install
export PLUMED_ROOT="/home/mb/softies/src/plumed-2.9.3"
source $PLUMED_ROOT/sourceme.sh
cd /path/to/gromacs-2024.5
$PLUMED_ROOT/src/lib/plumed patch -p
Patch the nearest recent version for the GROMACS Installation.
mkdir build && cd build
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_GPU=CUDA -DCMAKE_INSTALL_PREFIX=/home/mb/softies/gro2024_cuda_plumed_mpi -DGMX_THREAD_MPI=OFF -DGMX_MPI=ON -DCMAKE_C_COMPILER=/usr/bin/gcc-12 -DCMAKE_CXX_COMPILER=/usr/bin/g++-12
make -j 32 && make install
ldd ~/softies/plumed293/bin/plumed
ldd ~/softies/gro2024_cuda_plumed_mpi/bin/gmx_mpi
If you see libraries like, libgomp.so.1 or libmpich.so.12, then they were compiled with MPI indeed.
If the mpirun and mpiexec are compiled with MPICH Library, it will require more than one node to run. If the system doesn't have that many nodes it will fail. So, in that case, using OpenMP library is recommended.
So, to check which library the mpirun and mpiexec are using,
update-alternatives --get-selections | grep mpi
If you see the following output linked with mpich, then Linking to OpenMP is the best Practice.
mpi auto /usr/bin/mpicc.mpich
mpirun auto /usr/bin/mpirun.mpich
mpi-x86_64-linux-gnu auto /usr/include/x86_64-linux-gnu/mpich
Reinstall the OpenMPI bin and Library.
sudo apt-get install --reinstall openmpi-bin
Then Check again,
$> update-alternatives --get-selections | grep mpi
mpi auto /usr/bin/mpicc.openmpi
mpirun auto /usr/bin/mpirun.openmpi
mpi-x86_64-linux-gnu auto /usr/include/x86_64-linux-gnu/mpich
Now one can use mpirun or mpiexec to use GROMACS with PLUMED.
mpiexec -np 2 --oversubscribe gmx_mpi mdrun -plumed plumed.dat
Build Date: 03/03/10
Compiler: 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
To build Charm++, use:
./build charm++ mpi-linux-amd64
For NAMD configuration, run:
./config Linux-x86_64-MPI-icc --charm-arch mpi-linux-amd64
A custom architecture file was created:
arch/Linux-x86_64-MPI-icc.arch (contents below)
MPI Environment Requirement:
To run this executable, your MPI environment must be set by loading the intel/10.1 and mvapich/0.9.9 modules.
Architecture Settings:
NAMD_ARCH = Linux-x86_64
CHARMARCH = mpi-linux-amd64
CXX = mpiCC
FLOATOPTS = -axW -ip -fno-rtti
CXXOPTS = -i-static -static-libgcc -O2 $(FLOATOPTS)
CXXNOALIASOPTS = -O3 -fno-alias $(FLOATOPTS)
CC = mpicc
COPTS = -i-static -static-libgcc -O2 $(FLOATOPTS)
The Linux-x86_64.fftw file was modified to:
FFTDIR=/opt/lib/fftw/2.1.5
FFTINCL=-I$(FFTDIR)/include
FFTLIB=-L$(FFTDIR)/lib -lsrfftw -lsfftw
FFTFLAGS=-DNAMD_FFTW
FFT=$(FFTINCL) $(FFTFLAGS)
The Linux-x86_64.tcl file was modified to:
TCLDIR=/usr
TCLINCL=-I$(TCLDIR)/include
TCLLIB=-L$(TCLDIR)/lib64 -ltcl8.4 -ldl
TCLFLAGS=-DNAMD_TCL
TCL=$(TCLINCL) $(TCLFLAGS)
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
\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}gnuplot colormaps:
http://ayapin-film.sakura.ne.jp/Gnuplot/Primer/Misc/colormap.html
http://jswails.wikidot.com/gnuplot-color-schemes
gnuplot ternary operator
http://gnuplot.sourceforge.net/docs_4.2/node133.html
http://www.phyast.pitt.edu/~zov1/gnuplot/html/statistics.html
gnuplot contour :
set parametric
set contour base
set view 0,0,1
unset surface
set cntrparam levels 5
splot’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 --store stores average color for each residue for given state
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
git clone mb1148@bmdlogin.physik.uni-freiburg.de:/u3/langevin/src/olangevin olangevin
git branch working_b1 origin/working_b1
git checkout working_b1
make clean
make
make install
git commit -a -m "compiled b1"
Boost install script
#!/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 array:
#!/bin/bash
#SBATCH --partition=test
#SBATCH --constraint=dual
#SBATCH --ntasks=12
#SBATCH --cpus-per-task=1
#SBATCH --mem-per-cpu=2000
#SBATCH --time=00:05:00
#SBATCH --array=0-11:12
source /home/agburghardt/biswas/progs/Gromacs/bin/GMXRC
mydir=`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 1
done
# Wait for all child processes to terminate.
wait
Multiple jobs:
#!/bin/bash
#SBATCH --ntasks=16
#SBATCH --time=01:10:00
#SBATCH --mem-per-cpu=4096
for i in `seq 1 $SLURM_NTASKS`
do
srun --nodes=1 --ntasks=1 --cpus-per-task=1 sh SINGLEJOB.slurm &
done
# IMPORTANT must wait for all to finish, or all get killed
wait
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:
#set size 0.9,1
# enable macros
set 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 LENGTH
set 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 4
set style line 2 lc rgb "green" lt 1 lw 4
set style line 3 lc rgb "blue" lt 1 lw 4
set style line 4 lc rgb "cyan" lt 1 lw 4
set style line 5 lc rgb "violet" lt 1 lw 4
set style line 6 lc rgb "orange" lt 1 lw 4
set style line 7 lc rgb "black" lt 1 lw 4
set style line 10 lc rgb "#696969" lt 2 lw 6
# DOTTED
set style line 11 lc rgb "red" lt 2 lw 4 dt 3
set style line 12 lc rgb "green" lt 2 lw 4 dt 3
set style line 13 lc rgb "blue" lt 2 lw 4 dt 3
set style line 14 lc rgb "cyan" lt 2 lw 4 dt 3
set style line 15 lc rgb "violet" lt 2 lw 4 dt 3
set style line 16 lc rgb "orange" lt 2 lw 4 dt 3
set 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 2
set style line 22 lc rgb "green" lt 1 pt -1 lw 2
set style line 23 lc rgb "blue" lt 1 pt -1 lw 2
set style line 24 lc rgb "cyan" lt 1 pt -1 lw 2
set style line 25 lc rgb "violet" lt 1 pt -1 lw 2
set style line 26 lc rgb "orange" lt 1 pt -1 lw 2
set style line 27 lc rgb "black" lt 1 pt -1 lw 2
# ARROWS
set style arrow 1 nohead lc rgb "red" lt 0 lw 4
set style arrow 2 nohead lc rgb "green" lt 0 lw 4
set style arrow 3 nohead lc rgb "blue" lt 0 lw 4
set 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 terminal
WXT = "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