Skip to content

Commit 9a7449b

Browse files
committed
add test for linearized pb
1 parent 3b2fad4 commit 9a7449b

File tree

13 files changed

+973
-588
lines changed

13 files changed

+973
-588
lines changed

tests/CMakeLists.txt

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,6 @@ add_subdirectory(hf_grad_lda)
2929
add_subdirectory(cube_parser)
3030
add_subdirectory(h2_scf_cube)
3131
add_subdirectory(li_solv)
32-
add_subdirectory(h_m_solv_pb)
32+
add_subdirectory(h_pb)
33+
add_subdirectory(h_lpb)
3334
add_subdirectory(he_zora_scf_lda)

tests/h_lpb/CMakeLists.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
if(ENABLE_MPI)
2+
set(_h_lpb_launcher "${MPIEXEC} ${MPIEXEC_NUMPROC_FLAG} 1")
3+
endif()
4+
5+
add_integration_test(
6+
NAME "H_linear_poisson_boltzmann"
7+
LABELS "mrchem;h_lpb;linear_poisson_boltzmann;scf;energy"
8+
COST 100
9+
LAUNCH_AGENT ${_h_lpb_launcher}
10+
)

tests/h_lpb/h.inp

+40
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"world_prec": 1.0e-3,
3+
"world_size": 5,
4+
"MPI": {
5+
"numerically_exact": true
6+
},
7+
"Molecule": {
8+
"charge": -1,
9+
"coords": "H 0.0 0.0 0.0"
10+
},
11+
"WaveFunction": {
12+
"method": "pbe0",
13+
"environment": "pcm_lpb"
14+
},
15+
"PCM": {
16+
"SCRF": {
17+
"kain": 5,
18+
"max_iter": 100,
19+
"dynamic_thrs": false,
20+
"optimizer": "potential"
21+
},
22+
"Cavity": {
23+
"spheres": "0 2.645616384 1.0 0.0 0.2"
24+
},
25+
"Permittivity": {
26+
"epsilon_in": 1.0,
27+
"epsilon_out": 78.4,
28+
"formulation": "exponential"
29+
},
30+
"D_H_screening": {
31+
"kappa_out": 0.08703573174337145,
32+
"ion_radius": 0.0,
33+
"ion_width": 0.2
34+
}
35+
},
36+
"SCF": {
37+
"run": false,
38+
"guess_type": "sad_dz"
39+
}
40+
}

tests/h_lpb/reference/h.json

+269
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,269 @@
1+
{
2+
"input": {
3+
"constants": {
4+
"angstrom2bohrs": 1.8897261246257702,
5+
"dipmom_au2debye": 2.5417464739297717,
6+
"electron_g_factor": -2.00231930436256,
7+
"fine_structure_constant": 0.0072973525693,
8+
"hartree2ev": 27.211386245988,
9+
"hartree2kcalmol": 627.5094740630558,
10+
"hartree2kjmol": 2625.4996394798254,
11+
"hartree2simagnetizability": 78.9451185,
12+
"hartree2wavenumbers": 219474.6313632,
13+
"light_speed": 137.035999084
14+
},
15+
"molecule": {
16+
"cavity": {
17+
"spheres": [
18+
{
19+
"alpha": 1.0,
20+
"beta": 0.0,
21+
"center": [
22+
0.0,
23+
0.0,
24+
0.0
25+
],
26+
"radius": 2.645616384,
27+
"sigma": 0.2
28+
}
29+
]
30+
},
31+
"charge": -1,
32+
"coords": [
33+
{
34+
"atom": "h",
35+
"xyz": [
36+
0.0,
37+
0.0,
38+
0.0
39+
]
40+
}
41+
],
42+
"multiplicity": 1
43+
},
44+
"mpi": {
45+
"bank_size": -1,
46+
"numerically_exact": true,
47+
"shared_memory_size": 10000
48+
},
49+
"mra": {
50+
"basis_order": 5,
51+
"basis_type": "interpolating",
52+
"boxes": [
53+
2,
54+
2,
55+
2
56+
],
57+
"corner": [
58+
-1,
59+
-1,
60+
-1
61+
],
62+
"max_scale": 20,
63+
"min_scale": -4
64+
},
65+
"printer": {
66+
"file_name": "h",
67+
"print_constants": false,
68+
"print_level": 0,
69+
"print_mpi": false,
70+
"print_prec": 6,
71+
"print_width": 75
72+
},
73+
"rsp_calculations": {},
74+
"scf_calculation": {
75+
"fock_operator": {
76+
"coulomb_operator": {
77+
"poisson_prec": 0.001,
78+
"shared_memory": false
79+
},
80+
"exchange_operator": {
81+
"exchange_prec": -1.0,
82+
"poisson_prec": 0.001
83+
},
84+
"kinetic_operator": {
85+
"derivative": "abgv_55"
86+
},
87+
"nuclear_operator": {
88+
"proj_prec": 0.001,
89+
"shared_memory": false,
90+
"smooth_prec": 0.001
91+
},
92+
"reaction_operator": {
93+
"Poisson_Boltzmann": {
94+
"formulation": "variable",
95+
"ion_radius": 0.0,
96+
"ion_width": 0.2,
97+
"kappa_out": 0.08703573174337145,
98+
"solver_type": "linearized"
99+
},
100+
"density_type": "total",
101+
"dynamic_thrs": false,
102+
"epsilon_in": 1.0,
103+
"epsilon_out": 78.4,
104+
"formulation": "exponential",
105+
"kain": 5,
106+
"max_iter": 100,
107+
"optimizer": "potential",
108+
"poisson_prec": 0.001
109+
},
110+
"xc_operator": {
111+
"shared_memory": false,
112+
"xc_functional": {
113+
"cutoff": 0.0,
114+
"functionals": [
115+
{
116+
"coef": 1.0,
117+
"name": "pbe0"
118+
}
119+
],
120+
"spin": false
121+
}
122+
}
123+
},
124+
"initial_guess": {
125+
"environment": "None",
126+
"external_field": "None",
127+
"file_CUBE_a": "cube_vectors/CUBE_a_vector.json",
128+
"file_CUBE_b": "cube_vectors/CUBE_b_vector.json",
129+
"file_CUBE_p": "cube_vectors/CUBE_p_vector.json",
130+
"file_basis": "initial_guess/mrchem.bas",
131+
"file_chk": "checkpoint/phi_scf",
132+
"file_gto_a": "initial_guess/mrchem.moa",
133+
"file_gto_b": "initial_guess/mrchem.mob",
134+
"file_gto_p": "initial_guess/mrchem.mop",
135+
"file_phi_a": "initial_guess/phi_a_scf",
136+
"file_phi_b": "initial_guess/phi_b_scf",
137+
"file_phi_p": "initial_guess/phi_p_scf",
138+
"localize": false,
139+
"method": "DFT (PBE0)",
140+
"prec": 0.001,
141+
"relativity": "None",
142+
"restricted": true,
143+
"screen": 12.0,
144+
"type": "sad",
145+
"zeta": 2
146+
},
147+
"properties": {
148+
"dipole_moment": {
149+
"dip-1": {
150+
"operator": "h_e_dip",
151+
"precision": 0.001,
152+
"r_O": [
153+
0.0,
154+
0.0,
155+
0.0
156+
]
157+
}
158+
}
159+
}
160+
},
161+
"schema_name": "mrchem_input",
162+
"schema_version": 1
163+
},
164+
"output": {
165+
"properties": {
166+
"center_of_mass": [
167+
0.0,
168+
0.0,
169+
0.0
170+
],
171+
"charge": -1,
172+
"dipole_moment": {
173+
"dip-1": {
174+
"magnitude": 2.3498787074677478e-14,
175+
"r_O": [
176+
0.0,
177+
0.0,
178+
0.0
179+
],
180+
"vector": [
181+
0.0,
182+
0.0,
183+
0.0
184+
],
185+
"vector_el": [
186+
0.0,
187+
0.0,
188+
0.0
189+
],
190+
"vector_nuc": [
191+
0.0,
192+
0.0,
193+
0.0
194+
]
195+
}
196+
},
197+
"geometry": [
198+
{
199+
"symbol": "H",
200+
"xyz": [
201+
0.0,
202+
0.0,
203+
0.0
204+
]
205+
}
206+
],
207+
"multiplicity": 1,
208+
"orbital_energies": {
209+
"energy": [
210+
-0.135848916329942
211+
],
212+
"occupation": [
213+
2.0
214+
],
215+
"spin": [
216+
"p"
217+
],
218+
"sum_occupied": -0.271697832659884
219+
},
220+
"scf_energy": {
221+
"E_ee": 1.1624625387710454,
222+
"E_eext": 0.0,
223+
"E_el": -0.7997396466018049,
224+
"E_en": -1.9022728636357973,
225+
"E_kin": 0.910176260929555,
226+
"E_next": 0.0,
227+
"E_nn": 0.0,
228+
"E_nuc": 0.18350091818136058,
229+
"E_tot": -0.6162387284204442,
230+
"E_x": -0.14530552826383158,
231+
"E_xc": -0.47070320755006956,
232+
"Er_el": -0.3540968468527068,
233+
"Er_nuc": 0.18350091818136058,
234+
"Er_tot": -0.1705959286713455
235+
}
236+
},
237+
"provenance": {
238+
"creator": "MRChem",
239+
"mpi_processes": 1,
240+
"nthreads": 12,
241+
"routine": "mrchem.x",
242+
"total_cores": 12,
243+
"version": "1.2.0-alpha"
244+
},
245+
"rsp_calculations": null,
246+
"scf_calculation": {
247+
"initial_energy": {
248+
"E_ee": 1.1624625387710454,
249+
"E_eext": 0.0,
250+
"E_el": -0.7997396466018049,
251+
"E_en": -1.9022728636357973,
252+
"E_kin": 0.910176260929555,
253+
"E_next": 0.0,
254+
"E_nn": 0.0,
255+
"E_nuc": 0.18350091818136058,
256+
"E_tot": -0.6162387284204442,
257+
"E_x": -0.14530552826383158,
258+
"E_xc": -0.47070320755006956,
259+
"Er_el": -0.3540968468527068,
260+
"Er_nuc": 0.18350091818136058,
261+
"Er_tot": -0.1705959286713455
262+
},
263+
"success": true
264+
},
265+
"schema_name": "mrchem_output",
266+
"schema_version": 1,
267+
"success": true
268+
}
269+
}

0 commit comments

Comments
 (0)