27#include "./base/base_uses.f90"
31 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'pair_potential_types'
129 REAL(kind=
dp),
DIMENSION(2:15) :: a = 0.0_dp
130 REAL(kind=
dp) :: rcore = 0.0_dp
131 REAL(kind=
dp) :: m = 0.0_dp
132 REAL(kind=
dp) :: b = 0.0_dp
137 REAL(kind=
dp) :: epsilon = 0.0_dp
138 REAL(kind=
dp) :: sigma6 = 0.0_dp
139 REAL(kind=
dp) :: sigma12 = 0.0_dp
144 REAL(kind=
dp) :: a = 0.0_dp
145 REAL(kind=
dp) :: b = 0.0_dp
146 REAL(kind=
dp) :: c = 0.0_dp
147 REAL(kind=
dp) :: d = 0.0_dp
152 REAL(kind=
dp) :: a = 0.0_dp
153 REAL(kind=
dp) :: b = 0.0_dp
154 REAL(kind=
dp) :: c = 0.0_dp
155 REAL(kind=
dp) :: d = 0.0_dp
156 REAL(kind=
dp),
DIMENSION(2) :: bd = 0.0_dp
157 END TYPE ftd_pot_type
160 TYPE williams_pot_type
161 REAL(kind=
dp) :: a = 0.0_dp
162 REAL(kind=
dp) :: b = 0.0_dp
163 REAL(kind=
dp) :: c = 0.0_dp
164 END TYPE williams_pot_type
167 TYPE goodwin_pot_type
168 REAL(kind=
dp) :: vr0 = 0.0_dp
169 REAL(kind=
dp) :: m = 0.0_dp, mc = 0.0_dp
170 REAL(kind=
dp) :: d = 0.0_dp, dc = 0.0_dp
171 END TYPE goodwin_pot_type
175 CHARACTER(LEN=default_path_length) :: eam_file_name =
""
176 INTEGER :: npoints = 0
177 REAL(kind=
dp) :: drar = 0.0_dp, drhoar = 0.0_dp, acutal = 0.0_dp
178 REAL(kind=
dp),
POINTER,
DIMENSION(:) :: rho => null(), phi => null(), frho => null(), rhoval => null(), rval => null()
179 REAL(kind=
dp),
POINTER,
DIMENSION(:) :: rhop => null(), phip => null(), frhop => null()
184 CHARACTER(LEN=default_path_length) :: ace_file_name =
'NULL'
185 INTEGER :: atom_ace_type = 0
191 CHARACTER(LEN=default_path_length) :: deepmd_file_name =
'NULL'
192 INTEGER :: atom_deepmd_type = 0
197 CHARACTER(LEN=default_path_length) :: quip_file_name =
""
198 CHARACTER(LEN=1024) :: init_args =
""
199 CHARACTER(LEN=1024) :: calc_args =
""
204 CHARACTER(LEN=default_path_length) :: nequip_file_name =
'NULL', nequip_version =
'NULL', &
205 unit_coords =
'NULL', unit_forces =
'NULL', &
206 unit_energy =
'NULL', unit_cell =
'NULL'
207 CHARACTER(LEN=100),
DIMENSION(:),
ALLOCATABLE :: type_names_torch
208 REAL(kind=
dp) :: rcutsq = 0.0_dp, unit_coords_val = 1.0_dp, &
209 unit_forces_val = 1.0_dp, unit_energy_val = 1.0_dp, &
210 unit_cell_val = 1.0_dp
211 LOGICAL :: do_nequip_sp = .false.
216 CHARACTER(LEN=default_path_length) :: allegro_file_name =
'NULL', unit_cell =
'NULL', &
217 nequip_version =
'NULL', unit_coords =
'NULL', &
218 unit_forces =
'NULL', unit_energy =
'NULL'
220 CHARACTER(LEN=100),
DIMENSION(:),
ALLOCATABLE :: type_names_torch
222 REAL(kind=
dp) :: rcutsq = 0.0_dp, unit_coords_val = 1.0_dp, &
223 unit_forces_val = 1.0_dp, unit_cell_val = 1.0_dp, &
224 unit_energy_val = 1.0_dp
225 LOGICAL :: do_allegro_sp = .false.
229 TYPE buck4ran_pot_type
230 REAL(kind=
dp) :: a = 0.0_dp
231 REAL(kind=
dp) :: b = 0.0_dp
232 REAL(kind=
dp) :: c = 0.0_dp
233 REAL(kind=
dp) :: r1 = 0.0_dp
234 REAL(kind=
dp) :: r2 = 0.0_dp
235 REAL(kind=
dp) :: r3 = 0.0_dp
236 INTEGER :: npoly1 = 0, npoly2 = 0
237 REAL(kind=
dp),
DIMENSION(0:10) :: poly1 = 0.0_dp
238 REAL(kind=
dp),
DIMENSION(0:10) :: poly2 = 0.0_dp
239 END TYPE buck4ran_pot_type
242 TYPE buckmorse_pot_type
243 REAL(kind=
dp) :: f0 = 0.0_dp
244 REAL(kind=
dp) :: a1 = 0.0_dp
245 REAL(kind=
dp) :: a2 = 0.0_dp
246 REAL(kind=
dp) :: b1 = 0.0_dp
247 REAL(kind=
dp) :: b2 = 0.0_dp
248 REAL(kind=
dp) :: c = 0.0_dp
249 REAL(kind=
dp) :: d = 0.0_dp
250 REAL(kind=
dp) :: r0 = 0.0_dp
251 REAL(kind=
dp) :: beta = 0.0_dp
252 END TYPE buckmorse_pot_type
257 CHARACTER(LEN=default_path_length) :: potential =
""
258 CHARACTER(LEN=default_string_length), &
259 POINTER,
DIMENSION(:) :: parameters => null(), units => null()
260 CHARACTER(LEN=default_string_length) :: variables =
""
261 REAL(kind=
dp),
DIMENSION(:),
POINTER :: values => null()
267 REAL(kind=
dp) :: a = 0.0_dp
268 REAL(kind=
dp) :: b = 0.0_dp
269 REAL(kind=
dp) :: lambda1 = 0.0_dp
270 REAL(kind=
dp) :: lambda2 = 0.0_dp
271 REAL(kind=
dp) :: alpha = 0.0_dp
272 REAL(kind=
dp) :: beta = 0.0_dp
273 REAL(kind=
dp) :: n = 0.0_dp
274 REAL(kind=
dp) :: c = 0.0_dp
275 REAL(kind=
dp) :: d = 0.0_dp
276 REAL(kind=
dp) :: h = 0.0_dp
277 REAL(kind=
dp) :: lambda3 = 0.0_dp
278 REAL(kind=
dp) :: bigr = 0.0_dp
279 REAL(kind=
dp) :: bigd = 0.0_dp
280 REAL(kind=
dp) :: rcutsq = 0.0_dp
285 REAL(kind=
dp) :: b = 0.0_dp
286 REAL(kind=
dp) :: d = 0.0_dp
287 REAL(kind=
dp) :: e = 0.0_dp
288 REAL(kind=
dp) :: f = 0.0_dp
289 REAL(kind=
dp) :: beta = 0.0_dp
290 REAL(kind=
dp) :: rcutsq = 0.0_dp
291 LOGICAL :: allow_oh_formation = .false.
292 LOGICAL :: allow_h3o_formation = .false.
293 LOGICAL :: allow_o_formation = .false.
298 CHARACTER(LEN=2) :: met1 =
""
299 CHARACTER(LEN=2) :: met2 =
""
300 REAL(kind=
dp) :: epsilon = 0.0_dp
301 REAL(kind=
dp) :: bxy = 0.0_dp
302 REAL(kind=
dp) :: bz = 0.0_dp
303 REAL(kind=
dp) :: r1 = 0.0_dp
304 REAL(kind=
dp) :: r2 = 0.0_dp
305 REAL(kind=
dp) :: a1 = 0.0_dp
306 REAL(kind=
dp) :: a2 = 0.0_dp
307 REAL(kind=
dp) :: a3 = 0.0_dp
308 REAL(kind=
dp) :: a4 = 0.0_dp
309 REAL(kind=
dp) :: a = 0.0_dp
310 REAL(kind=
dp) :: b = 0.0_dp
311 REAL(kind=
dp) :: c = 0.0_dp
312 REAL(kind=
dp),
POINTER,
DIMENSION(:) :: gcn => null()
313 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: n_vectors
314 REAL(kind=
dp) :: rcutsq = 0.0_dp
315 LOGICAL :: express = .false.
321 CHARACTER(LEN=2) :: met1 =
""
322 CHARACTER(LEN=2) :: met2 =
""
323 REAL(kind=
dp) :: epsilon1 = 0.0_dp
324 REAL(kind=
dp) :: epsilon2 = 0.0_dp
325 REAL(kind=
dp) :: epsilon3 = 0.0_dp
326 REAL(kind=
dp) :: bxy1 = 0.0_dp
327 REAL(kind=
dp) :: bxy2 = 0.0_dp
328 REAL(kind=
dp) :: bz1 = 0.0_dp
329 REAL(kind=
dp) :: bz2 = 0.0_dp
330 REAL(kind=
dp) :: r1 = 0.0_dp
331 REAL(kind=
dp) :: r2 = 0.0_dp
332 REAL(kind=
dp) :: a11 = 0.0_dp
333 REAL(kind=
dp) :: a12 = 0.0_dp
334 REAL(kind=
dp) :: a13 = 0.0_dp
335 REAL(kind=
dp) :: a21 = 0.0_dp
336 REAL(kind=
dp) :: a22 = 0.0_dp
337 REAL(kind=
dp) :: a23 = 0.0_dp
338 REAL(kind=
dp) :: a31 = 0.0_dp
339 REAL(kind=
dp) :: a32 = 0.0_dp
340 REAL(kind=
dp) :: a33 = 0.0_dp
341 REAL(kind=
dp) :: a41 = 0.0_dp
342 REAL(kind=
dp) :: a42 = 0.0_dp
343 REAL(kind=
dp) :: a43 = 0.0_dp
344 REAL(kind=
dp) :: ao1 = 0.0_dp
345 REAL(kind=
dp) :: ao2 = 0.0_dp
346 REAL(kind=
dp) :: bo1 = 0.0_dp
347 REAL(kind=
dp) :: bo2 = 0.0_dp
348 REAL(kind=
dp) :: c = 0.0_dp
349 REAL(kind=
dp) :: ah1 = 0.0_dp
350 REAL(kind=
dp) :: ah2 = 0.0_dp
351 REAL(kind=
dp) :: bh1 = 0.0_dp
352 REAL(kind=
dp) :: bh2 = 0.0_dp
353 REAL(kind=
dp),
POINTER,
DIMENSION(:) :: gcn => null()
354 REAL(kind=
dp),
ALLOCATABLE,
DIMENSION(:, :) :: n_vectors
355 REAL(kind=
dp) :: rcutsq = 0.0_dp
356 LOGICAL :: express = .false.
362 CHARACTER(LEN=default_path_length) :: tabpot_file_name =
""
363 INTEGER :: npoints = 0, index = 0
364 REAL(kind=
dp) :: dr = 0.0_dp, rcut = 0.0_dp
365 REAL(kind=
dp),
POINTER,
DIMENSION(:) :: r => null(), e => null(), f => null()
371 REAL(kind=
dp) :: rmin = 0.0_dp, rmax = 0.0_dp
373 TYPE(gp_pot_type),
POINTER :: gp => null()
374 TYPE(lj_pot_type),
POINTER :: lj => null()
376 TYPE(williams_pot_type),
POINTER :: willis => null()
377 TYPE(goodwin_pot_type),
POINTER :: goodwin => null()
384 TYPE(buck4ran_pot_type),
POINTER :: buck4r => null()
385 TYPE(buckmorse_pot_type),
POINTER :: buckmo => null()
390 TYPE(ftd_pot_type),
POINTER :: ftd => null()
392 END TYPE pot_set_type
396 REAL(kind=
dp) :: rcutsq = 0.0_dp
397 REAL(kind=
dp) :: e_fac = 0.0_dp
398 REAL(kind=
dp) :: e_fcc = 0.0_dp
399 REAL(kind=
dp) :: e_fcs = 0.0_dp
400 REAL(kind=
dp) :: e_fsc = 0.0_dp
401 REAL(kind=
dp) :: z1 = 0.0_dp
402 REAL(kind=
dp) :: z2 = 0.0_dp
403 REAL(kind=
dp),
DIMENSION(0:5) :: zbl_poly = 0.0_dp
404 REAL(kind=
dp),
DIMENSION(2) :: zbl_rcut = 0.0_dp
405 LOGICAL :: undef = .false., &
408 INTEGER :: shell_type = 0
409 CHARACTER(LEN=default_string_length) :: at1 =
""
410 CHARACTER(LEN=default_string_length) :: at2 =
""
411 INTEGER,
POINTER,
DIMENSION(:) ::
TYPE => null()
412 TYPE(pot_set_type),
POINTER,
DIMENSION(:) :: set => null()
418 TYPE pair_potential_type
420 END TYPE pair_potential_type
424 TYPE(pair_potential_type),
DIMENSION(:),
POINTER :: pot => null()
429 TYPE(pair_potential_type),
DIMENSION(:, :),
POINTER :: pot => null()
443 LOGICAL,
INTENT(OUT) :: compare
451 cpassert(
ASSOCIATED(pot1%type))
452 cpassert(
ASSOCIATED(pot2%type))
453 IF (
SIZE(pot1%type) /=
SIZE(pot2%type))
RETURN
454 IF (any(pot1%type /= pot2%type))
RETURN
457 cpassert(
ASSOCIATED(pot1%set))
458 cpassert(
ASSOCIATED(pot2%set))
459 DO i = 1,
SIZE(pot1%type)
461 SELECT CASE (pot1%type(i))
463 IF ((pot1%set(i)%lj%epsilon == pot2%set(i)%lj%epsilon) .AND. &
464 (pot1%set(i)%lj%sigma6 == pot2%set(i)%lj%sigma6) .AND. &
465 (pot1%set(i)%lj%sigma12 == pot2%set(i)%lj%sigma12)) mycompare = .true.
467 IF ((pot1%set(i)%willis%a == pot2%set(i)%willis%a) .AND. &
468 (pot1%set(i)%willis%b == pot2%set(i)%willis%b) .AND. &
469 (pot1%set(i)%willis%c == pot2%set(i)%willis%c)) mycompare = .true.
471 IF ((pot1%set(i)%goodwin%vr0 == pot2%set(i)%goodwin%vr0) .AND. &
472 (pot1%set(i)%goodwin%m == pot2%set(i)%goodwin%m) .AND. &
473 (pot1%set(i)%goodwin%mc == pot2%set(i)%goodwin%mc) .AND. &
474 (pot1%set(i)%goodwin%d == pot2%set(i)%goodwin%d) .AND. &
475 (pot1%set(i)%goodwin%dc == pot2%set(i)%goodwin%dc)) mycompare = .true.
478 IF (pot1%set(i)%eam%npoints == pot2%set(i)%eam%npoints)
THEN
479 IF ((pot1%set(i)%eam%drar == pot2%set(i)%eam%drar) .AND. &
480 (pot1%set(i)%eam%drhoar == pot2%set(i)%eam%drhoar) .AND. &
481 (pot1%set(i)%eam%acutal == pot2%set(i)%eam%acutal) .AND. &
482 (sum(abs(pot1%set(i)%eam%rho - pot2%set(i)%eam%rho)) == 0.0_dp) .AND. &
483 (sum(abs(pot1%set(i)%eam%phi - pot2%set(i)%eam%phi)) == 0.0_dp) .AND. &
484 (sum(abs(pot1%set(i)%eam%frho - pot2%set(i)%eam%frho)) == 0.0_dp) .AND. &
485 (sum(abs(pot1%set(i)%eam%rhoval - pot2%set(i)%eam%rhoval)) == 0.0_dp) .AND. &
486 (sum(abs(pot1%set(i)%eam%rval - pot2%set(i)%eam%rval)) == 0.0_dp) .AND. &
487 (sum(abs(pot1%set(i)%eam%rhop - pot2%set(i)%eam%rhop)) == 0.0_dp) .AND. &
488 (sum(abs(pot1%set(i)%eam%phip - pot2%set(i)%eam%phip)) == 0.0_dp) .AND. &
489 (sum(abs(pot1%set(i)%eam%frhop - pot2%set(i)%eam%frhop)) == 0.0_dp)) mycompare = .true.
492 IF ((pot1%set(i)%ace%ace_file_name == pot2%set(i)%ace%ace_file_name) .AND. &
493 (pot1%set(i)%ace%atom_ace_type == pot2%set(i)%ace%atom_ace_type)) mycompare = .true.
495 IF ((pot1%set(i)%deepmd%deepmd_file_name == pot2%set(i)%deepmd%deepmd_file_name) .AND. &
496 (pot1%set(i)%deepmd%atom_deepmd_type == pot2%set(i)%deepmd%atom_deepmd_type)) mycompare = .true.
498 IF ((pot1%set(i)%quip%quip_file_name == pot2%set(i)%quip%quip_file_name) .AND. &
499 (pot1%set(i)%quip%init_args == pot2%set(i)%quip%init_args) .AND. &
500 (pot1%set(i)%quip%calc_args == pot2%set(i)%quip%calc_args)) mycompare = .true.
502 IF ((pot1%set(i)%nequip%nequip_file_name == pot2%set(i)%nequip%nequip_file_name) .AND. &
503 (pot1%set(i)%nequip%unit_coords == pot2%set(i)%nequip%unit_coords) .AND. &
504 (pot1%set(i)%nequip%unit_forces == pot2%set(i)%nequip%unit_forces) .AND. &
505 (pot1%set(i)%nequip%unit_energy == pot2%set(i)%nequip%unit_energy) .AND. &
506 (pot1%set(i)%nequip%unit_cell == pot2%set(i)%nequip%unit_cell)) mycompare = .true.
508 IF ((pot1%set(i)%allegro%allegro_file_name == pot2%set(i)%allegro%allegro_file_name) .AND. &
509 (pot1%set(i)%allegro%unit_coords == pot2%set(i)%allegro%unit_coords) .AND. &
510 (pot1%set(i)%allegro%unit_forces == pot2%set(i)%allegro%unit_forces) .AND. &
511 (pot1%set(i)%allegro%unit_energy == pot2%set(i)%allegro%unit_energy) .AND. &
512 (pot1%set(i)%allegro%unit_cell == pot2%set(i)%allegro%unit_cell)) mycompare = .true.
514 IF ((pot1%set(i)%ft%A == pot2%set(i)%ft%A) .AND. &
515 (pot1%set(i)%ft%B == pot2%set(i)%ft%B) .AND. &
516 (pot1%set(i)%ft%C == pot2%set(i)%ft%C) .AND. &
517 (pot1%set(i)%ft%D == pot2%set(i)%ft%D)) mycompare = .true.
519 IF ((pot1%set(i)%ftd%A == pot2%set(i)%ftd%A) .AND. &
520 (pot1%set(i)%ftd%B == pot2%set(i)%ftd%B) .AND. &
521 (pot1%set(i)%ftd%C == pot2%set(i)%ftd%C) .AND. &
522 (pot1%set(i)%ftd%D == pot2%set(i)%ftd%D) .AND. &
523 (all(pot1%set(i)%ftd%BD(:) == pot2%set(i)%ftd%BD(:)))) mycompare = .true.
525 IF ((sum(abs(pot1%set(i)%ipbv%a - pot2%set(i)%ipbv%a)) == 0.0_dp) .AND. &
526 (pot1%set(i)%ipbv%rcore == pot2%set(i)%ipbv%rcore) .AND. &
527 (pot1%set(i)%ipbv%m == pot2%set(i)%ipbv%m) .AND. &
528 (pot1%set(i)%ipbv%b == pot2%set(i)%ipbv%b)) mycompare = .true.
530 IF ((pot1%set(i)%tersoff%A == pot2%set(i)%tersoff%A) .AND. &
531 (pot1%set(i)%tersoff%B == pot2%set(i)%tersoff%B) .AND. &
532 (pot1%set(i)%tersoff%lambda1 == pot2%set(i)%tersoff%lambda1) .AND. &
533 (pot1%set(i)%tersoff%lambda2 == pot2%set(i)%tersoff%lambda2) .AND. &
534 (pot1%set(i)%tersoff%alpha == pot2%set(i)%tersoff%alpha) .AND. &
535 (pot1%set(i)%tersoff%beta == pot2%set(i)%tersoff%beta) .AND. &
536 (pot1%set(i)%tersoff%n == pot2%set(i)%tersoff%n) .AND. &
537 (pot1%set(i)%tersoff%c == pot2%set(i)%tersoff%c) .AND. &
538 (pot1%set(i)%tersoff%d == pot2%set(i)%tersoff%d) .AND. &
539 (pot1%set(i)%tersoff%h == pot2%set(i)%tersoff%h) .AND. &
540 (pot1%set(i)%tersoff%lambda3 == pot2%set(i)%tersoff%lambda3) .AND. &
541 (pot1%set(i)%tersoff%rcutsq == pot2%set(i)%tersoff%rcutsq) .AND. &
542 (pot1%set(i)%tersoff%bigR == pot2%set(i)%tersoff%bigR) .AND. &
543 (pot1%set(i)%tersoff%bigD == pot2%set(i)%tersoff%bigD)) mycompare = .true.
545 IF ((pot1%set(i)%siepmann%B == pot2%set(i)%siepmann%B) .AND. &
546 (pot1%set(i)%siepmann%D == pot2%set(i)%siepmann%D) .AND. &
547 (pot1%set(i)%siepmann%E == pot2%set(i)%siepmann%E) .AND. &
548 (pot1%set(i)%siepmann%F == pot2%set(i)%siepmann%F) .AND. &
549 (pot1%set(i)%siepmann%beta == pot2%set(i)%siepmann%beta) .AND. &
550 (pot1%set(i)%siepmann%rcutsq == pot2%set(i)%siepmann%rcutsq) .AND. &
551 (pot1%set(i)%siepmann%allow_oh_formation .EQV. &
552 pot2%set(i)%siepmann%allow_oh_formation) .AND. &
553 (pot1%set(i)%siepmann%allow_o_formation .EQV. &
554 pot2%set(i)%siepmann%allow_o_formation) .AND. &
555 (pot1%set(i)%siepmann%allow_h3o_formation .EQV. &
556 pot2%set(i)%siepmann%allow_h3o_formation)) mycompare = .true.
558 IF ((pot1%set(i)%gal%epsilon == pot2%set(i)%gal%epsilon) .AND. &
559 (pot1%set(i)%gal%bxy == pot2%set(i)%gal%bxy) .AND. &
560 (pot1%set(i)%gal%bz == pot2%set(i)%gal%bz) .AND. &
561 (pot1%set(i)%gal%r1 == pot2%set(i)%gal%r1) .AND. &
562 (pot1%set(i)%gal%r2 == pot2%set(i)%gal%r2) .AND. &
563 (pot1%set(i)%gal%a1 == pot2%set(i)%gal%a1) .AND. &
564 (pot1%set(i)%gal%a2 == pot2%set(i)%gal%a2) .AND. &
565 (pot1%set(i)%gal%a3 == pot2%set(i)%gal%a3) .AND. &
566 (pot1%set(i)%gal%a4 == pot2%set(i)%gal%a4) .AND. &
567 (pot1%set(i)%gal%a == pot2%set(i)%gal%a) .AND. &
568 (pot1%set(i)%gal%b == pot2%set(i)%gal%b) .AND. &
569 (pot1%set(i)%gal%c == pot2%set(i)%gal%c) .AND. &
570 (pot1%set(i)%gal%express .EQV. &
571 pot2%set(i)%gal%express) .AND. &
572 (pot1%set(i)%gal%rcutsq == pot2%set(i)%gal%rcutsq)) mycompare = .true.
574 IF ((pot1%set(i)%gal21%epsilon1 == pot2%set(i)%gal21%epsilon1) .AND. &
575 (pot1%set(i)%gal21%epsilon2 == pot2%set(i)%gal21%epsilon2) .AND. &
576 (pot1%set(i)%gal21%epsilon3 == pot2%set(i)%gal21%epsilon3) .AND. &
577 (pot1%set(i)%gal21%bxy1 == pot2%set(i)%gal21%bxy1) .AND. &
578 (pot1%set(i)%gal21%bxy2 == pot2%set(i)%gal21%bxy1) .AND. &
579 (pot1%set(i)%gal21%bz1 == pot2%set(i)%gal21%bz1) .AND. &
580 (pot1%set(i)%gal21%bz2 == pot2%set(i)%gal21%bz2) .AND. &
581 (pot1%set(i)%gal21%r1 == pot2%set(i)%gal21%r1) .AND. &
582 (pot1%set(i)%gal21%r2 == pot2%set(i)%gal21%r2) .AND. &
583 (pot1%set(i)%gal21%a11 == pot2%set(i)%gal21%a11) .AND. &
584 (pot1%set(i)%gal21%a12 == pot2%set(i)%gal21%a12) .AND. &
585 (pot1%set(i)%gal21%a13 == pot2%set(i)%gal21%a13) .AND. &
586 (pot1%set(i)%gal21%a21 == pot2%set(i)%gal21%a21) .AND. &
587 (pot1%set(i)%gal21%a22 == pot2%set(i)%gal21%a22) .AND. &
588 (pot1%set(i)%gal21%a23 == pot2%set(i)%gal21%a23) .AND. &
589 (pot1%set(i)%gal21%a31 == pot2%set(i)%gal21%a31) .AND. &
590 (pot1%set(i)%gal21%a32 == pot2%set(i)%gal21%a32) .AND. &
591 (pot1%set(i)%gal21%a33 == pot2%set(i)%gal21%a33) .AND. &
592 (pot1%set(i)%gal21%a41 == pot2%set(i)%gal21%a41) .AND. &
593 (pot1%set(i)%gal21%a42 == pot2%set(i)%gal21%a42) .AND. &
594 (pot1%set(i)%gal21%a43 == pot2%set(i)%gal21%a43) .AND. &
595 (pot1%set(i)%gal21%AO1 == pot2%set(i)%gal21%AO1) .AND. &
596 (pot1%set(i)%gal21%AO2 == pot2%set(i)%gal21%AO2) .AND. &
597 (pot1%set(i)%gal21%BO1 == pot2%set(i)%gal21%BO1) .AND. &
598 (pot1%set(i)%gal21%BO2 == pot2%set(i)%gal21%BO2) .AND. &
599 (pot1%set(i)%gal21%c == pot2%set(i)%gal21%c) .AND. &
600 (pot1%set(i)%gal21%AH1 == pot2%set(i)%gal21%AH1) .AND. &
601 (pot1%set(i)%gal21%AH2 == pot2%set(i)%gal21%AH2) .AND. &
602 (pot1%set(i)%gal21%BH1 == pot2%set(i)%gal21%BH1) .AND. &
603 (pot1%set(i)%gal21%BH2 == pot2%set(i)%gal21%BH2) .AND. &
604 (pot1%set(i)%gal21%express .EQV. &
605 pot2%set(i)%gal21%express) .AND. &
606 (pot1%set(i)%gal21%rcutsq == pot2%set(i)%gal21%rcutsq)) mycompare = .true.
609 mycompare = mycompare .AND. &
610 (pot1%set(i)%rmin == pot2%set(i)%rmin) .AND. (pot1%set(i)%rmax == pot2%set(i)%rmax)
611 IF ((mycompare) .AND. (i == 1)) compare = .true.
612 compare = compare .AND. mycompare
623 SUBROUTINE pair_potential_single_create(potparm, nset)
625 INTEGER,
INTENT(IN),
OPTIONAL :: nset
629 cpassert(.NOT.
ASSOCIATED(potparm))
632 IF (
PRESENT(nset)) lnset = nset
634 ALLOCATE (potparm%type(lnset))
635 ALLOCATE (potparm%set(lnset))
636 NULLIFY (potparm%spl_f, &
637 potparm%pair_spline_data)
641 NULLIFY (potparm%set(i)%ipbv, &
645 potparm%set(i)%willis, &
646 potparm%set(i)%goodwin, &
647 potparm%set(i)%eam, &
648 potparm%set(i)%quip, &
649 potparm%set(i)%nequip, &
650 potparm%set(i)%allegro, &
651 potparm%set(i)%ace, &
652 potparm%set(i)%deepmd, &
653 potparm%set(i)%buck4r, &
654 potparm%set(i)%buckmo, &
655 potparm%set(i)%tersoff, &
656 potparm%set(i)%siepmann, &
657 potparm%set(i)%gal, &
658 potparm%set(i)%gal21, &
659 potparm%set(i)%ftd, &
663 END SUBROUTINE pair_potential_single_create
677 potparm%undef = .true.
678 potparm%no_pp = .false.
679 potparm%no_mb = .false.
682 potparm%rcutsq = 0.0_dp
683 IF (
ASSOCIATED(potparm%pair_spline_data)) &
685 IF (
ASSOCIATED(potparm%spl_f)) &
688 DO i = 1,
SIZE(potparm%type)
691 CALL pair_potential_lj_clean(potparm%set(i)%lj)
692 CALL pair_potential_williams_clean(potparm%set(i)%willis)
693 CALL pair_potential_goodwin_clean(potparm%set(i)%goodwin)
694 CALL pair_potential_eam_clean(potparm%set(i)%eam)
695 CALL pair_potential_quip_clean(potparm%set(i)%quip)
696 CALL pair_potential_nequip_clean(potparm%set(i)%nequip)
697 CALL pair_potential_allegro_clean(potparm%set(i)%allegro)
698 CALL pair_potential_ace_clean(potparm%set(i)%ace)
699 CALL pair_potential_deepmd_clean(potparm%set(i)%deepmd)
700 CALL pair_potential_buck4r_clean(potparm%set(i)%buck4r)
701 CALL pair_potential_buckmo_clean(potparm%set(i)%buckmo)
702 CALL pair_potential_bmhft_clean(potparm%set(i)%ft)
703 CALL pair_potential_bmhftd_clean(potparm%set(i)%ftd)
704 CALL pair_potential_ipbv_clean(potparm%set(i)%ipbv)
705 CALL pair_potential_gp_clean(potparm%set(i)%gp)
706 CALL pair_potential_tersoff_clean(potparm%set(i)%tersoff)
707 CALL pair_potential_siepmann_clean(potparm%set(i)%siepmann)
708 CALL pair_potential_gal_clean(potparm%set(i)%gal)
709 CALL pair_potential_gal21_clean(potparm%set(i)%gal21)
710 CALL pair_potential_tab_clean(potparm%set(i)%tab)
725 cpassert(
ASSOCIATED(potparm_source))
726 IF (.NOT.
ASSOCIATED(potparm_dest))
THEN
727 CALL pair_potential_single_create(potparm_dest,
SIZE(potparm_source%type))
731 potparm_dest%type = potparm_source%type
732 potparm_dest%shell_type = potparm_source%shell_type
733 potparm_dest%undef = potparm_source%undef
734 potparm_dest%no_mb = potparm_source%no_mb
735 potparm_dest%no_pp = potparm_source%no_pp
736 potparm_dest%at1 = potparm_source%at1
737 potparm_dest%at2 = potparm_source%at2
738 potparm_dest%rcutsq = potparm_source%rcutsq
739 IF (
ASSOCIATED(potparm_source%pair_spline_data))
THEN
740 CALL spline_data_p_copy(potparm_source%pair_spline_data, potparm_dest%pair_spline_data)
743 IF (
ASSOCIATED(potparm_source%spl_f))
THEN
747 DO i = 1,
SIZE(potparm_source%type)
748 potparm_dest%set(i)%rmin = potparm_source%set(i)%rmin
749 potparm_dest%set(i)%rmax = potparm_source%set(i)%rmax
750 CALL pair_potential_lj_copy(potparm_source%set(i)%lj, potparm_dest%set(i)%lj)
751 CALL pair_potential_williams_copy(potparm_source%set(i)%willis, potparm_dest%set(i)%willis)
752 CALL pair_potential_goodwin_copy(potparm_source%set(i)%goodwin, potparm_dest%set(i)%goodwin)
753 CALL pair_potential_eam_copy(potparm_source%set(i)%eam, potparm_dest%set(i)%eam)
754 CALL pair_potential_quip_copy(potparm_source%set(i)%quip, potparm_dest%set(i)%quip)
755 CALL pair_potential_nequip_copy(potparm_source%set(i)%nequip, potparm_dest%set(i)%nequip)
756 CALL pair_potential_allegro_copy(potparm_source%set(i)%allegro, potparm_dest%set(i)%allegro)
757 CALL pair_potential_ace_copy(potparm_source%set(i)%ace, potparm_dest%set(i)%ace)
758 CALL pair_potential_deepmd_copy(potparm_source%set(i)%deepmd, potparm_dest%set(i)%deepmd)
759 CALL pair_potential_bmhft_copy(potparm_source%set(i)%ft, potparm_dest%set(i)%ft)
760 CALL pair_potential_bmhftd_copy(potparm_source%set(i)%ftd, potparm_dest%set(i)%ftd)
761 CALL pair_potential_ipbv_copy(potparm_source%set(i)%ipbv, potparm_dest%set(i)%ipbv)
762 CALL pair_potential_buck4r_copy(potparm_source%set(i)%buck4r, potparm_dest%set(i)%buck4r)
763 CALL pair_potential_buckmo_copy(potparm_source%set(i)%buckmo, potparm_dest%set(i)%buckmo)
764 CALL pair_potential_gp_copy(potparm_source%set(i)%gp, potparm_dest%set(i)%gp)
765 CALL pair_potential_tersoff_copy(potparm_source%set(i)%tersoff, potparm_dest%set(i)%tersoff)
766 CALL pair_potential_siepmann_copy(potparm_source%set(i)%siepmann, potparm_dest%set(i)%siepmann)
767 CALL pair_potential_gal_copy(potparm_source%set(i)%gal, potparm_dest%set(i)%gal)
768 CALL pair_potential_gal21_copy(potparm_source%set(i)%gal21, potparm_dest%set(i)%gal21)
769 CALL pair_potential_tab_copy(potparm_source%set(i)%tab, potparm_dest%set(i)%tab)
783 INTEGER :: i, j, size_dest, size_source
784 LOGICAL :: allocate_new, check
787 cpassert(
ASSOCIATED(potparm_source))
790 check = (.NOT.
ASSOCIATED(potparm_source%pair_spline_data)) .AND. &
791 (.NOT.
ASSOCIATED(potparm_source%spl_f))
793 check = (.NOT.
ASSOCIATED(potparm_dest%pair_spline_data)) .AND. &
794 (.NOT.
ASSOCIATED(potparm_dest%spl_f))
797 size_source =
SIZE(potparm_source%type)
798 allocate_new = .NOT.
ASSOCIATED(potparm_dest)
799 IF (.NOT. allocate_new)
THEN
800 size_dest =
SIZE(potparm_dest%type)
801 IF (size_dest == 1)
THEN
802 check = (
ASSOCIATED(potparm_dest%set(1)%lj)) .OR. &
803 (
ASSOCIATED(potparm_dest%set(1)%willis)) .OR. &
804 (
ASSOCIATED(potparm_dest%set(1)%goodwin)) .OR. &
805 (
ASSOCIATED(potparm_dest%set(1)%eam)) .OR. &
806 (
ASSOCIATED(potparm_dest%set(1)%quip)) .OR. &
807 (
ASSOCIATED(potparm_dest%set(1)%nequip)) .OR. &
808 (
ASSOCIATED(potparm_dest%set(1)%allegro)) .OR. &
809 (
ASSOCIATED(potparm_dest%set(1)%ace)) .OR. &
810 (
ASSOCIATED(potparm_dest%set(1)%deepmd)) .OR. &
811 (
ASSOCIATED(potparm_dest%set(1)%ft)) .OR. &
812 (
ASSOCIATED(potparm_dest%set(1)%ftd)) .OR. &
813 (
ASSOCIATED(potparm_dest%set(1)%ipbv)) .OR. &
814 (
ASSOCIATED(potparm_dest%set(1)%buck4r)) .OR. &
815 (
ASSOCIATED(potparm_dest%set(1)%buckmo)) .OR. &
816 (
ASSOCIATED(potparm_dest%set(1)%gp)) .OR. &
817 (
ASSOCIATED(potparm_dest%set(1)%tersoff)) .OR. &
818 (
ASSOCIATED(potparm_dest%set(1)%siepmann)) .OR. &
819 (
ASSOCIATED(potparm_dest%set(1)%gal)) .OR. &
820 (
ASSOCIATED(potparm_dest%set(1)%gal)) .OR. &
821 (
ASSOCIATED(potparm_dest%set(1)%tab))
822 IF (.NOT. check)
THEN
823 allocate_new = .true.
824 CALL pair_potential_single_release(potparm_dest)
828 IF (allocate_new)
THEN
830 CALL pair_potential_single_create(potparm_dest, size_source)
831 potparm_dest%shell_type = potparm_source%shell_type
832 potparm_dest%undef = potparm_source%undef
833 potparm_dest%no_mb = potparm_source%no_mb
834 potparm_dest%no_pp = potparm_source%no_pp
835 potparm_dest%at1 = potparm_source%at1
836 potparm_dest%at2 = potparm_source%at2
837 potparm_dest%rcutsq = potparm_source%rcutsq
839 size_dest =
SIZE(potparm_dest%type)
840 NULLIFY (potparm_tmp)
842 CALL pair_potential_single_release(potparm_dest)
843 CALL pair_potential_single_create(potparm_dest, size_dest + size_source)
845 potparm_dest%shell_type = potparm_tmp%shell_type
846 potparm_dest%undef = potparm_tmp%undef
847 potparm_dest%no_mb = potparm_tmp%no_mb
848 potparm_dest%no_pp = potparm_tmp%no_pp
849 potparm_dest%at1 = potparm_tmp%at1
850 potparm_dest%at2 = potparm_tmp%at2
851 potparm_dest%rcutsq = potparm_tmp%rcutsq
853 potparm_dest%type(i) = potparm_tmp%type(i)
854 potparm_dest%set(i)%rmin = potparm_tmp%set(i)%rmin
855 potparm_dest%set(i)%rmax = potparm_tmp%set(i)%rmax
856 CALL pair_potential_lj_copy(potparm_tmp%set(i)%lj, potparm_dest%set(i)%lj)
857 CALL pair_potential_williams_copy(potparm_tmp%set(i)%willis, potparm_dest%set(i)%willis)
858 CALL pair_potential_goodwin_copy(potparm_tmp%set(i)%goodwin, potparm_dest%set(i)%goodwin)
859 CALL pair_potential_eam_copy(potparm_tmp%set(i)%eam, potparm_dest%set(i)%eam)
860 CALL pair_potential_quip_copy(potparm_tmp%set(i)%quip, potparm_dest%set(i)%quip)
861 CALL pair_potential_nequip_copy(potparm_tmp%set(i)%nequip, potparm_dest%set(i)%nequip)
862 CALL pair_potential_allegro_copy(potparm_tmp%set(i)%allegro, potparm_dest%set(i)%allegro)
863 CALL pair_potential_ace_copy(potparm_tmp%set(i)%ace, potparm_dest%set(i)%ace)
864 CALL pair_potential_deepmd_copy(potparm_tmp%set(i)%deepmd, potparm_dest%set(i)%deepmd)
865 CALL pair_potential_bmhft_copy(potparm_tmp%set(i)%ft, potparm_dest%set(i)%ft)
866 CALL pair_potential_bmhftd_copy(potparm_tmp%set(i)%ftd, potparm_dest%set(i)%ftd)
867 CALL pair_potential_ipbv_copy(potparm_tmp%set(i)%ipbv, potparm_dest%set(i)%ipbv)
868 CALL pair_potential_buck4r_copy(potparm_tmp%set(i)%buck4r, potparm_dest%set(i)%buck4r)
869 CALL pair_potential_buckmo_copy(potparm_tmp%set(i)%buckmo, potparm_dest%set(i)%buckmo)
870 CALL pair_potential_gp_copy(potparm_tmp%set(i)%gp, potparm_dest%set(i)%gp)
871 CALL pair_potential_tersoff_copy(potparm_tmp%set(i)%tersoff, potparm_dest%set(i)%tersoff)
872 CALL pair_potential_siepmann_copy(potparm_tmp%set(i)%siepmann, potparm_dest%set(i)%siepmann)
873 CALL pair_potential_gal_copy(potparm_tmp%set(i)%gal, potparm_dest%set(i)%gal)
874 CALL pair_potential_gal21_copy(potparm_tmp%set(i)%gal21, potparm_dest%set(i)%gal21)
875 CALL pair_potential_tab_copy(potparm_tmp%set(i)%tab, potparm_dest%set(i)%tab)
877 CALL pair_potential_single_release(potparm_tmp)
880 check = (potparm_dest%shell_type == potparm_source%shell_type) .AND. &
881 (potparm_dest%undef .EQV. potparm_source%undef) .AND. &
882 (potparm_dest%no_mb .EQV. potparm_source%no_mb) .AND. &
883 (potparm_dest%no_pp .EQV. potparm_source%no_pp) .AND. &
884 (potparm_dest%at1 == potparm_source%at1) .AND. &
885 (potparm_dest%at2 == potparm_source%at2) .AND. &
886 (potparm_dest%rcutsq == potparm_source%rcutsq)
889 DO i = size_dest + 1, size_dest + size_source
891 potparm_dest%type(i) = potparm_source%type(j)
892 potparm_dest%set(i)%rmin = potparm_source%set(j)%rmin
893 potparm_dest%set(i)%rmax = potparm_source%set(j)%rmax
894 CALL pair_potential_lj_copy(potparm_source%set(j)%lj, potparm_dest%set(i)%lj)
895 CALL pair_potential_williams_copy(potparm_source%set(j)%willis, potparm_dest%set(i)%willis)
896 CALL pair_potential_goodwin_copy(potparm_source%set(j)%goodwin, potparm_dest%set(i)%goodwin)
897 CALL pair_potential_eam_copy(potparm_source%set(j)%eam, potparm_dest%set(i)%eam)
898 CALL pair_potential_quip_copy(potparm_source%set(j)%quip, potparm_dest%set(i)%quip)
899 CALL pair_potential_nequip_copy(potparm_source%set(j)%nequip, potparm_dest%set(i)%nequip)
900 CALL pair_potential_allegro_copy(potparm_source%set(j)%allegro, potparm_dest%set(i)%allegro)
901 CALL pair_potential_ace_copy(potparm_source%set(j)%ace, potparm_dest%set(i)%ace)
902 CALL pair_potential_deepmd_copy(potparm_source%set(j)%deepmd, potparm_dest%set(i)%deepmd)
903 CALL pair_potential_bmhft_copy(potparm_source%set(j)%ft, potparm_dest%set(i)%ft)
904 CALL pair_potential_bmhftd_copy(potparm_source%set(j)%ftd, potparm_dest%set(i)%ftd)
905 CALL pair_potential_ipbv_copy(potparm_source%set(j)%ipbv, potparm_dest%set(i)%ipbv)
906 CALL pair_potential_buck4r_copy(potparm_source%set(j)%buck4r, potparm_dest%set(i)%buck4r)
907 CALL pair_potential_buckmo_copy(potparm_source%set(j)%buckmo, potparm_dest%set(i)%buckmo)
908 CALL pair_potential_gp_copy(potparm_source%set(j)%gp, potparm_dest%set(i)%gp)
909 CALL pair_potential_tersoff_copy(potparm_source%set(j)%tersoff, potparm_dest%set(i)%tersoff)
910 CALL pair_potential_siepmann_copy(potparm_source%set(j)%siepmann, potparm_dest%set(i)%siepmann)
911 CALL pair_potential_gal_copy(potparm_source%set(j)%gal, potparm_dest%set(i)%gal)
912 CALL pair_potential_gal21_copy(potparm_source%set(j)%gal21, potparm_dest%set(i)%gal21)
913 CALL pair_potential_tab_copy(potparm_source%set(j)%tab, potparm_dest%set(i)%tab)
922 SUBROUTINE pair_potential_single_release(potparm)
927 cpassert(
ASSOCIATED(potparm))
930 DO i = 1,
SIZE(potparm%type)
931 CALL pair_potential_ipbv_release(potparm%set(i)%ipbv)
932 CALL pair_potential_lj_release(potparm%set(i)%lj)
933 CALL pair_potential_bmhft_release(potparm%set(i)%ft)
934 CALL pair_potential_bmhftd_release(potparm%set(i)%ftd)
935 CALL pair_potential_williams_release(potparm%set(i)%willis)
936 CALL pair_potential_goodwin_release(potparm%set(i)%goodwin)
937 CALL pair_potential_eam_release(potparm%set(i)%eam)
938 CALL pair_potential_quip_release(potparm%set(i)%quip)
939 CALL pair_potential_nequip_release(potparm%set(i)%nequip)
940 CALL pair_potential_allegro_release(potparm%set(i)%allegro)
941 CALL pair_potential_ace_release(potparm%set(i)%ace)
942 CALL pair_potential_deepmd_release(potparm%set(i)%deepmd)
943 CALL pair_potential_buck4r_release(potparm%set(i)%buck4r)
944 CALL pair_potential_buckmo_release(potparm%set(i)%buckmo)
945 CALL pair_potential_gp_release(potparm%set(i)%gp)
946 CALL pair_potential_tersoff_release(potparm%set(i)%tersoff)
947 CALL pair_potential_siepmann_release(potparm%set(i)%siepmann)
948 CALL pair_potential_gal_release(potparm%set(i)%gal)
949 CALL pair_potential_gal21_release(potparm%set(i)%gal21)
950 CALL pair_potential_tab_release(potparm%set(i)%tab)
952 DEALLOCATE (potparm%type)
953 DEALLOCATE (potparm%set)
955 END SUBROUTINE pair_potential_single_release
965 INTEGER,
INTENT(IN) :: nkinds
969 cpassert(.NOT.
ASSOCIATED(potparm))
971 ALLOCATE (potparm%pot(nkinds, nkinds))
974 NULLIFY (potparm%pot(i, j)%pot)
980 CALL pair_potential_single_create(potparm%pot(i, j)%pot)
981 potparm%pot(j, i)%pot => potparm%pot(i, j)%pot
999 IF (
ASSOCIATED(potparm))
THEN
1000 IF (
ASSOCIATED(potparm%pot))
THEN
1001 DO i = 1,
SIZE(potparm%pot, 1)
1002 DO j = i,
SIZE(potparm%pot, 2)
1003 CALL pair_potential_single_release(potparm%pot(i, j)%pot)
1004 NULLIFY (potparm%pot(j, i)%pot)
1007 DEALLOCATE (potparm%pot)
1009 DEALLOCATE (potparm)
1022 SUBROUTINE pair_potential_p_create(potparm, ndim, ub, lb)
1024 INTEGER,
INTENT(IN),
OPTIONAL :: ndim, ub, lb
1026 INTEGER :: i, loc_lb, loc_ub
1028 cpassert(.NOT.
ASSOCIATED(potparm))
1030 IF (
PRESENT(ndim))
THEN
1033 ALLOCATE (potparm%pot(loc_lb:loc_ub))
1034 IF (
PRESENT(lb) .OR.
PRESENT(ub))
THEN
1037 ELSE IF (
PRESENT(lb) .AND.
PRESENT(ub))
THEN
1040 ALLOCATE (potparm%pot(loc_lb:loc_ub))
1041 IF (
PRESENT(ndim))
THEN
1047 DO i = loc_lb, loc_ub
1048 NULLIFY (potparm%pot(i)%pot)
1049 CALL pair_potential_single_create(potparm%pot(i)%pot)
1051 END SUBROUTINE pair_potential_p_create
1066 IF (
ASSOCIATED(potparm))
THEN
1067 IF (
ASSOCIATED(potparm%pot))
THEN
1068 DO i = 1,
SIZE(potparm%pot)
1069 CALL pair_potential_single_release(potparm%pot(i)%pot)
1071 DEALLOCATE (potparm%pot)
1073 DEALLOCATE (potparm)
1086 SUBROUTINE pair_potential_p_copy(source, dest, istart, iend)
1088 INTEGER,
INTENT(IN),
OPTIONAL :: istart, iend
1090 INTEGER :: i, l_end, l_start
1092 cpassert(
ASSOCIATED(source))
1093 cpassert(
ASSOCIATED(dest))
1094 l_start = lbound(source%pot, 1)
1095 l_end = ubound(source%pot, 1)
1096 IF (
PRESENT(istart)) l_start = istart
1097 IF (
PRESENT(iend)) l_end = iend
1098 DO i = l_start, l_end
1099 IF (.NOT.
ASSOCIATED(source%pot(i)%pot)) &
1100 CALL pair_potential_single_create(source%pot(i)%pot)
1103 END SUBROUTINE pair_potential_p_copy
1134 quip, nequip, allegro, bmhft, bmhftd, ipbv, buck4r, buckmo, &
1135 gp, tersoff, siepmann, gal, gal21, tab, deepmd, ace)
1137 INTEGER,
INTENT(IN) :: lb1_new, ub1_new
1138 LOGICAL,
INTENT(IN),
OPTIONAL :: lj, lj_charmm, williams, goodwin, eam, quip, nequip, &
1139 allegro, bmhft, bmhftd, ipbv, buck4r, buckmo, gp, tersoff, siepmann, gal, gal21, tab, &
1142 INTEGER :: i, ipot, lb1_old, std_dim, ub1_old
1143 LOGICAL :: check, lace, lallegro, lbmhft, lbmhftd, lbuck4r, lbuckmo, ldeepmd, leam, lgal, &
1144 lgal21, lgoodwin, lgp, lipbv, llj, llj_charmm, lnequip, lquip, lsiepmann, ltab, ltersoff, &
1150 llj = .false.;
IF (
PRESENT(lj)) llj = lj
1151 llj_charmm = .false.;
IF (
PRESENT(lj_charmm)) llj_charmm = lj_charmm
1152 lwilliams = .false.;
IF (
PRESENT(williams)) lwilliams = williams
1153 lgoodwin = .false.;
IF (
PRESENT(goodwin)) lgoodwin = goodwin
1154 leam = .false.;
IF (
PRESENT(eam)) leam = eam
1155 lquip = .false.;
IF (
PRESENT(quip)) lquip = quip
1156 lnequip = .false.;
IF (
PRESENT(nequip)) lnequip = nequip
1157 lallegro = .false.;
IF (
PRESENT(allegro)) lallegro = allegro
1158 lace = .false.;
IF (
PRESENT(ace)) lace = ace
1159 ldeepmd = .false.;
IF (
PRESENT(deepmd)) ldeepmd = deepmd
1160 lbmhft = .false.;
IF (
PRESENT(bmhft)) lbmhft = bmhft
1161 lbmhftd = .false.;
IF (
PRESENT(bmhftd)) lbmhftd = bmhftd
1162 lipbv = .false.;
IF (
PRESENT(ipbv)) lipbv = ipbv
1163 lbuck4r = .false.;
IF (
PRESENT(buck4r)) lbuck4r = buck4r
1164 lbuckmo = .false.;
IF (
PRESENT(buckmo)) lbuckmo = buckmo
1165 lgp = .false.;
IF (
PRESENT(gp)) lgp = gp
1166 ltersoff = .false.;
IF (
PRESENT(tersoff)) ltersoff = tersoff
1167 lsiepmann = .false.;
IF (
PRESENT(siepmann)) lsiepmann = siepmann
1168 lgal = .false.;
IF (
PRESENT(gal)) lgal = gal
1169 lgal21 = .false.;
IF (
PRESENT(gal21)) lgal21 = gal21
1170 ltab = .false.;
IF (
PRESENT(tab)) ltab = tab
1174 check = .NOT. (llj_charmm .OR. lwilliams .OR. lgoodwin .OR. leam .OR. lquip .OR. lnequip .OR. lallegro &
1175 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1176 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1179 IF (llj_charmm)
THEN
1181 check = .NOT. (llj .OR. lwilliams .OR. lgoodwin .OR. leam .OR. lquip .OR. lnequip .OR. lallegro &
1182 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1183 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1188 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. leam .OR. lquip .OR. lnequip .OR. lallegro &
1189 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1190 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1195 check = .NOT. (llj .OR. llj_charmm .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip .OR. lallegro &
1196 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1197 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1202 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. lquip .OR. lnequip .OR. lallegro &
1203 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1204 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1209 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lnequip .OR. lallegro &
1210 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1211 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1216 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lallegro &
1217 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1218 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1223 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1224 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1225 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1230 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1231 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp &
1232 .OR. ltersoff .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd)
1237 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1238 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp &
1239 .OR. ltersoff .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. lace)
1244 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1245 .OR. lallegro .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1246 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1251 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1252 .OR. lallegro .OR. lbmhft .OR. lipbv .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1253 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1258 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1259 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lbuck4r .OR. lbuckmo .OR. lgp .OR. ltersoff &
1260 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1265 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1266 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuckmo .OR. lgp .OR. ltersoff &
1267 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1272 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1273 .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgp .OR. ltersoff &
1274 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1279 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1280 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgp .OR. lbuckmo &
1281 .OR. lsiepmann .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1286 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1287 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgp .OR. lbuckmo &
1288 .OR. ltersoff .OR. lgal .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1293 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1294 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgp .OR. lbuckmo &
1295 .OR. ltersoff .OR. lsiepmann .OR. lgal21 .OR. ltab .OR. ldeepmd .OR. lace)
1300 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1301 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgp .OR. lbuckmo &
1302 .OR. ltersoff .OR. lsiepmann .OR. lgal .OR. ltab .OR. ldeepmd .OR. lace)
1307 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1308 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgal21 .OR. lbuckmo &
1309 .OR. ltersoff .OR. lsiepmann .OR. lgal .OR. ltab .OR. ldeepmd .OR. lace)
1314 check = .NOT. (llj .OR. llj_charmm .OR. lgoodwin .OR. lwilliams .OR. leam .OR. lquip .OR. lnequip &
1315 .OR. lallegro .OR. lbmhft .OR. lbmhftd .OR. lipbv .OR. lbuck4r .OR. lgp .OR. lgal21 &
1316 .OR. lbuckmo .OR. ltersoff .OR. lsiepmann .OR. lgal .OR. lace)
1322 IF (
ASSOCIATED(p))
THEN
1323 lb1_old = lbound(p%pot, 1)
1324 ub1_old = ubound(p%pot, 1)
1325 CALL pair_potential_p_create(work, lb=lb1_old, ub=ub1_old)
1326 CALL pair_potential_p_copy(p, work)
1330 CALL pair_potential_p_create(p, lb=lb1_new, ub=ub1_new)
1331 IF (
ASSOCIATED(work))
THEN
1332 CALL pair_potential_p_copy(work, p, istart=lb1_old, iend=ub1_old)
1335 DO i = ub1_old + 1, ub1_new
1336 check = (
SIZE(p%pot(i)%pot%type) == std_dim) .AND. (
SIZE(p%pot(i)%pot%type) == std_dim)
1340 p%pot(i)%pot%undef = .true.
1341 p%pot(i)%pot%no_mb = .false.
1342 p%pot(i)%pot%no_pp = .false.
1343 p%pot(i)%pot%at1 =
'NULL'
1344 p%pot(i)%pot%at2 =
'NULL'
1351 CALL pair_potential_williams_create(p%pot(i)%pot%set(std_dim)%willis)
1353 CALL pair_potential_goodwin_create(p%pot(i)%pot%set(std_dim)%goodwin)
1355 CALL pair_potential_eam_create(p%pot(i)%pot%set(std_dim)%eam)
1357 CALL pair_potential_quip_create(p%pot(i)%pot%set(std_dim)%quip)
1359 CALL pair_potential_nequip_create(p%pot(i)%pot%set(std_dim)%nequip)
1361 CALL pair_potential_allegro_create(p%pot(i)%pot%set(std_dim)%allegro)
1363 CALL pair_potential_ace_create(p%pot(i)%pot%set(std_dim)%ace)
1365 CALL pair_potential_deepmd_create(p%pot(i)%pot%set(std_dim)%deepmd)
1367 CALL pair_potential_bmhft_create(p%pot(i)%pot%set(std_dim)%ft)
1369 CALL pair_potential_bmhftd_create(p%pot(i)%pot%set(std_dim)%ftd)
1371 CALL pair_potential_ipbv_create(p%pot(i)%pot%set(std_dim)%ipbv)
1373 CALL pair_potential_buck4r_create(p%pot(i)%pot%set(std_dim)%buck4r)
1375 CALL pair_potential_buckmo_create(p%pot(i)%pot%set(std_dim)%buckmo)
1377 CALL pair_potential_gp_create(p%pot(i)%pot%set(std_dim)%gp)
1379 CALL pair_potential_tersoff_create(p%pot(i)%pot%set(std_dim)%tersoff)
1381 CALL pair_potential_siepmann_create(p%pot(i)%pot%set(std_dim)%siepmann)
1383 CALL pair_potential_gal_create(p%pot(i)%pot%set(std_dim)%gal)
1385 CALL pair_potential_gal21_create(p%pot(i)%pot%set(std_dim)%gal21)
1387 CALL pair_potential_tab_create(p%pot(i)%pot%set(std_dim)%tab)
1389 NULLIFY (p%pot(i)%pot%spl_f)
1390 NULLIFY (p%pot(i)%pot%pair_spline_data)
1401 SUBROUTINE pair_potential_gp_create(gp)
1402 TYPE(gp_pot_type),
POINTER :: gp
1404 cpassert(.NOT.
ASSOCIATED(gp))
1406 NULLIFY (gp%parameters)
1408 CALL pair_potential_gp_clean(gp)
1409 END SUBROUTINE pair_potential_gp_create
1417 SUBROUTINE pair_potential_gp_copy(gp_source, gp_dest)
1418 TYPE(gp_pot_type),
POINTER :: gp_source, gp_dest
1422 IF (.NOT.
ASSOCIATED(gp_source))
RETURN
1423 IF (
ASSOCIATED(gp_dest))
CALL pair_potential_gp_release(gp_dest)
1424 CALL pair_potential_gp_create(gp_dest)
1425 gp_dest%myid = gp_source%myid
1426 gp_dest%potential = gp_source%potential
1427 gp_dest%variables = gp_source%variables
1428 IF (
ASSOCIATED(gp_source%parameters))
THEN
1429 idim =
SIZE(gp_source%parameters)
1430 ALLOCATE (gp_dest%parameters(idim))
1431 gp_dest%parameters = gp_source%parameters
1433 IF (
ASSOCIATED(gp_source%values))
THEN
1434 idim =
SIZE(gp_source%values)
1435 ALLOCATE (gp_dest%values(idim))
1436 gp_dest%values = gp_source%values
1438 END SUBROUTINE pair_potential_gp_copy
1445 SUBROUTINE pair_potential_gp_clean(gp)
1446 TYPE(gp_pot_type),
POINTER :: gp
1448 IF (.NOT.
ASSOCIATED(gp))
RETURN
1452 IF (
ASSOCIATED(gp%values))
THEN
1453 DEALLOCATE (gp%values)
1455 IF (
ASSOCIATED(gp%parameters))
THEN
1456 DEALLOCATE (gp%parameters)
1458 END SUBROUTINE pair_potential_gp_clean
1465 SUBROUTINE pair_potential_gp_release(gp)
1466 TYPE(gp_pot_type),
POINTER :: gp
1468 IF (
ASSOCIATED(gp))
THEN
1469 IF (
ASSOCIATED(gp%parameters))
THEN
1470 DEALLOCATE (gp%parameters)
1472 IF (
ASSOCIATED(gp%values))
THEN
1473 DEALLOCATE (gp%values)
1478 END SUBROUTINE pair_potential_gp_release
1486 TYPE(lj_pot_type),
POINTER :: lj
1488 cpassert(.NOT.
ASSOCIATED(lj))
1490 CALL pair_potential_lj_clean(lj)
1499 SUBROUTINE pair_potential_lj_copy(lj_source, lj_dest)
1500 TYPE(lj_pot_type),
POINTER :: lj_source, lj_dest
1502 IF (.NOT.
ASSOCIATED(lj_source))
RETURN
1503 IF (
ASSOCIATED(lj_dest))
CALL pair_potential_lj_release(lj_dest)
1505 lj_dest%epsilon = lj_source%epsilon
1506 lj_dest%sigma6 = lj_source%sigma6
1507 lj_dest%sigma12 = lj_source%sigma12
1508 END SUBROUTINE pair_potential_lj_copy
1515 SUBROUTINE pair_potential_lj_clean(lj)
1516 TYPE(lj_pot_type),
POINTER :: lj
1518 IF (.NOT.
ASSOCIATED(lj))
RETURN
1522 END SUBROUTINE pair_potential_lj_clean
1529 SUBROUTINE pair_potential_lj_release(lj)
1530 TYPE(lj_pot_type),
POINTER :: lj
1532 IF (
ASSOCIATED(lj))
THEN
1536 END SUBROUTINE pair_potential_lj_release
1543 SUBROUTINE pair_potential_williams_create(willis)
1544 TYPE(williams_pot_type),
POINTER :: willis
1546 cpassert(.NOT.
ASSOCIATED(willis))
1548 CALL pair_potential_williams_clean(willis)
1549 END SUBROUTINE pair_potential_williams_create
1557 SUBROUTINE pair_potential_williams_copy(willis_source, willis_dest)
1558 TYPE(williams_pot_type),
POINTER :: willis_source, willis_dest
1560 IF (.NOT.
ASSOCIATED(willis_source))
RETURN
1561 IF (
ASSOCIATED(willis_dest))
CALL pair_potential_williams_release(willis_dest)
1562 CALL pair_potential_williams_create(willis_dest)
1563 willis_dest%a = willis_source%a
1564 willis_dest%b = willis_source%b
1565 willis_dest%c = willis_source%c
1566 END SUBROUTINE pair_potential_williams_copy
1573 SUBROUTINE pair_potential_williams_clean(willis)
1574 TYPE(williams_pot_type),
POINTER :: willis
1576 IF (.NOT.
ASSOCIATED(willis))
RETURN
1580 END SUBROUTINE pair_potential_williams_clean
1587 SUBROUTINE pair_potential_williams_release(willis)
1588 TYPE(williams_pot_type),
POINTER :: willis
1590 IF (
ASSOCIATED(willis))
THEN
1594 END SUBROUTINE pair_potential_williams_release
1601 SUBROUTINE pair_potential_goodwin_create(goodwin)
1602 TYPE(goodwin_pot_type),
POINTER :: goodwin
1604 cpassert(.NOT.
ASSOCIATED(goodwin))
1606 CALL pair_potential_goodwin_clean(goodwin)
1607 END SUBROUTINE pair_potential_goodwin_create
1615 SUBROUTINE pair_potential_goodwin_copy(goodwin_source, goodwin_dest)
1616 TYPE(goodwin_pot_type),
POINTER :: goodwin_source, goodwin_dest
1618 IF (.NOT.
ASSOCIATED(goodwin_source))
RETURN
1619 IF (
ASSOCIATED(goodwin_dest))
CALL pair_potential_goodwin_release(goodwin_dest)
1620 CALL pair_potential_goodwin_create(goodwin_dest)
1621 goodwin_dest%vr0 = goodwin_source%vr0
1622 goodwin_dest%d = goodwin_source%d
1623 goodwin_dest%dc = goodwin_source%dc
1624 goodwin_dest%m = goodwin_source%m
1625 goodwin_dest%mc = goodwin_source%mc
1626 END SUBROUTINE pair_potential_goodwin_copy
1633 SUBROUTINE pair_potential_goodwin_clean(goodwin)
1634 TYPE(goodwin_pot_type),
POINTER :: goodwin
1636 IF (.NOT.
ASSOCIATED(goodwin))
RETURN
1637 goodwin%vr0 = 0.0_dp
1642 END SUBROUTINE pair_potential_goodwin_clean
1649 SUBROUTINE pair_potential_goodwin_release(goodwin)
1650 TYPE(goodwin_pot_type),
POINTER :: goodwin
1652 IF (
ASSOCIATED(goodwin))
THEN
1653 DEALLOCATE (goodwin)
1656 END SUBROUTINE pair_potential_goodwin_release
1663 SUBROUTINE pair_potential_eam_create(eam)
1666 cpassert(.NOT.
ASSOCIATED(eam))
1668 NULLIFY (eam%rho, eam%phi, eam%frho, eam%rhoval, eam%rval, &
1669 eam%rhop, eam%phip, eam%frhop)
1670 CALL pair_potential_eam_clean(eam)
1671 END SUBROUTINE pair_potential_eam_create
1679 SUBROUTINE pair_potential_eam_copy(eam_source, eam_dest)
1682 IF (.NOT.
ASSOCIATED(eam_source))
RETURN
1683 IF (
ASSOCIATED(eam_dest))
CALL pair_potential_eam_release(eam_dest)
1684 CALL pair_potential_eam_create(eam_dest)
1685 eam_dest%eam_file_name = eam_source%eam_file_name
1686 eam_dest%drar = eam_source%drar
1687 eam_dest%drhoar = eam_source%drhoar
1688 eam_dest%acutal = eam_source%acutal
1689 eam_dest%npoints = eam_source%npoints
1691 CALL reallocate(eam_dest%rho, 1, eam_dest%npoints)
1692 CALL reallocate(eam_dest%rhop, 1, eam_dest%npoints)
1693 CALL reallocate(eam_dest%phi, 1, eam_dest%npoints)
1694 CALL reallocate(eam_dest%phip, 1, eam_dest%npoints)
1695 CALL reallocate(eam_dest%frho, 1, eam_dest%npoints)
1696 CALL reallocate(eam_dest%frhop, 1, eam_dest%npoints)
1697 CALL reallocate(eam_dest%rval, 1, eam_dest%npoints)
1698 CALL reallocate(eam_dest%rhoval, 1, eam_dest%npoints)
1699 eam_dest%rho = eam_source%rho
1700 eam_dest%phi = eam_source%phi
1701 eam_dest%frho = eam_source%frho
1702 eam_dest%rhoval = eam_source%rhoval
1703 eam_dest%rval = eam_source%rval
1704 eam_dest%rhop = eam_source%rhop
1705 eam_dest%phip = eam_source%phip
1706 eam_dest%frhop = eam_source%frhop
1707 END SUBROUTINE pair_potential_eam_copy
1714 SUBROUTINE pair_potential_eam_clean(eam)
1717 IF (.NOT.
ASSOCIATED(eam))
RETURN
1718 eam%eam_file_name =
'NULL'
1731 END SUBROUTINE pair_potential_eam_clean
1738 SUBROUTINE pair_potential_eam_release(eam)
1741 IF (
ASSOCIATED(eam))
THEN
1742 IF (
ASSOCIATED(eam%rho))
THEN
1743 DEALLOCATE (eam%rho)
1745 IF (
ASSOCIATED(eam%rhop))
THEN
1746 DEALLOCATE (eam%rhop)
1748 IF (
ASSOCIATED(eam%phi))
THEN
1749 DEALLOCATE (eam%phi)
1751 IF (
ASSOCIATED(eam%phip))
THEN
1752 DEALLOCATE (eam%phip)
1754 IF (
ASSOCIATED(eam%frho))
THEN
1755 DEALLOCATE (eam%frho)
1757 IF (
ASSOCIATED(eam%frhop))
THEN
1758 DEALLOCATE (eam%frhop)
1760 IF (
ASSOCIATED(eam%rval))
THEN
1761 DEALLOCATE (eam%rval)
1763 IF (
ASSOCIATED(eam%rhoval))
THEN
1764 DEALLOCATE (eam%rhoval)
1768 END SUBROUTINE pair_potential_eam_release
1775 SUBROUTINE pair_potential_ace_create(ace)
1778 cpassert(.NOT.
ASSOCIATED(ace))
1780 END SUBROUTINE pair_potential_ace_create
1788 SUBROUTINE pair_potential_ace_copy(ace_source, ace_dest)
1791 IF (.NOT.
ASSOCIATED(ace_source))
RETURN
1793 IF (
ASSOCIATED(ace_dest))
CALL pair_potential_ace_release(ace_dest)
1794 CALL pair_potential_ace_create(ace_dest)
1795 ace_dest = ace_source
1796 END SUBROUTINE pair_potential_ace_copy
1803 SUBROUTINE pair_potential_ace_clean(ace)
1806 IF (.NOT.
ASSOCIATED(ace))
RETURN
1808 END SUBROUTINE pair_potential_ace_clean
1815 SUBROUTINE pair_potential_ace_release(ace)
1818 IF (
ASSOCIATED(ace))
THEN
1821 END SUBROUTINE pair_potential_ace_release
1828 SUBROUTINE pair_potential_deepmd_create(deepmd)
1831 cpassert(.NOT.
ASSOCIATED(deepmd))
1833 END SUBROUTINE pair_potential_deepmd_create
1841 SUBROUTINE pair_potential_deepmd_copy(deepmd_source, deepmd_dest)
1844 IF (.NOT.
ASSOCIATED(deepmd_source))
RETURN
1845 NULLIFY (deepmd_dest)
1846 IF (
ASSOCIATED(deepmd_dest))
CALL pair_potential_deepmd_release(deepmd_dest)
1847 CALL pair_potential_deepmd_create(deepmd_dest)
1848 deepmd_dest = deepmd_source
1849 END SUBROUTINE pair_potential_deepmd_copy
1856 SUBROUTINE pair_potential_deepmd_clean(deepmd)
1859 IF (.NOT.
ASSOCIATED(deepmd))
RETURN
1861 END SUBROUTINE pair_potential_deepmd_clean
1868 SUBROUTINE pair_potential_deepmd_release(deepmd)
1871 IF (
ASSOCIATED(deepmd))
THEN
1874 END SUBROUTINE pair_potential_deepmd_release
1881 SUBROUTINE pair_potential_quip_create(quip)
1884 cpassert(.NOT.
ASSOCIATED(quip))
1886 quip%quip_file_name =
""
1889 CALL pair_potential_quip_clean(quip)
1890 END SUBROUTINE pair_potential_quip_create
1898 SUBROUTINE pair_potential_quip_copy(quip_source, quip_dest)
1901 IF (.NOT.
ASSOCIATED(quip_source))
RETURN
1902 IF (
ASSOCIATED(quip_dest))
CALL pair_potential_quip_release(quip_dest)
1903 CALL pair_potential_quip_create(quip_dest)
1904 quip_dest%quip_file_name = quip_source%quip_file_name
1905 quip_dest%init_args = quip_source%init_args
1906 quip_dest%calc_args = quip_source%calc_args
1907 END SUBROUTINE pair_potential_quip_copy
1914 SUBROUTINE pair_potential_quip_clean(quip)
1917 IF (.NOT.
ASSOCIATED(quip))
RETURN
1918 quip%quip_file_name =
'NULL'
1921 END SUBROUTINE pair_potential_quip_clean
1928 SUBROUTINE pair_potential_quip_release(quip)
1931 IF (
ASSOCIATED(quip))
THEN
1934 END SUBROUTINE pair_potential_quip_release
1941 SUBROUTINE pair_potential_nequip_create(nequip)
1944 cpassert(.NOT.
ASSOCIATED(nequip))
1946 END SUBROUTINE pair_potential_nequip_create
1954 SUBROUTINE pair_potential_nequip_copy(nequip_source, nequip_dest)
1957 IF (.NOT.
ASSOCIATED(nequip_source))
RETURN
1958 IF (
ASSOCIATED(nequip_dest))
CALL pair_potential_nequip_release(nequip_dest)
1959 CALL pair_potential_nequip_create(nequip_dest)
1960 nequip_dest = nequip_source
1962 END SUBROUTINE pair_potential_nequip_copy
1969 SUBROUTINE pair_potential_nequip_clean(nequip)
1972 IF (.NOT.
ASSOCIATED(nequip))
RETURN
1975 END SUBROUTINE pair_potential_nequip_clean
1982 SUBROUTINE pair_potential_nequip_release(nequip)
1985 IF (
ASSOCIATED(nequip))
THEN
1988 END SUBROUTINE pair_potential_nequip_release
1995 SUBROUTINE pair_potential_allegro_create(allegro)
1998 cpassert(.NOT.
ASSOCIATED(allegro))
2000 END SUBROUTINE pair_potential_allegro_create
2008 SUBROUTINE pair_potential_allegro_copy(allegro_source, allegro_dest)
2011 IF (.NOT.
ASSOCIATED(allegro_source))
RETURN
2012 IF (
ASSOCIATED(allegro_dest))
CALL pair_potential_allegro_release(allegro_dest)
2013 CALL pair_potential_allegro_create(allegro_dest)
2014 allegro_dest = allegro_source
2015 END SUBROUTINE pair_potential_allegro_copy
2022 SUBROUTINE pair_potential_allegro_clean(allegro)
2025 IF (.NOT.
ASSOCIATED(allegro))
RETURN
2028 END SUBROUTINE pair_potential_allegro_clean
2035 SUBROUTINE pair_potential_allegro_release(allegro)
2038 IF (
ASSOCIATED(allegro))
THEN
2039 DEALLOCATE (allegro)
2041 END SUBROUTINE pair_potential_allegro_release
2048 SUBROUTINE pair_potential_bmhft_create(ft)
2051 cpassert(.NOT.
ASSOCIATED(ft))
2053 CALL pair_potential_bmhft_clean(ft)
2054 END SUBROUTINE pair_potential_bmhft_create
2062 SUBROUTINE pair_potential_bmhft_copy(ft_source, ft_dest)
2065 IF (.NOT.
ASSOCIATED(ft_source))
RETURN
2066 IF (
ASSOCIATED(ft_dest))
CALL pair_potential_bmhft_release(ft_dest)
2067 CALL pair_potential_bmhft_create(ft_dest)
2068 ft_dest%A = ft_source%A
2069 ft_dest%B = ft_source%B
2070 ft_dest%C = ft_source%C
2071 ft_dest%D = ft_source%D
2072 END SUBROUTINE pair_potential_bmhft_copy
2079 SUBROUTINE pair_potential_bmhft_clean(ft)
2082 IF (.NOT.
ASSOCIATED(ft))
RETURN
2087 END SUBROUTINE pair_potential_bmhft_clean
2094 SUBROUTINE pair_potential_bmhft_release(ft)
2097 IF (
ASSOCIATED(ft))
THEN
2101 END SUBROUTINE pair_potential_bmhft_release
2108 SUBROUTINE pair_potential_bmhftd_create(ftd)
2109 TYPE(ftd_pot_type),
POINTER :: ftd
2111 cpassert(.NOT.
ASSOCIATED(ftd))
2113 CALL pair_potential_bmhftd_clean(ftd)
2114 END SUBROUTINE pair_potential_bmhftd_create
2122 SUBROUTINE pair_potential_bmhftd_copy(ftd_source, ftd_dest)
2123 TYPE(ftd_pot_type),
POINTER :: ftd_source, ftd_dest
2125 IF (.NOT.
ASSOCIATED(ftd_source))
RETURN
2126 IF (
ASSOCIATED(ftd_dest))
CALL pair_potential_bmhftd_release(ftd_dest)
2127 CALL pair_potential_bmhftd_create(ftd_dest)
2128 ftd_dest%A = ftd_source%A
2129 ftd_dest%B = ftd_source%B
2130 ftd_dest%C = ftd_source%C
2131 ftd_dest%D = ftd_source%D
2132 ftd_dest%BD = ftd_source%BD
2133 END SUBROUTINE pair_potential_bmhftd_copy
2140 SUBROUTINE pair_potential_bmhftd_clean(ftd)
2141 TYPE(ftd_pot_type),
POINTER :: ftd
2143 IF (.NOT.
ASSOCIATED(ftd))
RETURN
2149 END SUBROUTINE pair_potential_bmhftd_clean
2156 SUBROUTINE pair_potential_bmhftd_release(ftd)
2157 TYPE(ftd_pot_type),
POINTER :: ftd
2159 IF (
ASSOCIATED(ftd))
THEN
2163 END SUBROUTINE pair_potential_bmhftd_release
2170 SUBROUTINE pair_potential_ipbv_create(ipbv)
2173 cpassert(.NOT.
ASSOCIATED(ipbv))
2175 CALL pair_potential_ipbv_clean(ipbv)
2176 END SUBROUTINE pair_potential_ipbv_create
2184 SUBROUTINE pair_potential_ipbv_copy(ipbv_source, ipbv_dest)
2187 IF (.NOT.
ASSOCIATED(ipbv_source))
RETURN
2188 IF (
ASSOCIATED(ipbv_dest))
CALL pair_potential_ipbv_release(ipbv_dest)
2189 CALL pair_potential_ipbv_create(ipbv_dest)
2190 ipbv_dest%a = ipbv_source%a
2191 ipbv_dest%rcore = ipbv_source%rcore
2192 ipbv_dest%b = ipbv_source%b
2193 ipbv_dest%m = ipbv_source%m
2194 END SUBROUTINE pair_potential_ipbv_copy
2201 SUBROUTINE pair_potential_ipbv_clean(ipbv)
2204 IF (.NOT.
ASSOCIATED(ipbv))
RETURN
2209 END SUBROUTINE pair_potential_ipbv_clean
2216 SUBROUTINE pair_potential_ipbv_release(ipbv)
2219 IF (
ASSOCIATED(ipbv))
THEN
2223 END SUBROUTINE pair_potential_ipbv_release
2230 SUBROUTINE pair_potential_buck4r_create(buck4r)
2231 TYPE(buck4ran_pot_type),
POINTER :: buck4r
2233 cpassert(.NOT.
ASSOCIATED(buck4r))
2235 CALL pair_potential_buck4r_clean(buck4r)
2236 END SUBROUTINE pair_potential_buck4r_create
2244 SUBROUTINE pair_potential_buck4r_copy(buck4r_source, buck4r_dest)
2245 TYPE(buck4ran_pot_type),
POINTER :: buck4r_source, buck4r_dest
2247 IF (.NOT.
ASSOCIATED(buck4r_source))
RETURN
2248 IF (
ASSOCIATED(buck4r_dest))
CALL pair_potential_buck4r_release(buck4r_dest)
2249 CALL pair_potential_buck4r_create(buck4r_dest)
2250 buck4r_dest%a = buck4r_source%a
2251 buck4r_dest%b = buck4r_source%b
2252 buck4r_dest%c = buck4r_source%c
2253 buck4r_dest%r1 = buck4r_source%r1
2254 buck4r_dest%r2 = buck4r_source%r2
2255 buck4r_dest%r3 = buck4r_source%r3
2256 buck4r_dest%poly1 = buck4r_source%poly1
2257 buck4r_dest%poly2 = buck4r_source%poly2
2258 buck4r_dest%npoly1 = buck4r_source%npoly1
2259 buck4r_dest%npoly2 = buck4r_source%npoly2
2260 END SUBROUTINE pair_potential_buck4r_copy
2267 SUBROUTINE pair_potential_buck4r_clean(buck4r)
2268 TYPE(buck4ran_pot_type),
POINTER :: buck4r
2270 IF (.NOT.
ASSOCIATED(buck4r))
RETURN
2277 buck4r%poly1 = 0.0_dp
2279 buck4r%poly2 = 0.0_dp
2281 END SUBROUTINE pair_potential_buck4r_clean
2288 SUBROUTINE pair_potential_buck4r_release(buck4r)
2289 TYPE(buck4ran_pot_type),
POINTER :: buck4r
2291 IF (
ASSOCIATED(buck4r))
THEN
2295 END SUBROUTINE pair_potential_buck4r_release
2302 SUBROUTINE pair_potential_buckmo_create(buckmo)
2303 TYPE(buckmorse_pot_type),
POINTER :: buckmo
2305 cpassert(.NOT.
ASSOCIATED(buckmo))
2307 CALL pair_potential_buckmo_clean(buckmo)
2308 END SUBROUTINE pair_potential_buckmo_create
2316 SUBROUTINE pair_potential_buckmo_copy(buckmo_source, buckmo_dest)
2317 TYPE(buckmorse_pot_type),
POINTER :: buckmo_source, buckmo_dest
2319 IF (.NOT.
ASSOCIATED(buckmo_source))
RETURN
2320 IF (
ASSOCIATED(buckmo_dest))
CALL pair_potential_buckmo_release(buckmo_dest)
2321 CALL pair_potential_buckmo_create(buckmo_dest)
2322 buckmo_dest%f0 = buckmo_source%f0
2323 buckmo_dest%a1 = buckmo_source%a1
2324 buckmo_dest%a2 = buckmo_source%a2
2325 buckmo_dest%b1 = buckmo_source%b1
2326 buckmo_dest%b2 = buckmo_source%b2
2327 buckmo_dest%c = buckmo_source%c
2328 buckmo_dest%d = buckmo_source%d
2329 buckmo_dest%r0 = buckmo_source%r0
2330 buckmo_dest%beta = buckmo_source%beta
2331 END SUBROUTINE pair_potential_buckmo_copy
2338 SUBROUTINE pair_potential_buckmo_clean(buckmo)
2339 TYPE(buckmorse_pot_type),
POINTER :: buckmo
2341 IF (.NOT.
ASSOCIATED(buckmo))
RETURN
2350 buckmo%beta = 0.0_dp
2351 END SUBROUTINE pair_potential_buckmo_clean
2358 SUBROUTINE pair_potential_buckmo_release(buckmo)
2359 TYPE(buckmorse_pot_type),
POINTER :: buckmo
2361 IF (
ASSOCIATED(buckmo))
THEN
2365 END SUBROUTINE pair_potential_buckmo_release
2372 SUBROUTINE pair_potential_tersoff_create(tersoff)
2375 cpassert(.NOT.
ASSOCIATED(tersoff))
2377 CALL pair_potential_tersoff_clean(tersoff)
2378 END SUBROUTINE pair_potential_tersoff_create
2386 SUBROUTINE pair_potential_tersoff_copy(tersoff_source, tersoff_dest)
2389 IF (.NOT.
ASSOCIATED(tersoff_source))
RETURN
2390 IF (
ASSOCIATED(tersoff_dest))
CALL pair_potential_tersoff_release(tersoff_dest)
2391 CALL pair_potential_tersoff_create(tersoff_dest)
2392 tersoff_dest%A = tersoff_source%A
2393 tersoff_dest%B = tersoff_source%B
2394 tersoff_dest%lambda1 = tersoff_source%lambda1
2395 tersoff_dest%lambda2 = tersoff_source%lambda2
2396 tersoff_dest%alpha = tersoff_source%alpha
2397 tersoff_dest%beta = tersoff_source%beta
2398 tersoff_dest%n = tersoff_source%n
2399 tersoff_dest%c = tersoff_source%c
2400 tersoff_dest%d = tersoff_source%d
2401 tersoff_dest%h = tersoff_source%h
2402 tersoff_dest%lambda3 = tersoff_source%lambda3
2403 tersoff_dest%bigR = tersoff_source%bigR
2404 tersoff_dest%bigD = tersoff_source%bigD
2405 tersoff_dest%rcutsq = tersoff_source%rcutsq
2406 END SUBROUTINE pair_potential_tersoff_copy
2413 SUBROUTINE pair_potential_tersoff_clean(tersoff)
2416 IF (.NOT.
ASSOCIATED(tersoff))
RETURN
2419 tersoff%lambda1 = 0.0_dp
2420 tersoff%lambda2 = 0.0_dp
2421 tersoff%alpha = 0.0_dp
2422 tersoff%beta = 0.0_dp
2427 tersoff%lambda3 = 0.0_dp
2428 tersoff%bigR = 0.0_dp
2429 tersoff%bigD = 0.0_dp
2430 tersoff%rcutsq = 0.0_dp
2431 END SUBROUTINE pair_potential_tersoff_clean
2438 SUBROUTINE pair_potential_tersoff_release(tersoff)
2441 IF (
ASSOCIATED(tersoff))
THEN
2442 DEALLOCATE (tersoff)
2445 END SUBROUTINE pair_potential_tersoff_release
2452 SUBROUTINE pair_potential_siepmann_create(siepmann)
2455 cpassert(.NOT.
ASSOCIATED(siepmann))
2457 CALL pair_potential_siepmann_clean(siepmann)
2458 END SUBROUTINE pair_potential_siepmann_create
2465 SUBROUTINE pair_potential_siepmann_copy(siepmann_source, siepmann_dest)
2468 IF (.NOT.
ASSOCIATED(siepmann_source))
RETURN
2469 IF (
ASSOCIATED(siepmann_dest))
CALL pair_potential_siepmann_release(siepmann_dest)
2470 CALL pair_potential_siepmann_create(siepmann_dest)
2471 siepmann_dest%B = siepmann_source%B
2472 siepmann_dest%D = siepmann_source%D
2473 siepmann_dest%E = siepmann_source%E
2474 siepmann_dest%F = siepmann_source%F
2475 siepmann_dest%beta = siepmann_source%beta
2476 siepmann_dest%rcutsq = siepmann_source%rcutsq
2477 siepmann_dest%allow_oh_formation = siepmann_source%allow_oh_formation
2478 siepmann_dest%allow_h3o_formation = siepmann_source%allow_h3o_formation
2479 siepmann_dest%allow_o_formation = siepmann_source%allow_o_formation
2481 END SUBROUTINE pair_potential_siepmann_copy
2488 SUBROUTINE pair_potential_siepmann_clean(siepmann)
2491 IF (.NOT.
ASSOCIATED(siepmann))
RETURN
2496 siepmann%beta = 0.0_dp
2497 siepmann%rcutsq = 0.0_dp
2498 siepmann%allow_oh_formation = .false.
2499 siepmann%allow_h3o_formation = .false.
2500 siepmann%allow_o_formation = .false.
2502 END SUBROUTINE pair_potential_siepmann_clean
2509 SUBROUTINE pair_potential_siepmann_release(siepmann)
2512 IF (
ASSOCIATED(siepmann))
THEN
2513 DEALLOCATE (siepmann)
2516 END SUBROUTINE pair_potential_siepmann_release
2523 SUBROUTINE pair_potential_gal_create(gal)
2526 cpassert(.NOT.
ASSOCIATED(gal))
2528 CALL pair_potential_gal_clean(gal)
2529 END SUBROUTINE pair_potential_gal_create
2537 SUBROUTINE pair_potential_gal_copy(gal_source, gal_dest)
2540 IF (.NOT.
ASSOCIATED(gal_source))
RETURN
2541 IF (
ASSOCIATED(gal_dest))
CALL pair_potential_gal_release(gal_dest)
2542 CALL pair_potential_gal_create(gal_dest)
2543 gal_dest%met1 = gal_source%met1
2544 gal_dest%met2 = gal_source%met2
2545 gal_dest%epsilon = gal_source%epsilon
2546 gal_dest%bxy = gal_source%bxy
2547 gal_dest%bz = gal_source%bz
2548 gal_dest%r1 = gal_source%r1
2549 gal_dest%r2 = gal_source%r2
2550 gal_dest%a1 = gal_source%a1
2551 gal_dest%a2 = gal_source%a2
2552 gal_dest%a3 = gal_source%a3
2553 gal_dest%a4 = gal_source%a4
2554 gal_dest%a = gal_source%a
2555 gal_dest%b = gal_source%b
2556 gal_dest%c = gal_source%c
2557 ALLOCATE (gal_dest%gcn(
SIZE(gal_source%gcn)))
2558 gal_dest%gcn = gal_source%gcn
2559 gal_dest%express = gal_source%express
2560 gal_dest%rcutsq = gal_source%rcutsq
2562 END SUBROUTINE pair_potential_gal_copy
2569 SUBROUTINE pair_potential_gal_clean(gal)
2572 IF (.NOT.
ASSOCIATED(gal))
RETURN
2573 gal%epsilon = 0.0_dp
2586 gal%express = .false.
2588 END SUBROUTINE pair_potential_gal_clean
2595 SUBROUTINE pair_potential_gal_release(gal)
2598 IF (
ASSOCIATED(gal))
THEN
2599 DEALLOCATE (gal%gcn)
2603 END SUBROUTINE pair_potential_gal_release
2610 SUBROUTINE pair_potential_gal21_create(gal21)
2613 cpassert(.NOT.
ASSOCIATED(gal21))
2615 CALL pair_potential_gal21_clean(gal21)
2616 END SUBROUTINE pair_potential_gal21_create
2624 SUBROUTINE pair_potential_gal21_copy(gal21_source, gal21_dest)
2627 IF (.NOT.
ASSOCIATED(gal21_source))
RETURN
2628 IF (
ASSOCIATED(gal21_dest))
CALL pair_potential_gal21_release(gal21_dest)
2629 CALL pair_potential_gal21_create(gal21_dest)
2630 gal21_dest%met1 = gal21_source%met1
2631 gal21_dest%met2 = gal21_source%met2
2632 gal21_dest%epsilon1 = gal21_source%epsilon1
2633 gal21_dest%epsilon2 = gal21_source%epsilon2
2634 gal21_dest%epsilon3 = gal21_source%epsilon3
2635 gal21_dest%bxy1 = gal21_source%bxy1
2636 gal21_dest%bxy2 = gal21_source%bxy2
2637 gal21_dest%bz1 = gal21_source%bz1
2638 gal21_dest%bz2 = gal21_source%bz2
2639 gal21_dest%r1 = gal21_source%r1
2640 gal21_dest%r2 = gal21_source%r2
2641 gal21_dest%a11 = gal21_source%a11
2642 gal21_dest%a12 = gal21_source%a12
2643 gal21_dest%a13 = gal21_source%a13
2644 gal21_dest%a21 = gal21_source%a21
2645 gal21_dest%a22 = gal21_source%a22
2646 gal21_dest%a23 = gal21_source%a23
2647 gal21_dest%a31 = gal21_source%a31
2648 gal21_dest%a32 = gal21_source%a32
2649 gal21_dest%a33 = gal21_source%a33
2650 gal21_dest%a41 = gal21_source%a41
2651 gal21_dest%a42 = gal21_source%a42
2652 gal21_dest%a43 = gal21_source%a43
2653 gal21_dest%AO1 = gal21_source%AO1
2654 gal21_dest%AO2 = gal21_source%AO2
2655 gal21_dest%BO1 = gal21_source%BO1
2656 gal21_dest%BO2 = gal21_source%BO2
2657 gal21_dest%c = gal21_source%c
2658 gal21_dest%AH1 = gal21_source%AH1
2659 gal21_dest%AH2 = gal21_source%AH2
2660 gal21_dest%BH1 = gal21_source%BH1
2661 gal21_dest%BH2 = gal21_source%BH2
2662 ALLOCATE (gal21_dest%gcn(
SIZE(gal21_source%gcn)))
2663 gal21_dest%gcn = gal21_source%gcn
2664 gal21_dest%express = gal21_source%express
2665 gal21_dest%rcutsq = gal21_source%rcutsq
2667 END SUBROUTINE pair_potential_gal21_copy
2674 SUBROUTINE pair_potential_gal21_clean(gal21)
2677 IF (.NOT.
ASSOCIATED(gal21))
RETURN
2678 gal21%epsilon1 = 0.0_dp
2679 gal21%epsilon2 = 0.0_dp
2680 gal21%epsilon3 = 0.0_dp
2708 gal21%rcutsq = 0.0_dp
2709 gal21%express = .false.
2711 END SUBROUTINE pair_potential_gal21_clean
2718 SUBROUTINE pair_potential_gal21_release(gal21)
2721 IF (
ASSOCIATED(gal21))
THEN
2722 DEALLOCATE (gal21%gcn)
2726 END SUBROUTINE pair_potential_gal21_release
2733 SUBROUTINE pair_potential_tab_create(tab)
2736 cpassert(.NOT.
ASSOCIATED(tab))
2738 NULLIFY (tab%r, tab%e, tab%f)
2739 CALL pair_potential_tab_clean(tab)
2740 END SUBROUTINE pair_potential_tab_create
2747 SUBROUTINE pair_potential_tab_copy(tab_source, tab_dest)
2750 IF (.NOT.
ASSOCIATED(tab_source))
RETURN
2751 IF (
ASSOCIATED(tab_dest))
CALL pair_potential_tab_release(tab_dest)
2752 CALL pair_potential_tab_create(tab_dest)
2753 tab_dest%tabpot_file_name = tab_source%tabpot_file_name
2754 tab_dest%dr = tab_source%dr
2755 tab_dest%rcut = tab_source%rcut
2756 tab_dest%npoints = tab_source%npoints
2757 tab_dest%index = tab_source%index
2759 CALL reallocate(tab_dest%r, 1, tab_dest%npoints)
2760 CALL reallocate(tab_dest%e, 1, tab_dest%npoints)
2761 CALL reallocate(tab_dest%f, 1, tab_dest%npoints)
2762 tab_dest%r = tab_source%r
2763 tab_dest%e = tab_source%e
2764 tab_dest%f = tab_source%f
2765 END SUBROUTINE pair_potential_tab_copy
2771 SUBROUTINE pair_potential_tab_clean(tab)
2774 IF (.NOT.
ASSOCIATED(tab))
RETURN
2775 tab%tabpot_file_name =
'NULL'
2784 END SUBROUTINE pair_potential_tab_clean
2790 SUBROUTINE pair_potential_tab_release(tab)
2793 IF (
ASSOCIATED(tab))
THEN
2794 IF (
ASSOCIATED(tab%r))
THEN
2797 IF (
ASSOCIATED(tab%e))
THEN
2800 IF (
ASSOCIATED(tab%f))
THEN
2805 END SUBROUTINE pair_potential_tab_release
Interface to ACE C wrapper.
Defines the basic variable types.
integer, parameter, public dp
integer, parameter, public default_string_length
integer, parameter, public default_path_length
Utility routines for the memory handling.
integer, parameter, public sh_sh
integer, parameter, public nosh_nosh
integer, parameter, public lj_charmm_type
integer, parameter, public allegro_type
integer, parameter, public bm_type
integer, dimension(22), parameter, public list_pot
integer, parameter, public gal_type
subroutine, public pair_potential_pp_release(potparm)
Release Data-structure that constains potential parameters.
integer, parameter, public nequip_type
integer, parameter, public wl_type
integer, parameter, public ft_type
integer, parameter, public tab_type
integer, parameter, public ftd_type
integer, parameter, public ip_type
subroutine, public pair_potential_p_release(potparm)
Release Data-structure that constains potential parameters.
integer, parameter, public lj_type
integer, parameter, public deepmd_type
subroutine, public pair_potential_single_copy(potparm_source, potparm_dest)
Copy two potential parameter type.
integer, parameter, public nn_type
subroutine, public pair_potential_reallocate(p, lb1_new, ub1_new, lj, lj_charmm, williams, goodwin, eam, quip, nequip, allegro, bmhft, bmhftd, ipbv, buck4r, buckmo, gp, tersoff, siepmann, gal, gal21, tab, deepmd, ace)
Cleans the potential parameter type.
integer, parameter, public multi_type
integer, parameter, public quip_type
integer, parameter, public gp_type
subroutine, public pair_potential_single_add(potparm_source, potparm_dest)
Add potential parameter type to an existing potential parameter type Used in case of multiple_potenti...
integer, parameter, public siepmann_type
integer, parameter, public nosh_sh
subroutine, public pair_potential_single_clean(potparm)
Cleans the potential parameter type.
subroutine, public pair_potential_lj_create(lj)
Cleans the LJ potential type.
integer, parameter, public ace_type
integer, dimension(2), parameter, public do_potential_single_allocation
subroutine, public compare_pot(pot1, pot2, compare)
compare two different potentials
integer, parameter, public gw_type
real(kind=dp), parameter, public not_initialized
subroutine, public pair_potential_pp_create(potparm, nkinds)
Data-structure that constains potential parameters.
integer, dimension(3), parameter, public list_sh_type
integer, dimension(2), parameter, public no_potential_single_allocation
integer, parameter, public b4_type
integer, parameter, public gal21_type
integer, dimension(2), public potential_single_allocation
integer, parameter, public ea_type
integer, parameter, public tersoff_type
routines for handling splines_types
subroutine, public spline_data_p_copy(spl_p_source, spl_p_dest)
Copy Data-structure of spline_data_p_type.
subroutine, public spline_factor_release(spline_factor)
releases spline_factor
subroutine, public spline_data_p_release(spl_p)
releases spline_data_p
subroutine, public spline_factor_copy(spline_factor_source, spline_factor_dest)
releases spline_factor