mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-22 04:13:31 +01:00
Merge branch 'master' of github.com:scemama/qmcchem
This commit is contained in:
commit
06e68216fb
@ -83,7 +83,7 @@ let hostname = lazy (
|
||||
try
|
||||
Unix.gethostname ()
|
||||
with
|
||||
| _ -> "localhost"
|
||||
| _ -> "127.0.0.1"
|
||||
)
|
||||
|
||||
|
||||
|
@ -100,7 +100,7 @@ let run ?(daemon=true) ezfio_filename =
|
||||
ZMQ.Socket.bind socket address;
|
||||
accu
|
||||
with
|
||||
| _ -> false;
|
||||
| _ -> false
|
||||
in
|
||||
ZMQ.Socket.close socket;
|
||||
result
|
||||
|
@ -12,13 +12,16 @@ let full_run ?(start_dataserver=true) ezfio_filename =
|
||||
|
||||
|
||||
(* Create the node file *)
|
||||
(*
|
||||
let () =
|
||||
let server_file =
|
||||
Filename.concat ezfio_filename "nodefile"
|
||||
in
|
||||
Out_channel.with_file server_file ~f:(fun out_channel ->
|
||||
Launcher.create_nodefile ()
|
||||
|> Out_channel.output_string out_channel
|
||||
) ;
|
||||
)
|
||||
*)
|
||||
|
||||
|
||||
(* Get the configuration of executables *)
|
||||
@ -32,7 +35,7 @@ let full_run ?(start_dataserver=true) ezfio_filename =
|
||||
if (start_dataserver) then
|
||||
begin
|
||||
(* Reset socket address in EZFIO *)
|
||||
Ezfio.set_simulation_http_server "tcp://localhost:65534";
|
||||
Ezfio.set_simulation_http_server "tcp://127.0.0.1:65534";
|
||||
|
||||
|
||||
(* Start the data server *)
|
||||
@ -64,7 +67,7 @@ let full_run ?(start_dataserver=true) ezfio_filename =
|
||||
ZMQ.Socket.send socket (Message.(to_string Test));
|
||||
ZMQ.Socket.recv socket
|
||||
) with
|
||||
| Unix.Unix_error _ ->
|
||||
| Unix.Unix_error (_,_,_) ->
|
||||
begin
|
||||
ZMQ.Socket.set_linger_period socket 1 ;
|
||||
ZMQ.Socket.close socket;
|
||||
|
124
src/det.irp.f
124
src/det.irp.f
@ -1467,30 +1467,6 @@ END_PROVIDER
|
||||
|
||||
END_PROVIDER
|
||||
|
||||
BEGIN_PROVIDER [ double precision, single_det_value ]
|
||||
&BEGIN_PROVIDER [ double precision, single_det_grad, (elec_num_8,3) ]
|
||||
&BEGIN_PROVIDER [ double precision, single_det_lapl, (elec_num) ]
|
||||
BEGIN_DOC
|
||||
! Value of a single determinant wave function from the 1st determinant
|
||||
END_DOC
|
||||
det_i = 1
|
||||
det_j = 1
|
||||
integer :: i
|
||||
single_det_value = det_alpha_value_curr * det_beta_value_curr
|
||||
do i=1,elec_alpha_num
|
||||
single_det_grad(i,1) = det_alpha_grad_lapl_curr(1,i) * det_beta_value_curr
|
||||
single_det_grad(i,2) = det_alpha_grad_lapl_curr(2,i) * det_beta_value_curr
|
||||
single_det_grad(i,3) = det_alpha_grad_lapl_curr(3,i) * det_beta_value_curr
|
||||
single_det_lapl(i) = det_alpha_grad_lapl_curr(4,i) * det_beta_value_curr
|
||||
enddo
|
||||
do i=elec_alpha_num+1,elec_num
|
||||
single_det_grad(i,1) = det_alpha_value_curr * det_beta_grad_lapl_curr(1,i)
|
||||
single_det_grad(i,2) = det_alpha_value_curr * det_beta_grad_lapl_curr(2,i)
|
||||
single_det_grad(i,3) = det_alpha_value_curr * det_beta_grad_lapl_curr(3,i)
|
||||
single_det_lapl(i) = det_alpha_value_curr * det_beta_grad_lapl_curr(4,i)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, psidet_value ]
|
||||
&BEGIN_PROVIDER [ double precision, psidet_inv ]
|
||||
@ -1609,62 +1585,26 @@ END_PROVIDER
|
||||
! Gradients
|
||||
! ---------
|
||||
|
||||
call dgemv('N',elec_alpha_num*4,det_alpha_num,1.d0, &
|
||||
det_alpha_grad_lapl, &
|
||||
size(det_alpha_grad_lapl,1)*size(det_alpha_grad_lapl,2), &
|
||||
CDb, 1, 0.d0, psidet_grad_lapl, 1)
|
||||
if (elec_beta_num /= 0) then
|
||||
call dgemv('N',elec_beta_num*4,det_beta_num,1.d0, &
|
||||
det_beta_grad_lapl(1,elec_alpha_num+1,1), &
|
||||
size(det_beta_grad_lapl,1)*size(det_beta_grad_lapl,2), &
|
||||
DaC, 1, 0.d0, psidet_grad_lapl(1,elec_alpha_num+1), 1)
|
||||
endif
|
||||
|
||||
if (do_pseudo) then
|
||||
do j=1,elec_num
|
||||
psidet_grad_lapl(1:4,j) = 0.d0
|
||||
pseudo_non_local(j) = 0.d0
|
||||
enddo
|
||||
|
||||
do i=1,det_alpha_num
|
||||
do j=1,elec_alpha_num
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do k=1,4
|
||||
psidet_grad_lapl(k,j) = psidet_grad_lapl(k,j) + det_alpha_grad_lapl(k,j,i)*CDb(i)
|
||||
enddo
|
||||
pseudo_non_local(j) = pseudo_non_local(j) + det_alpha_pseudo(j,i)*CDb(i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do i=1,det_beta_num
|
||||
do j=elec_alpha_num+1,elec_num
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do k=1,4
|
||||
psidet_grad_lapl(k,j) = psidet_grad_lapl(k,j) + det_beta_grad_lapl(k,j,i)*DaC(i)
|
||||
enddo
|
||||
pseudo_non_local(j) = pseudo_non_local(j) + det_beta_pseudo(j,i)*DaC(i)
|
||||
enddo
|
||||
enddo
|
||||
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do j=1,elec_num
|
||||
pseudo_non_local(j) = pseudo_non_local(j) * psidet_inv
|
||||
enddo
|
||||
|
||||
else
|
||||
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do j=1,elec_num
|
||||
psidet_grad_lapl(1:4,j) = 0.d0
|
||||
enddo
|
||||
|
||||
do i=1,det_alpha_num
|
||||
do j=1,elec_alpha_num
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do k=1,4
|
||||
psidet_grad_lapl(k,j) = psidet_grad_lapl(k,j) + det_alpha_grad_lapl(k,j,i)*CDb(i)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
do i=1,det_beta_num
|
||||
do j=elec_alpha_num+1,elec_num
|
||||
!DIR$ VECTOR ALIGNED
|
||||
do k=1,4
|
||||
psidet_grad_lapl(k,j) = psidet_grad_lapl(k,j) + det_beta_grad_lapl(k,j,i)*DaC(i)
|
||||
enddo
|
||||
enddo
|
||||
enddo
|
||||
|
||||
call dgemv('N',elec_alpha_num,det_alpha_num,psidet_inv, &
|
||||
det_alpha_pseudo, size(det_alpha_pseudo,1), &
|
||||
CDb, 1, 0.d0, pseudo_non_local, 1)
|
||||
if (elec_beta_num /= 0) then
|
||||
call dgemv('N',elec_beta_num,det_beta_num,psidet_inv, &
|
||||
det_beta_pseudo, size(det_beta_pseudo,1), &
|
||||
DaC, 1, 0.d0, pseudo_non_local(elec_alpha_num+1), 1)
|
||||
endif
|
||||
endif
|
||||
|
||||
END_PROVIDER
|
||||
@ -1748,7 +1688,7 @@ BEGIN_PROVIDER [ double precision, det_alpha_grad_lapl_curr, (4,elec_alpha_num)
|
||||
! imo = mo_list_alpha_curr(j)
|
||||
! do i=1,elec_alpha_num
|
||||
! do k=1,4
|
||||
! det_alpha_grad_lapl_curr(k,i) = det_alpha_grad_lapl_curr(k,i) + mo_grad_lapl(k,i,imo)*slater_matrix_alpha_inv_det(i,j)
|
||||
! det_alpha_grad_lapl_curr(k,i) = det_alpha_grad_lapl_curr(k,i) + mo_grad_lapl_alpha(k,i,imo)*slater_matrix_alpha_inv_det(i,j)
|
||||
! enddo
|
||||
! enddo
|
||||
! enddo
|
||||
@ -1905,3 +1845,27 @@ BEGIN_PROVIDER [ double precision, det_beta_grad_lapl_curr, (4,elec_alpha_num+1
|
||||
END_PROVIDER
|
||||
|
||||
|
||||
BEGIN_PROVIDER [ double precision, single_det_value ]
|
||||
&BEGIN_PROVIDER [ double precision, single_det_grad, (elec_num_8,3) ]
|
||||
&BEGIN_PROVIDER [ double precision, single_det_lapl, (elec_num) ]
|
||||
BEGIN_DOC
|
||||
! Value of a single determinant wave function from the 1st determinant
|
||||
END_DOC
|
||||
det_i = 1
|
||||
det_j = 1
|
||||
integer :: i
|
||||
single_det_value = det_alpha_value_curr * det_beta_value_curr
|
||||
do i=1,elec_alpha_num
|
||||
single_det_grad(i,1) = det_alpha_grad_lapl_curr(1,i) * det_beta_value_curr
|
||||
single_det_grad(i,2) = det_alpha_grad_lapl_curr(2,i) * det_beta_value_curr
|
||||
single_det_grad(i,3) = det_alpha_grad_lapl_curr(3,i) * det_beta_value_curr
|
||||
single_det_lapl(i) = det_alpha_grad_lapl_curr(4,i) * det_beta_value_curr
|
||||
enddo
|
||||
do i=elec_alpha_num+1,elec_num
|
||||
single_det_grad(i,1) = det_alpha_value_curr * det_beta_grad_lapl_curr(1,i)
|
||||
single_det_grad(i,2) = det_alpha_value_curr * det_beta_grad_lapl_curr(2,i)
|
||||
single_det_grad(i,3) = det_alpha_value_curr * det_beta_grad_lapl_curr(3,i)
|
||||
single_det_lapl(i) = det_alpha_value_curr * det_beta_grad_lapl_curr(4,i)
|
||||
enddo
|
||||
END_PROVIDER
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user