-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmd_H2O_vtz_CAS_continuation.py
71 lines (46 loc) · 1.07 KB
/
md_H2O_vtz_CAS_continuation.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
from pyscf import gto
import numpy as np
from evcont.MD_utils import converge_EVCont_MD
from evcont.CASCI_EVCont import CAS_EVCont_obj
from mpi4py import MPI
rank = MPI.COMM_WORLD.rank
"""
Runs the MD simulation for a water molecule in the cc-pVDT with a continuation from
CAS states.
"""
ncas = 8 # active space orbitals
neleca = 4 # active space electrons
def get_mol(geometry):
mol = gto.Mole()
mol.build(
atom=[("H", geometry[0]), ("H", geometry[1]), ("O", geometry[2])],
basis="cc-pVTZ",
symmetry=False,
unit="Bohr",
)
return mol
a_to_bohr = 1.8897259886
stretch_factor = 1.2
init_geometry = (
a_to_bohr
* stretch_factor
* np.array(
[
[0.0, 0.795, -0.454],
[0.0, -0.795, -0.454],
[0.0, 0.0, 0.113],
]
)
)
mol = get_mol(init_geometry)
steps = 300
dt = 5
init_mol = mol.copy()
converge_EVCont_MD(
CAS_EVCont_obj(ncas, neleca),
init_mol,
steps=steps,
dt=dt,
prune_irrelevant_data=False,
data_addition="farthest_point_ham",
)