In this repository I publish materials for my Computational Photochemistry course. Please note that the scripts and some of the programs that we use are often written ad hoc and were not thoroughly tested.
📘 Getting Started with MobaXterm
- Go to the MobaXterm official website.
- Download the Home Edition (Installer or Portable version).
- Install or unzip the package and launch
MobaXterm.
- Open MobaXterm.
- Click on Session (top left corner).
- Select SSH.
- Fill in the remote host details:
- Remote host:
ui.wcss.pl - Specify username: your-username
- Remote host:
- (Optional) Check Use private key if you're using an SSH key.
- Click OK to connect.
- Once connected via SSH, a file browser will appear on the left side.
- You can drag and drop files between your local machine and the server.
- Use the built-in terminal for Linux commands.
- Save sessions for quick reconnects.
- You can also use tools like
scp,rsync, or Git directly in the terminal.
🧠 Note: MobaXterm is available only on Windows. For macOS or Linux, consider using Terminal or other SSH clients.
🐧 Basic Linux / UNIX Commands
Each file in UNIX has:
- a type (directory, file, or link),
- access rights for:
- the owner,
- the group,
- others.
Example output of ls -l:
drwxr-xr-x 2 rgora kdm 2048 Mar 26 16:39 n2h2/
-rw-r--r-- 1 rgora kdm 4552 Mar 26 12:12 scan.dat
lrw-r--r-- 1 rgora kdm 75 Mar 26 12:14 scan.gplLegend:
d– directory,-– regular file,l– symbolic linkr– read,w– write,x– execute
File permissions are displayed as:
-rwx r-x r--
|---|---|---|
U G OU = User, G = Group, O = Others
# Navigation
cd # Go to home directory
cd /path/to/dir # Change to specific directory
# File listing
ls # List files
ls -la # Long list incl. hidden files
ls -1 /dir # One file per line
# File removal
rm file # Delete a file
rm -r folder # Recursively delete a folder
# Copy/move files
cp file1 file2 # Copy file1 to file2
cp -r dir1 dir2 # Copy directory
mv file newname # Rename or move file
# Create/delete directories
mkdir new_folder
rmdir empty_folder
# File viewing
cat file.txt # Print content
more file.txt # Page through file
less file.txt # Like more, but scrollable
# Changing permissions
chmod +x file # Make file executable
chmod a-w file # Remove write permission for all
chmod ugo=rx file # Read/execute access to all- Use
man <command>or<command> --helpto read about commands. - Use wildcards:
*matches any string.?matches a single character.
- Use
|(pipe) to connect commands:ls -l | less - Use
>and<to redirect output:ls -l > output.txt sort < output.txt
📝 Modern vim Basics
Esc– Command modei– Insert before cursora– Append after cursoro/O– Open new line below / abovev– Visual selection mode (character-wise)V– Visual line selectionCtrl + v– Visual block selection (column mode)
↑ ↓ ← →– Move cursor0/$– Start / end of linegg/G– Top / bottom of file:n– Go to linenCtrl + G– Show file and line info
x/X– Delete character under / before cursordd– Delete current lineyy– Copy linep– Paste after cursoru– UndoCtrl + r– Redo
Ctrl + v– Start block selection- Use arrow keys to expand selection
d,y,p, etc. work with blocks
Example:
- Select a vertical block with
Ctrl + v, move with arrows, pressIto insert text at the beginning of every selected line (then pressEsctwice to apply).
/pattern– Search forward?pattern– Search backwardn/N– Next / previous match:s/old/new/g– Replace in current line:%s/old/new/g– Replace in entire file
:w– Save:q– Quit:wqorZZ– Save and quit:q!– Quit without saving
:splitor:sp filename– Horizontal split:vsplitor:vsp filename– Vertical splitCtrl + w + w– Switch between windowsCtrl + w + q– Close current splitCtrl + w + =– Make splits equal size
💡 Tip: To open files in splits from the command line:
vim -O file1 file2(vertical)
vim -o file1 file2(horizontal)
🔐 Remote Access with SSH
ssh -Y [email protected]-Yallows GUI applications over SSH
ssh ui.wcss.pl "qstat -u $USER"scp file.txt ui.wcss.pl: # upload to home directory
scp -r folder/ ui.wcss.pl:target/ # upload directory
scp ui.wcss.pl:file.txt ./ # downloadssh-keygen -t rsaThen copy your public key:
cat ~/.ssh/id_rsa.pub | ssh [email protected] "cat >> ~/.ssh/authorized_keys"- Next time you connect: no password needed.
- Use
ssh-addif your key is passphrase protected.
📋 Job Scheduling with PBS
qstat
qstat -u $USER # your jobs only
qstat -f Job_ID # detailed info
pbsnodes -a # check compute nodesqsub -I -X -l select=1:ncpus=4:mem=4gb -l walltime=6:00:00cat << EOF | qsub -r n
#!/bin/bash
#PBS -N my_job
#PBS -l ncpus=4
#PBS -l mem=2mb
#PBS -q main
#PBS -m n
#PBS -l walltime=1:00:00
cd ~
ls -l >& output.txt
EOF- Use
qstat -u $USERto check job status:Q= queued,R= running
📅 Job Scheduling with SLURM
squeue # list current jobs
squeue -u $USER # your jobs
sinfo # info about nodessbatch job_script.shExample job_script.sh:
#!/bin/bash
#SBATCH --job-name=my_job
#SBATCH --output=result.out
#SBATCH --ntasks=1
#SBATCH --cpus-per-task=4
#SBATCH --mem=4G
#SBATCH --time=01:00:00
cd $HOME
ls -l > result.txtsrun --ntasks=1 --cpus-per-task=4 --mem=4G --time=01:00:00 --pty bashscancel <job_id>📊 To check the status of a running job one may use squeue command or sstat and for finished jobs sacct:
squeue --user $USER
squeue --user $USER --Format jobid:10,name,state:10,timeleft:12,minmemory:10,stdout:100'sstat <job_id>
sstat --fields=JobID,MaxVMSize,MaxVMSizeNode,MaxVMSizeTask,AveCPU <job_id>sacct --format=jobid,jobname,qos,cputime,ncpu,avecpu,elapsed,avevmsize --jobs=<job_id>📊 WCSS has a comprehensive users' manual at man.e-science.pl
📘 Excited states of pyrimidine nucleobases
In this tutorial, we try to locate geometries of ground and excited states minima of pyrimidine nucleobases as well as the relevant minimum energy crossing points (MECPs) between low-lying states. The starting geometries are available in the article of Lan et al.. In the supplementary information, the relevant geometries of U, T and C are reported.
We start with the optimization of geometry at the KS-DFT and TD-DFT levels in ORCA.
Next, we locate the relevant MECPs using Turbomole and CIOpt packages
To obtain reference geometries of MECPs we will use BAGEL package.
Finaly, we will attempt to locate the MECPs using MRSF-TDDFT using GAMESS(US) package.