There exist many tutorials on computational chemistry. Below are some related Youtube videos.
Linux for beginners:
1. https://www.youtube.com/watch?v=lmeDvSgN6zY
2. https://www.youtube.com/watch?v=IVquJh3DXUA
3. https://www.youtube.com/watch?v=s3ii48qYBxA
Python for beginners:
4. https://learnxinyminutes.com/docs/python/
5. https://www.youtube.com/watch?v=kqtD5dpn9C8
6. https://www.youtube.com/watch?v=_uQrJ0TkZlc
Atomistic simulation for beginners
7. https://www.youtube.com/watch?v=veBZYlD6AF4
8. https://www.youtube.com/watch?v=lLFEqKl3sm4
9. https://www.youtube.com/watch?v=GqvT9UvCr6I&t=321s
Introduction to GROMACS
10. https://www.youtube.com/watch?v=hM2fPemCvjw
11. https://www.youtube.com/watch?v=vK5RRg8gEyc
12. https://www.youtube.com/watch?v=MWafKFVgFTU
1. Installation
#GPU Support: https://www.cherryservers.com/blog/install-cuda-ubuntu
# https://zhuanlan.zhihu.com/p/496537091
tar axpvf gromacs*.tar.gz
cd gromacs-2023/
#plumed patch -p
mkdir build_GPU
cd build_GPU/
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DCMAKE_INSTALL_PREFIX=$HOME/programs/GROMACS-2023 \
-DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.1
#on HPC cluster: -DBUILD_SHARED_LIBS=OFF -DGMX_PREFER_STATIC_LIBS=ON
#### for MacOS, use the following: #######
#CC=/opt/homebrew/bin/mpicc CXX=/opt/homebrew/bin/mpic++ \
CC=/opt/homebrew/bin/gcc-13 CXX=/opt/homebrew/bin/g++-13 \
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=OFF -DREGRESSIONTEST_DOWNLOAD=ON \
-DGMX_GPU_DISABLE_COMPATIBILITY_CHECK=1 -DGMX_GPU=OpenCL \
-DGMX_DEFAULT_SUFFIX=OFF -DCMAKE_INSTALL_PREFIX=$HOME/programs/GROMACS-2023
#### End for MacOS #######
make -j 16
make install
Add the following to $HOME/.bashrc
#CUDA
export PATH=/usr/local/cuda-12.1/bin${PATH:+:${PATH}}
export LD_LIBRARY_PATH=/usr/local/cuda-12.1/lib64${LD_LIBRARY_PATH:+:${LD_LIBRARY_PATH}}
#Gromacs
GMX_PATH=$HOME/programs/GROMACS-2023
export PATH=$GMX_PATH/bin:$PATH
export GMXLIB=$HOME/works/library/library_GMX/itp:$GMX_PATH/share/gromacs/top
2. Tutorials:
https://tutorials.gromacs.org
http://www.mdtutorials.com/gmx/
https://jerkwin.github.io/2017/10/20/GROMACS分子动力学模拟教程-多肽-蛋白相互作用/
3. Practice Systems:
a. Water: https://drive.google.com/file/d/14W-NzVXdQaCxW47QtlNMHrN84jX5WNPy/view?usp=drive_link
b. Lysozyme: https://drive.google.com/file/d/1ZtH13HL7hMkquBUmpd_dM3oENEIkoAjU/view?usp=drive_link
c. Peptide: https://drive.google.com/file/d/1cEn5S1AU2dxEgLj3p0Z-WOCGrvNQyRii/view?usp=drive_link
d. Polymer: https://drive.google.com/file/d/1Y76fkqsiLNq74uGvpaVC2ucBNtG80UXA/view?usp=drive_link
4. Principal Component Analysis:
******Content of run_PCA.sh ***********************************************************
#!/bin/bash
step1=0
step2=0
step3=1
# gmx anaeig (2023) failed, so Gromacs 2019 is used for all analyses
source ~/programs/GROMACS-2019.6/bin/GMXRC.bash
if [ ${step1} -eq 1 ] ; then
echo -e "C-alpha\nSystem" | gmx trjconv -s ../T298_gmx2019.tpr -f ../T298.xtc -fit rot+trans -o mdfit.xtc
echo -e "C-alpha\nC-alpha" | gmx covar -s ../T298_gmx2019.tpr -f mdfit.xtc -o eigenvalues.xvg -v eigenvectors.trr -xpma covapic.xpm
gmx xpm2ps -f covapic.xpm -o covapic.eps
rm covar.log
fi
# 2D plot of PC1-PC2 (without time in -2d; with time in -proj)
if [ ${step2} -eq 1 ] ; then
echo -e "C-alpha\nC-alpha" | gmx anaeig -f mdfit.xtc -s ../T298_gmx2019.tpr -v eigenvectors.trr -first 1 -last 2 -2d 2d.xvg
xmgrace 2d.xvg
fi
# Free energy surface
if [ ${step3} -eq 1 ] ; then
echo -e "C-alpha\nC-alpha" | gmx anaeig -f mdfit.xtc -s ../T298_gmx2019.tpr -v eigenvectors.trr -last 1 -proj pc1.xvg
echo -e "C-alpha\nC-alpha" | gmx anaeig -f mdfit.xtc -s ../T298_gmx2019.tpr -v eigenvectors.trr -first 2 -last 2 -proj pc2.xvg
# merge pc1.xvg and pc2.xvg --> gsham_input.xvg, which has 3 columns: time pc1 pc2.
# Note that pc1.xvg/pc2.xvg can also be replaced with variables you select (Rg, RMSD, etc.)
grep -Ev "^#|^@" pc1.xvg > pc1_values.xvg
grep -Ev "^#|^@" pc2.xvg | awk '{print $2}' > pc2_values.xvg
paste pc1_values.xvg pc2_values.xvg > gsham_input.xvg
# FES calculation
gmx sham -f gsham_input.xvg -ngrid 60 60 1 -ls FES.xpm
gmx xpm2ps -f FES.xpm -o FES.eps -rainbow red
python2.7 ./scripts/xpm2txt.py -f FES.xpm -o FES.txt
# plot
python ./scripts/FES_plot.py FES.txt
# This is to print the rows of with the lowest free energy: (pc1, pc2, fes).
# Once (pc1, pc2) is known for the lowest energy, the time label could be obtained from gsham_input.txt (1st column);
# Consequently, the corresponding frame with the lowest free energy could be extracted using (gmx trjconv).
# print data with free energy less than a value
# cat FES.txt | awk '{if ($3 < 1) print}'
rm pc*_values*
fi
rm \#*
exit
******** End of run_PCA.sh ***************************************************
********Content of scripts/FES_plot.py *****************************
#!/usr/bin/env python
import pandas as pd
import matplotlib.pyplot as plt
import numpy as np
data=pd.read_csv('FES.txt',sep='\t',header=None)
fesvalue=np.array(data[2])
x = np.unique(data[0])
y = np.unique(data[1])
plotvalue=np.reshape(fesvalue,(y.shape[0], x.shape[0]))
# plot
plt.figure(figsize=(8,8))
plt.contourf(x, y, plotvalue, cmap='jet')
# imshow was also tested, which strangely produces a different plot from FES.eps. It is thus not used.
plt.xlabel('PC1',fontsize=16)
plt.ylabel('PC2',fontsize=16)
cbar = plt.colorbar()
cbar.set_label('Gibbs Free Energy (kJ/mol)')
# Print to .pdf
plt.savefig('FES.pdf',dpi=600)
********End of scripts/FES_plot.py *********************************
References:
1) https://kangsgo.cn/p/gromacs使用pca绘制能量景观图/
2) https://blog.csdn.net/xiaolan39/article/details/116742573
4) https://jerkwin.github.io/2017/10/20/GROMACS分子动力学模拟教程-多肽-蛋白相互作用/
1. Convert NAMD trajectory to Gromacs format
#***************************************************
#!/bin/bash
NAME=T298
# convert .coor to .pdb
catdcd -o ${NAME}.pdb -otype pdb -s ../psfgen/NaCl.psf -stype psf -namdbin ../${NAME}.coor
# read the box length and convert .pdb to .gro
echo "Get the box length in Angstrom from ../${NAME}.xsc"
if [ -f "box.txt" ]
then
rm box.txt
fi
tail -1 ../${NAME}.xsc >> box.txt
cat box.txt | while read step a_x a_y a_z b_x b_y b_z c_x c_y c_z o_x o_y o_z s_x s_y s_z s_u s_v s_w
do
echo "box (Angstrom): ${a_x} ${b_y} ${c_z}"
editconf -f ${NAME}.pdb -box $(echo "scale=5; ${a_x}/10.0"|bc) $(echo "scale=5; ${b_y}/10.0"|bc) $(echo "scale=5; ${c_z}/10.0"|bc) -o ${NAME}.gro
done
#get the index file
#echo -e "a N1 & r NO3\na O1 O2 O3 & r NO3\na O & r WAT\na C13 & r M1\na O1 O2 & r M1\na O O1 O2 O3\nq\n"| make_ndx -f ${NAME}.gro
#get the .tpr file
grompp -f T298.mdp -c ${NAME}.gro -p system.top -o ${NAME} -maxwarn 1
#-----Convert the trajectory
echo -e "system" | trjconv -f ../${NAME}.dcd -s ${NAME}.tpr -o ${NAME}.xtc -pbc mol
#clearn up
rm box.txt *.pdb mdout.mdp \#*
exit
#***************************************************
1. Generate peptide based on amino acid sequence
#***************************************************
#Generate peptide coordinate using AMBER tleap: the termini are not capped, i.e., they are charged
#convert one-letter to three-letter
pepName_3letters=$(sed -e 's/\(.*\)/\L\1/' -e 's/a/ALA /g' -e 's/c/CYS /g' -e 's/d/ASP /g' -e 's/e/GLU /g' -e 's/f/PHE /g' -e 's/g/GLY /g' -e 's/h/HIS /g' -e 's/i/ILE /g' -e 's/k/LYS /g' -e 's/l/LEU /g' -e 's/m/MET /g' -e 's/p/PRO /g' -e 's/r/ARG /g' -e 's/q/GLN /g' -e 's/n/ASN /g' -e 's/s/SER /g' -e 's/t/THR /g' -e 's/v/VAL /g' -e 's/w/TRP /g' -e 's/y/TYR /g' <<<$pepName)
cat << EOT >peptide.tleap
source leaprc.protein.ff14SB
prot = sequence { ${pepName_3letters}}
savepdb prot peptide.pdb
quit
EOT
tleap -f peptide.tleap
2. Generate GAFF files and convert to Gromacs-format
# ***************** amber2gmx.sh*****************
#!/bin/bash
NAME=GTP
antechamber -i ${NAME}.pdb -fi pdb -o ${NAME}.mol2 -fo mol2 -c bcc -s 2 -pf y -nc -4
parmchk2 -i ${NAME}.mol2 -f mol2 -o ${NAME}.frcmod
cat << EOT > tleap.in
source leaprc.protein.ff19SB
source leaprc.gaff
${NAME} = loadmol2 ${NAME}.mol2
#loadamberprep ${NAME} ${NAME}.prep
check ${NAME}
loadamberparams ${NAME}.frcmod
saveoff ${NAME} ${NAME}.lib
saveamberparm ${NAME} ${NAME}.prmtop ${NAME}.inpcrd
quit
EOT
tleap -f tleap.in
acpype -p GTP.prmtop -x GTP.inpcrd -a gaff2 -b GTP -o gmx
# ***************** End of file *****************
3. Convert AMBER trajectory to Gromacs format
#***************************************************
#!/bin/bash
NAME=T298
#combine AMBER trajectories
cpptraj -p ../system.prmtop -y ../${NAME}.nc -y ../${NAME}_2.nc -x ${NAME}_all.nc
ambpdb -p ../system.prmtop < ../${NAME}_2.rst > ${NAME}.pdb
# read the box length and convert .pdb to .gro
echo "Get the box length in Angstrom from ../${NAME}.rst"
if [ -f "box.txt" ]
then
rm box.txt
fi
tail -1 ../${NAME}_2.rst >> box.txt
cat box.txt | while read a b c x y z
do
echo "box (Angstrom): $a $b $c $x $y $z"
editconf -f ${NAME}.pdb -box $(echo "scale=5; $a/10.0"|bc) $(echo "scale=5; $b/10.0"|bc) $(echo "scale=5; $c/10.0"|bc) -o ${NAME}.gro
done
#get the index file
echo -e "a N1 & r NO3\na O1 O2 O3 & r NO3\na O & r WAT\na C13 & r M1\na O1 O2 & r M1\na O O1 O2 O3\nq\n"| make_ndx -f ${NAME}.gro
#get the .tpr file
grompp -f T298.mdp -c ${NAME}.gro -p system.top -o ${NAME}
#GROMACS can read .netcdf directly, but not .nc
cp ${NAME}_all.nc ${NAME}_all.netcdf
#.xtc format is smaller in size than .netcdf and .nc
echo -e "system" | trjconv -f ${NAME}_all.netcdf -s ${NAME}.tpr -o ${NAME}.xtc
#clearn up
rm box.txt *.pdb mdout.mdp *.netcdf *.nc \#*
exit 0
#***************************************************
Gromacs: https://developer.nvidia.com/blog/massively-improved-multi-node-nvidia-gpu-scalability-with-gromacs/
GPU-support: https://developer.nvidia.com/blog/creating-faster-molecular-dynamics-simulations-with-gromacs-2020/
NAMD: https://www.ks.uiuc.edu/Research/namd/benchmarks
AMBER: https://ambermd.org/gpus16/benchmarks.htm
https://developer.download.nvidia.com/GTC/amber-and-kepler-gpus.pdf
1. Installation
tar -xvzf plumed2-2.9.0.tar.gz
cd plumed2-2.9.0
./configure --prefix=$HOME/programs/PLUMED-2.9.0
# "AIB" is added to plumed2-2.9.0/src/tools/MolDataClass.cpp
#./configure --prefix=$HOME/programs/PLUMED-2.9.0_BQ
make -j 8
make install
plumed --has-mpi && echo ok
cd ../
tar -xvzf gromacs-2023.tar
cd gromacs-2023
make distclean
plumed patch -p
/bin/rm -rf build_plumed/
mkdir build_plumed
cd build_plumed/
#CC=/opt/homebrew/bin/mpicc CXX=/opt/homebrew/bin/mpic++ \
CC=/opt/homebrew/bin/gcc-13 CXX=/opt/homebrew/bin/g++-13 \
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=OFF \
-DGMX_GPU_DISABLE_COMPATIBILITY_CHECK=1 -DGMX_GPU=OpenCL \
#-DGMX_DEFAULT_SUFFIX=OFF -DCMAKE_INSTALL_PREFIX=$HOME/programs/GROMACS-2023_plumed2.9.0
-DGMX_DEFAULT_SUFFIX=OFF -DCMAKE_INSTALL_PREFIX=$HOME/programs/GROMACS-2023_plumed2.9.0_BQ
make -j 8
make install
cd ../
Add the following to $HOME/.bashrc
PLUMED_PATH=$HOME/programs/PLUMED-2.9.0
#PLUMED_PATH=$HOME/programs/PLUMED-2.9.0_BQ
export PATH=$PLUMED_PATH/bin:$PATH
export LD_LIBRARY_PATH=$PLUMED_PATH/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=$PLUMED_PATH/lib/pkgconfig:$PKG_CONFIG_PATH
NOTE: gcc compiler from anaconda might crash the step "make -j 20". If so, use gcc and g++ from the Ubuntu OS.
Solution 1: disable Anaconda.
(I removed the whole folder of Anaconda, hide it from .bashrc, reboot the computer. Then follow the process above. It worked)
Solution 2 (See https://groups.google.com/g/plumed-users/c/CaSr2dBBzMs):
./configure --prefix=$HOME/opt --disable-mpi CXX=/usr/bin/g++ CC=/usr/bin/gcc PYTHON_BIN=$HOME/anaconda3/bin/python
2. Installation via Anaconda
conda install -c conda-forge plumed
But the installation of Gromacs 2023 failed with an error message of the AVX support (no solution).
1. Installation
Under $HOME/programs: tar zxpvf vmd-1.9.4a57*.tar.gz
a) Edit configure
$install_bin_dir="/home/baofu/programs/vmd-1.9.4a57/bin";
$install_library_dir="/home/baofu/programs/vmd-1.9.4a57/lib";
b) ./configure
c) cd src; make install
d) Edit ~/.bashrc
export VMD_PATH=$HOME/programs/vmd-1.9.4a57
export VMD_PLUGIN_PATH=$VMD_PATH/lib/plugins/LINUXAMD64/molfile/
export PATH=$VMD_PATH/bin:$VMD_PATH/lib/plugins/LINUXAMD64/bin/catdcd5.2/:$PATH
#for MacOS
#alias vmd='/Applications/VMD\ 1.9.4a57-arm64-Rev12.app/Contents/vmd/vmd_MACOSXARM64'
#VMDFILECHOOSER=FLTK
#export VMDFILECHOOSER
e) install plug-ins
sudo apt update
sudo apt install imagemagick
sudo apt install povray
2. $HOME/.vimrc
# turn on lights 0 and 1
light 0 on
light 1 on
light 2 off
light 3 off
# position the stage and axes
axes location lowerleft
stage location off
# position and turn on menus
menu main move 5 225
menu display move 395 30
menu graphics move 395 500
menu color move 125 225
menu files move 125 325
menu labels move 125 525
menu render move 125 525
menu main on
color Display Background white
#color Display Background gray
display projection Orthographic
#display nearclip set 0
#display depthcue off
set env(VMDFILECHOOSER) FLTK #This is required for Macbook
#color Labels Atoms black
#color Labels Bonds black
#label textthickness 2.0
3. Align two protein structures
# **************************************************
# usage: vmd -e align-res.tcl -args file1.pdb file2.pdb
proc align_pep {mol1 mol2} {
set A_2 [atomselect $mol1 "resid 2 and backbone"]
set B_1 [atomselect $mol2 "resid 1 and backbone"]
set B [atomselect $mol2 all]
set M [measure fit $B_1 $A_2]
$B move $M
$B writepdb alignedB.pdb
}
if { $argc == 2 } {
set mol1 [lindex $argv 0]
set mol2 [lindex $argv 1]
} else {
puts "Missing arguments, 2 file names required"
exit
}
mol load pdb $mol1
mol load pdb $mol2
# call the function, output file name alignedB.pdb
align_pep 0 1
exit
# **************************************************
4. Single-point mutation - phosphorylation Ser2SP2
#separate chain A, B C, and others, into four different files
#mutate chain A/B/C separately: change chain{A,B,C}.pdb in Ser2SP2.pgn
for i in A B C; do
cat << EOT >Ser2SP2.pgn
topology toppar/top_all36_prot.rtf
topology toppar/top_all36_na.rtf
topology toppar/stream/prot/toppar_all36_prot_na_combined.str
alias residue HIS HSE
alias atom ILE CD1 CD
alias atom GLY OXT OT1
segment P1 { pdb chain${i}.pdb
}
patch SP2 P1:165
regenerate angles dihedrals
coordpdb chain${i}.pdb P1
guesscoord
writepdb chain${i}_mutated.pdb
#writepsf mutated.psf
exit
EOT
vmd -e Ser2SP2.pgn
sed -i "s/SER ${i} 165/SP2 ${i} 165/" chain${i}_mutated.pdb
done
#merge all chains
cat chainA_mutated.pdb chainB_mutated.pdb chainC_mutated.pdb others.pdb >mutated.pdb
grep -i '/END/d' mutated.pdb
#add the box back
gmx editconf -f mutated.pdb -box 20 20 8.34 -o mutated.pdb
1. Installation
sudo snap install pymol-oss #https://snapcraft.io/pymol-oss
2. protein single-point mutation
# add the chain label A (required), and start res.id with 1 (optional)
gmx editconf -f structure.pdb -label A -resnr 1 -o tmp.pdb
pymol-oss.pymol -c pymol_mutate.py tmp.pdb A/6/ ASN
####### content of pymol_mutate.py ########################################
## Based on https://sourceforge.net/p/pymol/mailman/message/11671708/
#######################################################################
## To read .pdb locally, use cmd.load() : pymol -qc mutate.py structure.pdb A/10/ ASN
## To fetch pdb from online, use cmd.fetch(): pymol -qc mutate.py 1god A/10/ ASN
from pymol import cmd
import sys
pdb, selection, mutant = sys.argv[-3:]
cmd.wizard("mutagenesis")
cmd.do("refresh_wizard")
cmd.load(pdb)
#cmd.fetch(pdb)
cmd.get_wizard().do_select(selection)
cmd.get_wizard().set_mode(mutant)
cmd.get_wizard().apply()
cmd.set_wizard()
cmd.save("mutated.pdb")
Latest CHARMM folder for Gromacs: http://mackerell.umaryland.edu/charmm_ff.shtml#gromacs
CGenFF for new ligand:
1) Log in www.charmm-gui.org
2) "Ligand Reader & Modeler" --> Click "Import" --> select ligand.pdb --> click "Next Step" --> --> save "charmm-gui.tgz"
3) See ./gromcs/LIG.itp
4) See penalty for bonded parameters in ./lig/lig.prm & charge penalty in ./lig/lig.rtf;
Recommended configuration parameters for Gromacs:
Force-based switching function should be used for the Lennard-Jones (LJ) 12-6 interaction with the switching range of 10 – 12 Å;
Short-range Coulomb interactions should be truncated at the cut-off distance of 12 Å, with the Smooth Particle Mesh Ewald (PME) algorithm for the long-range interactions;
Nosé-Hover temperature coupling (characteristic time 1 ps) is recommended along with the Parrinello-Rahman barostat (the characteristic time was 5 ps).
[1] CHARMM-GUI Input Generator for NAMD, GROMACS, AMBER, OpenMM, and CHARMM/OpenMM Simulations Using the CHARMM36 Additive Force Field. J. Lee, et al. J. Chem. Theory Comput. 2016, 12, 405-413. DOI: 10.1021/acs.jctc.5b00935.
1) Install pytorch
# To create a new virtual environment in a directory named .venv
sudo apt install python3-venv
python3 -m venv .venv
source .venv/bin/activate
#To Install pytorch (https://pytorch.org/get-started/locally/)
pip3 install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118
2) Install cmake #Latest version of Cmake is required:
sudo apt install build-essential libssl-dev
wget https://github.com/Kitware/CMake/releases/download/v3.31.7/cmake-3.31.7.tar.gz
tar -zxvf cmake-3.31.7.tar.gz
cd cmake-3.31.7 && ./bootstrap && make && sudo make install
3) Install Gromacs 2025
cd gromacs-2025.2/
make distclean
mkdir build_GPU
cd build_GPU/
cmake .. -DGMX_BUILD_OWN_FFTW=ON -DGMX_MPI=OFF \
-DCMAKE_PREFIX_PATH=$HOME/.venv/lib/python3.11/site-packages/torch/share/cmake/Torch/ \
-DCMAKE_INSTALL_PREFIX=$HOME/programs//GROMACS-2025.2 \
-DGMX_GPU=CUDA -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-12.2 \
make -j 16
#make check
make install
1. For Ln(III) simulations, to recognize Ln(III) ions
(a) left shift the atom.name by 1 in .pdb. Therefore, in the following example, 'a' in La is aligned with 'O' in OW; &
(b) atom.name is correctly added at the end of the line.
#################
ATOM 256 La La 18 40.660 36.160 37.310 1.00 0.00 La
ATOM 257 OW SOL 19 40.620 41.070 69.730 1.00 0.00
ATOM 258 HW1 SOL 19 40.980 41.300 70.590 1.00 0.00
ATOM 259 HW2 SOL 19 39.820 40.590 69.930 1.00 0.00
#################
2. For amino acid, charged termini (N- and C-) and center residues are included; but not charge neutral termini!
#!/bin/bash
#filename: myrm
#change the mode: "chmod +744 myrm"
#location: PATH2myrm=$HOME/programes/myrm/
#add a line "alias rm='PATH2myrm/myrm'" to ~/.bashrc
MAX=20480000 #10G
TrashPATH=$HOME/MyTrash
if [ ! -d $TrashPATH ]; then
mkdir $TrashPATH
fi
if [ ! -d $TrashPATH/.Trash ] ;then
mkdir $TrashPATH/.Trash
fi
line=`du -cs $@ |tail -n 1`
size=`echo $line |cut -d' ' -f1`
if (( $size < $MAX )); then
echo "mv $@ $TrashPATH/.Trash"
mv $@ $TrashPATH/.Trash
else
echo "/bin/rm -i $@"
/bin/rm -i $@
fi
1. Vim
# Content of $HOME/.vimrc
set hlsearch
syntax on
set ruler
2. Ubuntu login crash
It seems that Ubuntu crash a lot after upgrading the system (Nvidia driver, Bios, software). The login fails. Following the video below:
https://www.youtube.com/watch?v=kZYxkFtL5Rs
Press Esc --> recovery mode
3. Copy data:
rsyne -av --pregress {source} {target}