mirror of
https://github.com/LCPQ/quantum_package
synced 2024-08-25 14:01:46 +02:00
Review
This commit is contained in:
parent
1d1d680bdd
commit
14158742bf
@ -120,10 +120,11 @@ let run slave exe ezfio_file =
|
|||||||
| Some (_,x) -> x^" "
|
| Some (_,x) -> x^" "
|
||||||
| None -> assert false
|
| None -> assert false
|
||||||
in
|
in
|
||||||
|
let exit_code =
|
||||||
match (Sys.command (prefix^exe^ezfio_file)) with
|
match (Sys.command (prefix^exe^ezfio_file)) with
|
||||||
| 0 -> ()
|
| 0 -> 0
|
||||||
| i -> Printf.printf "Program exited with code %d.\n%!" i;
|
| i -> (Printf.printf "Program exited with code %d.\n%!" i; i)
|
||||||
;
|
in
|
||||||
|
|
||||||
TaskServer.stop ~port:port_number;
|
TaskServer.stop ~port:port_number;
|
||||||
Thread.join task_thread;
|
Thread.join task_thread;
|
||||||
@ -132,7 +133,8 @@ let run slave exe ezfio_file =
|
|||||||
|
|
||||||
let duration = Time.diff (Time.now()) time_start
|
let duration = Time.diff (Time.now()) time_start
|
||||||
|> Core.Span.to_string in
|
|> Core.Span.to_string in
|
||||||
Printf.printf "Wall time : %s\n\n" duration
|
Printf.printf "Wall time : %s\n\n" duration;
|
||||||
|
exit exit_code
|
||||||
|
|
||||||
let spec =
|
let spec =
|
||||||
let open Command.Spec in
|
let open Command.Spec in
|
||||||
|
@ -5,7 +5,6 @@ program scf
|
|||||||
! output: hartree_fock.energy
|
! output: hartree_fock.energy
|
||||||
! optional: mo_basis.mo_coef
|
! optional: mo_basis.mo_coef
|
||||||
END_DOC
|
END_DOC
|
||||||
! call debug
|
|
||||||
call create_guess
|
call create_guess
|
||||||
call orthonormalize_mos
|
call orthonormalize_mos
|
||||||
call run
|
call run
|
||||||
@ -56,7 +55,7 @@ subroutine run
|
|||||||
|
|
||||||
! Choose SCF algorithm
|
! Choose SCF algorithm
|
||||||
|
|
||||||
! call damping_SCF
|
! call damping_SCF ! Deprecated routine
|
||||||
call Roothaan_Hall_SCF
|
call Roothaan_Hall_SCF
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -309,16 +309,16 @@ def write_ezfio(res, filename):
|
|||||||
array_l_max_block.append(l_max_block)
|
array_l_max_block.append(l_max_block)
|
||||||
array_z_remove.append(z_remove)
|
array_z_remove.append(z_remove)
|
||||||
|
|
||||||
x = [[coef_n_zeta.split() for coef_n_zeta in l.split('\n')] \
|
x = [[ filter(None,coef_n_zeta.split()) for coef_n_zeta in l.split('\n')] \
|
||||||
for l in array_party[1:] ]
|
for l in array_party[1:] ]
|
||||||
x = []
|
# x = []
|
||||||
for l in array_party[1:]:
|
# for l in array_party[1:]:
|
||||||
y = []
|
# y = []
|
||||||
for coef_n_zeta in l.split('\n'):
|
# for coef_n_zeta in l.split('\n'):
|
||||||
z = coef_n_zeta.split()
|
# z = coef_n_zeta.split()
|
||||||
if z : y.append(z)
|
# if z : y.append(z)
|
||||||
x.append(y)
|
# x.append(y)
|
||||||
matrix.append(x)
|
# matrix.append(x)
|
||||||
return (matrix, array_l_max_block, array_z_remove)
|
return (matrix, array_l_max_block, array_z_remove)
|
||||||
|
|
||||||
def get_local_stuff(matrix):
|
def get_local_stuff(matrix):
|
||||||
@ -444,4 +444,12 @@ if __name__ == '__main__':
|
|||||||
print file_, 'recognized as', str(res_file).split('.')[-1].split()[0]
|
print file_, 'recognized as', str(res_file).split('.')[-1].split()[0]
|
||||||
|
|
||||||
write_ezfio(res_file, ezfio_file)
|
write_ezfio(res_file, ezfio_file)
|
||||||
os.system("qp_run save_ortho_mos "+ezfio_file)
|
if os.system("qp_run save_ortho_mos "+ezfio_file) != 0:
|
||||||
|
print """Warning: You need to run
|
||||||
|
|
||||||
|
qp_run save_ortho_mos """+ezfio_file+"""
|
||||||
|
|
||||||
|
to be sure your MOs will be orthogonal, which is not the case when
|
||||||
|
the MOs are read from output files (not enough precision in output)."""
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user