1#CPQA INCLUDE dimer.xyz
2#CPQA INCLUDE topology_atoms.psf
3!!cp2k!!
4!! inp file by Alin M Elena
5!! alinm.elena@gmail.com
6!! http://alin.elenaworld.net
7#global section sets what kind of calculations you want to do an general
8! settings
9@set pfreq 100 ! the frequency for printing .cube properties and restart files
10@set name dimer
11@set period T
12@set method GPW ! use GAPW/ GPW for dft
13@set zk 10.0  ! coupling constant for collective variables and atoms
14@set zmass 100.0 ! mass for collective variables
15@set zgamma 0.001 ! friction coefficient for lagrange equations for cvs
16@set Tz  3000.0 ! temperature
17@set Nz 1   ! number of steps to integrate z
18@set dtz 0.5 ! time step to integrate the z
19@set dt 1.0 ! time steps to integrate atoms
20@set N 1 ! the length of the mini-trajectory
21@set M 2 ! number of cycles/steps for the HMC part
22@set Temp 25 ! physical system temperature
23
24&Global
25  Project ${name}
26!   Run_type ENERGY_Force
27  Run_type TAMC
28!   Run_type MD
29!  Run_type GEOMETRY_OPTIMIZATION
30  Print_Level low
31  Echo_input yes
32  Preferred_FFT_library FFTSG
33   &Print
34    filename=./${name}
35  &end print
36  walltime 3600
37&End Global
38#defines how forces are evaluated
39&Force_eval
40  Method QS ! what is the method used for computing the energy
41  Stress_tensor analytical
42  &DFT ! dft settings
43    Charge 0
44    BASIS_SET_FILE_NAME BASIS_SET
45    POTENTIAL_FILE_NAME POTENTIAL
46    &QS
47      Eps_default 1.0e-12
48      Extrapolation ASPC
49      Extrapolation_order 3
50      Method ${method}
51
52      &DFTB
53        Self_consistent    T
54        Dispersion         T
55        Orthogonal_basis   F
56        DO_EWALD           T
57        &Parameter
58          Param_file_path  params_scc
59          Param_file_name  scc_parameter
60          UFF_force_field  uff_table
61        &End Parameter
62      &End DFTB
63
64    &End QS
65
66    &XC ! exchange and correlation functionals
67      &XC_Functional HCTH120
68        &HCTH T
69          Parameter_set 120
70        &End HCTH
71      &End XC_Functional
72    &End XC
73
74    &SCF ! the scf settings...
75      Max_SCF 20
76      Eps_SCF 1.e-1
77      SCF_Guess Atomic
78      &OT T ! orbital transformation settings
79        Preconditioner Full_single_inverse
80        Minimizer CG
81      &End OT
82      &Outer_SCF On
83        Eps_scf 1.0E-1
84        Max_scf 5
85      &End Outer_SCF
86      &Print
87        &Restart
88          &Each
89           QS_SCF 0
90           GEO_OPT 1
91           MD ${pfreq}
92          &End Each
93          Add_last Numeric
94        &End restart
95      &End Print
96      &Mixing
97        Method Pulay_Mixing
98        Pulay_alpha 0.3
99        Pulay_beta 0.5
100        NMixing 1
101        NBuffer 5
102      &end Mixing
103    &End SCF
104    &Mgrid
105      Cutoff 50
106    &end mgrid
107    &Poisson
108      Periodic None
109      Poisson_Solver MT
110      &MT
111      &end MT
112    &end poisson
113    &Localize True
114      Eps_localization 1.0e-4
115      Eps_occupation 1.0e-6
116      Min_or_Max SpreadMin
117      Restart false
118      States Occupied
119      Use_History true
120      &Print
121        &Wannier_Centers
122          Format xyz
123          Ions+Centers true
124          &each
125            MD 1
126          &end each
127          Add_last numeric
128        &end Wannier_Centers
129        &Total_dipole On
130          Periodic ${period}
131          Reference zero
132          reference_point 0.0 0.0 0.0
133          &each
134            MD 10
135          &end each
136          Add_last numeric
137        &end total_dipole
138        &molecular_dipoles Off
139          Periodic ${period}
140          Reference zero
141          reference_point 0.0 0.0 0.0
142          &each
143            MD 10
144          &end each
145          Add_last numeric
146        &end molecular_dipoles
147        &wannier_states on
148          &each
149            MD 1
150          &end each
151          add_last numeric
152        &end wannier_states
153       &molecular_states off
154          &each
155            MD 10
156          &end each
157          add_last numeric
158        &end molecular_states
159      &end
160    &end Localize
161    &Print
162      &MO_Cubes Medium
163        &each
164          MD 1
165        &end Each
166        Add_last Numeric
167      &end MO_Cubes
168      &E_Density_Cube Medium
169        &each
170          MD ${pfreq}
171        &end Each
172        Add_last Numeric
173      &end E_Density_Cube
174      &Tot_density_cube Medium
175        &each
176          MD ${pfreq}
177        &end Each
178        Add_last Numeric
179      &end tot_density_cube
180      &V_Hartree_Cube Medium
181        &each
182          MD ${pfreq}
183        &end Each
184        Add_last Numeric
185      &end V_Hartree_Cube
186      &EFIELD_Cube Medium
187        &each
188          MD ${pfreq}
189        &end Each
190        Add_last Numeric
191      &end EFIELD_Cube
192    &end Print
193  &End DFT
194  &Subsys
195    &cell
196      ABC [angstrom] 6.0 6.0 6.0
197      alpha_beta_gamma 90.0 90.0 90.0
198      Periodic xyz
199    &end cell
200    &topology
201      coord_file_format xyz
202      coord_file_name dimer.xyz
203     &center_coordinates off
204     &end center_coordinates
205     &MOL_SET
206        &MOLECULE
207          NMOL 1
208          CONN_FILE_NAME topology_atoms.psf
209        &END Molecule
210      &END MOL_SET
211      CONNECTIVITY MOL_SET
212    &end topology
213
214    &kind O
215      Basis_set DZVP-GTH-PADE
216      Potential GTH-HCTH120-q6
217    &end kind
218    &kind H
219      Basis_set DZVP-GTH-PADE
220      Potential GTH-HCTH120-q1
221    &end kind
222    &colvar
223      &HBP
224        NPOINTS 1
225        ATOMS 4 5 1
226      &end HBP
227    &end colvar
228 &end subsys
229&End Force_eval
230&Motion
231  &Geo_Opt
232    Max_Iter 1000
233    Max_Force 4.5e-4
234    Max_Dr 3.0e-3
235    Optimizer LBFGS
236  &end Geo_Opt
237  &MD
238    Timestep ${dt}
239    Time_Start_Val 0.0
240    Steps ${N}
241    Ensemble NVE
242    Temperature ${Temp}
243    &Thermostat
244      &Nose
245        length 3
246        yoshida 3
247        Timecon 1000.0
248        MTS 2
249      &end Nose
250    &End Thermostat
251  &End MD
252  &MC
253    Ensemble Traditional
254    Nstep ${M}
255    Iprint 1
256    RANDOMTOSKIP 0
257  &End MC
258  &Free_Energy Metadyn
259    &Metadyn
260      Lagrange true
261      Langevin true
262      Temperature ${Tz}
263      Temp_Tol 2000.0
264      TAMCSteps ${Nz}
265      Timestep ${dtz}
266      &Metavar
267        Lambda ${zk}
268        Mass  ${zmass}
269        Gamma ${zgamma}
270        Scale 1.0
271        Colvar 1
272      &end metavar
273      &EXT_LAGRANGE_SS0
274        0.44025202
275      &END EXT_LAGRANGE_SS0
276      &Print
277        &Colvar
278          &Each
279            MD 1
280          &End each
281        &end colvar
282      &End print
283    &End Metadyn
284  &End Free_energy
285  &print
286    &Trajectory
287      filename trajectory.xyz
288      format xyz
289      &Each
290        MD 10
291      &end each
292    &end trajectory
293    &Velocities
294      filename velocity.xyz
295      format xyz
296      &Each
297        MD 10
298      &End each
299    &end velocities
300  &End print
301&End Motion
302
303