forked from libefp2/libefp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
readme.txt
89 lines (62 loc) · 2.8 KB
/
readme.txt
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
This file contains a step-by-step instructions of how to integrate libefp into
an existing quantum chemistry package to get a working QM/EFP interface.
1. Initialization
a. Print the libefp banner: efp_print_banner
b. Create a EFP object: efp_create
c. Setup your EFP options: efp_set_opts
d. Load EFP parameters from ".efp" files: efp_add_potential
e. Add your EFP fragments: efp_add_fragment
f. Setup a callback function which computes electric field from
ab initio electrons: efp_set_electron_density_field_fn
g. (optional)
Setup a callback function to get better error
messages: efp_set_error_log
h. Call efp_prepare
i. (optional, EFP-only)
Setup periodic box size. If you have enabled periodic
boundary conditions (options.enable_pbc = true), you should
call efp_set_periodic_box
2. Optimization or molecular dynamics step
a. Set new fragment coordinates: efp_set_coordinates
b. Update ab initio nuclei: efp_set_point_charges
2.1 Ab initio SCF cycle
a. Start SCF cycle as usual
b. Compute one-electron EFP contributions
To compute one-electron contributions to quantum mechanical
Hamiltonian you will need multipole moment integrals as well as
electrostatics from EFP subsystem.
To get the electrostatics use the following functions:
atom charges from EFP fragments:
efp_get_frag_atoms
multipoles from EFP electrostatics:
efp_get_multipoles
polarization induced dipoles:
efp_get_induced_dipole_values
polarization conjugate induced dipoles:
efp_get_induced_dipole_conj_values
To compute QM/EFP interaction with induced dipoles use the
average of induced dipoles and conjugate induced dipoles
c. Compute wavefunction-dependent energy
Because EFP polarization induced dipoles depend on the electric
field from the wavefunction you have to converge them together.
To compute wavefunction-dependent terms use:
efp_get_wf_dependent_energy
d. Add obtained wavefunction dependent energy to your SCF energy
e. Go to step 2.1.a until SCF convergence criteria are met
2.2 Compute EFP energy and gradients
a. Compute all EFP energy terms: efp_compute
2.3 Geometry update
a. Get EFP energy: efp_get_energy
Do not forget to subtract wavefunction dependent energy you have
already added to your SCF energy from the total EFP energy
b. Get gradient on EFP fragments: efp_get_gradient
c. Get EFP gradient on ab initio nuclei: efp_get_point_charge_gradient
d. Update system geometry
Update all coordinates of your ab initio part and EFP fragments
according to you optimization or molecular dynamics algorithm
e. Go to the beginning of step 2
3. Cleanup resources
a. Release all memory used by libefp: efp_shutdown
4. Misc
Depending on your setup you may need to define LIBEFP_FORTRAN_INT64
if you have 64-bit integers in Fortran/BLAS by default.