Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions full_example_TiO2_2_100K/step1_MD/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Project_relaxation_recombination_TiO2_nanoclusters

**inputs and scripts to be in the same directory to start the calculation**

**inputs**:

AIMD is performed with CP2K. The folder contains the relaxed (TiO2)2 geometry at 100 K as case
example (`pos.xyz`), and cp2k input (`md.inp`) for performing the MD run.


**scripts**:

The `submit.slm` file for performing step 1 calculation in a HPC.

**outputs**:

3000 steps AIMD generated trajectory: `trajectory_TiO2_2_100K.xyz`

-------------

To prepare this step, combine all input and script files in the same folder and run:

sbatch submit.slm
128 changes: 128 additions & 0 deletions full_example_TiO2_2_100K/step1_MD/inputs/md.inp
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
&GLOBAL
PRINT_LEVEL MEDIUM
PROJECT_NAME TiO2_02_08
RUN_TYPE MD
&END GLOBAL
&FORCE_EVAL
METHOD QS
&DFT
UKS .FALSE.
BASIS_SET_FILE_NAME BASIS_MOLOPT
POTENTIAL_FILE_NAME POTENTIAL
&MGRID
NGRIDS 12
CUTOFF 300
REL_CUTOFF 50
&END MGRID
&QS
METHOD GPW
EPS_DEFAULT 1.000E-14
&END QS
&POISSON
PSOLVER MT
PERIODIC NONE
&END
&SCF
&DIAGONALIZATION ON
&END DIAGONALIZATION
&MIXING
ALPHA 0.3
METHOD BROYDEN_MIXING
NBROYDEN 8
&END MIXING
EPS_SCF 1.0E-6
SCF_GUESS ATOMIC
MAX_SCF 50
ADDED_MOS 50
&END SCF
&XC
&XC_FUNCTIONAL
&PBE
&END PBE
&END XC_FUNCTIONAL
&VDW_POTENTIAL
POTENTIAL_TYPE PAIR_POTENTIAL
&PAIR_POTENTIAL
PARAMETER_FILE_NAME dftd3.dat
TYPE DFTD3
REFERENCE_FUNCTIONAL PBE
R_CUTOFF [angstrom] 16
&END
&END VDW_POTENTIAL
&END XC
&PRINT
&MULLIKEN OFF
&END
&HIRSHFELD OFF
&END
&END PRINT
&END DFT
&SUBSYS

&CELL
A 10.000000000 0.0000000000 0.0000000000
B 0.0000000000 10.000000000 0.0000000000
C 0.0000000000 0.0000000000 10.000000000
PERIODIC NONE
&END CELL
&VELOCITY
6.11464E-05 -5.08645E-05 5.9453E-05
0.000164537 2.67605E-05 -8.76053E-05
-0.000173724 -0.000100692 0.000115461
2.1818E-05 8.05143E-05 -4.80069E-05
-0.000170792 -0.00010392 1.85E-05
-6.87189E-05 8.89652E-05 -8.06625E-05
&END VELOCITY

&TOPOLOGY
COORD_FILE_NAME pos.xyz
COORD_FILE_FORMAT XYZ
! These two lines to center the geometry in the cell
&CENTER_COORDINATES T
&END
&END

&KIND Ti
BASIS_SET DZVP-MOLOPT-SR-GTH
POTENTIAL GTH-PBE-q12
&END KIND
&KIND O
BASIS_SET DZVP-MOLOPT-GTH
POTENTIAL GTH-PBE-q6
&END KIND
&END SUBSYS
&END FORCE_EVAL

&MOTION
&MD
ENSEMBLE NVT
TEMPERATURE [K] 100 #make it larger 3200
TIMESTEP [fs] 1.0
STEPS 4000
&THERMOSTAT
REGION GLOBAL
TYPE NOSE
&NOSE
! adapt it based on the Ti-O stretch mode frequency
TIMECON 100
&END
&END THERMOSTAT
&END
&PRINT
&TRAJECTORY
&EACH
MD 1
&END EACH
&END TRAJECTORY
&VELOCITIES ON
&END VELOCITIES
&FORCES ON
&END FORCES
&RESTART
BACKUP_COPIES 1
&EACH
MD 1
&END EACH
&END RESTART
&END PRINT
&END
8 changes: 8 additions & 0 deletions full_example_TiO2_2_100K/step1_MD/inputs/pos.xyz
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
6

Ti 6.234433 4.992303 4.509986
O 7.477660 4.994919 5.560046
O 4.961883 6.329328 4.982885
Ti 3.787933 4.999196 5.482860
O 2.470030 5.016240 4.494639
O 5.023272 3.684964 4.983873
35 changes: 35 additions & 0 deletions full_example_TiO2_2_100K/step1_MD/inputs/submit_1.slm
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash -l
#SBATCH --account=alexeyak
##SBATCH --partition=valhalla --qos=valhalla
##SBATCH --clusters=faculty
#SBATCH --partition=general-compute --qos=general-compute
#SBATCH --clusters=ub-hpc
##SBATCH --partition=scavenger --qos=scavenger
#SBATCH --time=72:00:00
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=12
#SBATCH --cpus-per-task=1
#SBATCH --mem=64000
###SBATCH -C CPU-Gold-6130
###SBATCH --mail-user=mshakiba@buffalo.edu
echo "SLURM_JOBID="$SLURM_JOBID
echo "SLURM_JOB_NODELIST="$SLURM_JOB_NODELIST
echo "SLURM_NNODES="$SLURM_NNODES
echo "SLURMTMPDIR="$SLURMTMPDIR
echo "working directory="$SLURM_SUBMIT_DIR

# Here load whatever which is needed for running CP2K
# Load VMD if cube visualization flag is turned on
load vmd
module use /projects/academic/cyberwksp21/MODULES
module load cp2k/v24/avx512
module load libra/devel # load the devel version for alignment

# For slurm environments
export I_MPI_PMI_LIBRARY=/usr/lib64/libpmi.so
export OMP_NUM_THREADS=1


mpirun -np 9 cp2k.psmp -i md.inp -o out-md-2x2.log


35 changes: 35 additions & 0 deletions full_example_TiO2_2_100K/step2_TDDFT_Excitations/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Project_relaxation_recombination_TiO2_nanoclusters

**inputs and scripts to be in the same directory to start the calculation**

**inputs**:

Aligned AIMD trajectory for this (TiO2)2 system at 100 Ke (`dynamcis_AIMD-aligned_100K.xyz`).

CP2K input where TD-DFT options are detailed (`es_diag_temp.inp`).

**scripts**:

`distribute_jobs.py` is the file that you need modify by specifying initial and final step of the trajectory and the number of jobs. Libra will split the trajectory based on these values and will submit them by creating the specific folders for each job.

`run_template.py`: A file that contains the data to run the MO overlap calculations. It is important to properly define the Active Space. In this case we have chosen orbitals going from 24-15 to 25+15. 24th and 25th orbitals are respectively the HOMO and the LUMO.

The `submit_template.slm` file is the one which will be submitted and runs the python `run.py` where the `run.py` file is the copy of the `run_template.py` file but with the initial and final steps filled based on the requested number of jobs and the initial and final step for the trajectory.

`vmd_input_template`: The VMD input template. This input will be modified by Libra but only the mol load cube and rendering line, render Tachyon ... will be changed. You can make your own input template by opening the VMD on your computer and from File choose Log Tcl commands to file... and it will append all the commands for reproducing that image into a file.

To start the TD-DFT calculation simply run: **python distribute_jobs.py**



**outputs**:

All logfiles with TD-DFT CP2K output information are included in `logfiles_TiO2_2_100K.tar.bz2`.
`res_TiO2_2_100K.tar.bz2`contains all KS energies (E_ks_*); MO overalps (S_ks_*) and time-overlaps (St_ks_*).

To unpack, decompress each file separately:

tar -xvjf logfiles_TiO2_2_100K.tar.bz2
tar -xvjf res_TiO2_2_100K.tar.bz2


Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import os
import sys
import libra_py.packages.cp2k.methods as CP2K_methods


run_slurm = True
submit_template = 'submit_template.slm'
run_python_file = 'run_template.py'
istep = 1000
fstep = 4000
njobs = 10
submission_exe = 'sbatch'
# Removing the previous folders if existed. You can keep them as well
# but Libra will overwrite some of the data if their names are the same
os.system('rm -rf res job* all_*')

print('Distributing jobs...')
CP2K_methods.distribute_cp2k_libint_jobs(submit_template, run_python_file, istep, fstep, njobs, run_slurm, submission_exe)

Loading