Table of Content
Interface of running nonadiabatic molecular dynamics (NAMD) between QChem and homemade nuclear dynamic program (Dr. Dmitry Makhov).
- Electronic structure theory (EST) program: Q-Chem
- Nuclear dynamic method: Chemical Physics 2017, 493, 200-218.
- Molecular visualizer: Jmol
- EST and nuclear parts can by changed to other resources.
- Input data procession:
dima2xyz
,dima2inifile
- On-the-fly dynamic propagation:
runNAMD_slave
,macro_runNAMD
,checkRunningDir
- Output data procession:
check1traj
,macro_chk
,ana1traj
,macro_ana
,plotStates.gnu
- Purpose of each source code
dima2xyz
: Transform Bohr to angstrom in order to check the initial molecular structure via Jmol.dima2inifile
: Pre-process initial input file (coordinate and momentum) for each trajectory.
- Purpose of each source code
runNAMD_slave
: Propagate one trajectory on HPC; Sun Grid Engine (SGE) scheduler systemmacro_runNAMD
: CallrunNAMD_slave
to propagate many trajectories.checkRunningDir
: Check the running status for all trajectories, and standard output the statistic result.
- Key pseudo-code in
runNAMD_slave
- Calculate the first point of one trajectory
- Extracting position and momentum to form the header of the dynamic file.
- Calculate non-adiabatic coupling.
- Calculate force in different electronic states.
- Extract EST information to complete the dynamic file.
- Nuclear preliminary propagation.
- Calculate non-adiabatic coupling.
- Calculate force in different electronic states.
- Extract EST information to write another dynamic file.
- Final nuclear propagation
- Propagate the rest points depending on the previous point
- Repeat steps 5 to 9.
- Calculate the first point of one trajectory
- Purpose of each source code
check1traj
: Transform raw data to useful information for one trajectory.macro_chk
: Callcheck1traj
to transform raw data to useful information for all trajectories.ana1traj
: For one trajectory, calculate bonds length from the output of the previous step.macro_ana
: Callana1traj
to analyse all trajectories.plotStates.gnu
: Use gnuplot to plot potential energy curves, population of each electronic state, and non-adiabatic coupling for any two states.
- PATH: /run/CH4
-
Check geometry after sampling.
- Transform the unit of molecular coordinate from Bohr to angstrom.
- input: g_1.dima, atomlist.dat
- output: g_1.xyz
$ dima2xyz g_1.dima atomlist.dat
- Visualize molecular structure.
- Download Jmol via this link if you need.
- input: g_1.xyz
- output: stdout
$ jmol g_1.xyz
- Transform the unit of molecular coordinate from Bohr to angstrom.
-
Check nuclear and electronic setting.
- File: setting.dat
- Especially check the number of atom and number of state for different molecule.
-
Run dynamics on HPC.
- Input for
runNAMD_slave
- File with molecular coordinate and momentum (g_1.iniPM).
- File with nuclear and electronic setting (setting.dat).
$ qsub runNAMD_slave g_1.iniPM setting.dat
- Input for
- PATH: /run/C3H2F4
-
Check geometry after sampling. In this example, it has five molecular structures.
-
Transform the unit of molecular coordinate from Bohr to angstrom.
- input: c3h2f4.dima, atomlist.dat
- output: c3h2f4.xyz
$ dima2xyz c3h2f4.dima atomlist.dat
-
Visualize molecular structure.
- input: c3h2f4.xyz
- output: stdout
$ jmol c3h2f4.xyz
c3h2f4.mov
-
-
Generate the file with both molecular coordinate and momentum (c3h2f4.iniPM) by the sampling file (c3h2f4.dima).
- input: c3h2f4.dima, atomlist.dat
- output: c3h2f4_*.iniPM
$ dima2iniPM c3h2f4.dima atomlist.dat
-
Check the nuclear and electronic setting.
- File: setting.dat
- Now, the number of atom is 9, and the number of state is 5 in this case.
-
Use a loop to prepare necessary files.
- Create sub-directory for each trajectory. The psudo-code is
$ mkdir traj_$(directory index)
- And then put all the *.iniPM into these subdirectories separately. The psudo-code is
$ mv $(some name).iniPM traj_$(directory index)
- Also, create the list for recording the sub-directory index. The psudo-code is
$ echo $(subdirectory index) >> list.dat
- Combine above three steps, the real script for the testing 5 subdirectories is
$ for ((i=1;i<=5;i++)) do mkdir traj_$i mv g_$i.iniPM traj_$i echo $i >> list.dat done
- Create sub-directory for each trajectory. The psudo-code is
-
Run dynamics on HPC.
$ macro_runNAMD list.dat setting.dat