-
Notifications
You must be signed in to change notification settings - Fork 0
/
constrained-density-functional-theory-with-cp2k.html
218 lines (186 loc) · 16.6 KB
/
constrained-density-functional-theory-with-cp2k.html
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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
<!DOCTYPE html>
<html lang="en" prefix="og: http://ogp.me/ns# fb: https://www.facebook.com/2008/fbml">
<head>
<title>constrained Density Functional Theory with cp2k - Yi Yao's Homepage</title>
<!-- Using the latest rendering mode for IE -->
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="canonical" href="./constrained-density-functional-theory-with-cp2k.html">
<meta name="author" content="Yi Yao" />
<meta name="keywords" content="dft" />
<meta name="description" content="A simple example for constrained DFT with cp2k" />
<meta property="og:site_name" content="Yi Yao's Homepage" />
<meta property="og:type" content="article"/>
<meta property="og:title" content="constrained Density Functional Theory with cp2k"/>
<meta property="og:url" content="./constrained-density-functional-theory-with-cp2k.html"/>
<meta property="og:description" content="A simple example for constrained DFT with cp2k"/>
<meta property="article:published_time" content="2015-03-09" />
<meta property="article:section" content="misc" />
<meta property="article:tag" content="dft" />
<meta property="article:author" content="Yi Yao" />
<!-- Bootstrap -->
<link rel="stylesheet" href="./themestatic/css/bootstrap.min.css" type="text/css"/>
<link href="./themestatic/css/font-awesome.min.css" rel="stylesheet">
<link href="./themestatic/css/pygments/native.css" rel="stylesheet">
<link rel="stylesheet" href="./themestatic/css/style.css" type="text/css"/>
</head>
<body>
<div class="navbar navbar-default navbar-fixed-top" role="navigation">
<div class="container">
<div class="navbar-header">
<button type="button" class="navbar-toggle" data-toggle="collapse" data-target=".navbar-ex1-collapse">
<span class="sr-only">Toggle navigation</span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
<a href="./" class="navbar-brand">
Yi Yao's Homepage </a>
</div>
<div class="collapse navbar-collapse navbar-ex1-collapse">
<ul class="nav navbar-nav">
<li><a href="index.html">About Me</a></li>
<li><a href="research.html">Research</a></li>
<li><a href="categories.html">Research Blogs</a></li>
</ul>
<ul class="nav navbar-nav navbar-right">
</ul>
</div>
<!-- /.navbar-collapse -->
</div>
</div> <!-- /.navbar -->
<!-- Banner -->
<!-- End Banner -->
<!-- Content Container -->
<div class="container">
<div class="row">
<div class="col-lg-12">
<section id="content">
<article>
<header class="page-header">
<h1>
<a href="./constrained-density-functional-theory-with-cp2k.html"
rel="bookmark"
title="Permalink to constrained Density Functional Theory with cp2k">
constrained Density Functional Theory with cp2k
</a>
</h1>
</header>
<div class="entry-content">
<div class="panel">
<div class="panel-body">
<footer class="post-info">
<span class="label label-default">Date</span>
<span class="published">
<i class="fa fa-calendar"></i><time datetime="2015-03-09T14:56:00+01:00"> Mon 09 March 2015</time>
</span>
<span class="label label-default">Tags</span>
<a href="./tag/dft.html">dft</a>
</footer><!-- /.post-info --> </div>
</div>
<p><a href="http://pubs.acs.org/doi/pdf/10.1021/cr200148b">Constrained Density Functional Theory</a> has many applications. Here I showed a simple example of cDFT of H2+ system. And I would like to constrain the electron on one proton with cp2k.</p>
<p>Here is the script.</p>
<div class="highlight"><pre><span></span><code><span class="o">&</span><span class="n">FORCE_EVAL</span><span class="w"></span>
<span class="w"> </span><span class="k">METHOD</span><span class="w"> </span><span class="n">Quickstep</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">DFT</span><span class="w"></span>
<span class="w"> </span><span class="n">BASIS_SET_FILE_NAME</span><span class="w"> </span><span class="o">/</span><span class="k">global</span><span class="o">/</span><span class="n">homes</span><span class="o">/</span><span class="n">y</span><span class="o">/</span><span class="n">yyao_unc</span><span class="o">/</span><span class="n">software</span><span class="o">/</span><span class="n">cp2k</span><span class="o">/</span><span class="n">cp2k</span><span class="o">/</span><span class="n">cp2k</span><span class="o">/</span><span class="k">data</span><span class="o">/</span><span class="n">BASIS_MOLOPT</span><span class="w"></span>
<span class="w"> </span><span class="n">POTENTIAL_FILE_NAME</span><span class="w"> </span><span class="o">/</span><span class="k">global</span><span class="o">/</span><span class="n">homes</span><span class="o">/</span><span class="n">y</span><span class="o">/</span><span class="n">yyao_unc</span><span class="o">/</span><span class="n">software</span><span class="o">/</span><span class="n">cp2k</span><span class="o">/</span><span class="n">cp2k</span><span class="o">/</span><span class="n">cp2k</span><span class="o">/</span><span class="k">data</span><span class="o">/</span><span class="n">GTH_POTENTIALS</span><span class="w"></span>
<span class="w"> </span><span class="n">CHARGE</span><span class="w"> </span><span class="o">+</span><span class="mi">1</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">MGRID</span><span class="w"></span>
<span class="w"> </span><span class="n">CUTOFF</span><span class="w"> </span><span class="mi">250</span><span class="w"></span>
<span class="w"> </span><span class="n">REL_CUTOFF</span><span class="w"> </span><span class="mi">50</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">MGRID</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">QS</span><span class="w"></span>
<span class="w"> </span><span class="k">METHOD</span><span class="w"> </span><span class="n">GPW</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">MULLIKEN_RESTRAINT</span><span class="w"></span>
<span class="w"> </span><span class="n">TARGET</span><span class="w"> </span><span class="mf">1.0</span><span class="w"></span>
<span class="w"> </span><span class="n">STRENGTH</span><span class="w"> </span><span class="mf">3000.0</span><span class="w"></span>
<span class="w"> </span><span class="n">ATOMS</span><span class="w"> </span><span class="mi">1</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">QS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">SCF</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">OT</span><span class="w"> </span><span class="k">ON</span><span class="w"></span>
<span class="w"> </span><span class="n">MINIMIZER</span><span class="w"> </span><span class="n">DIIS</span><span class="w"></span>
<span class="w"> </span><span class="n">ENERGY_GAP</span><span class="w"> </span><span class="mf">0.001</span><span class="w"></span>
<span class="w"> </span><span class="n">PRECONDITIONER</span><span class="w"> </span><span class="n">FULL_ALL</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">OT</span><span class="w"></span>
<span class="w"> </span><span class="n">EPS_SCF</span><span class="w"> </span><span class="mf">1.0E-6</span><span class="w"></span>
<span class="w"> </span><span class="n">SCF_GUESS</span><span class="w"> </span><span class="k">ATOMIC</span><span class="w"></span>
<span class="w"> </span><span class="n">MAX_SCF</span><span class="w"> </span><span class="mi">200000</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SCF</span><span class="w"></span>
<span class="w"> </span><span class="n">UKS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">XC</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">XC_FUNCTIONAL</span><span class="w"> </span><span class="n">PBE</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">XC_FUNCTIONAL</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">XC_GRID</span><span class="w"></span>
<span class="w"> </span><span class="n">XC_SMOOTH_RHO</span><span class="w"> </span><span class="n">NN50</span><span class="w"></span>
<span class="w"> </span><span class="n">XC_DERIV</span><span class="w"> </span><span class="n">NN50_SMOOTH</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">XC</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">PRINT</span><span class="w"> </span>
<span class="w"> </span><span class="o">&</span><span class="n">E_DENSITY_CUBE</span><span class="w"> </span>
<span class="w"> </span><span class="o">&</span><span class="k">EACH</span><span class="w"> </span>
<span class="w"> </span><span class="n">MD</span><span class="w"> </span><span class="mi">100</span><span class="w"> </span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">EACH</span><span class="w"> </span>
<span class="w"> </span><span class="n">STRIDE</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span><span class="mi">1</span><span class="w"> </span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">E_DENSITY_CUBE</span><span class="w"> </span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">PRINT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">DFT</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">SUBSYS</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">CELL</span><span class="w"></span>
<span class="w"> </span><span class="n">ABC</span><span class="w"> </span><span class="o">[</span><span class="n">bohr</span><span class="o">]</span><span class="w"> </span><span class="mf">20.0</span><span class="w"> </span><span class="mf">20.0</span><span class="w"> </span><span class="mf">20.0</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">CELL</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">COORD</span><span class="w"></span>
<span class="w"> </span><span class="n">H</span><span class="w"> </span><span class="mf">10.0</span><span class="w"> </span><span class="mf">10.0</span><span class="w"> </span><span class="mf">9.0</span><span class="w"></span>
<span class="w"> </span><span class="n">H</span><span class="w"> </span><span class="mf">10.0</span><span class="w"> </span><span class="mf">10.0</span><span class="w"> </span><span class="mf">11.0</span><span class="w"></span>
<span class="w"> </span><span class="n">UNIT</span><span class="w"> </span><span class="n">bohr</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">COORD</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="n">KIND</span><span class="w"> </span><span class="n">H</span><span class="w"></span>
<span class="w"> </span><span class="n">BASIS_SET</span><span class="w"> </span><span class="n">DZVP</span><span class="o">-</span><span class="n">MOLOPT</span><span class="o">-</span><span class="n">SR</span><span class="o">-</span><span class="n">GTH</span><span class="o">-</span><span class="n">q1</span><span class="w"></span>
<span class="w"> </span><span class="n">#BASIS_SET</span><span class="w"> </span><span class="n">DZVP</span><span class="o">-</span><span class="n">GTH</span><span class="w"></span>
<span class="w"> </span><span class="n">POTENTIAL</span><span class="w"> </span><span class="n">GTH</span><span class="o">-</span><span class="n">BLYP</span><span class="o">-</span><span class="n">q1</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">KIND</span><span class="w"></span>
<span class="w"> </span><span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">SUBSYS</span><span class="w"></span>
<span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="n">FORCE_EVAL</span><span class="w"></span>
<span class="o">&</span><span class="k">GLOBAL</span><span class="w"></span>
<span class="w"> </span><span class="n">PROJECT</span><span class="w"> </span><span class="n">h2</span><span class="o">+</span><span class="w"></span>
<span class="w"> </span><span class="n">PRINT_LEVEL</span><span class="w"> </span><span class="n">MEDIUM</span><span class="w"> </span>
<span class="o">&</span><span class="k">END</span><span class="w"> </span><span class="k">GLOBAL</span><span class="w"></span>
</code></pre></div>
<p>After the calculation the Mulliken Analysis is showed here.</p>
<div class="highlight"><pre><span></span><code> MULLIKEN POPULATION ANALYSIS
# Atom Element Kind Atomic population (alpha,beta) Net charge Spin moment
1 H 1 0.999915 0.000000 0.000085 0.999915
2 H 1 0.000085 0.000000 0.999915 0.000085
# Total charge and spin 1.000000 0.000000 1.000000 1.000000
</code></pre></div>
<p>And I also visulized the charge density cube file. Most of the charge density is on the left proton now.</p>
<p><img alt="Alt Text" src="./images/cdft_h2+_cp2k.jpeg"></p>
</div>
<!-- /.entry-content -->
</article>
</section>
</div>
</div>
</div>
<!-- End Content Container -->
<footer>
<div class="container">
<hr>
<div class="row">
<div class="col-xs-10">© 2021 Yi Yao
· Powered by <a href="https://github.com/getpelican/pelican-themes/tree/master/pelican-bootstrap3" target="_blank">pelican-bootstrap3</a>,
<a href="http://docs.getpelican.com/" target="_blank">Pelican</a>,
<a href="http://getbootstrap.com" target="_blank">Bootstrap</a> </div>
<div class="col-xs-2"><p class="pull-right"><i class="fa fa-arrow-up"></i> <a href="#">Back to top</a></p></div>
</div>
</div>
</footer>
<script src="./themestatic/js/jquery.min.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="./themestatic/js/bootstrap.min.js"></script>
<!-- Enable responsive features in IE8 with Respond.js (https://github.com/scottjehl/Respond) -->
<script src="./themestatic/js/respond.min.js"></script>
</body>
</html>