NAMD Simulation with PyRAI2MD - Open-Quantum-Platform/openqp GitHub Wiki

An example of performing NAMD using OpenQP and PyRAI2MD.

Note that /path/to/... should be replaced with real paths.

  1. Installation of PyRAI2MD
git clone https://github.com/mlcclab/PyRAI2MD-hiam.git
cd ./PyRAI2MD-hiam
pip install .
pyrai2md update

Check PyRAI2MD manual. Here

  1. A coordinate file of c2h4.xyz (C2H4 example)
6
symmetry c1 unit in angstrom
C       -1.795088763      0.000000000     -1.451300047
C       -1.795088763      0.000000000     -0.121142047
H       -1.795088763      0.923341000     -2.024250047
H       -1.795088763     -0.923341000     -2.024250047
H       -1.795088763      0.923341000      0.451807953
H       -1.795088763     -0.923341000      0.451807953
  1. An initial velocity file of c2h4.velo
6
c2h4 coord 1 state 2 unit in bohr/atomic unit of time
C          0.0000193469257018      0.0000160154385259      0.0003595025587447
C          0.0002006653655435      0.0001140704025351      0.0003596538093650
H          0.0005229241988100      0.0000331514690925      0.0012142228161999
H          0.0005246180579281      0.0001325296756183      0.0011619904980530
H          0.0003363875352877      0.0000136706855326      0.0009272289952444
H          0.0007483154487217      0.0000566647923786      0.0010636124089325

Note: The actual c2h4.velo should not have the first two line and the first column, it just need to be an array for velocity, so it should be like this:

0.0000193469257018      0.0000160154385259      0.0003595025587447
0.0002006653655435      0.0001140704025351      0.0003596538093650
0.0005229241988100      0.0000331514690925      0.0012142228161999
0.0005246180579281      0.0001325296756183      0.0011619904980530
0.0003363875352877      0.0000136706855326      0.0009272289952444
0.0007483154487217      0.0000566647923786      0.0010636124089325
  1. PyRAI2MD input, input
&CONTROL
title    c2h4
qc_ncpu  1
gl_seed  1
jobtype  md
qm       openqp
abinit openqp

&MOLECULE
ci   3
spin 0
coupling 1 2, 1 3, 2 3

&openqp
openqp /path/to/OpenQP/
threads 4
use_hpc 0

&MD
randvelo 0
temp 300
step 10
size 20.67
root 3
activestate 1
nactype dcm
sfhp fssh
thermo 0
direct 10
buffer 0
verbose 1
phasecheck 0

"phasecheck" is 0 because PyRAI2MD in default will check and correction the sign of NACV, however, OpenQP already corrects the sign when computing derivative coupling.

Note that the path to openqp should be changed to your local environment!

  1. OpenQP input file of c2h4.openqp
[input]
functional=pbe0
charge=0
method=tdhf
basis=6-31g

[scf]
type=rohf
maxit=100
multiplicity=3

[tdhf]
type=mrsf
nstate=5
  1. bash run script of run.sh
# environment variables for OpenQP
export PYRAI2MD=/path/to/PYRAI2MD-hiam
export OPENQP_ROOT=/path/to/openqp
# run command
pyrai2md input

Back

⚠️ **GitHub.com Fallback** ⚠️