From 0cf264ff9240acacbbbb616735d1ec9e5d5786d6 Mon Sep 17 00:00:00 2001 From: Patrick Seewald Date: Fri, 1 Apr 2016 20:10:47 +0000 Subject: [PATCH] split long lines svn-origin-rev: 16770 --- src/admm_methods.F | 5 +- src/atom_basis.F | 5 +- src/atom_fit.F | 21 +- src/atom_kind_orbitals.F | 10 +- src/atom_types.F | 10 +- src/colvar_methods.F | 10 +- src/common/bibliography.F | 15 +- src/core_ae.F | 15 +- src/cp_dbcsr_operations.F | 3 +- src/cp_ddapc_types.F | 3 +- src/cp_ddapc_util.F | 3 +- src/dbcsr/dbcsr_performance_multiply.F | 3 +- src/dbcsr/ops/dbcsr_io.F | 12 +- src/distribution_methods.F | 8 +- src/dm_ls_chebyshev.F | 12 +- src/dm_ls_scf_methods.F | 6 +- src/emd/rt_make_propagators.F | 20 +- src/emd/rt_propagation_utils.F | 7 +- src/environment.F | 6 +- src/et_coupling.F | 4 +- src/ewalds_multipole.F | 3 +- src/ewalds_multipole_debug.F | 19 +- src/f77_interface.F | 3 +- src/fist_force.F | 3 +- src/force_fields_input.F | 3 +- src/hfx_derivatives.F | 12 +- src/hfx_energy_potential.F | 99 ++-- src/hfx_load_balance_methods.F | 48 +- src/hfx_screening_methods.F | 5 +- src/hfx_types.F | 3 +- src/hfxbase/hfx_compression_core_methods.F | 3 +- src/input/input_parsing.F | 3 +- src/input_cp2k_almo.F | 39 +- src/input_cp2k_atom.F | 7 +- src/input_cp2k_colvar.F | 35 +- src/input_cp2k_constraints.F | 47 +- src/input_cp2k_dft.F | 608 +++++++++++---------- src/input_cp2k_force_eval.F | 7 +- src/input_cp2k_free_energy.F | 23 +- src/input_cp2k_global.F | 197 +++---- src/input_cp2k_ls.F | 56 +- src/input_cp2k_mixed.F | 48 +- src/input_cp2k_mm.F | 113 ++-- src/input_cp2k_motion_print.F | 45 +- src/input_cp2k_mp2.F | 65 ++- src/input_cp2k_poisson.F | 185 ++++--- src/input_cp2k_properties_dft.F | 61 ++- src/input_cp2k_qmmm.F | 50 +- src/input_cp2k_rsgrid.F | 7 +- src/input_cp2k_subsys.F | 118 ++-- src/input_cp2k_transport.F | 28 +- src/input_cp2k_xc.F | 60 +- src/input_optimize_basis.F | 43 +- src/linesearch.F | 23 +- src/matrix_exp.F | 21 +- src/mode_selective.F | 19 +- src/motion/gopt_f77_methods.F | 5 +- src/motion/helium_interactions.F | 8 +- src/motion/helium_methods.F | 12 +- src/motion/input_cp2k_md.F | 7 +- src/motion/input_cp2k_vib.F | 78 +-- src/motion/mc/mc_ensembles.F | 20 +- src/motion/mc/mc_moves.F | 9 +- src/motion/mc/mc_types.F | 5 +- src/motion/mc/tamc_run.F | 11 +- src/motion/md_run.F | 5 +- src/motion/simpar_methods.F | 9 +- src/motion/thermostat/thermostat_methods.F | 10 +- src/mp2.F | 6 +- src/mp2_cphf.F | 10 +- src/mp2_direct_method.F | 30 +- src/mp2_gpw.F | 109 ++-- src/mp2_ri_gpw.F | 140 +++-- src/optimize_basis_utils.F | 3 +- src/pme.F | 3 +- src/preconditioner.F | 3 +- src/pw/pw_spline_utils.F | 3 +- src/qmmm_se_energy.F | 7 +- src/qmmm_se_forces.F | 7 +- src/qmmm_topology_util.F | 16 +- src/qmmmx_update.F | 5 +- src/qmmmx_util.F | 18 +- src/qs_collocate_density.F | 31 +- src/qs_dftb_matrices.F | 23 +- src/qs_environment_types.F | 3 +- src/qs_epr_hyp.F | 5 +- src/qs_gspace_mixing.F | 21 +- src/qs_integrate_potential_low.F | 22 +- src/qs_ks_utils.F | 3 +- src/qs_linres_current.F | 7 +- src/qs_localization_methods.F | 8 +- src/qs_neighbor_lists.F | 3 +- src/qs_pdos.F | 3 +- src/qs_scf_post_gpw.F | 12 +- src/qs_scf_wfn_mix.F | 3 +- src/rpa_im_time.F | 9 +- src/rpa_ri_gpw.F | 64 ++- src/rtp_admm_methods.F | 3 +- src/se_fock_matrix_coulomb.F | 28 +- src/semi_empirical_int_ana.F | 14 +- src/semi_empirical_store_int_types.F | 7 +- src/start/input_cp2k.F | 68 +-- src/start/input_cp2k_motion.F | 159 +++--- src/stm_images.F | 4 +- src/subsys/external_potential_types.F | 3 +- src/swarm/glbopt_input.F | 11 +- src/swarm/swarm_input.F | 14 +- src/task_list_methods.F | 9 +- src/tmc/input_cp2k_tmc.F | 9 +- src/xc/xc.F | 6 +- src/xc/xc_atom.F | 9 +- 111 files changed, 1866 insertions(+), 1521 deletions(-) diff --git a/src/admm_methods.F b/src/admm_methods.F index d5dbb1fed4..f477aaf5c2 100644 --- a/src/admm_methods.F +++ b/src/admm_methods.F @@ -1316,8 +1316,9 @@ CONTAINS IF (dft_control%nspins == 2) THEN CALL calc_spin_dep_aux_exch_ener(qs_env=qs_env, admm_env=admm_env, ener_k_ispin=ener_k(ispin), & ener_x_ispin=ener_x(ispin), ispin=ispin) - admm_env%lambda_merlot(ispin) = (trace_tmp+2.0_dp/3.0_dp*((admm_env%gsi(ispin))**(2.0_dp/3.0_dp))*ener_x(ispin)- & - ((admm_env%gsi(ispin))**(2.0_dp/3.0_dp))*trace_tmp_two)/(admm_env%n_large_basis(ispin)) + admm_env%lambda_merlot(ispin) = & + (trace_tmp+2.0_dp/3.0_dp*((admm_env%gsi(ispin))**(2.0_dp/3.0_dp))*ener_x(ispin)- & + ((admm_env%gsi(ispin))**(2.0_dp/3.0_dp))*trace_tmp_two)/(admm_env%n_large_basis(ispin)) ELSE admm_env%lambda_merlot(ispin) = (trace_tmp+(admm_env%gsi(ispin))**(2.0_dp/3.0_dp)* & diff --git a/src/atom_basis.F b/src/atom_basis.F index e43c4c7232..867c047568 100644 --- a/src/atom_basis.F +++ b/src/atom_basis.F @@ -377,8 +377,9 @@ CONTAINS DO kb = 1, basis%nbas(lb) ja = ibptr(ka, la) jb = ibptr(kb, lb) - smat(ja:ja+nna-1, jb:jb+nnb-1) = smat(ja:ja+nna-1, jb:jb+nnb-1)+ & - sab(1:nna, 1:nnb)*basis%cm(ia, ka, la)*basis%cm(ib, kb, lb) + smat(ja:ja+nna-1, jb:jb+nnb-1) = & + smat(ja:ja+nna-1, jb:jb+nnb-1)+ & + sab(1:nna, 1:nnb)*basis%cm(ia, ka, la)*basis%cm(ib, kb, lb) END DO END DO END IF diff --git a/src/atom_fit.F b/src/atom_fit.F index 7a858ef486..be9f0e9d86 100644 --- a/src/atom_fit.F +++ b/src/atom_fit.F @@ -757,7 +757,8 @@ CONTAINS ELSE WRITE (pc1, "(I2)") NINT(peig) END IF - CALL atom_orbital_charge(charge, atom%orbitals%wfna(:, k, l), atom%orbitals%rcmax(k, l, 1), l, atom%basis) + CALL atom_orbital_charge( & + charge, atom%orbitals%wfna(:, k, l), atom%orbitals%rcmax(k, l, 1), l, atom%basis) drho = charge-atom%orbitals%refchg(k, l, 1) pchg = pval(2, k, l, j, i)/afun*100._dp IF (pval(6, k, l, j, i) > 0.5_dp) THEN @@ -776,7 +777,8 @@ CONTAINS ELSE WRITE (pc1, "(I2)") NINT(peig) END IF - CALL atom_orbital_charge(charge, atom%orbitals%wfnb(:, k, l), atom%orbitals%rcmax(k, l, 2), l, atom%basis) + CALL atom_orbital_charge( & + charge, atom%orbitals%wfnb(:, k, l), atom%orbitals%rcmax(k, l, 2), l, atom%basis) drho = charge-atom%orbitals%refchg(k, l, 2) pchg = pval(4, k, l, j, i)/afun*100._dp IF (pval(8, k, l, j, i) > 0.5_dp) THEN @@ -881,7 +883,8 @@ CONTAINS ELSE WRITE (pc1, "(I2)") NINT(peig) END IF - CALL atom_orbital_charge(charge, atom%orbitals%wfn(:, k, l), atom%orbitals%rcmax(k, l, 1), l, atom%basis) + CALL atom_orbital_charge( & + charge, atom%orbitals%wfn(:, k, l), atom%orbitals%rcmax(k, l, 1), l, atom%basis) drho = charge-atom%orbitals%refchg(k, l, 1) pchg = pval(2, k, l, j, i)/afun*100._dp IF (pval(6, k, l, j, i) > 0.5_dp) THEN @@ -916,7 +919,8 @@ CONTAINS ELSE WRITE (pc1, "(I2)") NINT(peig) END IF - CALL atom_orbital_charge(charge, atom%orbitals%wfna(:, k, l), atom%orbitals%rcmax(k, l, 1), l, atom%basis) + CALL atom_orbital_charge( & + charge, atom%orbitals%wfna(:, k, l), atom%orbitals%rcmax(k, l, 1), l, atom%basis) drho = charge-atom%orbitals%refchg(k, l, 1) pchg = pval(2, k, l, j, i)/afun*100._dp IF (pval(6, k, l, j, i) > 0.5_dp) THEN @@ -935,7 +939,8 @@ CONTAINS ELSE WRITE (pc1, "(I2)") NINT(peig) END IF - CALL atom_orbital_charge(charge, atom%orbitals%wfnb(:, k, l), atom%orbitals%rcmax(k, l, 2), l, atom%basis) + CALL atom_orbital_charge( & + charge, atom%orbitals%wfnb(:, k, l), atom%orbitals%rcmax(k, l, 2), l, atom%basis) drho = charge-atom%orbitals%refchg(k, l, 2) pchg = pval(4, k, l, j, i)/afun*100._dp IF (pval(8, k, l, j, i) > 0.5_dp) THEN @@ -952,10 +957,12 @@ CONTAINS DO k = 1, np CALL atom_wfnr0(pv, atom%orbitals%wfna(:, k, 0), atom%basis) pchg = atom%weight*atom%orbitals%wpsir0(k, 1)*pv*pv/afun*100._dp - WRITE (iunit, '(" s-states"," N=",I5,T35,"Alpha Wavefunction at r=0:",T64,F13.6,"[",I2,"]")') k, pv, NINT(pchg) + WRITE (iunit, '(" s-states"," N=",I5,T35,"Alpha Wavefunction at r=0:",T64,F13.6,"[",I2,"]")') & + k, pv, NINT(pchg) CALL atom_wfnr0(pv, atom%orbitals%wfnb(:, k, 0), atom%basis) pchg = atom%weight*atom%orbitals%wpsir0(k, 2)*pv*pv/afun*100._dp - WRITE (iunit, '(" s-states"," N=",I5,T36,"Beta Wavefunction at r=0:",T64,F13.6,"[",I2,"]")') k, pv, NINT(pchg) + WRITE (iunit, '(" s-states"," N=",I5,T36,"Beta Wavefunction at r=0:",T64,F13.6,"[",I2,"]")') & + k, pv, NINT(pchg) END DO END IF END IF diff --git a/src/atom_kind_orbitals.F b/src/atom_kind_orbitals.F index f8efd4b3fb..aead1fc606 100644 --- a/src/atom_kind_orbitals.F +++ b/src/atom_kind_orbitals.F @@ -341,8 +341,9 @@ CONTAINS basis%bf(k, j, l) = basis%bf(k, j, l)+rk**l*ear*basis%cm(i, j, l) basis%dbf(k, j, l) = basis%dbf(k, j, l) & +(REAL(l, dp)*rk**(l-1)-2._dp*al*rk**(l+1))*ear*basis%cm(i, j, l) - basis%ddbf(k, j, l) = basis%ddbf(k, j, l)+(REAL(l*(l-1), dp)*rk**(l-2)- & - 2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))*ear*basis%cm(i, j, l) + basis%ddbf(k, j, l) = basis%ddbf(k, j, l)+ & + (REAL(l*(l-1), dp)*rk**(l-2)-2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))* & + ear*basis%cm(i, j, l) END DO END DO END DO @@ -1077,8 +1078,9 @@ CONTAINS basis%bf(k, j, l) = basis%bf(k, j, l)+rk**l*ear*basis%cm(i, j, l) basis%dbf(k, j, l) = basis%dbf(k, j, l) & +(REAL(l, dp)*rk**(l-1)-2._dp*al*rk**(l+1))*ear*basis%cm(i, j, l) - basis%ddbf(k, j, l) = basis%ddbf(k, j, l)+(REAL(l*(l-1), dp)*rk**(l-2)- & - 2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))*ear*basis%cm(i, j, l) + basis%ddbf(k, j, l) = basis%ddbf(k, j, l)+ & + (REAL(l*(l-1), dp)*rk**(l-2)-2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))* & + ear*basis%cm(i, j, l) END DO END DO END DO diff --git a/src/atom_types.F b/src/atom_types.F index 5f5f9ceb93..32369610f5 100644 --- a/src/atom_types.F +++ b/src/atom_types.F @@ -564,8 +564,9 @@ CONTAINS basis%bf(k, j, l) = basis%bf(k, j, l)+rk**l*ear*basis%cm(i, j, l) basis%dbf(k, j, l) = basis%dbf(k, j, l) & +(REAL(l, dp)*rk**(l-1)-2._dp*al*rk**(l+1))*ear*basis%cm(i, j, l) - basis%ddbf(k, j, l) = basis%ddbf(k, j, l)+(REAL(l*(l-1), dp)*rk**(l-2)- & - 2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))*ear*basis%cm(i, j, l) + basis%ddbf(k, j, l) = basis%ddbf(k, j, l)+ & + (REAL(l*(l-1), dp)*rk**(l-2)-2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))* & + ear*basis%cm(i, j, l) END DO END DO END DO @@ -782,8 +783,9 @@ CONTAINS gbasis%bf(k, j, l) = gbasis%bf(k, j, l)+rk**l*ear*gbasis%cm(i, j, l) gbasis%dbf(k, j, l) = gbasis%dbf(k, j, l) & +(REAL(l, dp)*rk**(l-1)-2._dp*al*rk**(l+1))*ear*gbasis%cm(i, j, l) - gbasis%ddbf(k, j, l) = gbasis%ddbf(k, j, l)+(REAL(l*(l-1), dp)*rk**(l-2)- & - 2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))*ear*gbasis%cm(i, j, l) + gbasis%ddbf(k, j, l) = gbasis%ddbf(k, j, l)+ & + (REAL(l*(l-1), dp)*rk**(l-2)-2._dp*al*REAL(2*l+1, dp)*rk**(l)+4._dp*al*rk**(l+2))* & + ear*gbasis%cm(i, j, l) END DO END DO END DO diff --git a/src/colvar_methods.F b/src/colvar_methods.F index a1b9260abc..239e66a579 100644 --- a/src/colvar_methods.F +++ b/src/colvar_methods.F @@ -4271,8 +4271,8 @@ CONTAINS DO i = 1, ncolv DO j = 1, colvar%reaction_path_param%colvar_p(i)%colvar%n_atom_s ii = ii+1 - fi(:, ii) = colvar%reaction_path_param%colvar_p(i)%colvar%dsdr(:, j)*lambda*(ds1(i, 1) & - /s1(2)/REAL(nconf-1, dp)-colvar%ss*ds1(i, 2)/s1(2))*2.0_dp + fi(:, ii) = colvar%reaction_path_param%colvar_p(i)%colvar%dsdr(:, j)*lambda* & + (ds1(i, 1)/s1(2)/REAL(nconf-1, dp)-colvar%ss*ds1(i, 2)/s1(2))*2.0_dp END DO END DO @@ -5128,7 +5128,8 @@ CONTAINS CALL rmsd3(my_particles, r, r0(:, 1), output_unit=-1, weights=weights, my_val=rmsd(1), rotate=.FALSE., drmsd3=drmsd(:, :, 1)) IF (nframes == 2) THEN - CALL rmsd3(my_particles, r, r0(:, 2), output_unit=-1, weights=weights, my_val=rmsd(2), rotate=.FALSE., drmsd3=drmsd(:, :, 2)) + CALL rmsd3(my_particles, r, r0(:, 2), output_unit=-1, weights=weights, & + my_val=rmsd(2), rotate=.FALSE., drmsd3=drmsd(:, :, 2)) f1 = 1.0_dp/(rmsd(1)+rmsd(2)) ! (rmsdA-rmsdB)/(rmsdA+rmsdB) @@ -5406,7 +5407,8 @@ CONTAINS count1 = v_count+1 DO i = p_bounds(1, count1), p_bounds(2, count1) gp(count1) = REAL(i, KIND=dp)*grid_sp(count1) - k = rec_eval_grid(iw1, ncol, f_vals, count1, gp, grid_sp, step_size, istart, iend, s1v, s1, p_bounds, lambda, ifunc, nconf) + k = rec_eval_grid(iw1, ncol, f_vals, count1, gp, grid_sp, step_size, & + istart, iend, s1v, s1, p_bounds, lambda, ifunc, nconf) END DO ELSE IF (v_count == ncol .AND. ifunc == 1) THEN DO i = istart, iend diff --git a/src/common/bibliography.F b/src/common/bibliography.F index 837f26e1bd..3b11e4b3ea 100644 --- a/src/common/bibliography.F +++ b/src/common/bibliography.F @@ -95,7 +95,8 @@ CONTAINS CALL add_reference(key=Ceriotti2012, ISI_record=s2a( & "AU Ceriotti, M", & " Manolopoulos, D", & - "TI Efficient First-Principles Calculation of the Quantum Kinetic Energy and Momentum Distribution of Nuclei", & + "TI Efficient First-Principles Calculation of the Quantum "// & + "Kinetic Energy and Momentum Distribution of Nuclei", & "SO PHYSICAL REVIEW LETTERS", & "PY 2012", & "VL 109", & @@ -127,7 +128,8 @@ CONTAINS " Norskov, J", & " Bligaard, T", & " Jacobsen, K", & - "TI Density functionals for surface science: Exchange-correlation model development with Bayesian error estimation", & + "TI Density functionals for surface science: Exchange-correlation "// & + "model development with Bayesian error estimation", & "SO PHYSICAL REVIEW B", & "PY 2012", & "VL 85", & @@ -1809,7 +1811,8 @@ CONTAINS "AU Chang, DT", & " Schenter, GK", & " Garrett, BC ", & - "TI Self-consistent polarization neglect of diatomic differential overlap: Applications to water clusters", & + "TI Self-consistent polarization neglect of diatomic differential overlap: "// & + "Applications to water clusters", & "SO JOURNAL OF CHEMICAL PHYSICS", & "SN 0021-9606", & "PD APR 28", & @@ -1903,7 +1906,8 @@ CONTAINS CALL add_reference(key=Kolafa2004, ISI_record=s2a( & "AU Kolafa, J", & - "TI Time-reversible always stable predictor-corrector method for molecular dynamics of polarizable molecules", & + "TI Time-reversible always stable predictor-corrector method for "// & + "molecular dynamics of polarizable molecules", & "SO JOURNAL OF COMPUTATIONAL CHEMISTRY", & "SN 0192-8651", & "J9 J COMPUT CHEM", & @@ -2711,7 +2715,8 @@ CONTAINS "AF Khaliullin, Rustam Z.", & " Bell, Alexis T.", & " Head-Gordon, Martin", & - "TI Analysis of charge transfer effects in molecular complexes based on absolutely localized molecular orbitals", & + "TI Analysis of charge transfer effects in molecular complexes "// & + "based on absolutely localized molecular orbitals", & "SO Journal of Chemical Physics", & "SN 0021-9606", & "PY 2008", & diff --git a/src/core_ae.F b/src/core_ae.F index 564c481c2c..c59391baa3 100644 --- a/src/core_ae.F +++ b/src/core_ae.F @@ -470,12 +470,15 @@ CONTAINS fa(3) = fa(3)-pab(icoa, icob)*(-zax2*habd(icap3+icax, icob)+ & REAL(la(3), KIND=dp)*habd(icam3+icax, icob)) - fb(1) = fb(1)-pab(icoa, icob)*(-zbx2*(habd(icap1+icax, icob)- & - rab(1)*habd(ic_a+icax, icob))+REAL(lb(1), KIND=dp)*habd(ic_a+icax, icbm1+icbx)) - fb(2) = fb(2)-pab(icoa, icob)*(-zbx2*(habd(icap2+icax, icob)- & - rab(2)*habd(ic_a+icax, icob))+REAL(lb(2), KIND=dp)*habd(ic_a+icax, icbm2+icbx)) - fb(3) = fb(3)-pab(icoa, icob)*(-zbx2*(habd(icap3+icax, icob)- & - rab(3)*habd(ic_a+icax, icob))+REAL(lb(3), KIND=dp)*habd(ic_a+icax, icbm3+icbx)) + fb(1) = fb(1)-pab(icoa, icob)*( & + -zbx2*(habd(icap1+icax, icob)-rab(1)*habd(ic_a+icax, icob))+ & + REAL(lb(1), KIND=dp)*habd(ic_a+icax, icbm1+icbx)) + fb(2) = fb(2)-pab(icoa, icob)*( & + -zbx2*(habd(icap2+icax, icob)-rab(2)*habd(ic_a+icax, icob))+ & + REAL(lb(2), KIND=dp)*habd(ic_a+icax, icbm2+icbx)) + fb(3) = fb(3)-pab(icoa, icob)*( & + -zbx2*(habd(icap3+icax, icob)-rab(3)*habd(ic_a+icax, icob))+ & + REAL(lb(3), KIND=dp)*habd(ic_a+icax, icbm3+icbx)) END DO ! ic_b END DO ! ic_a diff --git a/src/cp_dbcsr_operations.F b/src/cp_dbcsr_operations.F index 88516f5c42..a510b9750a 100644 --- a/src/cp_dbcsr_operations.F +++ b/src/cp_dbcsr_operations.F @@ -1349,7 +1349,8 @@ CONTAINS row_blk_size_tmp => row_blk_size col_blk_size_tmp => col_blk_size CALL cp_dbcsr_create(bc_mat, "Block-cyclic"//cp_dbcsr_name(matrix), bc_dist, & - dbcsr_type_no_symmetry, row_blk_size_tmp, col_blk_size_tmp, nze=0, data_type=cp_dbcsr_get_data_type(matrix), & + dbcsr_type_no_symmetry, row_blk_size_tmp, col_blk_size_tmp, & + nze=0, data_type=cp_dbcsr_get_data_type(matrix), & reuse_arrays=.TRUE.) CALL dbcsr_distribution_release(bc_dist) CALL cp_dbcsr_complete_redistribute(matrix, bc_mat) diff --git a/src/cp_ddapc_types.F b/src/cp_ddapc_types.F index 98b61f62aa..11e4e947e7 100644 --- a/src/cp_ddapc_types.F +++ b/src/cp_ddapc_types.F @@ -340,7 +340,8 @@ CONTAINS grid_print_section => section_vals_get_subs_vals(force_env_section, "PRINT%GRID_INFORMATION") CALL Setup_Ewald_Spline(pw_grid=cp_ddapc_ewald%pw_grid_qm, pw_pool=cp_ddapc_ewald%pw_pool_qm, & coeff=cp_ddapc_ewald%coeff_qm, LG=LG, gx=gx, gy=gy, gz=gz, hmat=hmat, npts=npts, & - param_section=multipole_section, tag="ddapc", para_env=para_env, print_section=grid_print_section) + param_section=multipole_section, tag="ddapc", & + para_env=para_env, print_section=grid_print_section) DEALLOCATE (LG) DEALLOCATE (gx) DEALLOCATE (gy) diff --git a/src/cp_ddapc_util.F b/src/cp_ddapc_util.F index b921bbe4bc..4806e2e7a6 100644 --- a/src/cp_ddapc_util.F +++ b/src/cp_ddapc_util.F @@ -420,7 +420,8 @@ CONTAINS !NB just returns rows, since dAm is symmetric, and missing columns can be !NB reconstructed with a simple transpose, as below CALL build_der_A_matrix_rows(dAm, cp_ddapc_env%gfunc, cp_ddapc_env%w, & - particle_set, radii, rho_tot_g, gcut, iparticle0, nparticles, g_dot_rvec_sin, g_dot_rvec_cos) + particle_set, radii, rho_tot_g, gcut, iparticle0, & + nparticles, g_dot_rvec_sin, g_dot_rvec_cos) !NB no more reduction of dbv and dAm - instead we go through with each node's contribution !NB and reduce resulting charges/forces once, at the end. Intermediate speedup can be !NB had by reducing dqv after the inner loop, and then other routines don't need to know diff --git a/src/dbcsr/dbcsr_performance_multiply.F b/src/dbcsr/dbcsr_performance_multiply.F index 96cddb5175..9dcd339a7d 100644 --- a/src/dbcsr/dbcsr_performance_multiply.F +++ b/src/dbcsr/dbcsr_performance_multiply.F @@ -647,7 +647,8 @@ CONTAINS ", ", dbcsr_get_matrix_type(m_b), & ", ", dbcsr_get_matrix_type(m_c), & ")" - WRITE (io_unit, '(T4,3(A,I6,A,I6),A)') "matrix sizes A(", r_a, " x", c_a, "), B(", r_b, " x", c_b, ") and C(", r_c, " x", c_c, ")" + WRITE (io_unit, '(T4,3(A,I6,A,I6),A)') & + "matrix sizes A(", r_a, " x", c_a, "), B(", r_b, " x", c_b, ") and C(", r_c, " x", c_c, ")" WRITE (io_unit, '(T4,A,I5)') 'numnodes = ', numnodes WRITE (io_unit, '(T4,A,I5)') 'nthreads = ', nthreads WRITE (io_unit, '(T4,A,E26.15)') 'checksum(A) = ', chksum_a diff --git a/src/dbcsr/ops/dbcsr_io.F b/src/dbcsr/ops/dbcsr_io.F index 918ef78b80..16d3169d3a 100644 --- a/src/dbcsr/ops/dbcsr_io.F +++ b/src/dbcsr/ops/dbcsr_io.F @@ -316,13 +316,15 @@ CONTAINS DO r = 1, rows IF (.NOT. t) THEN IF (PRESENT(variable_name)) THEN - WRITE (iunit, '(A,I4,A,I4,A,E23.16,A)') variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix(r+(c-1)*rows), ';' + WRITE (iunit, '(A,I4,A,I4,A,E23.16,A)') & + variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix(r+(c-1)*rows), ';' ELSE WRITE (iunit, '(A,I4,A,I4,A,E23.16,A)') 'a(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix(r+(c-1)*rows), ';' ENDIF ELSE IF (PRESENT(variable_name)) THEN - WRITE (iunit, '(A,I4,A,I4,A,E23.16,A)') variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix((r-1)*cols+c), ';' + WRITE (iunit, '(A,I4,A,I4,A,E23.16,A)') & + variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix((r-1)*cols+c), ';' ELSE WRITE (iunit, '(A,I4,A,I4,A,E23.16,A)') 'a(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix((r-1)*cols+c), ';' ENDIF @@ -372,13 +374,15 @@ CONTAINS DO r = 1, rows IF (.NOT. t) THEN IF (PRESENT(variable_name)) THEN - WRITE (iunit, '(A,I4,A,I4,A,E15.7,A)') variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix(r+(c-1)*rows), ';' + WRITE (iunit, '(A,I4,A,I4,A,E15.7,A)') & + variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix(r+(c-1)*rows), ';' ELSE WRITE (iunit, '(A,I4,A,I4,A,E15.7,A)') 'a(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix(r+(c-1)*rows), ';' ENDIF ELSE IF (PRESENT(variable_name)) THEN - WRITE (iunit, '(A,I4,A,I4,A,E15.7,A)') variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix((r-1)*cols+c), ';' + WRITE (iunit, '(A,I4,A,I4,A,E15.7,A)') & + variable_name//'(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix((r-1)*cols+c), ';' ELSE WRITE (iunit, '(A,I4,A,I4,A,E15.7,A)') 'a(', r+r_offset-1, ',', c+c_offset-1, ')=', matrix((r-1)*cols+c), ';' ENDIF diff --git a/src/distribution_methods.F b/src/distribution_methods.F index 569dcc5fa9..28cc44a4fe 100644 --- a/src/distribution_methods.F +++ b/src/distribution_methods.F @@ -226,8 +226,8 @@ CONTAINS DO imolecule = 1, nmolecule IF (has_prev_subsys_info) THEN DO imolecule_prev_kind = 1, SIZE(prev_molecule_kind_set) - IF (ANY(prev_local_molecules%list(imolecule_prev_kind)%array(1:prev_local_molecules%n_el(imolecule_prev_kind)) == & - molecule_list(imolecule))) THEN + IF (ANY(prev_local_molecules%list(imolecule_prev_kind)%array( & + 1:prev_local_molecules%n_el(imolecule_prev_kind)) == molecule_list(imolecule))) THEN ! molecule used to be local nmolecule_local(imolecule_kind) = nmolecule_local(imolecule_kind)+1 ENDIF @@ -274,8 +274,8 @@ CONTAINS is_local = .FALSE. IF (has_prev_subsys_info) THEN DO imolecule_prev_kind = 1, SIZE(prev_molecule_kind_set) - IF (ANY(prev_local_molecules%list(imolecule_prev_kind)%array(1:prev_local_molecules%n_el(imolecule_prev_kind)) == & - molecule_list(imolecule))) THEN + IF (ANY(prev_local_molecules%list(imolecule_prev_kind)%array( & + 1:prev_local_molecules%n_el(imolecule_prev_kind)) == molecule_list(imolecule))) THEN is_local = .TRUE. END IF END DO diff --git a/src/dm_ls_chebyshev.F b/src/dm_ls_chebyshev.F index c3e1f636a0..6ed4f5ad90 100644 --- a/src/dm_ls_chebyshev.F +++ b/src/dm_ls_chebyshev.F @@ -200,7 +200,8 @@ CONTAINS ! find largest and smallest eigenvalues CALL cp_dbcsr_arnoldi_extremal(matrix_F, max_ev, min_ev, converged=converged, max_iter=ls_scf_env%max_iter_lanczos, & threshold=ls_scf_env%eps_lanczos) !Lanczos algorithm to calculate eigenvalue - IF (unit_nr > 0) WRITE (unit_nr, '(T2,A,2F16.8,A,L2)') "smallest largest eigenvalue", min_ev, max_ev, " converged ", converged + IF (unit_nr > 0) WRITE (unit_nr, '(T2,A,2F16.8,A,L2)') & + "smallest largest eigenvalue", min_ev, max_ev, " converged ", converged IF (nwindow > 0) THEN IF (unit_nr > 0) WRITE (unit_nr, '(T2,A,1000F16.8)') "requested interval-min_energy", ev1(:) IF (unit_nr > 0) WRITE (unit_nr, '(T2,A,1000F16.8)') "requested interval-max_energy", ev2(:) @@ -266,8 +267,10 @@ CONTAINS DO iwindow = 1, nwindow CALL cp_dbcsr_copy(matrix_dummy1, matrix_tmp1) CALL cp_dbcsr_copy(matrix_dummy2(iwindow), matrix_tmp2) !matrix_dummy2= - CALL cp_dbcsr_scale(matrix_dummy1, kernel_g(1)*aitchev_T(1, iwindow)) !first term of chebyshev poly(matrix) - CALL cp_dbcsr_scale(matrix_dummy2(iwindow), 2.0_dp*kernel_g(2)*aitchev_T(2, iwindow)) !second term of chebyshev poly(matrix) + !first term of chebyshev poly(matrix) + CALL cp_dbcsr_scale(matrix_dummy1, kernel_g(1)*aitchev_T(1, iwindow)) + !second term of chebyshev poly(matrix) + CALL cp_dbcsr_scale(matrix_dummy2(iwindow), 2.0_dp*kernel_g(2)*aitchev_T(2, iwindow)) CALL cp_dbcsr_add(matrix_dummy2(iwindow), matrix_dummy1, 1.0_dp, 1.0_dp) END DO @@ -285,7 +288,8 @@ CONTAINS DO iwindow = 1, nwindow CALL cp_dbcsr_copy(matrix_dummy1, matrix_tmp2) - CALL cp_dbcsr_scale(matrix_dummy1, 2.0_dp*kernel_g(icheb+1)*aitchev_T(icheb+1, iwindow)) !second term of chebyshev poly(matrix) + !second term of chebyshev poly(matrix) + CALL cp_dbcsr_scale(matrix_dummy1, 2.0_dp*kernel_g(icheb+1)*aitchev_T(icheb+1, iwindow)) CALL cp_dbcsr_add(matrix_dummy2(iwindow), matrix_dummy1, 1.0_dp, 1.0_dp) CALL cp_dbcsr_trace(matrix_dummy2(iwindow), trace=trace_dm(iwindow)) !icheb+1 th coefficient diff --git a/src/dm_ls_scf_methods.F b/src/dm_ls_scf_methods.F index b9bcdee62f..04a81b8714 100644 --- a/src/dm_ls_scf_methods.F +++ b/src/dm_ls_scf_methods.F @@ -698,7 +698,8 @@ CONTAINS gamma_values(i) = gam IF (unit_nr > 0 .AND. .FALSE.) THEN - WRITE (unit_nr, *) "trace_fx", trace_fx, "trace_gx", trace_gx, "gam", gam, "frob_id", frob_id, "conv", ABS(frob_id/frob_x) + WRITE (unit_nr, *) "trace_fx", trace_fx, "trace_gx", trace_gx, "gam", gam, & + "frob_id", frob_id, "conv", ABS(frob_id/frob_x) ENDIF IF (do_dyn_threshold) THEN @@ -781,7 +782,8 @@ CONTAINS mu_fa = evaluate_trs4_polynomial(mu_a, gamma_values, i-1)-0.5_dp DO j = 1, 40 mu_c = 0.5*(mu_a+mu_b) - mu_fc = evaluate_trs4_polynomial(mu_c, gamma_values, i-1)-0.5_dp ! i-1 because in the last iteration, only convergence is checked + ! i-1 because in the last iteration, only convergence is checked + mu_fc = evaluate_trs4_polynomial(mu_c, gamma_values, i-1)-0.5_dp IF (ABS(mu_fc) < 1.0E-6_dp .OR. (mu_b-mu_a)/2 < 1.0E-6_dp) EXIT !TODO: define threshold values IF (mu_fc*mu_fa > 0) THEN diff --git a/src/emd/rt_make_propagators.F b/src/emd/rt_make_propagators.F index e9de7f02e2..93d8457ed7 100644 --- a/src/emd/rt_make_propagators.F +++ b/src/emd/rt_make_propagators.F @@ -301,23 +301,27 @@ CONTAINS prefac = -0.5_dp*dt CALL cp_dbcsr_scale(exp_H_old(im)%matrix, prefac) IF (.NOT. rtp%do_hfx .AND. rtp_control%fixed_ions) THEN - CALL bch_expansion_imaginary_propagator(exp_H_old(im)%matrix, & - rho_next(re)%matrix, rho_next(im)%matrix, rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) + CALL bch_expansion_imaginary_propagator( & + exp_H_old(im)%matrix, rho_next(re)%matrix, rho_next(im)%matrix, & + rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) ELSE CALL cp_dbcsr_scale(exp_H_old(re)%matrix, prefac) - CALL bch_expansion_complex_propagator(exp_H_old(re)%matrix, exp_H_old(im)%matrix, & - rho_next(re)%matrix, rho_next(im)%matrix, rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) + CALL bch_expansion_complex_propagator( & + exp_H_old(re)%matrix, exp_H_old(im)%matrix, rho_next(re)%matrix, rho_next(im)%matrix, & + rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) ENDIF END IF END IF CALL cp_dbcsr_copy(rho_new(re)%matrix, rho_next(re)%matrix) CALL cp_dbcsr_copy(rho_new(im)%matrix, rho_next(im)%matrix) IF (.NOT. rtp%do_hfx .AND. rtp_control%fixed_ions) THEN - CALL bch_expansion_imaginary_propagator(propagator_matrix(im)%matrix, & - rho_new(re)%matrix, rho_new(im)%matrix, rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) + CALL bch_expansion_imaginary_propagator( & + propagator_matrix(im)%matrix, rho_new(re)%matrix, rho_new(im)%matrix, & + rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) ELSE - CALL bch_expansion_complex_propagator(propagator_matrix(re)%matrix, propagator_matrix(im)%matrix, & - rho_new(re)%matrix, rho_new(im)%matrix, rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) + CALL bch_expansion_complex_propagator( & + propagator_matrix(re)%matrix, propagator_matrix(im)%matrix, rho_new(re)%matrix, rho_new(im)%matrix, & + rtp%filter_eps, rtp%filter_eps_small, rtp_control%eps_exp) ENDIF END DO diff --git a/src/emd/rt_propagation_utils.F b/src/emd/rt_propagation_utils.F index 651a0739f1..4165e39bdc 100644 --- a/src/emd/rt_propagation_utils.F +++ b/src/emd/rt_propagation_utils.F @@ -290,9 +290,10 @@ CONTAINS CALL cp_fm_get_info(mo_array(ispin)%mo_set%mo_coeff, ncol_global=ncol) alpha = 1.0_dp IF (SIZE(mo_array) == 1) alpha = 2*alpha - CALL cp_dbcsr_plus_fm_fm_t(sparse_matrix=rho_old(re)%matrix, & - matrix_v=mo_array(ispin)%mo_set%mo_coeff, matrix_g=mo_array(ispin)%mo_set%mo_coeff, ncol=ncol, & - keep_sparsity=.FALSE., alpha=alpha) + CALL cp_dbcsr_plus_fm_fm_t( & + sparse_matrix=rho_old(re)%matrix, & + matrix_v=mo_array(ispin)%mo_set%mo_coeff, matrix_g=mo_array(ispin)%mo_set%mo_coeff, ncol=ncol, & + keep_sparsity=.FALSE., alpha=alpha) END DO DO i = 1, nspin CALL cp_dbcsr_copy(rho_new(i)%matrix, rho_old(i)%matrix) diff --git a/src/environment.F b/src/environment.F index 99830f6c5b..94e7d6b775 100644 --- a/src/environment.F +++ b/src/environment.F @@ -766,9 +766,11 @@ CONTAINS WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") "MEMORY| Buffers ", Buffers, Buffers_min, Buffers_max, Buffers_avr WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") "MEMORY| Cached ", Cached, Cached_min, Cached_max, Cached_avr WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") "MEMORY| Slab ", Slab, Slab_min, Slab_max, Slab_avr - WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") "MEMORY| SReclaimable ", SReclaimable, SReclaimable_min, SReclaimable_max, & + WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") & + "MEMORY| SReclaimable ", SReclaimable, SReclaimable_min, SReclaimable_max, & SReclaimable_avr - WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") "MEMORY| MemLikelyFree ", MemLikelyFree, MemLikelyFree_min, MemLikelyFree_max, & + WRITE (UNIT=output_unit, FMT="(T2,A23,4I14)") & + "MEMORY| MemLikelyFree ", MemLikelyFree, MemLikelyFree_min, MemLikelyFree_max, & MemLikelyFree_avr WRITE (UNIT=output_unit, FMT='()') diff --git a/src/et_coupling.F b/src/et_coupling.F index a5d621b10c..986aeb49f1 100644 --- a/src/et_coupling.F +++ b/src/et_coupling.F @@ -656,8 +656,8 @@ CONTAINS IF (iatom .NE. jatom) THEN d_sum_Pm_dR(:, jatom) = d_sum_Pm_dR(:, jatom)+dP_i_dRj(:, iatom, jatom) - IF (is_constraint(iatom)) d_sum_const_dR(:, jatom) = d_sum_const_dR(:, jatom)+dP_i_dRj(:, iatom, jatom)* & - coefficients(iatom) + IF (is_constraint(iatom)) d_sum_const_dR(:, jatom) = & + d_sum_const_dR(:, jatom)+dP_i_dRj(:, iatom, jatom)*coefficients(iatom) END IF END DO ELSE diff --git a/src/ewalds_multipole.F b/src/ewalds_multipole.F index 3d82185e8d..95f973248a 100644 --- a/src/ewalds_multipole.F +++ b/src/ewalds_multipole.F @@ -112,7 +112,8 @@ CONTAINS ! ************************************************************************************************** RECURSIVE SUBROUTINE ewald_multipole_evaluate(ewald_env, ewald_pw, nonbond_env, & cell, particle_set, local_particles, energy_local, energy_glob, e_neut, e_self, & - task, do_correction_bonded, do_forces, do_stress, do_efield, radii, charges, dipoles, & + task, do_correction_bonded, do_forces, do_stress, & + do_efield, radii, charges, dipoles, & quadrupoles, forces_local, forces_glob, pv_local, pv_glob, efield0, efield1, & efield2, iw, do_debug, atomic_kind_set, mm_section) TYPE(ewald_environment_type), POINTER :: ewald_env diff --git a/src/ewalds_multipole_debug.F b/src/ewalds_multipole_debug.F index b2cc40a14d..ec4bb01936 100644 --- a/src/ewalds_multipole_debug.F +++ b/src/ewalds_multipole_debug.F @@ -773,8 +773,9 @@ SUBROUTINE debug_ewald_multipoles_fields(ewald_env, ewald_pw, nonbond_env, cell, e_neut = 0.0_dp e_self = 0.0_dp CALL ewald_multipole_evaluate(ewald_env, ewald_pw, nonbond_env, cell, particle_set, & - local_particles, energy_local, energy_glob, e_neut, e_self, task, .FALSE., .FALSE., .FALSE., & - .FALSE., radii, lcharges, dipoles, quadrupoles, iw=iw, do_debug=.FALSE.) + local_particles, energy_local, energy_glob, e_neut, e_self, & + task, .FALSE., .FALSE., .FALSE., .FALSE., radii, & + lcharges, dipoles, quadrupoles, iw=iw, do_debug=.FALSE.) ene(k) = energy_local+energy_glob+e_neut+e_self END DO pot = (ene(2)-ene(1))/(2.0_dp*dq) @@ -807,9 +808,10 @@ SUBROUTINE debug_ewald_multipoles_fields(ewald_env, ewald_pw, nonbond_env, cell, e_self = 0.0_dp efield0 = 0.0_dp CALL ewald_multipole_evaluate(ewald_env, ewald_pw, nonbond_env, cell, particle_set, & - local_particles, energy_local, energy_glob, e_neut, e_self, task, .FALSE., .TRUE., .TRUE., & - .TRUE., radii, charges, dipoles, quadrupoles, forces_local, forces_glob, pv_local, pv_glob, & - efield0, iw=iw, do_debug=.FALSE.) + local_particles, energy_local, energy_glob, e_neut, e_self, & + task, .FALSE., .TRUE., .TRUE., .TRUE., radii, & + charges, dipoles, quadrupoles, forces_local, forces_glob, & + pv_local, pv_glob, efield0, iw=iw, do_debug=.FALSE.) ene(k) = efield0(i) particle_set(i)%r(j) = coord(j) END DO @@ -847,9 +849,10 @@ SUBROUTINE debug_ewald_multipoles_fields(ewald_env, ewald_pw, nonbond_env, cell, e_self = 0.0_dp efield1 = 0.0_dp CALL ewald_multipole_evaluate(ewald_env, ewald_pw, nonbond_env, cell, particle_set, & - local_particles, energy_local, energy_glob, e_neut, e_self, task, .FALSE., .TRUE., .TRUE., & - .TRUE., radii, charges, dipoles, quadrupoles, forces_local, forces_glob, pv_local, pv_glob, & - efield1=efield1, iw=iw, do_debug=.FALSE.) + local_particles, energy_local, energy_glob, e_neut, e_self, & + task, .FALSE., .TRUE., .TRUE., .TRUE., radii, & + charges, dipoles, quadrupoles, forces_local, forces_glob, & + pv_local, pv_glob, efield1=efield1, iw=iw, do_debug=.FALSE.) enev(:, k) = efield1(:, i) particle_set(i)%r(j) = coord(j) END DO diff --git a/src/f77_interface.F b/src/f77_interface.F index 8115a63962..f191b52b77 100644 --- a/src/f77_interface.F +++ b/src/f77_interface.F @@ -536,7 +536,8 @@ CONTAINS !> f77_interface:create_force_env, f77_interface:destroy_force_env ! ************************************************************************************************** RECURSIVE SUBROUTINE create_force_env(new_env_id, input_declaration, input_path, & - output_path, mpi_comm, output_unit, owns_out_unit, input, ierr, work_dir, initial_variables) + output_path, mpi_comm, output_unit, owns_out_unit, & + input, ierr, work_dir, initial_variables) INTEGER, INTENT(out) :: new_env_id TYPE(section_type), POINTER :: input_declaration CHARACTER(len=*), INTENT(in) :: input_path diff --git a/src/fist_force.F b/src/fist_force.F index 43072195c7..9bccad7c23 100644 --- a/src/fist_force.F +++ b/src/fist_force.F @@ -1010,7 +1010,8 @@ CONTAINS dipole_type = "[Non Periodic]" DO i = 1, SIZE(particle_set) atomic_kind => particle_set(i)%atomic_kind - ria = particle_set(i)%r(:) ! no pbc(particle_set(i)%r(:),cell) so that the total dipole is the sum of the molecular dipoles + ! no pbc(particle_set(i)%r(:),cell) so that the total dipole is the sum of the molecular dipoles + ria = particle_set(i)%r(:) CALL get_atomic_kind(atomic_kind=atomic_kind, qeff=q) IF (ASSOCIATED(charges)) q = charges(i) dipole = dipole-q*(ria-rcc) diff --git a/src/force_fields_input.F b/src/force_fields_input.F index b415cdcab1..03f495a95b 100644 --- a/src/force_fields_input.F +++ b/src/force_fields_input.F @@ -367,7 +367,8 @@ CONTAINS END DO CALL read_bends_section(inp_info%bend_kind, inp_info%bend_a, inp_info%bend_b, inp_info%bend_c, & inp_info%bend_k, inp_info%bend_theta0, inp_info%bend_cb, & - inp_info%bend_r012, inp_info%bend_r032, inp_info%bend_kbs12, inp_info%bend_kbs32, inp_info%bend_kss, & + inp_info%bend_r012, inp_info%bend_r032, inp_info%bend_kbs12, & + inp_info%bend_kbs32, inp_info%bend_kss, & inp_info%bend_legendre, tmp_section, ntot) END IF tmp_section => section_vals_get_subs_vals(ff_section, "BEND") diff --git a/src/hfx_derivatives.F b/src/hfx_derivatives.F index 98dba21be2..8404dda108 100644 --- a/src/hfx_derivatives.F +++ b/src/hfx_derivatives.F @@ -1301,9 +1301,10 @@ CONTAINS cartesian_estimate = SET_EXPONENT(1.0_dp, estimate_to_store_int+1) IF (.NOT. buffer_overflow .AND. actual_x_data%memory_parameter%recalc_forces) THEN IF (cartesian_estimate < eps_schwarz) THEN - CALL hfx_add_single_cache_element(estimate_to_store_int, 6, & - maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & - use_disk_storage, max_val_memory) + CALL hfx_add_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & + use_disk_storage, max_val_memory) END IF END IF @@ -1447,8 +1448,9 @@ CONTAINS IF (use_virial .AND. spherical_estimate_virial*pmax_entry >= eps_schwarz) THEN DO coord = 1, 12 DO i = 1, 3 - T2 => primitive_forces_virial(((i-1)*12+coord-1)*nsgfa(iset)*nsgfb(jset)*nsgfc(kset)*nsgfd(lset)+1: & - ((i-1)*12+coord)*nsgfa(iset)*nsgfb(jset)*nsgfc(kset)*nsgfd(lset)) + T2 => primitive_forces_virial( & + ((i-1)*12+coord-1)*nsgfa(iset)*nsgfb(jset)*nsgfc(kset)*nsgfd(lset)+1: & + ((i-1)*12+coord)*nsgfa(iset)*nsgfb(jset)*nsgfc(kset)*nsgfd(lset)) IF (with_mp2_density) THEN CALL update_virial(nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & pbd_buf, pbc_buf, pad_buf, pac_buf, fac, & diff --git a/src/hfx_energy_potential.F b/src/hfx_energy_potential.F index afeb2d8d75..d5c1fc759d 100644 --- a/src/hfx_energy_potential.F +++ b/src/hfx_energy_potential.F @@ -1466,13 +1466,15 @@ CONTAINS IF (.NOT. buffer_overflow .AND. .NOT. geometry_did_change) THEN nints = current_counter IF (.NOT. use_disk_storage) THEN - CALL hfx_get_single_cache_element(estimate_to_store_int, 6, & - maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & - use_disk_storage) + CALL hfx_get_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & + use_disk_storage) ELSE - CALL hfx_get_single_cache_element(estimate_to_store_int, 6, & - maxval_cache_disk, maxval_container_disk, memory_parameter%actual_memory_usage_disk, & - use_disk_storage) + CALL hfx_get_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache_disk, maxval_container_disk, memory_parameter%actual_memory_usage_disk, & + use_disk_storage) END IF spherical_estimate = SET_EXPONENT(1.0_dp, estimate_to_store_int+1) IF (spherical_estimate*pmax_entry < eps_schwarz) CYCLE @@ -1550,13 +1552,15 @@ CONTAINS IF (.NOT. buffer_overflow .AND. geometry_did_change) THEN IF (cartesian_estimate < eps_schwarz) THEN IF (.NOT. use_disk_storage) THEN - CALL hfx_add_single_cache_element(estimate_to_store_int, 6, & - maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & - use_disk_storage, max_val_memory) + CALL hfx_add_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & + use_disk_storage, max_val_memory) ELSE - CALL hfx_add_single_cache_element(estimate_to_store_int, 6, & - maxval_cache_disk, maxval_container_disk, memory_parameter%actual_memory_usage_disk, & - use_disk_storage) + CALL hfx_add_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache_disk, maxval_container_disk, memory_parameter%actual_memory_usage_disk, & + use_disk_storage) END IF END IF END IF @@ -1575,13 +1579,15 @@ CONTAINS IF (.NOT. buffer_overflow .AND. geometry_did_change) THEN IF (.NOT. use_disk_storage) THEN - CALL hfx_add_single_cache_element(estimate_to_store_int, 6, & - maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & - use_disk_storage, max_val_memory) + CALL hfx_add_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache, maxval_container, memory_parameter%actual_memory_usage, & + use_disk_storage, max_val_memory) ELSE - CALL hfx_add_single_cache_element(estimate_to_store_int, 6, & - maxval_cache_disk, maxval_container_disk, memory_parameter%actual_memory_usage_disk, & - use_disk_storage) + CALL hfx_add_single_cache_element( & + estimate_to_store_int, 6, & + maxval_cache_disk, maxval_container_disk, memory_parameter%actual_memory_usage_disk, & + use_disk_storage) END IF END IF spherical_estimate = SET_EXPONENT(1.0_dp, estimate_to_store_int+1) @@ -1631,43 +1637,48 @@ CONTAINS END IF !!! DEBUG, print out primitive integrals and indices. Only works serial no OMP !!! IF (.FALSE.) THEN - CALL print_integrals(iatom, jatom, katom, latom, shm_set_offset, shm_atomic_block_offset, & - iset, jset, kset, lset, nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), primitive_integrals) + CALL print_integrals( & + iatom, jatom, katom, latom, shm_set_offset, shm_atomic_block_offset, & + iset, jset, kset, lset, nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), primitive_integrals) ENDIF IF (.NOT. is_anti_symmetric) THEN !! Update Kohn-Sham matrix - CALL update_fock_matrix(nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & - fac, symm_fac, full_density_alpha(:, 1), full_ks_alpha(:, 1), & - primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & - kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & - iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & - atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) + CALL update_fock_matrix( & + nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & + fac, symm_fac, full_density_alpha(:, 1), full_ks_alpha(:, 1), & + primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & + kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & + iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & + atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) IF (.NOT. treat_lsd_in_core) THEN IF (nspins == 2) THEN - CALL update_fock_matrix(nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & - fac, symm_fac, full_density_beta(:, 1), full_ks_beta(:, 1), & - primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & - kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & - iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & - atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) + CALL update_fock_matrix( & + nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & + fac, symm_fac, full_density_beta(:, 1), full_ks_beta(:, 1), & + primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & + kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & + iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & + atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) END IF END IF ELSE !! Update Kohn-Sham matrix - CALL update_fock_matrix_as(nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & - fac, symm_fac, full_density_alpha(:, 1), full_ks_alpha(:, 1), & - primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & - kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & - iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & - atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) + CALL update_fock_matrix_as( & + nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & + fac, symm_fac, full_density_alpha(:, 1), full_ks_alpha(:, 1), & + primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & + kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & + iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & + atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) IF (.NOT. treat_lsd_in_core) THEN IF (nspins == 2) THEN - CALL update_fock_matrix_as(nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & - fac, symm_fac, full_density_beta(:, 1), full_ks_beta(:, 1), & - primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & - kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & - iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & - atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) + CALL update_fock_matrix_as( & + nsgfa(iset), nsgfb(jset), nsgfc(kset), nsgfd(lset), & + fac, symm_fac, full_density_beta(:, 1), full_ks_beta(:, 1), & + primitive_integrals, pbd_buf, pbc_buf, pad_buf, pac_buf, kbd_buf, & + kbc_buf, kad_buf, kac_buf, iatom, jatom, katom, latom, & + iset, jset, kset, lset, offset_bd_set, offset_bc_set, offset_ad_set, offset_ac_set, & + atomic_offset_bd, atomic_offset_bc, atomic_offset_ad, atomic_offset_ac) END IF END IF END IF diff --git a/src/hfx_load_balance_methods.F b/src/hfx_load_balance_methods.F index f8d9574cdc..d58db39499 100644 --- a/src/hfx_load_balance_methods.F +++ b/src/hfx_load_balance_methods.F @@ -276,29 +276,31 @@ CONTAINS new_jatom_end = iatom_end tmp_blocks(current_block_id)%istart = new_iatom_start tmp_blocks(current_block_id)%iend = new_iatom_end - tmp_blocks(current_block_id)%cost = estimate_block_cost(natom, nkind, list_ij, list_kl, set_list_ij, set_list_kl, & - new_iatom_start, new_iatom_end, new_iatom_start, new_iatom_end, & - new_iatom_start, new_iatom_end, new_iatom_start, new_iatom_end, & - particle_set, & - coeffs_set, coeffs_kind, & - is_assoc_atomic_block_global, do_periodic, & - kind_of, basis_parameter, pmax_set, pmax_atom, pmax_blocks, & - cell, & - do_p_screening, map_atom_to_kind_atom, eval_type, & - log10_eps_schwarz, log_2, coeffs_kind_max0, use_virial, atomic_pair_list) + tmp_blocks(current_block_id)%cost = estimate_block_cost( & + natom, nkind, list_ij, list_kl, set_list_ij, set_list_kl, & + new_iatom_start, new_iatom_end, new_iatom_start, new_iatom_end, & + new_iatom_start, new_iatom_end, new_iatom_start, new_iatom_end, & + particle_set, & + coeffs_set, coeffs_kind, & + is_assoc_atomic_block_global, do_periodic, & + kind_of, basis_parameter, pmax_set, pmax_atom, pmax_blocks, & + cell, & + do_p_screening, map_atom_to_kind_atom, eval_type, & + log10_eps_schwarz, log_2, coeffs_kind_max0, use_virial, atomic_pair_list) current_block_id = current_block_id+1 tmp_blocks(current_block_id)%istart = new_jatom_start tmp_blocks(current_block_id)%iend = new_jatom_end - tmp_blocks(current_block_id)%cost = estimate_block_cost(natom, nkind, list_ij, list_kl, set_list_ij, set_list_kl, & - new_jatom_start, new_jatom_end, new_jatom_start, new_jatom_end, & - new_jatom_start, new_jatom_end, new_jatom_start, new_jatom_end, & - particle_set, & - coeffs_set, coeffs_kind, & - is_assoc_atomic_block_global, do_periodic, & - kind_of, basis_parameter, pmax_set, pmax_atom, pmax_blocks, & - cell, & - do_p_screening, map_atom_to_kind_atom, eval_type, & - log10_eps_schwarz, log_2, coeffs_kind_max0, use_virial, atomic_pair_list) + tmp_blocks(current_block_id)%cost = estimate_block_cost( & + natom, nkind, list_ij, list_kl, set_list_ij, set_list_kl, & + new_jatom_start, new_jatom_end, new_jatom_start, new_jatom_end, & + new_jatom_start, new_jatom_end, new_jatom_start, new_jatom_end, & + particle_set, & + coeffs_set, coeffs_kind, & + is_assoc_atomic_block_global, do_periodic, & + kind_of, basis_parameter, pmax_set, pmax_atom, pmax_blocks, & + cell, & + do_p_screening, map_atom_to_kind_atom, eval_type, & + log10_eps_schwarz, log_2, coeffs_kind_max0, use_virial, atomic_pair_list) ELSE tmp_blocks(current_block_id)%istart = iatom_start tmp_blocks(current_block_id)%iend = iatom_end @@ -1798,7 +1800,8 @@ CONTAINS p5 = p(5); p6 = p(6); p7 = p(7); p8 = p(8) p9 = p(9); p10 = p(10); p11 = p(11); p12 = p(12) res = poly2(nsa, p1, p2, p3)*poly2(nsb, p1, p2, p3)*poly2(nsc, p1, p2, p3)*poly2(nsd, p1, p2, p3)* & - poly2(npgfa, p4, p5, p6)*poly2(npgfb, p4, p5, p6)*poly2(npgfc, p4, p5, p6)*poly2(npgfd, p4, p5, p6)*EXP(-p7*ratio+p8*ratio**2)+ & + poly2(npgfa, p4, p5, p6)*poly2(npgfb, p4, p5, p6)*poly2(npgfc, p4, p5, p6)* & + poly2(npgfd, p4, p5, p6)*EXP(-p7*ratio+p8*ratio**2)+ & 1000.0_dp*p9+poly2(nsa, p10, p11, p12)*poly2(nsb, p10, p11, p12)*poly2(nsc, p10, p11, p12)*poly2(nsd, p10, p11, p12) res = 1+ABS(res) END FUNCTION estimate_basic @@ -2456,7 +2459,8 @@ CONTAINS DO i = 1, nranks DO j = 1, bins_per_rank(i)/2 k = k+1 - WRITE (iw, FMT="(T6,I5,T15,I5,T27,I16,T55,F19.8)") i-1, j, buffer_out(2*(k-1)+1), REAL(buffer_out(2*k), dp)/10000.0_dp + WRITE (iw, FMT="(T6,I5,T15,I5,T27,I16,T55,F19.8)") & + i-1, j, buffer_out(2*(k-1)+1), REAL(buffer_out(2*k), dp)/10000.0_dp summary(2*(i-1)+1) = summary(2*(i-1)+1)+buffer_out(2*(k-1)+1) summary(2*i) = summary(2*i)+buffer_out(2*k) END DO diff --git a/src/hfx_screening_methods.F b/src/hfx_screening_methods.F index a9f0baf6a9..237f523836 100644 --- a/src/hfx_screening_methods.F +++ b/src/hfx_screening_methods.F @@ -770,8 +770,9 @@ CONTAINS rp(:) = ra(:)+rap(:) rb(:) = ra(:)+rab(:) cutoff = 1.0_dp - R1 = exp_radius_very_extended(la, la, lb, lb, ra=ra, rb=rb, rp=rp, & - zetp=zetp, eps=eps_schwarz, prefactor=prefactor, cutoff=cutoff, epsin=1.0E-12_dp) + R1 = exp_radius_very_extended( & + la, la, lb, lb, ra=ra, rb=rb, rp=rp, & + zetp=zetp, eps=eps_schwarz, prefactor=prefactor, cutoff=cutoff, epsin=1.0E-12_dp) R_max = MAX(R_max, R1) END DO END DO diff --git a/src/hfx_types.F b/src/hfx_types.F index 1e77f63405..9d71fe21b9 100644 --- a/src/hfx_types.F +++ b/src/hfx_types.F @@ -810,7 +810,8 @@ CONTAINS actual_x_data%maxval_container_disk%file_counter = 1 actual_x_data%maxval_container_disk%desc = 'Max_' actual_x_data%maxval_container_disk%unit = -1 - WRITE (actual_x_data%maxval_container_disk%filename, '(A,I0,A,A,A)') TRIM(actual_x_data%memory_parameter%storage_location), & + WRITE (actual_x_data%maxval_container_disk%filename, '(A,I0,A,A,A)') & + TRIM(actual_x_data%memory_parameter%storage_location), & storage_id, "_", actual_x_data%maxval_container_disk%desc, "6" CALL compress(actual_x_data%maxval_container_disk%filename, .TRUE.) ALLOCATE (actual_x_data%integral_containers_disk(64)) diff --git a/src/hfxbase/hfx_compression_core_methods.F b/src/hfxbase/hfx_compression_core_methods.F index 21ef1a7b36..3c4f97fec6 100644 --- a/src/hfxbase/hfx_compression_core_methods.F +++ b/src/hfxbase/hfx_compression_core_methods.F @@ -173,7 +173,8 @@ CONTAINS data_tmp = full_data(idata) pack_tmp = ISHFT(data_tmp, 64-Nbits+i_odd_bits) ! put the missing bits on the left if pack_tmp ibits_remaining = 64-Nbits+i_odd_bits - pack_tmp = ISHFT(pack_tmp, -MIN(Nbits, ibits_remaining)) ! shift to make place, but not more than the number of available bits + ! shift to make place, but not more than the number of available bits + pack_tmp = ISHFT(pack_tmp, -MIN(Nbits, ibits_remaining)) ENDIF ENDDO diff --git a/src/input/input_parsing.F b/src/input/input_parsing.F index abd31d33e0..5046d703fb 100644 --- a/src/input/input_parsing.F +++ b/src/input/input_parsing.F @@ -254,7 +254,8 @@ CONTAINS CALL section_typo_match(typo_match_section, TRIM(section%name), TRIM(token), "", & typo_matching_rank, typo_matching_line, bonus=0) DO imatch = 1, SIZE(typo_matching_rank) - WRITE (output_unit, '(T2,A,1X,I0)') TRIM(typo_matching_line(imatch))//" score: ", typo_matching_rank(imatch) + WRITE (output_unit, '(T2,A,1X,I0)') & + TRIM(typo_matching_line(imatch))//" score: ", typo_matching_rank(imatch) ENDDO ENDIF CALL cp_abort(__LOCATION__, & diff --git a/src/input_cp2k_almo.F b/src/input_cp2k_almo.F index b6f13380f7..098d85a322 100644 --- a/src/input_cp2k_almo.F +++ b/src/input_cp2k_almo.F @@ -103,25 +103,26 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="DELOCALIZE_METHOD", & - description="Methods to reintroduce electron delocalization, which is excluded "// & - "with the block-diagonal ALMO reference. Electron delocalization can "// & - "be computed using either fully delocalized MOs or spatially restricted "// & - "ALMOs (called extended ALMOs or XALMOs). All methods below use a PCG "// & - "optimizer controlled by XALMO_OPTIMIZER_PCG. The only exception is "// & - "the non-iterative XALMO_1DIAG.", & - usage="DELOCALIZE_METHOD XALMO_X", & - default_i_val=almo_deloc_xalmo_x, & - enum_c_vals=s2a("NONE", "XALMO_1DIAG", "XALMO_X", "XALMO_SCF", "FULL_X", "FULL_SCF", "FULL_X_THEN_SCF"), & - enum_desc=s2a("Neglect electron delocalization", & - "Correction based on one diagonalization of the spatially projected Hamiltonian (XALMO)", & - "Single excitation correction (no Hamiltonian re-build) with spatial restrictions (XALMO)", & - "Self-consistent treatment of delocalization with spatial restrictions (XALMO)", & - "Single excitation correction (no Hamiltonian re-build) without spatial restrictions", & - "Self-consistent treatment of delocalization without spatial restrictions", & - "Single excitation correction followed by full SCF procedure, both without spatial restrictions"), & - enum_i_vals=(/almo_deloc_none, almo_deloc_xalmo_1diag, almo_deloc_xalmo_x, almo_deloc_xalmo_scf, & - almo_deloc_x, almo_deloc_scf, almo_deloc_x_then_scf/)) + CALL keyword_create( & + keyword, name="DELOCALIZE_METHOD", & + description="Methods to reintroduce electron delocalization, which is excluded "// & + "with the block-diagonal ALMO reference. Electron delocalization can "// & + "be computed using either fully delocalized MOs or spatially restricted "// & + "ALMOs (called extended ALMOs or XALMOs). All methods below use a PCG "// & + "optimizer controlled by XALMO_OPTIMIZER_PCG. The only exception is "// & + "the non-iterative XALMO_1DIAG.", & + usage="DELOCALIZE_METHOD XALMO_X", & + default_i_val=almo_deloc_xalmo_x, & + enum_c_vals=s2a("NONE", "XALMO_1DIAG", "XALMO_X", "XALMO_SCF", "FULL_X", "FULL_SCF", "FULL_X_THEN_SCF"), & + enum_desc=s2a("Neglect electron delocalization", & + "Correction based on one diagonalization of the spatially projected Hamiltonian (XALMO)", & + "Single excitation correction (no Hamiltonian re-build) with spatial restrictions (XALMO)", & + "Self-consistent treatment of delocalization with spatial restrictions (XALMO)", & + "Single excitation correction (no Hamiltonian re-build) without spatial restrictions", & + "Self-consistent treatment of delocalization without spatial restrictions", & + "Single excitation correction followed by full SCF procedure, both without spatial restrictions"), & + enum_i_vals=(/almo_deloc_none, almo_deloc_xalmo_1diag, almo_deloc_xalmo_x, almo_deloc_xalmo_scf, & + almo_deloc_x, almo_deloc_scf, almo_deloc_x_then_scf/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_atom.F b/src/input_cp2k_atom.F index 6432db6a68..0d4693a22d 100644 --- a/src/input_cp2k_atom.F +++ b/src/input_cp2k_atom.F @@ -229,9 +229,10 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "FIT_DENSITY", & - description="Fit the total electronic density to a linear combination of Gaussian functions", & - print_level=high_print_level, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "FIT_DENSITY", & + description="Fit the total electronic density to a linear combination of Gaussian functions", & + print_level=high_print_level, filename="__STD_OUT__") CALL keyword_create(keyword, name="NUM_GTO", & description="Number of Gaussian type functions for density fit", & usage="NUM_GTO integer ", type_of_var=integer_t, & diff --git a/src/input_cp2k_colvar.F b/src/input_cp2k_colvar.F index d27aece9c1..6fd180d627 100644 --- a/src/input_cp2k_colvar.F +++ b/src/input_cp2k_colvar.F @@ -1209,10 +1209,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="WEIGHTS", & - description="Specifies the weights for a weighted geometrical center. Default is 1/natoms for every atom", & - usage="WEIGHTS {real} {real} {real} {real}", & - n_var=-1, type_of_var=real_t, repeats=.TRUE.) + CALL keyword_create( & + keyword, name="WEIGHTS", & + description="Specifies the weights for a weighted geometrical center. Default is 1/natoms for every atom", & + usage="WEIGHTS {real} {real} {real} {real}", & + n_var=-1, type_of_var=real_t, repeats=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1936,13 +1937,14 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="LAMBDA", & - description="Specifies the exponent of the Gaussian used in the integral representation of the colvar."// & - "The shape of the space orthogonal to the reaction path is defined by this choice. "// & - "In the limit of large values, it is given by the plane orthogonal to the path."// & - "In practice, modest values are required for stable numerical integration.", & - usage="LAMBDA {real}", & - type_of_var=real_t, default_r_val=5.0_dp) + CALL keyword_create( & + keyword, name="LAMBDA", & + description="Specifies the exponent of the Gaussian used in the integral representation of the colvar."// & + "The shape of the space orthogonal to the reaction path is defined by this choice. "// & + "In the limit of large values, it is given by the plane orthogonal to the path."// & + "In practice, modest values are required for stable numerical integration.", & + usage="LAMBDA {real}", & + type_of_var=real_t, default_r_val=5.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1961,11 +1963,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL cp_print_key_section_create(print_key, name="MAP", & - description="Activating this print key will print once a file with the values of the FUNCTION on a grid "// & - "of COLVAR values in a specified range. "// & - "GRID_SPACING and RANGE for every COLVAR has to be specified again in the same order as they are in the input.", & - print_level=high_print_level, filename="PATH") + CALL cp_print_key_section_create( & + print_key, name="MAP", & + description="Activating this print key will print once a file with the values of the FUNCTION on a grid "// & + "of COLVAR values in a specified range. "// & + "GRID_SPACING and RANGE for every COLVAR has to be specified again in the same order as they are in the input.", & + print_level=high_print_level, filename="PATH") CALL keyword_create(keyword, name="RANGE", & description="The range of of the grid of the COLVAR.", & diff --git a/src/input_cp2k_constraints.F b/src/input_cp2k_constraints.F index 331369b17b..30e185865a 100644 --- a/src/input_cp2k_constraints.F +++ b/src/input_cp2k_constraints.F @@ -139,9 +139,10 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "lagrange_multipliers", & - description="Prints out the lagrange multipliers of the specified constraints during an MD.", & - print_level=high_print_level, filename="") + CALL cp_print_key_section_create( & + print_key, "lagrange_multipliers", & + description="Prints out the lagrange multipliers of the specified constraints during an MD.", & + print_level=high_print_level, filename="") CALL section_add_subsection(section, print_key) CALL section_release(print_key) @@ -389,28 +390,30 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MM_SUBSYS", & - variants=(/"PROTEIN"/), & - description="In a QM/MM run all MM atoms are fixed according to the argument.", & - usage="MM_SUBSYS (NONE|ATOMIC|MOLECULAR)", & - enum_c_vals=s2a("NONE", "ATOMIC", "MOLECULAR"), & - enum_i_vals=(/do_constr_none, do_constr_atomic, do_constr_molec/), & - enum_desc=s2a("fix nothing", & - "only the MM atoms itself", & - "the full molecule/residue that contains a MM atom (i.e. some QM atoms might be fixed as well)"), & - default_i_val=do_constr_none, repeats=.FALSE.) + CALL keyword_create( & + keyword, name="MM_SUBSYS", & + variants=(/"PROTEIN"/), & + description="In a QM/MM run all MM atoms are fixed according to the argument.", & + usage="MM_SUBSYS (NONE|ATOMIC|MOLECULAR)", & + enum_c_vals=s2a("NONE", "ATOMIC", "MOLECULAR"), & + enum_i_vals=(/do_constr_none, do_constr_atomic, do_constr_molec/), & + enum_desc=s2a("fix nothing", & + "only the MM atoms itself", & + "the full molecule/residue that contains a MM atom (i.e. some QM atoms might be fixed as well)"), & + default_i_val=do_constr_none, repeats=.FALSE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="QM_SUBSYS", & - description="In a QM/MM run all QM atoms are fixed according to the argument.", & - usage="QM_SUBSYS (NONE|ATOMIC|MOLECULAR)", & - enum_c_vals=s2a("NONE", "ATOMIC", "MOLECULAR"), & - enum_desc=s2a("fix nothing", & - "only the QM atoms itself", & - "the full molecule/residue that contains a QM atom (i.e. some MM atoms might be fixed as well)"), & - enum_i_vals=(/do_constr_none, do_constr_atomic, do_constr_molec/), & - default_i_val=do_constr_none, repeats=.FALSE.) + CALL keyword_create( & + keyword, name="QM_SUBSYS", & + description="In a QM/MM run all QM atoms are fixed according to the argument.", & + usage="QM_SUBSYS (NONE|ATOMIC|MOLECULAR)", & + enum_c_vals=s2a("NONE", "ATOMIC", "MOLECULAR"), & + enum_desc=s2a("fix nothing", & + "only the QM atoms itself", & + "the full molecule/residue that contains a QM atom (i.e. some MM atoms might be fixed as well)"), & + enum_i_vals=(/do_constr_none, do_constr_atomic, do_constr_molec/), & + default_i_val=do_constr_none, repeats=.FALSE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_dft.F b/src/input_cp2k_dft.F index 8fce001e00..ac0a28557c 100644 --- a/src/input_cp2k_dft.F +++ b/src/input_cp2k_dft.F @@ -570,9 +570,10 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MAX_CRAZY_ANGLE", & - description="Largest allowed angle for the crazy rotations algorithm (smaller is slower but more stable).", & - usage="MAX_CRAZY_ANGLE 0.1", unit_str="rad", default_r_val=0.2_dp) + CALL keyword_create( & + keyword, name="MAX_CRAZY_ANGLE", & + description="Largest allowed angle for the crazy rotations algorithm (smaller is slower but more stable).", & + usage="MAX_CRAZY_ANGLE 0.1", unit_str="rad", default_r_val=0.2_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -588,16 +589,18 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="USE_HISTORY", & - description="Generate an improved initial guess based on a history of results, which is useful during MD."// & - "Will only work if the number of states to be localized remains constant.", & - usage="USE_HISTORY ", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="USE_HISTORY", & + description="Generate an improved initial guess based on a history of results, which is useful during MD."// & + "Will only work if the number of states to be localized remains constant.", & + usage="USE_HISTORY ", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_OCCUPATION", & - description="Tolerance in the occupation number to select only fully occupied orbitals for the rotation", & - usage="EPS_OCCUPATION 1.E-5", default_r_val=1.0E-8_dp) + CALL keyword_create( & + keyword, name="EPS_OCCUPATION", & + description="Tolerance in the occupation number to select only fully occupied orbitals for the rotation", & + usage="EPS_OCCUPATION 1.E-5", default_r_val=1.0E-8_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -623,21 +626,22 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="METHOD", & - description="Method of optimization if any", & - usage="METHOD (JACOBI|CRAZY|DIRECT|L1SD|NONE)", & - enum_c_vals=s2a("NONE", "JACOBI", "CRAZY", "L1SD", "DIRECT"), & - enum_i_vals=(/do_loc_none, & - do_loc_jacobi, & - do_loc_crazy, & - do_loc_l1_norm_sd, & - do_loc_direct/), & - enum_desc=s2a("No localization is applied", & - "Using 2 x 2 rotations of the orbitals, slow but robust", & - "A new fast method is applied, might be slightly less robust than jacobi, but usually much faster", & - "Steepest descent minimization of an approximate l1 norm", & - "Using a direct minimisation approach"), & - default_i_val=do_loc_jacobi) + CALL keyword_create( & + keyword, name="METHOD", & + description="Method of optimization if any", & + usage="METHOD (JACOBI|CRAZY|DIRECT|L1SD|NONE)", & + enum_c_vals=s2a("NONE", "JACOBI", "CRAZY", "L1SD", "DIRECT"), & + enum_i_vals=(/do_loc_none, & + do_loc_jacobi, & + do_loc_crazy, & + do_loc_l1_norm_sd, & + do_loc_direct/), & + enum_desc=s2a("No localization is applied", & + "Using 2 x 2 rotations of the orbitals, slow but robust", & + "A new fast method is applied, might be slightly less robust than jacobi, but usually much faster", & + "Steepest descent minimization of an approximate l1 norm", & + "Using a direct minimisation approach"), & + default_i_val=do_loc_jacobi) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -711,15 +715,16 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword=keyword, & - name="ENERGY_RANGE", & - description="Select the orbitals to be localized within the given energy range."// & - "This type of selection cannot be added on top of the selection through a LIST. It reads to reals that are"// & - " lower and higher boundaries of the energy range.", & - usage=" ENERGY_RANGE lower_bound {real}, higher_bound {real}", & - repeats=.FALSE., & - n_var=2, default_r_vals=(/0._dp, 0._dp/), unit_str='eV', & - type_of_var=real_t) + CALL keyword_create( & + keyword=keyword, & + name="ENERGY_RANGE", & + description="Select the orbitals to be localized within the given energy range."// & + "This type of selection cannot be added on top of the selection through a LIST. It reads to reals that are"// & + " lower and higher boundaries of the energy range.", & + usage=" ENERGY_RANGE lower_bound {real}, higher_bound {real}", & + repeats=.FALSE., & + n_var=2, default_r_vals=(/0._dp, 0._dp/), unit_str='eV', & + type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1087,10 +1092,11 @@ CONTAINS default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MATRIX_VXC", & - description="If the printkey is activated compute and print the matrix of the exchange and correlation potential."// & - "Only the GGA part for GPW is printed", & - default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="MATRIX_VXC", & + description="If the printkey is activated compute and print the matrix of the exchange and correlation potential."// & + "Only the GGA part for GPW is printed", & + default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) CALL keyword_create(keyword, name="ORTHO", & @@ -1109,14 +1115,16 @@ CONTAINS default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PSO", & - description="If the printkey is activated controls the printing of the paramagnetic spin-orbit matrices", & - default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="PSO", & + description="If the printkey is activated controls the printing of the paramagnetic spin-orbit matrices", & + default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EFG", & - description="If the printkey is activated controls the printing of the electric field gradient matrices", & - default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="EFG", & + description="If the printkey is activated controls the printing of the electric field gradient matrices", & + default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) CALL keyword_create(keyword, name="POTENTIAL_ENERGY", & @@ -1153,10 +1161,11 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "MO", & - description="Controls the printing of the molecular orbitals."// & - "Note that this is only functional with diagonalization based methods, in particular not with OT (see MO_CUBES)", & - print_level=high_print_level, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "MO", & + description="Controls the printing of the molecular orbitals."// & + "Note that this is only functional with diagonalization based methods, in particular not with OT (see MO_CUBES)", & + print_level=high_print_level, filename="__STD_OUT__") CALL keyword_create(keyword, name="Cartesian", & description="If the printkey is activated controls the printing of the mo in the cartesian basis", & default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) @@ -1453,14 +1462,15 @@ CONTAINS ! !Printing of Moments CALL create_dipoles_section(print_key, "MOMENTS", high_print_level) - CALL keyword_create(keyword=keyword, & - name="MAX_MOMENT", & - description="Maximum moment to be calculated. Values higher than 1 not implemented under periodic boundaries.", & - usage="MAX_MOMENT {integer}", & - repeats=.FALSE., & - n_var=1, & - type_of_var=integer_t, & - default_i_val=1) + CALL keyword_create( & + keyword=keyword, & + name="MAX_MOMENT", & + description="Maximum moment to be calculated. Values higher than 1 not implemented under periodic boundaries.", & + usage="MAX_MOMENT {integer}", & + repeats=.FALSE., & + n_var=1, & + type_of_var=integer_t, & + default_i_val=1) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) CALL keyword_create(keyword=keyword, & @@ -1838,10 +1848,11 @@ CONTAINS default_i_val=0) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="nhomo", & - description="If the printkey is activated controls the number of homos that dumped as a cube (-1=all),"// & - " eigenvalues are always all dumped", & - default_i_val=1) + CALL keyword_create( & + keyword, name="nhomo", & + description="If the printkey is activated controls the number of homos that dumped as a cube (-1=all),"// & + " eigenvalues are always all dumped", & + default_i_val=1) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) @@ -1886,10 +1897,11 @@ CONTAINS lone_keyword_l_val=.TRUE.) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="NLUMO", & - description="Number of virtual orbitals to be added to the MO set (-1=all)."//newline// & - "CAUTION: Setting this value to be higher than the number of states present may cause a Cholesky error.", & - usage="NLUMO integer", default_i_val=0) + CALL keyword_create( & + keyword, name="NLUMO", & + description="Number of virtual orbitals to be added to the MO set (-1=all)."//newline// & + "CAUTION: Setting this value to be higher than the number of states present may cause a Cholesky error.", & + usage="NLUMO integer", default_i_val=0) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) CALL keyword_create(keyword, name="OUT_EACH_MO", & @@ -2163,10 +2175,11 @@ CONTAINS description="Controls printing of molecular states ", & print_level=high_print_level, filename=" ", citations=(/Hunt2003/)) - CALL keyword_create(keyword, name="CUBE_EVAL_RANGE", & - description="only write cubes if the eigenvalues of the corresponding molecular states lie in the given interval. "// & - "Default is all states.", & - usage="CUBE_EVAL_RANGE -1.0 1.0", unit_str="hartree", n_var=2, type_of_var=real_t) + CALL keyword_create( & + keyword, name="CUBE_EVAL_RANGE", & + description="only write cubes if the eigenvalues of the corresponding molecular states lie in the given interval. "// & + "Default is all states.", & + usage="CUBE_EVAL_RANGE -1.0 1.0", unit_str="hartree", n_var=2, type_of_var=real_t) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) @@ -2215,10 +2228,11 @@ CONTAINS description="Controls printing of molecular states ", & print_level=high_print_level, filename=" ") - CALL keyword_create(keyword, name="CUBE_EVAL_RANGE", & - description="only write cubes if the eigenvalues of the corresponding molecular states lie in the given interval. "// & - "Default is all states.", & - usage="CUBE_EVAL_RANGE -1.0 1.0", unit_str="hartree", n_var=2, type_of_var=real_t) + CALL keyword_create( & + keyword, name="CUBE_EVAL_RANGE", & + description="only write cubes if the eigenvalues of the corresponding molecular states lie in the given interval. "// & + "Default is all states.", & + usage="CUBE_EVAL_RANGE -1.0 1.0", unit_str="hartree", n_var=2, type_of_var=real_t) CALL section_add_keyword(print_key, keyword) CALL keyword_release(keyword) @@ -2282,10 +2296,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_GVG_RSPACE", & - variants=(/"EPS_GVG"/), & - description="Sets precision of the realspace KS matrix element integration. Overrides SQRT(EPS_DEFAULT) value", & - usage="EPS_GVG_RSPACE real", type_of_var=real_t) + CALL keyword_create( & + keyword, name="EPS_GVG_RSPACE", & + variants=(/"EPS_GVG"/), & + description="Sets precision of the realspace KS matrix element integration. Overrides SQRT(EPS_DEFAULT) value", & + usage="EPS_GVG_RSPACE real", type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -2295,10 +2310,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_KG_ORB", & - description="Sets precision used in coloring the subsets for the Kim-Gordon method. Overrides SQRT(EPS_DEFAULT) value", & - usage="EPS_KG_ORB 1.0E-8", & - type_of_var=real_t) + CALL keyword_create( & + keyword, name="EPS_KG_ORB", & + description="Sets precision used in coloring the subsets for the Kim-Gordon method. Overrides SQRT(EPS_DEFAULT) value", & + usage="EPS_KG_ORB 1.0E-8", & + type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -2308,9 +2324,10 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_PPNL", & - description="Sets precision of the non-local part of the pseudo potential. Overrides sqrt(EPS_DEFAULT) value", & - usage="EPS_PPNL real", type_of_var=real_t) + CALL keyword_create( & + keyword, name="EPS_PPNL", & + description="Sets precision of the non-local part of the pseudo potential. Overrides sqrt(EPS_DEFAULT) value", & + usage="EPS_PPNL real", type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -2381,14 +2398,15 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="FORCE_PAW", & - description="Use the GAPW scheme also for atoms with soft basis sets, i.e. "// & - " the local densities are computed even if hard and soft should be equal. "// & - "If this keyword is not set to true, those atoms with soft basis sets are treated by a GPW scheme, i.e. "// & - "the corresponding density contribution goes on the global grid and is expanded in PW. "// & - " This option nullifies the effect of the GPW_TYPE in the atomic KIND", & - usage="FORCE_PAW", & - default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="FORCE_PAW", & + description="Use the GAPW scheme also for atoms with soft basis sets, i.e. "// & + " the local densities are computed even if hard and soft should be equal. "// & + "If this keyword is not set to true, those atoms with soft basis sets are treated by a GPW scheme, i.e. "// & + "the corresponding density contribution goes on the global grid and is expanded in PW. "// & + " This option nullifies the effect of the GPW_TYPE in the atomic KIND", & + usage="FORCE_PAW", & + default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -2507,36 +2525,38 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EXTRAPOLATION", & - variants=s2a("INTERPOLATION", "WF_INTERPOLATION"), & - description="Extrapolation strategy for the wavefunction during e.g. MD."// & - "PS and ASPC are recommended, see also EXTRAPOLATION_ORDER.", & - citations=(/Kolafa2004, VandeVondele2005a/), & - usage="EXTRAPOLATION PS", & - enum_c_vals=s2a("USE_GUESS", "USE_PREV_P", "USE_PREV_RHO_R", "LINEAR_WF", & - "LINEAR_P", "LINEAR_PS", "USE_PREV_WF", "PS", "FROZEN", "ASPC"), & - enum_desc=s2a("Use the method specified with SCF_GUESS, i.e. no extrapolation", & - "Use the previous density matrix", & - "Use the previous density in real space", & - "Linear extrapolation of the wavefunction", & - "Linear extrapolation of the density matrix", & - "Linear extrapolation of the density matrix times the overlap matrix", & - "Use the previous wavefunction", & - "Higher order extrapolation of the density matrix times the overlap matrix", & - "Frozen ...", & - "Always stable predictor corrector, similar to PS, but going for MD stability instead of intial guess accuracy."), & - enum_i_vals=(/ & - wfi_use_guess_method_nr, & - wfi_use_prev_p_method_nr, & - wfi_use_prev_rho_r_method_nr, & - wfi_linear_wf_method_nr, & - wfi_linear_p_method_nr, & - wfi_linear_ps_method_nr, & - wfi_use_prev_wf_method_nr, & - wfi_ps_method_nr, & - wfi_frozen_method_nr, & - wfi_aspc_nr/), & - default_i_val=wfi_aspc_nr) + CALL keyword_create( & + keyword, name="EXTRAPOLATION", & + variants=s2a("INTERPOLATION", "WF_INTERPOLATION"), & + description="Extrapolation strategy for the wavefunction during e.g. MD."// & + "PS and ASPC are recommended, see also EXTRAPOLATION_ORDER.", & + citations=(/Kolafa2004, VandeVondele2005a/), & + usage="EXTRAPOLATION PS", & + enum_c_vals=s2a("USE_GUESS", "USE_PREV_P", "USE_PREV_RHO_R", "LINEAR_WF", & + "LINEAR_P", "LINEAR_PS", "USE_PREV_WF", "PS", "FROZEN", "ASPC"), & + enum_desc=s2a( & + "Use the method specified with SCF_GUESS, i.e. no extrapolation", & + "Use the previous density matrix", & + "Use the previous density in real space", & + "Linear extrapolation of the wavefunction", & + "Linear extrapolation of the density matrix", & + "Linear extrapolation of the density matrix times the overlap matrix", & + "Use the previous wavefunction", & + "Higher order extrapolation of the density matrix times the overlap matrix", & + "Frozen ...", & + "Always stable predictor corrector, similar to PS, but going for MD stability instead of intial guess accuracy."), & + enum_i_vals=(/ & + wfi_use_guess_method_nr, & + wfi_use_prev_p_method_nr, & + wfi_use_prev_rho_r_method_nr, & + wfi_linear_wf_method_nr, & + wfi_linear_p_method_nr, & + wfi_linear_ps_method_nr, & + wfi_use_prev_wf_method_nr, & + wfi_ps_method_nr, & + wfi_frozen_method_nr, & + wfi_aspc_nr/), & + default_i_val=wfi_aspc_nr) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -3205,12 +3225,13 @@ CONTAINS "calculations.", n_keywords=0, n_subsections=1, repeats=.FALSE.) NULLIFY (keyword) - CALL keyword_create(keyword, name="CUTOFF", & - description="Atomic Cutoff Radius Cutoff for the evaluation of the Coulomb integrals. "// & - "For non-periodic calculation the default value is exactly the full cell dimension, in order "// & - "to evaluate all pair interactions. Instead, for periodic calculations the default numerical value is used.", & - usage="CUTOFF {real} ", unit_str="angstrom", & - default_r_val=cp_unit_to_cp2k(value=12.0_dp, unit_str="angstrom")) + CALL keyword_create( & + keyword, name="CUTOFF", & + description="Atomic Cutoff Radius Cutoff for the evaluation of the Coulomb integrals. "// & + "For non-periodic calculation the default value is exactly the full cell dimension, in order "// & + "to evaluate all pair interactions. Instead, for periodic calculations the default numerical value is used.", & + usage="CUTOFF {real} ", unit_str="angstrom", & + default_r_val=cp_unit_to_cp2k(value=12.0_dp, unit_str="angstrom")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -4087,21 +4108,22 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="SCF_GUESS", & - description="Change the initial guess for the wavefunction.", & - usage="SCF_GUESS RESTART", default_i_val=atomic_guess, & - enum_c_vals=s2a("ATOMIC", "RESTART", "RANDOM", "CORE", & - "HISTORY_RESTART", "MOPAC", "SPARSE", "NONE"), & - enum_desc=s2a("Generate an atomic density using the atomic code", & - "Use the RESTART file as an initial guess (and ATOMIC if not present).", & - "Use random wavefunction coefficients.", & - "Diagonalize the core hamiltonian for an initial guess.", & - "Extrapolated from previous RESTART files.", & + CALL keyword_create( & + keyword, name="SCF_GUESS", & + description="Change the initial guess for the wavefunction.", & + usage="SCF_GUESS RESTART", default_i_val=atomic_guess, & + enum_c_vals=s2a("ATOMIC", "RESTART", "RANDOM", "CORE", & + "HISTORY_RESTART", "MOPAC", "SPARSE", "NONE"), & + enum_desc=s2a("Generate an atomic density using the atomic code", & + "Use the RESTART file as an initial guess (and ATOMIC if not present).", & + "Use random wavefunction coefficients.", & + "Diagonalize the core hamiltonian for an initial guess.", & + "Extrapolated from previous RESTART files.", & "Use same guess as MOPAC for semi-empirical methods or a simple diagonal density matrix for other methods", & - "Generate a sparse wavefunction using the atomic code (for OT based methods)", & - "Skip initial guess (only for NON-SCC DFTB)."), & - enum_i_vals=(/atomic_guess, restart_guess, random_guess, core_guess, & - history_guess, mopac_guess, sparse_guess, no_guess/)) + "Generate a sparse wavefunction using the atomic code (for OT based methods)", & + "Skip initial guess (only for NON-SCC DFTB)."), & + enum_i_vals=(/atomic_guess, restart_guess, random_guess, core_guess, & + history_guess, mopac_guess, sparse_guess, no_guess/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -4182,12 +4204,13 @@ CONTAINS CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "RESTART_HISTORY", & - description="Dumps unique MO restart files during the run keeping all of them.", & - print_level=low_print_level, common_iter_levels=0, & - each_iter_names=s2a("__ROOT__", "MD", "GEO_OPT", "ROT_OPT", "NEB", "METADYNAMICS", "QS_SCF"), & - each_iter_values=(/500, 500, 500, 500, 500, 500, 500/), & - filename="RESTART") + CALL cp_print_key_section_create( & + print_key, "RESTART_HISTORY", & + description="Dumps unique MO restart files during the run keeping all of them.", & + print_level=low_print_level, common_iter_levels=0, & + each_iter_names=s2a("__ROOT__", "MD", "GEO_OPT", "ROT_OPT", "NEB", "METADYNAMICS", "QS_SCF"), & + each_iter_values=(/500, 500, 500, 500, 500, 500, 500/), & + filename="RESTART") CALL keyword_create(keyword, name="BACKUP_COPIES", & description="Specifies the maximum index of backup copies.", & usage="BACKUP_COPIES {int}", & @@ -4251,9 +4274,10 @@ CONTAINS CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "DIAG_SUB_SCF", & - description="Controls the printing of information on subspace diagonalization internal loop. ", & - print_level=medium_print_level, add_last=add_last_numeric, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "DIAG_SUB_SCF", & + description="Controls the printing of information on subspace diagonalization internal loop. ", & + print_level=medium_print_level, add_last=add_last_numeric, filename="__STD_OUT__") CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) @@ -4409,16 +4433,17 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="OPTIMIZER", & - description="Method used to bring the outer loop to a stationary point", & - usage="OPTIMIZER SD", & - default_i_val=outer_scf_optimizer_none, & - enum_c_vals=s2a("SD", "DIIS", "NONE", "BISECT"), & - enum_desc=s2a("Takes steps in the direction of the gradient, multiplied by step_size", & - "Uses a Direct Inversion in the Iterative Subspace method", & - "Do nothing, useful only with the none type", & - "Bisection on the gradient, useful for difficult one dimensional cases"), & - enum_i_vals=(/outer_scf_optimizer_sd, outer_scf_optimizer_diis, outer_scf_optimizer_none, outer_scf_optimizer_bisect/)) + CALL keyword_create( & + keyword, name="OPTIMIZER", & + description="Method used to bring the outer loop to a stationary point", & + usage="OPTIMIZER SD", & + default_i_val=outer_scf_optimizer_none, & + enum_c_vals=s2a("SD", "DIIS", "NONE", "BISECT"), & + enum_desc=s2a("Takes steps in the direction of the gradient, multiplied by step_size", & + "Uses a Direct Inversion in the Iterative Subspace method", & + "Do nothing, useful only with the none type", & + "Bisection on the gradient, useful for difficult one dimensional cases"), & + enum_i_vals=(/outer_scf_optimizer_sd, outer_scf_optimizer_diis, outer_scf_optimizer_none, outer_scf_optimizer_bisect/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -5161,11 +5186,12 @@ CONTAINS n_var=-1, type_of_var=real_t, repeats=.FALSE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="SPIN_CONFIGURATION", & - description="for each singly occupied orbital, specify if this should be an alpha (=1) or a beta (=2) orbital"// & - "This keyword should be repeated, each repetition corresponding to an additional term.", & - usage="SPIN_CONFIGURATION 1 2", & - n_var=-1, type_of_var=integer_t, repeats=.TRUE.) + CALL keyword_create( & + keyword, name="SPIN_CONFIGURATION", & + description="for each singly occupied orbital, specify if this should be an alpha (=1) or a beta (=2) orbital"// & + "This keyword should be repeated, each repetition corresponding to an additional term.", & + usage="SPIN_CONFIGURATION 1 2", & + n_var=-1, type_of_var=integer_t, repeats=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -5609,16 +5635,17 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MINIMIZER", & - description="Minimizer to be used with the OT method", & - usage="MINIMIZER DIIS", & - default_i_val=ot_mini_cg, & - enum_c_vals=s2a("SD", "CG", "DIIS", "BROYDEN"), & - enum_desc=s2a("Steepest descent: not recommended", "Conjugate Gradients: most reliable, use for difficult systems."// & - " The total energy should decrease at every OT CG step if the line search is appropriate.", & - "Direct inversion in the iterative subspace: less reliable than CG, but sometimes about 50% faster", & - "Broyden mixing approximating the inverse Hessian"), & - enum_i_vals=(/ot_mini_sd, ot_mini_cg, ot_mini_diis, ot_mini_broyden/)) + CALL keyword_create( & + keyword, name="MINIMIZER", & + description="Minimizer to be used with the OT method", & + usage="MINIMIZER DIIS", & + default_i_val=ot_mini_cg, & + enum_c_vals=s2a("SD", "CG", "DIIS", "BROYDEN"), & + enum_desc=s2a("Steepest descent: not recommended", "Conjugate Gradients: most reliable, use for difficult systems."// & + " The total energy should decrease at every OT CG step if the line search is appropriate.", & + "Direct inversion in the iterative subspace: less reliable than CG, but sometimes about 50% faster", & + "Broyden mixing approximating the inverse Hessian"), & + enum_i_vals=(/ot_mini_sd, ot_mini_cg, ot_mini_diis, ot_mini_broyden/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -5724,13 +5751,14 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="STEPSIZE", & - description="Initial stepsize used for the line search, sometimes this parameter can be reduced to stablize DIIS"// & - " or to improve the CG behavior in the first few steps."// & - " The optimal value depends on the quality of the preconditioner."// & - " A negative values leaves the choice to CP2K depending on the preconditioner.", & - usage="STEPSIZE 0.4", & - default_r_val=-1.0_dp) + CALL keyword_create( & + keyword, name="STEPSIZE", & + description="Initial stepsize used for the line search, sometimes this parameter can be reduced to stablize DIIS"// & + " or to improve the CG behavior in the first few steps."// & + " The optimal value depends on the quality of the preconditioner."// & + " A negative values leaves the choice to CP2K depending on the preconditioner.", & + usage="STEPSIZE 0.4", & + default_r_val=-1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -5741,75 +5769,80 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PRECONDITIONER", & - description="Type of preconditioner to be used with all minimization schemes. "// & - "They differ in effectiveness, cost of construction, cost of application. "// & - "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", & - usage="PRECONDITIONER FULL_ALL", & - default_i_val=ot_precond_full_kinetic, & - enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", & - "NONE"), & - enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// & - "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// & - "This preconditioner is recommended for almost all systems, except very large systems where "// & - "make_preconditioner would dominate the total computational cost.", & - "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// & - "but cheaper to construct, "// & - "might be somewhat less robust. Recommended for large systems.", & - "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", & - "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// & - "use for very large systems.", & - "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", & - "skip preconditioning"), & - enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_full_single, & - ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_none/), & - citations=(/VandeVondele2003, Weber2008, Schiffmann2015/)) + CALL keyword_create( & + keyword, name="PRECONDITIONER", & + description="Type of preconditioner to be used with all minimization schemes. "// & + "They differ in effectiveness, cost of construction, cost of application. "// & + "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", & + usage="PRECONDITIONER FULL_ALL", & + default_i_val=ot_precond_full_kinetic, & + enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", & + "NONE"), & + enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// & + "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// & + "This preconditioner is recommended for almost all systems, except very large systems where "// & + "make_preconditioner would dominate the total computational cost.", & + "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// & + "but cheaper to construct, "// & + "might be somewhat less robust. Recommended for large systems.", & + "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", & + "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// & + "use for very large systems.", & + "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", & + "skip preconditioning"), & + enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_full_single, & + ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_none/), & + citations=(/VandeVondele2003, Weber2008, Schiffmann2015/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PRECOND_SOLVER", & - description="How the preconditioner is applied to the residual.", & - usage="PRECOND_SOLVER DIRECT", & - default_i_val=ot_precond_solver_default, & - enum_c_vals=s2a("DEFAULT", "DIRECT", "INVERSE_CHOLESKY", "INVERSE_UPDATE"), & - enum_desc=s2a("the default", "Cholesky decomposition followed by triangular solve "// & - "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", & - "Cholesky decomposition followed by explicit inversion "// & - "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", & - "Performs a Hotelling update of the inverse if a previous preconditioner is present. "// & - "Mainly useful for GPU accelerated systems (works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)"), & - enum_i_vals=(/ot_precond_solver_default, & - ot_precond_solver_direct, & - ot_precond_solver_inv_chol, & - ot_precond_solver_update/)) + CALL keyword_create( & + keyword, name="PRECOND_SOLVER", & + description="How the preconditioner is applied to the residual.", & + usage="PRECOND_SOLVER DIRECT", & + default_i_val=ot_precond_solver_default, & + enum_c_vals=s2a("DEFAULT", "DIRECT", "INVERSE_CHOLESKY", "INVERSE_UPDATE"), & + enum_desc=s2a("the default", "Cholesky decomposition followed by triangular solve "// & + "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", & + "Cholesky decomposition followed by explicit inversion "// & + "(works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)", & + "Performs a Hotelling update of the inverse if a previous preconditioner is present. "// & + "Mainly useful for GPU accelerated systems (works for FULL_KINETIC/SINGLE_INVERSE/S_INVERSE)"), & + enum_i_vals=(/ot_precond_solver_default, & + ot_precond_solver_direct, & + ot_precond_solver_inv_chol, & + ot_precond_solver_update/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="ENERGY_GAP", & - description="Should be an estimate for the energy gap [a.u.] (HOMO-LUMO) and is used in preconditioning, "// & - "especially effective with the FULL_ALL preconditioner, in which case it should be an underestimate "// & - "of the gap (can be a small number, e.g. 0.002)."// & - " FULL_SINGLE_INVERSE takes it as lower bound (values below 0.05 can cause stability issues)."// & - " In general, heigher values will tame the preconditioner in case of poor initial guesses."// & - " A negative value will leave the choice to CP2K depending on type of preconditioner.", & - usage="ENERGY_GAP 0.001", & - default_r_val=-1.0_dp) + CALL keyword_create( & + keyword, name="ENERGY_GAP", & + description="Should be an estimate for the energy gap [a.u.] (HOMO-LUMO) and is used in preconditioning, "// & + "especially effective with the FULL_ALL preconditioner, in which case it should be an underestimate "// & + "of the gap (can be a small number, e.g. 0.002)."// & + " FULL_SINGLE_INVERSE takes it as lower bound (values below 0.05 can cause stability issues)."// & + " In general, heigher values will tame the preconditioner in case of poor initial guesses."// & + " A negative value will leave the choice to CP2K depending on type of preconditioner.", & + usage="ENERGY_GAP 0.001", & + default_r_val=-1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_TAYLOR", & - variants=(/"EPSTAYLOR"/), & - description="Target accuracy of the taylor expansion for the matrix functions, should normally be kept as is.", & - usage="EPS_TAYLOR 1.0E-15", & - default_r_val=1.0E-16_dp) + CALL keyword_create( & + keyword, name="EPS_TAYLOR", & + variants=(/"EPSTAYLOR"/), & + description="Target accuracy of the taylor expansion for the matrix functions, should normally be kept as is.", & + usage="EPS_TAYLOR 1.0E-15", & + default_r_val=1.0E-16_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MAX_TAYLOR", & - description="Maximum order of the Taylor expansion before diagonalisation is prefered, for large parallel runs"// & - " a slightly higher order could sometimes result in a small speedup.", & - usage="MAX_TAYLOR 5", & - default_i_val=4) + CALL keyword_create( & + keyword, name="MAX_TAYLOR", & + description="Maximum order of the Taylor expansion before diagonalisation is prefered, for large parallel runs"// & + " a slightly higher order could sometimes result in a small speedup.", & + usage="MAX_TAYLOR 5", & + default_i_val=4) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -5987,17 +6020,18 @@ CONTAINS NULLIFY (keyword) - CALL keyword_create(keyword, name="PRECONDITIONER", & - description="Type of preconditioner to be used with all minimization schemes. ", & - usage="PRECONDITIONER FULL_ALL", & - default_i_val=ot_precond_full_all, & - enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "NONE"), & - enum_desc=s2a("Most effective state selective preconditioner based on diagonalization ", & - "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// & - "but cheaper to construct, might be somewhat less robust. Recommended for large systems.", & - "skip preconditioning"), & - enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_none/), & - citations=(/VandeVondele2003/)) + CALL keyword_create( & + keyword, name="PRECONDITIONER", & + description="Type of preconditioner to be used with all minimization schemes. ", & + usage="PRECONDITIONER FULL_ALL", & + default_i_val=ot_precond_full_all, & + enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "NONE"), & + enum_desc=s2a("Most effective state selective preconditioner based on diagonalization ", & + "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// & + "but cheaper to construct, might be somewhat less robust. Recommended for large systems.", & + "skip preconditioning"), & + enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_none/), & + citations=(/VandeVondele2003/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -6016,13 +6050,14 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="ENERGY_GAP", & - description="Should be an estimate for the energy gap [a.u.] (HOMO-LUMO) and is used in preconditioning, "// & - "especially effective with the FULL_ALL preconditioner, in which case it should be an underestimate "// & - "of the gap (0.001 doing normally fine). For the other preconditioners, making this value larger (0.2)"// & - " will tame the preconditioner in case of poor initial guesses.", & - usage="ENERGY_GAP 0.001", & - default_r_val=0.2_dp) + CALL keyword_create( & + keyword, name="ENERGY_GAP", & + description="Should be an estimate for the energy gap [a.u.] (HOMO-LUMO) and is used in preconditioning, "// & + "especially effective with the FULL_ALL preconditioner, in which case it should be an underestimate "// & + "of the gap (0.001 doing normally fine). For the other preconditioners, making this value larger (0.2)"// & + " will tame the preconditioner in case of poor initial guesses.", & + usage="ENERGY_GAP 0.001", & + default_r_val=0.2_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -6164,12 +6199,13 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_SKIP_SUB_DIAG", & - description="Level of convergence to be reached before starting the internal loop of subspace rotations."// & - " Above this threshold only the outer diagonalization method is used. "// & - " If negative the subspace rotation is started at the first iteration", & - usage="EPS_SKIP_SUB_DIAG 0.001", & - default_r_val=-1.0_dp) + CALL keyword_create( & + keyword, name="EPS_SKIP_SUB_DIAG", & + description="Level of convergence to be reached before starting the internal loop of subspace rotations."// & + " Above this threshold only the outer diagonalization method is used. "// & + " If negative the subspace rotation is started at the first iteration", & + usage="EPS_SKIP_SUB_DIAG 0.001", & + default_r_val=-1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -6388,9 +6424,10 @@ CONTAINS CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "XAS_SPECTRUM", & - description="Controls the dumping of the CLS output files containing the absorption spectra", & - print_level=low_print_level, common_iter_levels=3, filename="") + CALL cp_print_key_section_create( & + print_key, "XAS_SPECTRUM", & + description="Controls the dumping of the CLS output files containing the absorption spectra", & + print_level=low_print_level, common_iter_levels=3, filename="") CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) @@ -6714,11 +6751,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="ORTHONORMAL", & - description="Performs rtp in the orthonormal basis. This keyword is only intended for development purposes."// & - "It should not be used outside code development", & - usage="ORTHONORMAL", & - default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="ORTHONORMAL", & + description="Performs rtp in the orthonormal basis. This keyword is only intended for development purposes."// & + "It should not be used outside code development", & + usage="ORTHONORMAL", & + default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -6729,11 +6767,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="ACCURACY_REFINEMENT", & - description="If using density propagation some parts should be calculated with a higher accuracy than the rest"// & - " to reduce numerical noise. This factor determines by how much the filtering threshold is"// & - " reduced for these calculations.", & - usage="ACCURACY_REFINEMENT", default_i_val=100) + CALL keyword_create( & + keyword, name="ACCURACY_REFINEMENT", & + description="If using density propagation some parts should be calculated with a higher accuracy than the rest"// & + " to reduce numerical noise. This factor determines by how much the filtering threshold is"// & + " reduced for these calculations.", & + usage="ACCURACY_REFINEMENT", default_i_val=100) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -7239,14 +7278,15 @@ CONTAINS CALL section_release(print_key) ! dirichlet type constraints - CALL cp_print_key_section_create(print_key, "DIRICHLET_BC_CUBE", & - description="Controls the printing of cube files with unit step functions (constraints) "// & - "representing Dirichlet-type (boundary) regions defined in the implicit (generalized) Poisson "// & - "solver section. The regions remain unchanged throughout the calculations. If the Dirichlet "// & - " regions are relatively large and/or the number of partitions is quite high, in order to save memory,"// & - " generate the cube files in early steps and perform the rest of the calculations with this keyword"// & - " switched off.", & - print_level=high_print_level, filename="") + CALL cp_print_key_section_create( & + print_key, "DIRICHLET_BC_CUBE", & + description="Controls the printing of cube files with unit step functions (constraints) "// & + "representing Dirichlet-type (boundary) regions defined in the implicit (generalized) Poisson "// & + "solver section. The regions remain unchanged throughout the calculations. If the Dirichlet "// & + " regions are relatively large and/or the number of partitions is quite high, in order to save memory,"// & + " generate the cube files in early steps and perform the rest of the calculations with this keyword"// & + " switched off.", & + print_level=high_print_level, filename="") CALL keyword_create(keyword, name="TILE_CUBES", & description="Print tiles that tessellate the Dirichlet regions into cube files. If TRUE, "// & diff --git a/src/input_cp2k_force_eval.F b/src/input_cp2k_force_eval.F index 202cd6c15a..3430cbd346 100644 --- a/src/input_cp2k_force_eval.F +++ b/src/input_cp2k_force_eval.F @@ -305,9 +305,10 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "GRID_INFORMATION", & - description="Controls the printing of information regarding the PW and RS grid structures.", & - print_level=medium_print_level, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "GRID_INFORMATION", & + description="Controls the printing of information regarding the PW and RS grid structures.", & + print_level=medium_print_level, filename="__STD_OUT__") CALL section_add_subsection(section, print_key) CALL section_release(print_key) diff --git a/src/input_cp2k_free_energy.F b/src/input_cp2k_free_energy.F index b78b206905..2d6f9208ee 100644 --- a/src/input_cp2k_free_energy.F +++ b/src/input_cp2k_free_energy.F @@ -703,17 +703,18 @@ CONTAINS description="Controls the activation of walls on COLVAR during a metadynamic run.", & n_keywords=0, n_subsections=1, repeats=.TRUE.) - CALL keyword_create(keyword, name="TYPE", & - description="Specify the type of wall", & - usage=" TYPE (REFLECTIVE|QUADRATIC|QUARTIC|GAUSSIAN|NONE)", & - enum_c_vals=s2a("REFLECTIVE", "QUADRATIC", "QUARTIC", "GAUSSIAN", "NONE"), & - enum_desc=s2a("Reflective wall. Colvar velocity is inverted when the colvar is beyond the wall position.", & - "Applies a quadratic potential at the wall position.", & - "Applies a quartic potential at the wall position.", & - "Applies a gaussian potential at the wall position.", & - "No walls are applied."), & - enum_i_vals=(/do_wall_reflective, do_wall_quadratic, do_wall_quartic, do_wall_gaussian, do_wall_none/), & - default_i_val=do_wall_none) + CALL keyword_create( & + keyword, name="TYPE", & + description="Specify the type of wall", & + usage=" TYPE (REFLECTIVE|QUADRATIC|QUARTIC|GAUSSIAN|NONE)", & + enum_c_vals=s2a("REFLECTIVE", "QUADRATIC", "QUARTIC", "GAUSSIAN", "NONE"), & + enum_desc=s2a("Reflective wall. Colvar velocity is inverted when the colvar is beyond the wall position.", & + "Applies a quadratic potential at the wall position.", & + "Applies a quartic potential at the wall position.", & + "Applies a gaussian potential at the wall position.", & + "No walls are applied."), & + enum_i_vals=(/do_wall_reflective, do_wall_quadratic, do_wall_quartic, do_wall_gaussian, do_wall_none/), & + default_i_val=do_wall_none) CALL section_add_keyword(wall_section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_global.F b/src/input_cp2k_global.F index ff732c5b46..6c8a75738c 100644 --- a/src/input_cp2k_global.F +++ b/src/input_cp2k_global.F @@ -106,48 +106,52 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PREFERRED_DIAG_LIBRARY", & - description="Specifies the DIAGONALIZATION library to be used. If not availabe, the standard scalapack is used", & - usage="PREFERRED_DIAG_LIBRARY ELPA", & - default_i_val=do_diag_sl, & - enum_i_vals=(/do_diag_sl, do_diag_sl2, do_diag_elpa/), & - enum_c_vals=s2a("SL", "SL2", "ELPA"), & - enum_desc=s2a("Standard scalapack: syevd", "Scalapack 2.0: syevr", "ELPA")) + CALL keyword_create( & + keyword, name="PREFERRED_DIAG_LIBRARY", & + description="Specifies the DIAGONALIZATION library to be used. If not availabe, the standard scalapack is used", & + usage="PREFERRED_DIAG_LIBRARY ELPA", & + default_i_val=do_diag_sl, & + enum_i_vals=(/do_diag_sl, do_diag_sl2, do_diag_elpa/), & + enum_c_vals=s2a("SL", "SL2", "ELPA"), & + enum_desc=s2a("Standard scalapack: syevd", "Scalapack 2.0: syevr", "ELPA")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="ELPA_KERNEL", & - description="Specifies the kernel to be used when ELPA is in use", & - usage="ELPA_KERNEL SSE", & - default_i_val=elpa_gen, & - enum_i_vals=(/elpa_gen, elpa_gen_sim, elpa_bgp, elpa_bgq, elpa_sse, elpa_avx_b2, elpa_avx_b4, elpa_avx_b6/), & - enum_c_vals=s2a("GENERIC", "GENERIC_SIMPLE", "BGP", "BGQ", "SSE", "AVX_BLOCK2", "AVX_BLOCK4", "AVX_BLOCK6"), & - enum_desc=s2a("Generic kernel", "Simplified generic kernel", "Kernel optimized for IBM BGP", "Kernel optimized for IBM BGQ", & - "Kernel wiwth assembler for SSE vectorization", "Kernel optimized for x86_64 using SSE2/SSE3 (Intel)", & - "Kernel optimized for x86_64 using SSE2/SSE4 (AMD Bulldozer) ", & - "Kernel optimized for x86_64 using SSE2/SSE4 (block6)")) + CALL keyword_create( & + keyword, name="ELPA_KERNEL", & + description="Specifies the kernel to be used when ELPA is in use", & + usage="ELPA_KERNEL SSE", & + default_i_val=elpa_gen, & + enum_i_vals=(/elpa_gen, elpa_gen_sim, elpa_bgp, elpa_bgq, elpa_sse, elpa_avx_b2, elpa_avx_b4, elpa_avx_b6/), & + enum_c_vals=s2a("GENERIC", "GENERIC_SIMPLE", "BGP", "BGQ", "SSE", "AVX_BLOCK2", "AVX_BLOCK4", "AVX_BLOCK6"), & + enum_desc=s2a( & + "Generic kernel", "Simplified generic kernel", "Kernel optimized for IBM BGP", "Kernel optimized for IBM BGQ", & + "Kernel wiwth assembler for SSE vectorization", "Kernel optimized for x86_64 using SSE2/SSE3 (Intel)", & + "Kernel optimized for x86_64 using SSE2/SSE4 (AMD Bulldozer) ", & + "Kernel optimized for x86_64 using SSE2/SSE4 (block6)")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PREFERRED_FFT_LIBRARY", & - description="Specifies the FFT library which should be preferred. "// & - "If it is not available, use FFTW3 if this is linked in, if FFTW3 is not available use FFTSG. "// & - "Improved performance with FFTW3 can be obtained specifying a proper value for FFTW_PLAN_TYPE. "// & - "Contrary to earlier CP2K versions, all libraries will result in the same grids, "// & - "i.e. the subset of grids which all FFT libraries can transform. "// & - "See EXTENDED_FFT_LENGTHS if larger FFTs or grids that more precisely match a given cutoff are needed, "// & - "or older results need to be reproduced. "// & - "FFTW3 is often (close to) optimal, and well tested with CP2K.", & - usage="PREFERRED_FFT_LIBRARY FFTW3", & - citations=(/Frigo2005/), & - default_i_val=do_fft_fftw3, & - enum_i_vals=(/do_fft_sg, do_fft_fftw3, do_fft_fftw3/), & - enum_c_vals=s2a("FFTSG", "FFTW3", "FFTW"), & - enum_desc=s2a("Stefan Goedecker''s FFT (FFTSG), always available,"// & - "will be used in case a FFT lib is specified and not available", & - "a fast portable FFT library. Recommended."// & - "See also the FFTW_PLAN_TYPE, and FFTW_WISDOM_FILE_NAME keywords.", & - "Same as FFTW3 (for compatability with CP2K 2.3)")) + CALL keyword_create( & + keyword, name="PREFERRED_FFT_LIBRARY", & + description="Specifies the FFT library which should be preferred. "// & + "If it is not available, use FFTW3 if this is linked in, if FFTW3 is not available use FFTSG. "// & + "Improved performance with FFTW3 can be obtained specifying a proper value for FFTW_PLAN_TYPE. "// & + "Contrary to earlier CP2K versions, all libraries will result in the same grids, "// & + "i.e. the subset of grids which all FFT libraries can transform. "// & + "See EXTENDED_FFT_LENGTHS if larger FFTs or grids that more precisely match a given cutoff are needed, "// & + "or older results need to be reproduced. "// & + "FFTW3 is often (close to) optimal, and well tested with CP2K.", & + usage="PREFERRED_FFT_LIBRARY FFTW3", & + citations=(/Frigo2005/), & + default_i_val=do_fft_fftw3, & + enum_i_vals=(/do_fft_sg, do_fft_fftw3, do_fft_fftw3/), & + enum_c_vals=s2a("FFTSG", "FFTW3", "FFTW"), & + enum_desc=s2a("Stefan Goedecker''s FFT (FFTSG), always available,"// & + "will be used in case a FFT lib is specified and not available", & + "a fast portable FFT library. Recommended."// & + "See also the FFTW_PLAN_TYPE, and FFTW_WISDOM_FILE_NAME keywords.", & + "Same as FFTW3 (for compatability with CP2K 2.3)")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -226,24 +230,25 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PROGRAM_NAME", & - variants=(/"PROGRAM"/), & - description="Which program should be run", & - usage="PROGRAM_NAME ", & - enum_c_vals=s2a("ATOM", "FARMING", "TEST", "CP2K", "OPTIMIZE_INPUT", "OPTIMIZE_BASIS", "TMC", "MC_ANALYSIS", "SWARM"), & - enum_desc=s2a("Runs single atom calculations", & - "Runs N independent jobs in a single run", & - "Do some benchmarking and testing", & - "Runs one of the CP2K package", & - "A tool to optimize parameters in a CP2K input", & - "A tool to create a MOLOPT or ADMM basis for a given set"// & - " of training structures", & - "Runs Tree Monte Carlo algorithm using additional input file(s)", & - "Runs (Tree) Monte Carlo trajectory file analysis", & - "Runs swarm based calculation"), & - enum_i_vals=(/do_atom, do_farming, do_test, do_cp2k, do_optimize_input, & - do_opt_basis, do_tree_mc, do_tree_mc_ana, do_swarm/), & - default_i_val=do_cp2k) + CALL keyword_create( & + keyword, name="PROGRAM_NAME", & + variants=(/"PROGRAM"/), & + description="Which program should be run", & + usage="PROGRAM_NAME ", & + enum_c_vals=s2a("ATOM", "FARMING", "TEST", "CP2K", "OPTIMIZE_INPUT", "OPTIMIZE_BASIS", "TMC", "MC_ANALYSIS", "SWARM"), & + enum_desc=s2a("Runs single atom calculations", & + "Runs N independent jobs in a single run", & + "Do some benchmarking and testing", & + "Runs one of the CP2K package", & + "A tool to optimize parameters in a CP2K input", & + "A tool to create a MOLOPT or ADMM basis for a given set"// & + " of training structures", & + "Runs Tree Monte Carlo algorithm using additional input file(s)", & + "Runs (Tree) Monte Carlo trajectory file analysis", & + "Runs swarm based calculation"), & + enum_i_vals=(/do_atom, do_farming, do_test, do_cp2k, do_optimize_input, & + do_opt_basis, do_tree_mc, do_tree_mc_ana, do_swarm/), & + default_i_val=do_cp2k) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -264,35 +269,36 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="RUN_TYPE", & - description="Type of run that you want to perform Geometry "// & - "optimization, md, montecarlo,...", & - usage="RUN_TYPE MD", & - default_i_val=energy_force_run, & - citations=(/Ceriotti2014, Schonherr2014/), & - enum_c_vals=s2a("NONE", "ENERGY", "ENERGY_FORCE", "MD", "GEO_OPT", & - "MC", "SPECTRA", "DEBUG", "BSSE", "LR", "PINT", "VIBRATIONAL_ANALYSIS", & - "BAND", "CELL_OPT", "WFN_OPT", "WAVEFUNCTION_OPTIMIZATION", & - "MOLECULAR_DYNAMICS", "GEOMETRY_OPTIMIZATION", "MONTECARLO", & - "ELECTRONIC_SPECTRA", "LINEAR_RESPONSE", "NORMAL_MODES", "RT_PROPAGATION", & - "EHRENFEST_DYN", "TAMC", "TMC", "DRIVER"), & - enum_i_vals=(/none_run, energy_run, energy_force_run, mol_dyn_run, & - geo_opt_run, mon_car_run, electronic_spectra_run, debug_run, & - bsse_run, linear_response_run, pint_run, vib_anal, do_band, & - cell_opt_run, energy_run, energy_run, mol_dyn_run, geo_opt_run, & - mon_car_run, electronic_spectra_run, linear_response_run, & - vib_anal, real_time_propagation, ehrenfest, do_tamc, tree_mc_run, driver_run/), & - enum_desc=s2a("Perform no tasks", "Computes energy", "Computes energy and forces", & - "Molecular Dynamics", "Geometry Optimization", "Monte Carlo", "Computes absorption Spectra", & - "Performs a Debug analysis", "Basis set superposition error", "Linear Response", & - "Path integral", "Vibrational analysis", "Band methods", "Cell optimization", & - "Alias for ENERGY", "Alias for ENERGY", "Alias for MD", "Alias for GEO_OPT", & - "Alias for MC", "Alias for SPECTRA", "Alias for LR", "Alias for VIBRATIONAL_ANALYSIS", & - "Real Time propagation run (fixed ionic positions)", & - "Ehrenfest dynamics (using real time propagation of the wavefunction)", & - "Temperature Accelerated Monte Carlo (TAMC)", & - "Tree Monte Carlo (TMC), a pre-sampling MC algorithm", & - "i-PI driver mode")) + CALL keyword_create( & + keyword, name="RUN_TYPE", & + description="Type of run that you want to perform Geometry "// & + "optimization, md, montecarlo,...", & + usage="RUN_TYPE MD", & + default_i_val=energy_force_run, & + citations=(/Ceriotti2014, Schonherr2014/), & + enum_c_vals=s2a("NONE", "ENERGY", "ENERGY_FORCE", "MD", "GEO_OPT", & + "MC", "SPECTRA", "DEBUG", "BSSE", "LR", "PINT", "VIBRATIONAL_ANALYSIS", & + "BAND", "CELL_OPT", "WFN_OPT", "WAVEFUNCTION_OPTIMIZATION", & + "MOLECULAR_DYNAMICS", "GEOMETRY_OPTIMIZATION", "MONTECARLO", & + "ELECTRONIC_SPECTRA", "LINEAR_RESPONSE", "NORMAL_MODES", "RT_PROPAGATION", & + "EHRENFEST_DYN", "TAMC", "TMC", "DRIVER"), & + enum_i_vals=(/none_run, energy_run, energy_force_run, mol_dyn_run, & + geo_opt_run, mon_car_run, electronic_spectra_run, debug_run, & + bsse_run, linear_response_run, pint_run, vib_anal, do_band, & + cell_opt_run, energy_run, energy_run, mol_dyn_run, geo_opt_run, & + mon_car_run, electronic_spectra_run, linear_response_run, & + vib_anal, real_time_propagation, ehrenfest, do_tamc, tree_mc_run, driver_run/), & + enum_desc=s2a("Perform no tasks", "Computes energy", "Computes energy and forces", & + "Molecular Dynamics", "Geometry Optimization", "Monte Carlo", "Computes absorption Spectra", & + "Performs a Debug analysis", "Basis set superposition error", "Linear Response", & + "Path integral", "Vibrational analysis", "Band methods", "Cell optimization", & + "Alias for ENERGY", "Alias for ENERGY", "Alias for MD", "Alias for GEO_OPT", & + "Alias for MC", "Alias for SPECTRA", "Alias for LR", "Alias for VIBRATIONAL_ANALYSIS", & + "Real Time propagation run (fixed ionic positions)", & + "Ehrenfest dynamics (using real time propagation of the wavefunction)", & + "Temperature Accelerated Monte Carlo (TAMC)", & + "Tree Monte Carlo (TMC), a pre-sampling MC algorithm", & + "i-PI driver mode")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -330,23 +336,26 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="TRACE_MAX", & - description="Limit the total number a given subroutine is printed in the trace. Accounting is not influenced.", & - usage="TRACE_MAX 100", default_i_val=HUGE(0)) + CALL keyword_create( & + keyword, name="TRACE_MAX", & + description="Limit the total number a given subroutine is printed in the trace. Accounting is not influenced.", & + usage="TRACE_MAX 100", default_i_val=HUGE(0)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="TRACE_ROUTINES", & - description="A list of routines to trace. If left empty all routines are traced. Accounting is not influenced.", & - usage="TRACE_ROUTINES {routine_name1} {routine_name2} ...", type_of_var=char_t, & - n_var=-1) + CALL keyword_create( & + keyword, name="TRACE_ROUTINES", & + description="A list of routines to trace. If left empty all routines are traced. Accounting is not influenced.", & + usage="TRACE_ROUTINES {routine_name1} {routine_name2} ...", type_of_var=char_t, & + n_var=-1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="FLUSH_SHOULD_FLUSH", & - description="Flush output regularly, enabling this option might degrade performance significantly on certain machines.", & - usage="FLUSH_SHOULD_FLUSH", & - default_l_val=.TRUE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="FLUSH_SHOULD_FLUSH", & + description="Flush output regularly, enabling this option might degrade performance significantly on certain machines.", & + usage="FLUSH_SHOULD_FLUSH", & + default_l_val=.TRUE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_ls.F b/src/input_cp2k_ls.F index 6839dbd040..93307e3ccf 100644 --- a/src/input_cp2k_ls.F +++ b/src/input_cp2k_ls.F @@ -104,9 +104,10 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_SCF", & - description="Target accuracy for the SCF convergence in terms of change of the total energy per electron.", & - usage="EPS_SCF 1.e-6", default_r_val=1.e-7_dp) + CALL keyword_create( & + keyword, name="EPS_SCF", & + description="Target accuracy for the SCF convergence in terms of change of the total energy per electron.", & + usage="EPS_SCF 1.e-6", default_r_val=1.e-7_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -195,17 +196,18 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MATRIX_CLUSTER_TYPE", & - description="Specify how atomic blocks should be clustered in the used matrices, in order to improve flop rate, "// & - "and possibly speedup the matrix multiply. Note that the atomic s_preconditioner can not be used."// & - "Furthermore, since screening is on matrix blocks, "// & - "slightly more accurate results can be expected with molecular.", & - usage="MATRIX_CLUSTER_TYPE MOLECULAR", & - default_i_val=ls_cluster_atomic, & - enum_c_vals=s2a("ATOMIC", "MOLECULAR"), & - enum_desc=s2a("Using atomic blocks", & - "Using molecular blocks."), & - enum_i_vals=(/ls_cluster_atomic, ls_cluster_molecular/)) + CALL keyword_create( & + keyword, name="MATRIX_CLUSTER_TYPE", & + description="Specify how atomic blocks should be clustered in the used matrices, in order to improve flop rate, "// & + "and possibly speedup the matrix multiply. Note that the atomic s_preconditioner can not be used."// & + "Furthermore, since screening is on matrix blocks, "// & + "slightly more accurate results can be expected with molecular.", & + usage="MATRIX_CLUSTER_TYPE MOLECULAR", & + default_i_val=ls_cluster_atomic, & + enum_c_vals=s2a("ATOMIC", "MOLECULAR"), & + enum_desc=s2a("Using atomic blocks", & + "Using molecular blocks."), & + enum_i_vals=(/ls_cluster_atomic, ls_cluster_molecular/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -215,10 +217,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="RESTART_WRITE", & - description="Write the density matrix at the end of the SCF (currently requires EXTRAPOLATION_ORDER>0). "// & - "Files might be rather large.", & - usage="RESTART_READ", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="RESTART_WRITE", & + description="Write the density matrix at the end of the SCF (currently requires EXTRAPOLATION_ORDER>0). "// & + "Files might be rather large.", & + usage="RESTART_READ", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -328,14 +331,15 @@ CONTAINS CALL section_release(print_key) ! Energy specific electron density cubes - CALL cp_print_key_section_create(print_key, & - name="PRINT_SPECIFIC_E_DENSITY_CUBE", & - description="Controls the printing of cube files with "// & - "the electronic density (states) "// & - "contributing to the density of states within "// & - "the specific energy range "// & - "(MIN_ENERGY ≤ E ≤ MAX_ENERGY). MIN_ENERGY and MAX_ENERGY need to be specified explicitly.", & - print_level=high_print_level, filename="") + CALL cp_print_key_section_create( & + print_key, & + name="PRINT_SPECIFIC_E_DENSITY_CUBE", & + description="Controls the printing of cube files with "// & + "the electronic density (states) "// & + "contributing to the density of states within "// & + "the specific energy range "// & + "(MIN_ENERGY ≤ E ≤ MAX_ENERGY). MIN_ENERGY and MAX_ENERGY need to be specified explicitly.", & + print_level=high_print_level, filename="") CALL keyword_create(keyword, name="stride", & description="The stride (X,Y,Z) used to write the cube file "// & diff --git a/src/input_cp2k_mixed.F b/src/input_cp2k_mixed.F index ef93792004..36ad79206b 100644 --- a/src/input_cp2k_mixed.F +++ b/src/input_cp2k_mixed.F @@ -66,23 +66,24 @@ CONTAINS n_keywords=1, n_subsections=0, repeats=.FALSE.) NULLIFY (keyword, subsection) - CALL keyword_create(keyword, name="MIXING_TYPE", & - description="The type of mixing to be employed", & - usage="MIXING_TYPE LINEAR_COMBINATION", & - default_i_val=mix_linear_combination, & - enum_c_vals=s2a("LINEAR_COMBINATION", & - "MINIMUM", & - "COUPLED", & - "RESTRAINT", & - "GENMIX"), & - enum_desc=s2a("Linear combination of force envs (support only 2 force_evals)", & - "Use the force env with the minimum energy (support only 2 force_evals)", & - "Consider the force envs as a two state system with a given"// & - " coupling matrix element (support only 2 force_evals)", & - "Use the difference between the energy of the force envs as a"// & - " restraint on the first (support only 2 force_evals)", & - "Defines a user-driven generica coupling (support for an unlimited number of force_eval)"), & - enum_i_vals=(/mix_linear_combination, mix_minimum, mix_coupled, mix_restrained, mix_generic/)) + CALL keyword_create( & + keyword, name="MIXING_TYPE", & + description="The type of mixing to be employed", & + usage="MIXING_TYPE LINEAR_COMBINATION", & + default_i_val=mix_linear_combination, & + enum_c_vals=s2a("LINEAR_COMBINATION", & + "MINIMUM", & + "COUPLED", & + "RESTRAINT", & + "GENMIX"), & + enum_desc=s2a("Linear combination of force envs (support only 2 force_evals)", & + "Use the force env with the minimum energy (support only 2 force_evals)", & + "Consider the force envs as a two state system with a given"// & + " coupling matrix element (support only 2 force_evals)", & + "Use the difference between the energy of the force envs as a"// & + " restraint on the first (support only 2 force_evals)", & + "Defines a user-driven generica coupling (support for an unlimited number of force_eval)"), & + enum_i_vals=(/mix_linear_combination, mix_minimum, mix_coupled, mix_restrained, mix_generic/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -241,12 +242,13 @@ CONTAINS "needs to be provided as parameter)", & n_keywords=1, n_subsections=0, repeats=.TRUE.) - CALL keyword_create(keyword, name="DEFINE_FRAGMENTS", & - description="Specify the fragments definition of the force_eval through the fragments of the"// & - " force_eval_mixed. This avoids the pedantic definition of the fragments for the force_eval,"// & - " assuming the order of the fragments for the specified force_eval is the same as the sequence "// & - " of integers provided. Easier to USE should be preferred to the specification of the single fragments.", & - usage="DEFINE_FRAGMENTS .. ", type_of_var=integer_t, n_var=-1) + CALL keyword_create( & + keyword, name="DEFINE_FRAGMENTS", & + description="Specify the fragments definition of the force_eval through the fragments of the"// & + " force_eval_mixed. This avoids the pedantic definition of the fragments for the force_eval,"// & + " assuming the order of the fragments for the specified force_eval is the same as the sequence "// & + " of integers provided. Easier to USE should be preferred to the specification of the single fragments.", & + usage="DEFINE_FRAGMENTS .. ", type_of_var=integer_t, n_var=-1) CALL section_add_keyword(sub2section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_mm.F b/src/input_cp2k_mm.F index 2cfa770562..b110a18ab6 100644 --- a/src/input_cp2k_mm.F +++ b/src/input_cp2k_mm.F @@ -222,21 +222,22 @@ CONTAINS NULLIFY (subsection, keyword) - CALL keyword_create(keyword, name="PARMTYPE", & - description="Define the kind of torsion potential", & - usage="PARMTYPE {OFF,CHM,G87,G96}", & - enum_c_vals=s2a("OFF", "CHM", "G87", "G96", "AMBER"), & - enum_desc=s2a("Provides force field parameters through the input file", & - "Provides force field parameters through an external file with CHARMM format", & - "Provides force field parameters through an external file with GROMOS 87 format", & - "Provides force field parameters through an external file with GROMOS 96 format", & - "Provides force field parameters through an external file with AMBER format (from v.8 on)"), & - enum_i_vals=(/do_ff_undef, & - do_ff_charmm, & - do_ff_g87, & - do_ff_g96, & - do_ff_amber/), & - default_i_val=do_ff_undef) + CALL keyword_create( & + keyword, name="PARMTYPE", & + description="Define the kind of torsion potential", & + usage="PARMTYPE {OFF,CHM,G87,G96}", & + enum_c_vals=s2a("OFF", "CHM", "G87", "G96", "AMBER"), & + enum_desc=s2a("Provides force field parameters through the input file", & + "Provides force field parameters through an external file with CHARMM format", & + "Provides force field parameters through an external file with GROMOS 87 format", & + "Provides force field parameters through an external file with GROMOS 96 format", & + "Provides force field parameters through an external file with AMBER format (from v.8 on)"), & + enum_i_vals=(/do_ff_undef, & + do_ff_charmm, & + do_ff_g87, & + do_ff_g96, & + do_ff_amber/), & + default_i_val=do_ff_undef) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -422,9 +423,10 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="NPOINTS", & - description="Override the default search for an accurate spline by specifying a fixed number of spline points.", & - usage="NPOINTS 1024", default_i_val=-1) + CALL keyword_create( & + keyword, name="NPOINTS", & + description="Override the default search for an accurate spline by specifying a fixed number of spline points.", & + usage="NPOINTS 1024", default_i_val=-1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -650,33 +652,34 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword=keyword, name="KIND", & - description="Define the kind of bend potential", & - usage="KIND HARMONIC", & - enum_c_vals=s2a("HARMONIC", "CHARMM", "AMBER", "G87", "G96", "CUBIC", "MIXED_BEND_STRETCH", "MM3", & - "LEGENDRE"), & - enum_desc=s2a("Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", & - "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", & - "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", & - "Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", & - "Functional Form (G96): 1/2*K*(COS(THETA)-THETA0)^2", & - "Functional Form (CUBIC): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))", & - "Functional Form (MIXED_BEND_STRETCH): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))+"// & - " KSS*(R12-R012)*(R32-R032)+KBS12*(R12-R012)*(THETA-THETA0)+KBS32*(R32-R032)*(THETA-THETA0)", & - "Functional Form (MM3): 1/2*K*(THETA-THETA0)**2*(1-0.014*(THETA-THETA0)+5.6E-5*(THETA-THETA0)**2"// & - " -7.0E-7*(THETA-THETA0)**3+9.0E-10*(THETA-THETA0)**4)+KBS12*(R12-R012)*(THETA-THETA0)+"// & - " KBS32*(R32-R032)*(THETA-THETA0)", & - "Functional Form (LEGENDRE): sum_{i=0}^N c_i*P_i(COS(THETA)) "), & - enum_i_vals=(/do_ff_harmonic, & - do_ff_charmm, & - do_ff_amber, & - do_ff_g87, & - do_ff_g96, & - do_ff_cubic, & - do_ff_mixed_bend_stretch, & - do_ff_mm3, & - do_ff_legendre/), & - default_i_val=do_ff_charmm) + CALL keyword_create( & + keyword=keyword, name="KIND", & + description="Define the kind of bend potential", & + usage="KIND HARMONIC", & + enum_c_vals=s2a("HARMONIC", "CHARMM", "AMBER", "G87", "G96", "CUBIC", "MIXED_BEND_STRETCH", "MM3", & + "LEGENDRE"), & + enum_desc=s2a("Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", & + "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", & + "Functional Form (CHARMM|AMBER): K*(THETA-THETA0)^2", & + "Functional Form (HARMONIC|G87): 1/2*K*(THETA-THETA0)^2", & + "Functional Form (G96): 1/2*K*(COS(THETA)-THETA0)^2", & + "Functional Form (CUBIC): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))", & + "Functional Form (MIXED_BEND_STRETCH): K*(THETA-THETA0)**2*(1+CB*(THETA-THETA0))+"// & + " KSS*(R12-R012)*(R32-R032)+KBS12*(R12-R012)*(THETA-THETA0)+KBS32*(R32-R032)*(THETA-THETA0)", & + "Functional Form (MM3): 1/2*K*(THETA-THETA0)**2*(1-0.014*(THETA-THETA0)+5.6E-5*(THETA-THETA0)**2"// & + " -7.0E-7*(THETA-THETA0)**3+9.0E-10*(THETA-THETA0)**4)+KBS12*(R12-R012)*(THETA-THETA0)+"// & + " KBS32*(R32-R032)*(THETA-THETA0)", & + "Functional Form (LEGENDRE): sum_{i=0}^N c_i*P_i(COS(THETA)) "), & + enum_i_vals=(/do_ff_harmonic, & + do_ff_charmm, & + do_ff_amber, & + do_ff_g87, & + do_ff_g96, & + do_ff_cubic, & + do_ff_mixed_bend_stretch, & + do_ff_mm3, & + do_ff_legendre/), & + default_i_val=do_ff_charmm) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -920,10 +923,11 @@ CONTAINS TYPE(keyword_type), POINTER :: keyword CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="QUADRUPOLE", & - description="This section specifies that we will perform an SCF quadrupole calculation of the MM atoms. "// & - "Needs KEYWORD POL_SCF in POISSON secton", & - n_keywords=1, n_subsections=0, repeats=.TRUE.) + CALL section_create( & + section, name="QUADRUPOLE", & + description="This section specifies that we will perform an SCF quadrupole calculation of the MM atoms. "// & + "Needs KEYWORD POL_SCF in POISSON secton", & + n_keywords=1, n_subsections=0, repeats=.TRUE.) NULLIFY (keyword) @@ -2089,11 +2093,12 @@ CONTAINS TYPE(keyword_type), POINTER :: keyword CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="BUCKMORSE", & - description="This section specifies the input parameters for"// & - " Buckingham plus Morse potential type "// & - " Functional Form: V(r) = F0*(B1+B2)*EXP([A1+A2-r]/[B1+B2])-C/r^6+D*{EXP[-2*beta*(r-R0)]-2*EXP[-beta*(r-R0)]}.", & - citations=(/Yamada2000/), n_keywords=1, n_subsections=0, repeats=.TRUE.) + CALL section_create( & + section, name="BUCKMORSE", & + description="This section specifies the input parameters for"// & + " Buckingham plus Morse potential type "// & + " Functional Form: V(r) = F0*(B1+B2)*EXP([A1+A2-r]/[B1+B2])-C/r^6+D*{EXP[-2*beta*(r-R0)]-2*EXP[-beta*(r-R0)]}.", & + citations=(/Yamada2000/), n_keywords=1, n_subsections=0, repeats=.TRUE.) NULLIFY (keyword) diff --git a/src/input_cp2k_motion_print.F b/src/input_cp2k_motion_print.F index ee92c523a9..ba4f2eac2a 100644 --- a/src/input_cp2k_motion_print.F +++ b/src/input_cp2k_motion_print.F @@ -71,10 +71,11 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "SHELL_TRAJECTORY", & - description="Controls the output of the trajectory of shells when the shell-model is used ", & - print_level=high_print_level, common_iter_levels=1, & - filename="", unit_str="angstrom") + CALL cp_print_key_section_create( & + print_key, "SHELL_TRAJECTORY", & + description="Controls the output of the trajectory of shells when the shell-model is used ", & + print_level=high_print_level, common_iter_levels=1, & + filename="", unit_str="angstrom") CALL add_format_keyword(keyword, print_key, pos=.TRUE., & description="Specifies the format of the output file for the trajectory of shells.") CALL section_add_subsection(section, print_key) @@ -134,10 +135,11 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "FORCE_MIXING_LABELS", & - description="Controls the output of the force mixing (FORCE_EVAL&QMMM&FORCE_MIXING) labels", & - print_level=high_print_level, common_iter_levels=1, & - filename="") + CALL cp_print_key_section_create( & + print_key, "FORCE_MIXING_LABELS", & + description="Controls the output of the force mixing (FORCE_EVAL&QMMM&FORCE_MIXING) labels", & + print_level=high_print_level, common_iter_levels=1, & + filename="") CALL add_format_keyword(keyword, print_key, pos=.FALSE., & description="Specifies the format of the output file for the force mixing labels.") CALL section_add_subsection(section, print_key) @@ -258,19 +260,20 @@ CONTAINS IF (pos) THEN - CALL keyword_create(keyword, name="FORMAT", & - description=description, usage="FORMAT (ATOMIC|DCD|PDB|XMOL|XYZ)", & - default_i_val=dump_xmol, & - enum_c_vals=s2a("ATOMIC", "DCD", "DCD_ALIGNED_CELL", "PDB", "XMOL", "XYZ"), & - enum_i_vals=(/dump_atomic, dump_dcd, dump_dcd_aligned_cell, dump_pdb, dump_xmol, dump_xmol/), & - enum_desc=s2a("Write only the coordinates X,Y,Z without element symbols to a formatted file", & - "Write the coordinates (no element labels) and the cell information to a binary file", & - "Like DCD, but the dumped coordinates refer to an aligned cell following the common convention: "// & - "the cell vector a is aligned with the x axis and the cell vector b lies in "// & - "the xy plane. This allows the reconstruction of scaled coordinates from the DCD data only.", & - "Write the atomic information in PDB format to a formatted file", & - "Mostly known as XYZ format, provides in a formatted file: element_symbol X Y Z", & - "Alias name for XMOL")) + CALL keyword_create( & + keyword, name="FORMAT", & + description=description, usage="FORMAT (ATOMIC|DCD|PDB|XMOL|XYZ)", & + default_i_val=dump_xmol, & + enum_c_vals=s2a("ATOMIC", "DCD", "DCD_ALIGNED_CELL", "PDB", "XMOL", "XYZ"), & + enum_i_vals=(/dump_atomic, dump_dcd, dump_dcd_aligned_cell, dump_pdb, dump_xmol, dump_xmol/), & + enum_desc=s2a("Write only the coordinates X,Y,Z without element symbols to a formatted file", & + "Write the coordinates (no element labels) and the cell information to a binary file", & + "Like DCD, but the dumped coordinates refer to an aligned cell following the common convention: "// & + "the cell vector a is aligned with the x axis and the cell vector b lies in "// & + "the xy plane. This allows the reconstruction of scaled coordinates from the DCD data only.", & + "Write the atomic information in PDB format to a formatted file", & + "Mostly known as XYZ format, provides in a formatted file: element_symbol X Y Z", & + "Alias name for XMOL")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_mp2.F b/src/input_cp2k_mp2.F index 6850e6454a..2f90bec377 100644 --- a/src/input_cp2k_mp2.F +++ b/src/input_cp2k_mp2.F @@ -406,22 +406,24 @@ CONTAINS NULLIFY (keyword) - CALL keyword_create(keyword, name="QUADRATURE_POINTS", & - variants=(/"LAPLACE_NUM_QUAD_POINTS"/), & - description="Number of quadrature points for the numerical integration in the RI-SOS-MP2-Laplace method.", & - usage="QUADRATURE_POINTS 6", & - default_i_val=5) + CALL keyword_create( & + keyword, name="QUADRATURE_POINTS", & + variants=(/"LAPLACE_NUM_QUAD_POINTS"/), & + description="Number of quadrature points for the numerical integration in the RI-SOS-MP2-Laplace method.", & + usage="QUADRATURE_POINTS 6", & + default_i_val=5) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="SIZE_INTEG_GROUP", & - variants=(/"LAPLACE_GROUP_SIZE"/), & - description="Group size for the integration in the Laplace method, that is the number of processes involved in "// & - "the computation of each integration point. SIZE_INTEG_GROUP has to be a multiple "// & - "of GROUP_SIZE in the WF_CORRELATION section. The default (-1) "// & - "is automatic.", & - usage="SIZE_INTEG_GROUP 16", & - default_i_val=-1) + CALL keyword_create( & + keyword, name="SIZE_INTEG_GROUP", & + variants=(/"LAPLACE_GROUP_SIZE"/), & + description="Group size for the integration in the Laplace method, that is the number of processes involved in "// & + "the computation of each integration point. SIZE_INTEG_GROUP has to be a multiple "// & + "of GROUP_SIZE in the WF_CORRELATION section. The default (-1) "// & + "is automatic.", & + usage="SIZE_INTEG_GROUP 16", & + default_i_val=-1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -747,15 +749,16 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="FRACTION_EXX", & - variants=(/"ALPHA"/), & - description="Mixing parameter between official CP2K-HFX (EXX) based on the truncated Coulomb operator "// & - "(fraction = alpha) and the RI-HFX (fraction = 1-alpha). To be valid, set MIX_HFX TRUE. "// & - "Parameter can be used to speed up the convergence of the GW HOMO-LUMO gap of periodic systems "// & - "with the cell size.", & - usage="FRACTION_EXX 0.21", & - default_r_val=0.21_dp, & - unit_str="") + CALL keyword_create( & + keyword, name="FRACTION_EXX", & + variants=(/"ALPHA"/), & + description="Mixing parameter between official CP2K-HFX (EXX) based on the truncated Coulomb operator "// & + "(fraction = alpha) and the RI-HFX (fraction = 1-alpha). To be valid, set MIX_HFX TRUE. "// & + "Parameter can be used to speed up the convergence of the GW HOMO-LUMO gap of periodic systems "// & + "with the cell size.", & + usage="FRACTION_EXX 0.21", & + default_r_val=0.21_dp, & + unit_str="") CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -811,10 +814,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_FILTER", & - description="Determines a threshold for the DBCSR based multiply (usually 10 times smaller than EPS_GRID).", & - usage="EPS_FILTER 1.0E-10 ", type_of_var=real_t, & - default_r_val=1.0E-9_dp) + CALL keyword_create( & + keyword, name="EPS_FILTER", & + description="Determines a threshold for the DBCSR based multiply (usually 10 times smaller than EPS_GRID).", & + usage="EPS_FILTER 1.0E-10 ", type_of_var=real_t, & + default_r_val=1.0E-9_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -869,10 +873,11 @@ CONTAINS TYPE(keyword_type), POINTER :: keyword CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, "CPHF", & - description="Parameters influencing the solution of the Z-vector equations in MP2 gradients calculations.", & - n_keywords=2, n_subsections=0, repeats=.FALSE., & - citations=(/DelBen2013/)) + CALL section_create( & + section, "CPHF", & + description="Parameters influencing the solution of the Z-vector equations in MP2 gradients calculations.", & + n_keywords=2, n_subsections=0, repeats=.FALSE., & + citations=(/DelBen2013/)) NULLIFY (keyword) diff --git a/src/input_cp2k_poisson.F b/src/input_cp2k_poisson.F index 3823442fd5..204c630c83 100644 --- a/src/input_cp2k_poisson.F +++ b/src/input_cp2k_poisson.F @@ -287,23 +287,24 @@ CONTAINS citations=(/Ewald1921, Darden1993, Essmann1995, Toukmaji1996, Laino2008/)) NULLIFY (keyword, print_key, subsection) - CALL keyword_create(keyword, name="EWALD_TYPE", & - description="The type of ewald you want to perform.", & - citations=(/Ewald1921, Essmann1995, Darden1993/), & - usage="EWALD_TYPE (NONE|EWALD|PME|SPME)", & - default_i_val=do_ewald_ewald, & - enum_c_vals=(/"none ", & - "ewald ", & - "pme ", & - "spme "/), & - enum_i_vals=(/do_ewald_none, & - do_ewald_ewald, & - do_ewald_pme, & - do_ewald_spme/), & - enum_desc=s2a("NONE standard real-space coulomb potential is computed together with the non-bonded contributions", & - "EWALD is the standard non-fft based ewald", & - "PME is the particle mesh using fft interpolation", & - "SPME is the smooth particle mesh using beta-Euler splines (recommended)")) + CALL keyword_create( & + keyword, name="EWALD_TYPE", & + description="The type of ewald you want to perform.", & + citations=(/Ewald1921, Essmann1995, Darden1993/), & + usage="EWALD_TYPE (NONE|EWALD|PME|SPME)", & + default_i_val=do_ewald_ewald, & + enum_c_vals=(/"none ", & + "ewald ", & + "pme ", & + "spme "/), & + enum_i_vals=(/do_ewald_none, & + do_ewald_ewald, & + do_ewald_pme, & + do_ewald_spme/), & + enum_desc=s2a("NONE standard real-space coulomb potential is computed together with the non-bonded contributions", & + "EWALD is the standard non-fft based ewald", & + "PME is the particle mesh using fft interpolation", & + "SPME is the smooth particle mesh using beta-Euler splines (recommended)")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -538,23 +539,25 @@ CONTAINS TYPE(keyword_type), POINTER :: keyword CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="wavelet", & - description="Sets up parameters of wavelet based poisson solver."// & - "This solver allows for non-periodic (PERIODIC NONE) boundary conditions and slab-boundary conditions "// & - "(but only PERIODIC XZ)."// & - "It does not require very large unit cells, only that the density goes to zero on the faces of the cell."// & - "The use of PREFERRED_FFT_LIBRARY FFTSG is required", & - n_keywords=1, n_subsections=0, repeats=.FALSE., & - citations=(/Genovese2006, Genovese2007/)) + CALL section_create( & + section, name="wavelet", & + description="Sets up parameters of wavelet based poisson solver."// & + "This solver allows for non-periodic (PERIODIC NONE) boundary conditions and slab-boundary conditions "// & + "(but only PERIODIC XZ)."// & + "It does not require very large unit cells, only that the density goes to zero on the faces of the cell."// & + "The use of PREFERRED_FFT_LIBRARY FFTSG is required", & + n_keywords=1, n_subsections=0, repeats=.FALSE., & + citations=(/Genovese2006, Genovese2007/)) NULLIFY (keyword) - CALL keyword_create(keyword, name="SCF_TYPE", & - description="Type of scaling function used in the wavelet approach, the total energy depends on this choice,"// & - "and the convergence with respect to cutoff depends on the selected scaling functions."// & - "Possible values are 8,14,16,20,24,30,40,50,60,100 ", & - usage="SCF_TYPE integer", & - n_var=1, default_i_val=40) + CALL keyword_create( & + keyword, name="SCF_TYPE", & + description="Type of scaling function used in the wavelet approach, the total energy depends on this choice,"// & + "and the convergence with respect to cutoff depends on the selected scaling functions."// & + "Possible values are 8,14,16,20,24,30,40,50,60,100 ", & + usage="SCF_TYPE integer", & + n_var=1, default_i_val=40) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -590,14 +593,15 @@ CONTAINS CALL section_add_subsection(section, subsection) CALL section_release(subsection) - CALL keyword_create(keyword, name="BOUNDARY_CONDITIONS", & - enum_c_vals=s2a('PERIODIC', 'MIXED', 'MIXED_PERIODIC', 'NEUMANN'), & - enum_desc=s2a('periodic boundary conditions', 'Dirichlet + homogeneous Neumann boundary conditions', & - 'Dirichlet + periodic boundary conditions', 'homogeneous Neumann BC (zero-average solution)'), & - enum_i_vals=(/PERIODIC_BC, MIXED_BC, MIXED_PERIODIC_BC, NEUMANN_BC/), & - description="Specifies the type of boundary conditions. Dirichlet=fixed value, Neumann=zero normal deriv. "// & - "Mixed and Neumann boundaries essentially requires FFTW3 so that all grid sizes are FFT-able.", & - usage="BOUNDARY_CONDITIONS ", default_i_val=PERIODIC_BC) + CALL keyword_create( & + keyword, name="BOUNDARY_CONDITIONS", & + enum_c_vals=s2a('PERIODIC', 'MIXED', 'MIXED_PERIODIC', 'NEUMANN'), & + enum_desc=s2a('periodic boundary conditions', 'Dirichlet + homogeneous Neumann boundary conditions', & + 'Dirichlet + periodic boundary conditions', 'homogeneous Neumann BC (zero-average solution)'), & + enum_i_vals=(/PERIODIC_BC, MIXED_BC, MIXED_PERIODIC_BC, NEUMANN_BC/), & + description="Specifies the type of boundary conditions. Dirichlet=fixed value, Neumann=zero normal deriv. "// & + "Mixed and Neumann boundaries essentially requires FFTW3 so that all grid sizes are FFT-able.", & + usage="BOUNDARY_CONDITIONS ", default_i_val=PERIODIC_BC) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -625,14 +629,15 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="NEUMANN_DIRECTIONS", & - enum_c_vals=s2a('XYZ', 'XY', 'XZ', 'YZ', 'X', 'Y', 'Z'), & - enum_i_vals=(/neumannXYZ, neumannXY, neumannXZ, neumannYZ, neumannX, neumannY, neumannZ/), & - description="Directions in which homogeneous Neumann conditions are imposed. In the remaining directions "// & - "periodic conditions will be enforced. Having specified MIXED or NEUMANN as BOUNDARY_CONDITIONS, "// & - "the keyword is meant to be used to combine periodic and homogeneous Neumann conditions at the "// & - "boundaries of the simulation cell.", & - usage="NEUMANN_DIRECTIONS ", default_i_val=neumannXYZ) + CALL keyword_create( & + keyword, name="NEUMANN_DIRECTIONS", & + enum_c_vals=s2a('XYZ', 'XY', 'XZ', 'YZ', 'X', 'Y', 'Z'), & + enum_i_vals=(/neumannXYZ, neumannXY, neumannXZ, neumannYZ, neumannX, neumannY, neumannZ/), & + description="Directions in which homogeneous Neumann conditions are imposed. In the remaining directions "// & + "periodic conditions will be enforced. Having specified MIXED or NEUMANN as BOUNDARY_CONDITIONS, "// & + "the keyword is meant to be used to combine periodic and homogeneous Neumann conditions at the "// & + "boundaries of the simulation cell.", & + usage="NEUMANN_DIRECTIONS ", default_i_val=neumannXYZ) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -669,16 +674,17 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="DIELECTRIC_FUNCTION_TYPE", & - enum_c_vals=s2a('density_dependent', 'spatially_dependent', 'spatially_rho_dependent'), & - enum_i_vals=(/rho_dependent, spatially_dependent, spatially_rho_dependent/), & - enum_desc=s2a("Dielectric constant as a function of the electron density "// & - "as e.g. proposed within the SCCS model.", & - "Various regions with different dielectric constants.", & - "Various regions with different dielectric constants. The dielectric constant decays to 1.0, "// & - "wherever the electron density is present."), & - description="Preferred type for the dielectric constant function.", & - usage="DIELECTRIC_FUNCTION_TYPE ", default_i_val=rho_dependent) + CALL keyword_create( & + keyword, name="DIELECTRIC_FUNCTION_TYPE", & + enum_c_vals=s2a('density_dependent', 'spatially_dependent', 'spatially_rho_dependent'), & + enum_i_vals=(/rho_dependent, spatially_dependent, spatially_rho_dependent/), & + enum_desc=s2a("Dielectric constant as a function of the electron density "// & + "as e.g. proposed within the SCCS model.", & + "Various regions with different dielectric constants.", & + "Various regions with different dielectric constants. The dielectric constant decays to 1.0, "// & + "wherever the electron density is present."), & + description="Preferred type for the dielectric constant function.", & + usage="DIELECTRIC_FUNCTION_TYPE ", default_i_val=rho_dependent) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -700,18 +706,19 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="DERIVATIVE_METHOD", & - enum_c_vals=s2a('fft', 'fft_use_deps', 'fft_use_drho', 'cd3', 'cd5', 'cd7'), & - enum_i_vals=(/derivative_fft, derivative_fft_use_deps, derivative_fft_use_drho, & - derivative_cd3, derivative_cd5, derivative_cd7/), & - enum_desc=s2a("FFT based deriv of epsilon, without correction (high cutoff needed).", & - "FFT based deriv of epsilon, with correction using gradient of epsilon (high cutoff needed).", & - "FFT based deriv of epsilon, with correction using gradient of rho (high cutoff needed).", & - "3-point central difference derivative.", & - "5-point central difference derivative.", & - "7-point central difference derivative (recommended)."), & - description="Preferred method for evaluating the gradient of ln(eps).", & - usage="DERIVATIVE_METHOD ", default_i_val=derivative_cd7) + CALL keyword_create( & + keyword, name="DERIVATIVE_METHOD", & + enum_c_vals=s2a('fft', 'fft_use_deps', 'fft_use_drho', 'cd3', 'cd5', 'cd7'), & + enum_i_vals=(/derivative_fft, derivative_fft_use_deps, derivative_fft_use_drho, & + derivative_cd3, derivative_cd5, derivative_cd7/), & + enum_desc=s2a("FFT based deriv of epsilon, without correction (high cutoff needed).", & + "FFT based deriv of epsilon, with correction using gradient of epsilon (high cutoff needed).", & + "FFT based deriv of epsilon, with correction using gradient of rho (high cutoff needed).", & + "3-point central difference derivative.", & + "5-point central difference derivative.", & + "7-point central difference derivative (recommended)."), & + description="Preferred method for evaluating the gradient of ln(eps).", & + usage="DERIVATIVE_METHOD ", default_i_val=derivative_cd7) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -983,9 +990,10 @@ CONTAINS TYPE(keyword_type), POINTER :: keyword CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="PLANAR", & - description="Parameters for creating planar (rectangular) Dirichlet boundary regions with given vertices.", & - n_keywords=7, n_subsections=0, repeats=.TRUE.) + CALL section_create( & + section, name="PLANAR", & + description="Parameters for creating planar (rectangular) Dirichlet boundary regions with given vertices.", & + n_keywords=7, n_subsections=0, repeats=.TRUE.) NULLIFY (keyword) @@ -1016,11 +1024,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="N_PRTN", & - description="The number of partitions along the edges for tiling the rectangular region. If the edges "// & - "have different lengths, from the two given values, the larger one will be assigned to the longer edge.", & - usage="N_PRTN ", & - n_var=2, default_i_vals=(/1, 1/)) + CALL keyword_create( & + keyword, name="N_PRTN", & + description="The number of partitions along the edges for tiling the rectangular region. If the edges "// & + "have different lengths, from the two given values, the larger one will be assigned to the longer edge.", & + usage="N_PRTN ", & + n_var=2, default_i_vals=(/1, 1/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1098,11 +1107,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="N_PRTN", & - description="The number of partitions along the face edges of the prism for tiling. If the edges "// & - "have different lengths, from the two given values, the larger one will be assigned to the longer edge.", & - usage="N_PRTN ", & - n_var=2, default_i_vals=(/1, 1/)) + CALL keyword_create( & + keyword, name="N_PRTN", & + description="The number of partitions along the face edges of the prism for tiling. If the edges "// & + "have different lengths, from the two given values, the larger one will be assigned to the longer edge.", & + usage="N_PRTN ", & + n_var=2, default_i_vals=(/1, 1/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1118,11 +1128,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="delta_alpha", & - description="A central angle specifying the gap between the faces of the n-gonal prism. To avoide overlap "// & - "between the cuboids (of the given thickness) built on top of the faces, a larger value is required if the"// & - " number of faces (N_SIDES) is quite few and/or the base radius is fairly small.", & - usage="delta_alpha ", default_r_val=0.05_dp, unit_str="rad") + CALL keyword_create( & + keyword, name="delta_alpha", & + description="A central angle specifying the gap between the faces of the n-gonal prism. To avoide overlap "// & + "between the cuboids (of the given thickness) built on top of the faces, a larger value is required if the"// & + " number of faces (N_SIDES) is quite few and/or the base radius is fairly small.", & + usage="delta_alpha ", default_r_val=0.05_dp, unit_str="rad") CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_properties_dft.F b/src/input_cp2k_properties_dft.F index 7e379099de..0ab0365a84 100644 --- a/src/input_cp2k_properties_dft.F +++ b/src/input_cp2k_properties_dft.F @@ -156,28 +156,29 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="PRECONDITIONER", & - description="Type of preconditioner to be used with all minimization schemes. "// & - "They differ in effectiveness, cost of construction, cost of application. "// & - "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", & - usage="PRECONDITIONER FULL_ALL", & - default_i_val=ot_precond_none, & - enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", & - "NONE"), & - enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// & - "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// & - "This preconditioner is recommended for almost all systems, except very large systems where "// & - "make_preconditioner would dominate the total computational cost.", & - "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// & - "but cheaper to construct, "// & - "might be somewhat less robust. Recommended for large systems.", & - "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", & - "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// & - "use for very large systems.", & - "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", & - "skip preconditioning"), & - enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_full_single, & - ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_none/)) + CALL keyword_create( & + keyword, name="PRECONDITIONER", & + description="Type of preconditioner to be used with all minimization schemes. "// & + "They differ in effectiveness, cost of construction, cost of application. "// & + "Properly preconditioned minimization can be orders of magnitude faster than doing nothing.", & + usage="PRECONDITIONER FULL_ALL", & + default_i_val=ot_precond_none, & + enum_c_vals=s2a("FULL_ALL", "FULL_SINGLE_INVERSE", "FULL_SINGLE", "FULL_KINETIC", "FULL_S_INVERSE", & + "NONE"), & + enum_desc=s2a("Most effective state selective preconditioner based on diagonalization, "// & + "requires the ENERGY_GAP parameter to be an underestimate of the HOMO-LUMO gap. "// & + "This preconditioner is recommended for almost all systems, except very large systems where "// & + "make_preconditioner would dominate the total computational cost.", & + "Based on H-eS cholesky inversion, similar to FULL_SINGLE in preconditioning efficiency "// & + "but cheaper to construct, "// & + "might be somewhat less robust. Recommended for large systems.", & + "Based on H-eS diagonalisation, not as good as FULL_ALL, but somewhat cheaper to apply. ", & + "Cholesky inversion of S and T, fast construction, robust, and relatively good, "// & + "use for very large systems.", & + "Cholesky inversion of S, not as good as FULL_KINETIC, yet equally expensive.", & + "skip preconditioning"), & + enum_i_vals=(/ot_precond_full_all, ot_precond_full_single_inverse, ot_precond_full_single, & + ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_none/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -231,9 +232,10 @@ CONTAINS CALL section_create(subsection, "PRINT", "printing of information during the linear response calculation", & repeats=.FALSE.) - CALL cp_print_key_section_create(print_key, "program_run_info", & - description="Controls the printing of basic iteration information during the LINRES calculation", & - print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "program_run_info", & + description="Controls the printing of basic iteration information during the LINRES calculation", & + print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) @@ -1000,10 +1002,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="COEFF", & - description="Defines the the coefficient of the atom in the atom list (default is one), currently DDAPC only ", & - usage="COEFF 1.0 -1.0", & - type_of_var=real_t, n_var=-1) + CALL keyword_create( & + keyword, name="COEFF", & + description="Defines the the coefficient of the atom in the atom list (default is one), currently DDAPC only ", & + usage="COEFF 1.0 -1.0", & + type_of_var=real_t, n_var=-1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_qmmm.F b/src/input_cp2k_qmmm.F index 384f3393ec..74ad3ff89e 100644 --- a/src/input_cp2k_qmmm.F +++ b/src/input_cp2k_qmmm.F @@ -216,10 +216,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="DELTA_CHARGE", & - description="Additional net charge relative to that specified in DFT section. Used automatically by force mixing", & - usage="DELTA_CHARGE q", default_i_val=0, & - n_var=1, type_of_var=integer_t, repeats=.FALSE.) + CALL keyword_create( & + keyword, name="DELTA_CHARGE", & + description="Additional net charge relative to that specified in DFT section. Used automatically by force mixing", & + usage="DELTA_CHARGE q", default_i_val=0, & + n_var=1, type_of_var=integer_t, repeats=.FALSE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -485,10 +486,11 @@ CONTAINS ![NB] also, breakable bonds? ! BUFFER_LINKS subsection NULLIFY (subsection) - CALL section_create(subsection, name="BUFFER_LINKS", & - description="Information about possible links for automatic covalent bond breaking for the buffer QM/MM calculation."// & - "Ignored - need to implement buffer selection by atom and walking of connectivity data.", & - n_keywords=0, n_subsections=1, repeats=.TRUE.) + CALL section_create( & + subsection, name="BUFFER_LINKS", & + description="Information about possible links for automatic covalent bond breaking for the buffer QM/MM calculation."// & + "Ignored - need to implement buffer selection by atom and walking of connectivity data.", & + n_keywords=0, n_subsections=1, repeats=.TRUE.) NULLIFY (link_subsection) CALL create_qmmm_link_section(link_subsection) @@ -749,9 +751,10 @@ CONTAINS n_keywords=0, n_subsections=0, repeats=.FALSE., & citations=(/Laino2006/)) - CALL keyword_create(keyword, name="GMAX", & - description="Specifies the maximum value of G in the reciprocal space over which perform the Ewald sum.", & - usage="GMAX ", n_var=1, default_r_val=1.0_dp) + CALL keyword_create( & + keyword, name="GMAX", & + description="Specifies the maximum value of G in the reciprocal space over which perform the Ewald sum.", & + usage="GMAX ", n_var=1, default_r_val=1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -994,10 +997,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="CORR_RADIUS", & - description="Overwrite the specification of the correction radius only for the MM atom involved in the link."// & - "Default is to use the same correction radius as for the specified type.", & - usage="RADIUS real", n_var=1, type_of_var=real_t, unit_str="angstrom") + CALL keyword_create( & + keyword, name="CORR_RADIUS", & + description="Overwrite the specification of the correction radius only for the MM atom involved in the link."// & + "Default is to use the same correction radius as for the specified type.", & + usage="RADIUS real", n_var=1, type_of_var=real_t, unit_str="angstrom") CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1126,10 +1130,11 @@ CONTAINS CALL section_add_keyword(subsection, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="CORR_RADIUS", & - description="Specifies the correction radius used for the QM/MM electrostatic coupling for the added source", & - usage="RADIUS real", n_var=1, unit_str="angstrom", & - default_r_val=cp_unit_to_cp2k(RADIUS_QMMM_DEFAULT, "angstrom")) + CALL keyword_create( & + keyword, name="CORR_RADIUS", & + description="Specifies the correction radius used for the QM/MM electrostatic coupling for the added source", & + usage="RADIUS real", n_var=1, unit_str="angstrom", & + default_r_val=cp_unit_to_cp2k(RADIUS_QMMM_DEFAULT, "angstrom")) CALL section_add_keyword(subsection, keyword) CALL keyword_release(keyword) @@ -1322,9 +1327,10 @@ CONTAINS CALL section_add_subsection(section, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "PERIODIC_INFO", & - description="Controls the printing of information regarding the periodic boundary condition.", & - print_level=medium_print_level, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "PERIODIC_INFO", & + description="Controls the printing of information regarding the periodic boundary condition.", & + print_level=medium_print_level, filename="__STD_OUT__") CALL section_add_subsection(section, print_key) CALL section_release(print_key) diff --git a/src/input_cp2k_rsgrid.F b/src/input_cp2k_rsgrid.F index 1f21a08d5a..61b33ed749 100644 --- a/src/input_cp2k_rsgrid.F +++ b/src/input_cp2k_rsgrid.F @@ -47,9 +47,10 @@ CONTAINS TYPE(keyword_type), POINTER :: keyword CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="RS_GRID", & - description="Set options that influence how the realspace grids are being distributed in parallel runs.", & - n_keywords=5, n_subsections=0, repeats=.TRUE.) + CALL section_create( & + section, name="RS_GRID", & + description="Set options that influence how the realspace grids are being distributed in parallel runs.", & + n_keywords=5, n_subsections=0, repeats=.TRUE.) NULLIFY (keyword) CALL keyword_create(keyword, name="DISTRIBUTION_TYPE", & diff --git a/src/input_cp2k_subsys.F b/src/input_cp2k_subsys.F index 24b5cbae00..20a98f40c7 100644 --- a/src/input_cp2k_subsys.F +++ b/src/input_cp2k_subsys.F @@ -187,26 +187,27 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="SYMMETRY", & - description="Imposes an initial cell symmetry.", & - usage="SYMMETRY monoclinic", & - enum_desc=s2a("No cell symmetry", & - "Triclinic (a ≠ b ≠ c ≠ a, α ≠ β ≠ γ ≠ α ≠ 90°)", & - "Monoclinic (a ≠ b ≠ c ≠ a, α = γ = 90°, β ≠ 90°)", & - "Orthorhombic (a ≠ b ≠ c, α = β = γ = 90°)", & - "Tetragonal (a = b ≠ c, α = β = γ = 90°)", & - "Tetragonal (a = c ≠ b, α = β = γ = 90°)", & - "Tetragonal (a ≠ b = c, α = β = γ = 90°)", & - "Tetragonal (alias for TETRAGONAL_AB)", & - "Rhombohedral (a = b = c, α = β = γ ≠ 90°)", & - "Hexagonal (a = b ≠ c, α = β = 90°, γ = 60°)", & - "Cubic (a = b = c, α = β = γ = 90°)"), & - enum_c_vals=s2a("NONE", "TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL_AB", "TETRAGONAL_AC", & - "TETRAGONAL_BC", "TETRAGONAL", "RHOMBOHEDRAL", "HEXAGONAL", "CUBIC"), & - enum_i_vals=(/cell_sym_none, cell_sym_triclinic, cell_sym_monoclinic, cell_sym_orthorhombic, & - cell_sym_tetragonal_ab, cell_sym_tetragonal_ac, cell_sym_tetragonal_bc, & - cell_sym_tetragonal_ab, cell_sym_rhombohedral, cell_sym_hexagonal, cell_sym_cubic/), & - default_i_val=cell_sym_none) + CALL keyword_create( & + keyword, name="SYMMETRY", & + description="Imposes an initial cell symmetry.", & + usage="SYMMETRY monoclinic", & + enum_desc=s2a("No cell symmetry", & + "Triclinic (a ≠ b ≠ c ≠ a, α ≠ β ≠ γ ≠ α ≠ 90°)", & + "Monoclinic (a ≠ b ≠ c ≠ a, α = γ = 90°, β ≠ 90°)", & + "Orthorhombic (a ≠ b ≠ c, α = β = γ = 90°)", & + "Tetragonal (a = b ≠ c, α = β = γ = 90°)", & + "Tetragonal (a = c ≠ b, α = β = γ = 90°)", & + "Tetragonal (a ≠ b = c, α = β = γ = 90°)", & + "Tetragonal (alias for TETRAGONAL_AB)", & + "Rhombohedral (a = b = c, α = β = γ ≠ 90°)", & + "Hexagonal (a = b ≠ c, α = β = 90°, γ = 60°)", & + "Cubic (a = b = c, α = β = γ = 90°)"), & + enum_c_vals=s2a("NONE", "TRICLINIC", "MONOCLINIC", "ORTHORHOMBIC", "TETRAGONAL_AB", "TETRAGONAL_AC", & + "TETRAGONAL_BC", "TETRAGONAL", "RHOMBOHEDRAL", "HEXAGONAL", "CUBIC"), & + enum_i_vals=(/cell_sym_none, cell_sym_triclinic, cell_sym_monoclinic, cell_sym_orthorhombic, & + cell_sym_tetragonal_ab, cell_sym_tetragonal_ac, cell_sym_tetragonal_bc, & + cell_sym_tetragonal_ab, cell_sym_rhombohedral, cell_sym_hexagonal, cell_sym_cubic/), & + default_i_val=cell_sym_none) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -849,31 +850,32 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="_DEFAULT_KEYWORD_", & - repeats=.TRUE., type_of_var=lchar_t, & - description="CP2K Basis Set Standard Format"//newline// & - "
"//newline// &
-                          "Element symbol  Name of the basis set  Alias names"//newline// &
-                          "nset (repeat the following block of lines nset times)"//newline// &
-                          "n lmin lmax nexp nshell(lmin) nshell(lmin+1) ... nshell(lmax-1) nshell(lmax)"//newline// &
-                      "a(1)      c(1,l,1)      c(1,l,2) ...      c(1,l,nshell(l)-1)      c(1,l,nshell(l)), l=lmin,lmax"//newline// &
-                      "a(2)      c(2,l,1)      c(2,l,2) ...      c(2,l,nshell(l)-1)      c(2,l,nshell(l)), l=lmin,lmax"//newline// &
-                          " .         .             .                 .                       ."//newline// &
-                          " .         .             .                 .                       ."//newline// &
-                          " .         .             .                 .                       ."//newline// &
-                 "a(nexp-1) c(nexp-1,l,1) c(nexp-1,l,2) ... c(nexp-1,l,nshell(l)-1) c(nexp-1,l,nshell(l)), l=lmin,lmax"//newline// &
-                   "a(nexp)   c(nexp,l,1)   c(nexp,l,2)   ... c(nexp,l,nshell(l)-1)   c(nexp,l,nshell(l)), l=lmin,lmax"//newline// &
-                          newline// &
-                          newline// &
-                          "nset     : Number of exponent sets"//newline// &
-                          "n        : Principle quantum number (only for orbital label printing)"//newline// &
-                          "lmax     : Maximum angular momentum quantum number l"//newline// &
-                          "lmin     : Minimum angular momentum quantum number l"//newline// &
-                          "nshell(l): Number of shells for angular momentum quantum number l"//newline// &
-                          "a        : Exponent"//newline// &
-                          "c        : Contraction coefficient"//newline// &
-                          "
"//newline// & - "Source: ftp://ftp.aip.org/epaps/journ_chem_phys/E-JCPSA6-127-308733/BASIS_MOLOPT_JCP.txt") + CALL keyword_create( & + keyword, name="_DEFAULT_KEYWORD_", & + repeats=.TRUE., type_of_var=lchar_t, & + description="CP2K Basis Set Standard Format"//newline// & + "
"//newline// &
+         "Element symbol  Name of the basis set  Alias names"//newline// &
+         "nset (repeat the following block of lines nset times)"//newline// &
+         "n lmin lmax nexp nshell(lmin) nshell(lmin+1) ... nshell(lmax-1) nshell(lmax)"//newline// &
+         "a(1)      c(1,l,1)      c(1,l,2) ...      c(1,l,nshell(l)-1)      c(1,l,nshell(l)), l=lmin,lmax"//newline// &
+         "a(2)      c(2,l,1)      c(2,l,2) ...      c(2,l,nshell(l)-1)      c(2,l,nshell(l)), l=lmin,lmax"//newline// &
+         " .         .             .                 .                       ."//newline// &
+         " .         .             .                 .                       ."//newline// &
+         " .         .             .                 .                       ."//newline// &
+         "a(nexp-1) c(nexp-1,l,1) c(nexp-1,l,2) ... c(nexp-1,l,nshell(l)-1) c(nexp-1,l,nshell(l)), l=lmin,lmax"//newline// &
+         "a(nexp)   c(nexp,l,1)   c(nexp,l,2)   ... c(nexp,l,nshell(l)-1)   c(nexp,l,nshell(l)), l=lmin,lmax"//newline// &
+         newline// &
+         newline// &
+         "nset     : Number of exponent sets"//newline// &
+         "n        : Principle quantum number (only for orbital label printing)"//newline// &
+         "lmax     : Maximum angular momentum quantum number l"//newline// &
+         "lmin     : Minimum angular momentum quantum number l"//newline// &
+         "nshell(l): Number of shells for angular momentum quantum number l"//newline// &
+         "a        : Exponent"//newline// &
+         "c        : Contraction coefficient"//newline// &
+         "
"//newline// & + "Source: ftp://ftp.aip.org/epaps/journ_chem_phys/E-JCPSA6-127-308733/BASIS_MOLOPT_JCP.txt") CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1075,12 +1077,13 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="AUX_FIT_BASIS_SET", & - variants=s2a("AUXILIARY_FIT_BASIS_SET", "AUX_FIT_BASIS"), & - description="DEPRECATED (use BASIS_SET): The auxliliary basis set (GTO type) for auxiliary density matrix method", & - usage="AUX_FIT_BASIS_SET DZVP", default_c_val=" ", & - citations=(/Guidon2010/), & - n_var=1) + CALL keyword_create( & + keyword, name="AUX_FIT_BASIS_SET", & + variants=s2a("AUXILIARY_FIT_BASIS_SET", "AUX_FIT_BASIS"), & + description="DEPRECATED (use BASIS_SET): The auxliliary basis set (GTO type) for auxiliary density matrix method", & + usage="AUX_FIT_BASIS_SET DZVP", default_c_val=" ", & + citations=(/Guidon2010/), & + n_var=1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) ! end of old basis set keywords @@ -1597,12 +1600,13 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="MULTIPLE_UNIT_CELL", & - description="Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// & - "assuming it as a unit cell. This keyword affects only the coordinates specification. The same keyword "// & - "in SUBSYS%CELL%MULTIPLE_UNIT_CELL should be modified in order to affect the cell "// & - "specification.", usage="MULTIPLE_UNIT_CELL 1 1 1", & - n_var=3, default_i_vals=(/1, 1, 1/), repeats=.FALSE.) + CALL keyword_create( & + keyword, name="MULTIPLE_UNIT_CELL", & + description="Specifies the numbers of repetition in space (X, Y, Z) of the defined cell, "// & + "assuming it as a unit cell. This keyword affects only the coordinates specification. The same keyword "// & + "in SUBSYS%CELL%MULTIPLE_UNIT_CELL should be modified in order to affect the cell "// & + "specification.", usage="MULTIPLE_UNIT_CELL 1 1 1", & + n_var=3, default_i_vals=(/1, 1, 1/), repeats=.FALSE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_transport.F b/src/input_cp2k_transport.F index 580c1b00f2..be8eabaf11 100644 --- a/src/input_cp2k_transport.F +++ b/src/input_cp2k_transport.F @@ -170,14 +170,15 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="ROW_DISTRIBUTION", & - description="How to distribute matrix rows over tasks.", & - enum_c_vals=s2a("DBCSR", "CEILING", "FLOOR"), & - enum_desc=s2a("Each task holds floor(N_BLOCK/TASKS_PER_POINT) DBCSR block rows for a total of N_BLOCK block rows", & - "Each task holds ceiling(N/TASKS_PER_POINT) rows for a total of N matrix rows", & - "Each task holds floor(N/TASKS_PER_POINT) rows for a total of N matrix rows"), & - enum_i_vals=(/csr_dbcsr_blkrow_dist, csr_eqrow_ceil_dist, csr_eqrow_floor_dist/), & - default_i_val=csr_eqrow_floor_dist) + CALL keyword_create( & + keyword, name="ROW_DISTRIBUTION", & + description="How to distribute matrix rows over tasks.", & + enum_c_vals=s2a("DBCSR", "CEILING", "FLOOR"), & + enum_desc=s2a("Each task holds floor(N_BLOCK/TASKS_PER_POINT) DBCSR block rows for a total of N_BLOCK block rows", & + "Each task holds ceiling(N/TASKS_PER_POINT) rows for a total of N matrix rows", & + "Each task holds floor(N/TASKS_PER_POINT) rows for a total of N matrix rows"), & + enum_i_vals=(/csr_dbcsr_blkrow_dist, csr_eqrow_ceil_dist, csr_eqrow_floor_dist/), & + default_i_val=csr_eqrow_floor_dist) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -207,11 +208,12 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="CUTOUT", & - description="Degrees of freedom at the beginning and the end of the structure (in the number of atoms) "// & - "where the density should not be changed.", & - usage="CUTOUT ", & - n_var=2, default_i_vals=(/0, 0/)) + CALL keyword_create( & + keyword, name="CUTOUT", & + description="Degrees of freedom at the beginning and the end of the structure (in the number of atoms) "// & + "where the density should not be changed.", & + usage="CUTOUT ", & + n_var=2, default_i_vals=(/0, 0/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_cp2k_xc.F b/src/input_cp2k_xc.F index 0b65ba7040..5e31c2f86d 100644 --- a/src/input_cp2k_xc.F +++ b/src/input_cp2k_xc.F @@ -82,20 +82,22 @@ CONTAINS Tao2003, Wellendorff2012/)) NULLIFY (subsection, keyword) - CALL keyword_create(keyword, name="_SECTION_PARAMETERS_", & - description="Shortcut for the most common functional combinations.", & - usage="&xc_functional BLYP", & -enum_c_vals=s2a("B3LYP", "PBE0", "BLYP", "BP", "PADE", "LDA", "PBE", "TPSS", "HCTH120", "OLYP", "BEEFVDW", "NO_SHORTCUT", "NONE"), & - enum_i_vals=(/xc_funct_b3lyp, xc_funct_pbe0, xc_funct_blyp, xc_funct_bp, xc_funct_pade, xc_funct_pade, xc_funct_pbe, & - xc_funct_tpss, xc_funct_hcth120, xc_funct_olyp, xc_funct_beefvdw, xc_funct_no_shortcut, xc_none/), & - enum_desc=s2a("B3LYP", & - "PBE0. See note in section XC/XC_FUNCTIONAL/PBE.", & - "BLYP", "BP", "PADE", "Alias for PADE", & - "PBE. See note in section XC/XC_FUNCTIONAL/PBE.", & - "TPSS", "HCTH120", "OLYP", & - "BEEFVDW", "NO_SHORTCUT", "NONE"), & - default_i_val=xc_funct_no_shortcut, & - lone_keyword_i_val=xc_funct_no_shortcut) + CALL keyword_create( & + keyword, name="_SECTION_PARAMETERS_", & + description="Shortcut for the most common functional combinations.", & + usage="&xc_functional BLYP", & + enum_c_vals=s2a("B3LYP", "PBE0", "BLYP", "BP", "PADE", "LDA", "PBE", & + "TPSS", "HCTH120", "OLYP", "BEEFVDW", "NO_SHORTCUT", "NONE"), & + enum_i_vals=(/xc_funct_b3lyp, xc_funct_pbe0, xc_funct_blyp, xc_funct_bp, xc_funct_pade, xc_funct_pade, xc_funct_pbe, & + xc_funct_tpss, xc_funct_hcth120, xc_funct_olyp, xc_funct_beefvdw, xc_funct_no_shortcut, xc_none/), & + enum_desc=s2a("B3LYP", & + "PBE0. See note in section XC/XC_FUNCTIONAL/PBE.", & + "BLYP", "BP", "PADE", "Alias for PADE", & + "PBE. See note in section XC/XC_FUNCTIONAL/PBE.", & + "TPSS", "HCTH120", "OLYP", & + "BEEFVDW", "NO_SHORTCUT", "NONE"), & + default_i_val=xc_funct_no_shortcut, & + lone_keyword_i_val=xc_funct_no_shortcut) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -571,9 +573,10 @@ enum_c_vals=s2a("B3LYP", "PBE0", "BLYP", "BP", "PADE", "LDA", "PBE", "TPSS", "HC lone_keyword_l_val=.TRUE., default_l_val=.FALSE.) CALL section_add_keyword(subsection, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, "scale_x", & - description="scales the exchange part of the functional, if -1 the default for the given parametrization is used", & - default_r_val=-1._dp) + CALL keyword_create( & + keyword, "scale_x", & + description="scales the exchange part of the functional, if -1 the default for the given parametrization is used", & + default_r_val=-1._dp) CALL section_add_keyword(subsection, keyword) CALL keyword_release(keyword) CALL keyword_create(keyword, "scale_c", & @@ -1077,17 +1080,18 @@ enum_c_vals=s2a("B3LYP", "PBE0", "BLYP", "BP", "PADE", "LDA", "PBE", "TPSS", "HC CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="FUNCTIONAL_ROUTINE", & - description="Select the code for xc calculation", & - usage="FUNCTIONAL_ROUTINE (NEW|OLD|TEST_LSD|DEBUG)", & - default_i_val=xc_new_f_routine, & - enum_c_vals=s2a("NEW", "OLD", "TEST_LSD", "DEBUG"), & - enum_i_vals=(/xc_new_f_routine, xc_old_f_routine, & - xc_test_lsd_f_routine, xc_debug_new_routine/), & - enum_desc=s2a("Use new code for exchange-correlation functional calculation", & - "Use old code for exchange-correlation functional calculation", & - "Use test local-spin-density approximation code for exchange-correlation functional calculation", & - "Use debug new code for exchange-correlation functional calculation")) + CALL keyword_create( & + keyword, name="FUNCTIONAL_ROUTINE", & + description="Select the code for xc calculation", & + usage="FUNCTIONAL_ROUTINE (NEW|OLD|TEST_LSD|DEBUG)", & + default_i_val=xc_new_f_routine, & + enum_c_vals=s2a("NEW", "OLD", "TEST_LSD", "DEBUG"), & + enum_i_vals=(/xc_new_f_routine, xc_old_f_routine, & + xc_test_lsd_f_routine, xc_debug_new_routine/), & + enum_desc=s2a("Use new code for exchange-correlation functional calculation", & + "Use old code for exchange-correlation functional calculation", & + "Use test local-spin-density approximation code for exchange-correlation functional calculation", & + "Use debug new code for exchange-correlation functional calculation")) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/input_optimize_basis.F b/src/input_optimize_basis.F index b99b285429..11214b2086 100644 --- a/src/input_optimize_basis.F +++ b/src/input_optimize_basis.F @@ -97,32 +97,35 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="BASIS_COMBINATIONS", & - description="If multiple atomic kinds are fitted at the same time, this keyword "// & - "allows to specify which basis sets should be used together in optimization (underived set ID=0). "// & - "If skipped all combinations are used. The order is taken as the kinds and sets are specified in the input", & - repeats=.TRUE., & - usage="BASIS_COMBINATIONS SET_ID(KIND1) SET_ID(KIND2) ... ", type_of_var=integer_t, n_var=-1) + CALL keyword_create( & + keyword, name="BASIS_COMBINATIONS", & + description="If multiple atomic kinds are fitted at the same time, this keyword "// & + "allows to specify which basis sets should be used together in optimization (underived set ID=0). "// & + "If skipped all combinations are used. The order is taken as the kinds and sets are specified in the input", & + repeats=.TRUE., & + usage="BASIS_COMBINATIONS SET_ID(KIND1) SET_ID(KIND2) ... ", type_of_var=integer_t, n_var=-1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="RESIDUUM_WEIGHT", & - description="This keyword allows to give different weight factors to the "// & - "residuum of the different basis combinations. "// & - "The first entry corresponds to the original basis sets. Every further value is assigned to the combinations "// & - "in the order given for BASIS_COMBINATIONS.", & - repeats=.TRUE., & - usage="RESIDUUM_WEIGHT REAL ", default_r_val=1.0_dp) + CALL keyword_create( & + keyword, name="RESIDUUM_WEIGHT", & + description="This keyword allows to give different weight factors to the "// & + "residuum of the different basis combinations. "// & + "The first entry corresponds to the original basis sets. Every further value is assigned to the combinations "// & + "in the order given for BASIS_COMBINATIONS.", & + repeats=.TRUE., & + usage="RESIDUUM_WEIGHT REAL ", default_r_val=1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="CONDITION_WEIGHT", & - description="This keyword allows to give different weight factors to the "// & - "condition number of different basis combinations (LOG(cond) is used). "// & - "The first entry corresponds to the original basis sets. Every further value is assigned to the combinations "// & - "in the order given for BASIS_COMBINATIONS.", & - repeats=.TRUE., & - usage="CONTITION_WEIGHT REAL ", default_r_val=1.0_dp) + CALL keyword_create( & + keyword, name="CONDITION_WEIGHT", & + description="This keyword allows to give different weight factors to the "// & + "condition number of different basis combinations (LOG(cond) is used). "// & + "The first entry corresponds to the original basis sets. Every further value is assigned to the combinations "// & + "in the order given for BASIS_COMBINATIONS.", & + repeats=.TRUE., & + usage="CONTITION_WEIGHT REAL ", default_r_val=1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/linesearch.F b/src/linesearch.F index 4678077510..2833ffe75c 100644 --- a/src/linesearch.F +++ b/src/linesearch.F @@ -131,17 +131,18 @@ CONTAINS CALL section_create(section, "LINE_SEARCH", repeats=.FALSE., & description="Detail settings or linesearch method.") - CALL keyword_create(keyword, name="METHOD", & - description="Linesearch method.", & - default_i_val=linesearch_method_adapt, & - enum_c_vals=s2a("ADAPT", "3PNT", "2PNT", "GOLD", "NONE"), & - enum_desc=s2a("extrapolates usually based on 3 points, uses additional points on demand, very robust.", & - "extrapolate based on 3 points", & - "extrapolate based on 2 points and the slope (super fast, but might get stuck at saddle points)", & - "perform 1D golden section search of the minimum (very expensive)", & - "always take steps of fixed INITIAL_STEP_SIZE"), & - enum_i_vals=(/linesearch_method_adapt, linesearch_method_3pnt, linesearch_method_2pnt, & - linesearch_method_gold, linesearch_method_none/)) + CALL keyword_create( & + keyword, name="METHOD", & + description="Linesearch method.", & + default_i_val=linesearch_method_adapt, & + enum_c_vals=s2a("ADAPT", "3PNT", "2PNT", "GOLD", "NONE"), & + enum_desc=s2a("extrapolates usually based on 3 points, uses additional points on demand, very robust.", & + "extrapolate based on 3 points", & + "extrapolate based on 2 points and the slope (super fast, but might get stuck at saddle points)", & + "perform 1D golden section search of the minimum (very expensive)", & + "always take steps of fixed INITIAL_STEP_SIZE"), & + enum_i_vals=(/linesearch_method_adapt, linesearch_method_3pnt, linesearch_method_2pnt, & + linesearch_method_gold, linesearch_method_none/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/matrix_exp.F b/src/matrix_exp.F index fbb457f595..de2270c00f 100644 --- a/src/matrix_exp.F +++ b/src/matrix_exp.F @@ -766,7 +766,8 @@ CONTAINS !$OMP PARALLEL DO PRIVATE(icol_local) DEFAULT(NONE) SHARED(V_mats,norm1,ncol_local) DO icol_local = 1, ncol_local V_mats(1)%matrix%local_data(:, icol_local) = V_mats(1)%matrix%local_data(:, icol_local)/norm1(icol_local) - V_mats(1)%matrix%local_data(:, icol_local+ncol_local) = V_mats(1)%matrix%local_data(:, icol_local+ncol_local)/norm1(icol_local) + V_mats(1)%matrix%local_data(:, icol_local+ncol_local) = & + V_mats(1)%matrix%local_data(:, icol_local+ncol_local)/norm1(icol_local) END DO ! arnoldi subspace procedure to get H_approx @@ -789,7 +790,8 @@ CONTAINS !$OMP PARALLEL DO DEFAULT(NONE) SHARED(results,V_mats,ncol_local,l,i) DO icol_local = 1, ncol_local results(icol_local) = SUM(V_mats(l)%matrix%local_data(:, icol_local)*V_mats(i)%matrix%local_data(:, icol_local))+ & - SUM(V_mats(l)%matrix%local_data(:, icol_local+ncol_local)*V_mats(i)%matrix%local_data(:, icol_local+ncol_local)) + SUM(V_mats(l)%matrix%local_data(:, icol_local+ncol_local)* & + V_mats(i)%matrix%local_data(:, icol_local+ncol_local)) END DO CALL mp_sum(results, col_group) @@ -799,8 +801,9 @@ CONTAINS H_approx_save(l, i-1, icol_local) = results(icol_local) V_mats(i)%matrix%local_data(:, icol_local) = V_mats(i)%matrix%local_data(:, icol_local)- & results(icol_local)*V_mats(l)%matrix%local_data(:, icol_local) - V_mats(i)%matrix%local_data(:, icol_local+ncol_local) = V_mats(i)%matrix%local_data(:, icol_local+ncol_local)- & - results(icol_local)*V_mats(l)%matrix%local_data(:, icol_local+ncol_local) + V_mats(i)%matrix%local_data(:, icol_local+ncol_local) = & + V_mats(i)%matrix%local_data(:, icol_local+ncol_local)- & + results(icol_local)*V_mats(l)%matrix%local_data(:, icol_local+ncol_local) END DO END DO @@ -935,10 +938,12 @@ CONTAINS DO icol_local = 1, ncol_local DO idim = 1, mydim prefac = H_approx(idim, 1, icol_local)*norm1(icol_local) - mos_next(1)%matrix%local_data(:, icol_local) = mos_next(1)%matrix%local_data(:, icol_local)+ & - V_mats(idim)%matrix%local_data(:, icol_local)*prefac - mos_next(2)%matrix%local_data(:, icol_local) = mos_next(2)%matrix%local_data(:, icol_local)+ & - V_mats(idim)%matrix%local_data(:, icol_local+ncol_local)*prefac + mos_next(1)%matrix%local_data(:, icol_local) = & + mos_next(1)%matrix%local_data(:, icol_local)+ & + V_mats(idim)%matrix%local_data(:, icol_local)*prefac + mos_next(2)%matrix%local_data(:, icol_local) = & + mos_next(2)%matrix%local_data(:, icol_local)+ & + V_mats(idim)%matrix%local_data(:, icol_local+ncol_local)*prefac END DO END DO END IF diff --git a/src/mode_selective.F b/src/mode_selective.F index 5e50a8bb8e..50b946fdb5 100644 --- a/src/mode_selective.F +++ b/src/mode_selective.F @@ -380,8 +380,10 @@ CONTAINS DO j = 1, nrep DO i = 1, nrep IF (i .NE. j) THEN - ms_vib%b_vec(:, j) = ms_vib%b_vec(:, j)-DOT_PRODUCT(ms_vib%b_vec(:, j), ms_vib%b_vec(:, i))*ms_vib%b_vec(:, i) - ms_vib%b_vec(:, j) = ms_vib%b_vec(:, j)/SQRT(DOT_PRODUCT(ms_vib%b_vec(:, j), ms_vib%b_vec(:, j))) + ms_vib%b_vec(:, j) = & + ms_vib%b_vec(:, j)-DOT_PRODUCT(ms_vib%b_vec(:, j), ms_vib%b_vec(:, i))*ms_vib%b_vec(:, i) + ms_vib%b_vec(:, j) = & + ms_vib%b_vec(:, j)/SQRT(DOT_PRODUCT(ms_vib%b_vec(:, j), ms_vib%b_vec(:, j))) END IF END DO END DO @@ -684,9 +686,10 @@ CONTAINS output_unit = cp_logger_get_default_io_unit(logger) CALL section_vals_val_get(ms_vib_section, "RESTART_FILE_NAME", c_val=ms_filename) - IF (ms_filename == "") output_molden = cp_print_key_unit_nr(logger, input, & - "VIBRATIONAL_ANALYSIS%PRINT%MOLDEN_VIB", extension=".mol", file_status='UNKNOWN', & - file_action="READ") + IF (ms_filename == "") output_molden = & + cp_print_key_unit_nr(logger, input, "VIBRATIONAL_ANALYSIS%PRINT%MOLDEN_VIB", & + extension=".mol", file_status='UNKNOWN', & + file_action="READ") IF (para_env%mepos == para_env%source) THEN IF (ms_filename == "") THEN @@ -1290,7 +1293,8 @@ CONTAINS tmp_resid = 0._dp DO j = 1, count1 DO i = 1, ms_vib%mat_size - tmp_resid(:, j) = tmp_resid(:, j)+approx_H(i, map1(j, 1))*(ms_vib%s_mat(:, i)-eigenval(map1(j, 1))*ms_vib%b_mat(:, i)) + tmp_resid(:, j) = tmp_resid(:, j)+approx_H(i, map1(j, 1))* & + (ms_vib%s_mat(:, i)-eigenval(map1(j, 1))*ms_vib%b_mat(:, i)) END DO END DO @@ -1314,7 +1318,8 @@ CONTAINS IF (count1 .NE. 0) THEN DO j = 1, count1 DO i = 1, ms_vib%mat_size - residuum(:, j) = residuum(:, j)+approx_H(i, map1(j, 1))*(ms_vib%s_mat(:, i)-eigenval(map1(j, 1))*ms_vib%b_mat(:, i)) + residuum(:, j) = residuum(:, j)+approx_H(i, map1(j, 1))* & + (ms_vib%s_mat(:, i)-eigenval(map1(j, 1))*ms_vib%b_mat(:, i)) END DO ind(j) = map1(j, 1) END DO diff --git a/src/motion/gopt_f77_methods.F b/src/motion/gopt_f77_methods.F index 6295a10230..ddbe490b40 100644 --- a/src/motion/gopt_f77_methods.F +++ b/src/motion/gopt_f77_methods.F @@ -244,8 +244,9 @@ USE cp_log_handling, ONLY: cp_logger_type avgs_section => section_vals_get_subs_vals(work, "AVERAGES") CALL section_vals_get(work, explicit=explicit) IF (.NOT. explicit) & - CALL cp_abort(__LOCATION__, & - "Cell optimization at finite temperature was requested. MD section MUST be provided in the input file!") + CALL cp_abort( & + __LOCATION__, & + "Cell optimization at finite temperature was requested. MD section MUST be provided in the input file!") ! Only NVT ensemble is allowed.. CALL section_vals_val_get(gopt_env%motion_section, "MD%ENSEMBLE", i_val=ensemble) IF (ensemble /= nvt_ensemble) & diff --git a/src/motion/helium_interactions.F b/src/motion/helium_interactions.F index 2976cda6b9..aac057166e 100644 --- a/src/motion/helium_interactions.F +++ b/src/motion/helium_interactions.F @@ -564,10 +564,10 @@ CONTAINS fp = 0.0_dp END IF - dvij = angstrom*(10.8_dp/2.9673_dp)*((-13.353384_dp*544850.4_dp)* & - EXP(-13.353384_dp*x)-fp+f*(((10.0_dp*0.1781_dp)*x2+ & - (8.0_dp*0.4253785_dp))*x2+(6.0_dp*1.3732412_dp))*x2*x2*x2/x)/( & - r*kelvin) + dvij = angstrom*(10.8_dp/2.9673_dp)*( & + (-13.353384_dp*544850.4_dp)*EXP(-13.353384_dp*x)-fp+ & + f*(((10.0_dp*0.1781_dp)*x2+(8.0_dp*0.4253785_dp))*x2+(6.0_dp*1.3732412_dp))* & + x2*x2*x2/x)/(r*kelvin) RETURN END FUNCTION helium_d_vij diff --git a/src/motion/helium_methods.F b/src/motion/helium_methods.F index 844911a3e5..e02542c370 100644 --- a/src/motion/helium_methods.F +++ b/src/motion/helium_methods.F @@ -573,13 +573,11 @@ CONTAINS x1 = angstrom*0.5_dp*helium%cell_size ! 10.8 is in Kelvin, x1 needs to be in Angstrom, ! since 2.9673 is in Angstrom - helium%e_corr = (twopi* & - helium%density/angstrom**3*10.8_dp*(544850.4_dp* & - EXP(-13.353384_dp*x1/2.9673_dp)*(2.9673_dp/13.353384_dp)**3* & - (2.0_dp+2.0_dp*13.353384_dp*x1/2.9673_dp+(13.353384_dp* & - x1/2.9673_dp)**2)-(((0.1781_dp/7.0_dp*(2.9673_dp/x1)**2+ & - 0.4253785_dp/5.0_dp)*(2.9673_dp/x1)**2+1.3732412_dp/3.0_dp)* & - (2.9673_dp/x1)**3)*2.9673_dp**3))/kelvin + helium%e_corr = (twopi*helium%density/angstrom**3*10.8_dp* & + (544850.4_dp*EXP(-13.353384_dp*x1/2.9673_dp)*(2.9673_dp/13.353384_dp)**3* & + (2.0_dp+2.0_dp*13.353384_dp*x1/2.9673_dp+(13.353384_dp*x1/2.9673_dp)**2)- & + (((0.1781_dp/7.0_dp*(2.9673_dp/x1)**2+0.4253785_dp/5.0_dp)*(2.9673_dp/x1)**2+ & + 1.3732412_dp/3.0_dp)*(2.9673_dp/x1)**3)*2.9673_dp**3))/kelvin END IF END IF diff --git a/src/motion/input_cp2k_md.F b/src/motion/input_cp2k_md.F index 811938975b..b55c5c4bc8 100644 --- a/src/motion/input_cp2k_md.F +++ b/src/motion/input_cp2k_md.F @@ -491,9 +491,10 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="VARIABLE_VOLUME", & - description="Enables the possibility to read a CELL file with information on the CELL size during the MD.", & - repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="VARIABLE_VOLUME", & + description="Enables the possibility to read a CELL file with information on the CELL size during the MD.", & + repeats=.FALSE., default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/motion/input_cp2k_vib.F b/src/motion/input_cp2k_vib.F index 36fbbebd88..5b06a47eba 100644 --- a/src/motion/input_cp2k_vib.F +++ b/src/motion/input_cp2k_vib.F @@ -63,13 +63,14 @@ CONTAINS TYPE(section_type), POINTER :: subsection CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="VIBRATIONAL_ANALYSIS", & - description="Section to setup parameters to perform a Normal Modes, vibrational, or phonon analysis. "// & - "Vibrations are computed using finite differences, "// & - "which implies a very tight (e.g. 1E-8) threshold is needed for EPS_SCF to get accurate low frequencies. "// & - "The analysis assumes a stationary state (minimum or TS),"// & - " i.e. tight geometry optimization (MAX_FORCE) is needed as well.", & - n_keywords=1, n_subsections=0, repeats=.FALSE.) + CALL section_create( & + section, name="VIBRATIONAL_ANALYSIS", & + description="Section to setup parameters to perform a Normal Modes, vibrational, or phonon analysis. "// & + "Vibrations are computed using finite differences, "// & + "which implies a very tight (e.g. 1E-8) threshold is needed for EPS_SCF to get accurate low frequencies. "// & + "The analysis assumes a stationary state (minimum or TS),"// & + " i.e. tight geometry optimization (MAX_FORCE) is needed as well.", & + n_keywords=1, n_subsections=0, repeats=.FALSE.) NULLIFY (keyword, subsection) CALL keyword_create(keyword, name="DX", & @@ -243,25 +244,27 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EPS_NORM", & - description="Convergence criterium for the davidson algorithm. Specifies the maximal value of the norm "// & - "of the residuum vectors ", & - usage="EPS_NORM {REAL}", default_r_val=2.0E-6_dp) + CALL keyword_create( & + keyword, name="EPS_NORM", & + description="Convergence criterium for the davidson algorithm. Specifies the maximal value of the norm "// & + "of the residuum vectors ", & + usage="EPS_NORM {REAL}", default_r_val=2.0E-6_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="INITIAL_GUESS", & - description="The type of initial guess for the normal modes", & - usage="INITIAL_GUESS BFGS_HESS", & - default_i_val=ms_guess_atomic, & - enum_c_vals=s2a("BFGS_HESS", "ATOMIC", "RESTART", "RESTART_VEC", "MOLDEN_RESTART"), & - enum_desc=s2a("get the first displacement vector out of the BFGS approximate Hessian", & - "use random displacements for a set of atoms specified", & - "use data from MS_RESTART as initial guess", & - "use a vector from MS_RESTART, useful if you want to increase accurcy by changing functionals or basis", & - "use the .mol file of a former run, to restart a vector"// & - "(similar to Restart_vec, but a different file FORMAT is used)"), & - enum_i_vals=(/ms_guess_bfgs, ms_guess_atomic, ms_guess_restart, ms_guess_restart_vec, ms_guess_molden/)) + CALL keyword_create( & + keyword, name="INITIAL_GUESS", & + description="The type of initial guess for the normal modes", & + usage="INITIAL_GUESS BFGS_HESS", & + default_i_val=ms_guess_atomic, & + enum_c_vals=s2a("BFGS_HESS", "ATOMIC", "RESTART", "RESTART_VEC", "MOLDEN_RESTART"), & + enum_desc=s2a("get the first displacement vector out of the BFGS approximate Hessian", & + "use random displacements for a set of atoms specified", & + "use data from MS_RESTART as initial guess", & + "use a vector from MS_RESTART, useful if you want to increase accurcy by changing functionals or basis", & + "use the .mol file of a former run, to restart a vector"// & + "(similar to Restart_vec, but a different file FORMAT is used)"), & + enum_i_vals=(/ms_guess_bfgs, ms_guess_atomic, ms_guess_restart, ms_guess_restart_vec, ms_guess_molden/)) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -307,23 +310,26 @@ CONTAINS NULLIFY (keyword) CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="INVOLVED_ATOMS", & - description="All parameters needed for the tracking of modes dominated by the motion of selected atoms ", & - n_keywords=2, n_subsections=0, repeats=.FALSE.) + CALL section_create( & + section, name="INVOLVED_ATOMS", & + description="All parameters needed for the tracking of modes dominated by the motion of selected atoms ", & + n_keywords=2, n_subsections=0, repeats=.FALSE.) - CALL keyword_create(keyword, name="RANGE", & - description=" Specifies the range of wavenumbers in which the modes related to the ATOMS have to be tracked. "// & - " If not specified frequencies >400cm-1 will be used to avoid tracking of translational or rotational modes", & - usage="RANGE {REAL} {REAL}", & - n_var=-1, type_of_var=real_t) + CALL keyword_create( & + keyword, name="RANGE", & + description=" Specifies the range of wavenumbers in which the modes related to the ATOMS have to be tracked. "// & + " If not specified frequencies >400cm-1 will be used to avoid tracking of translational or rotational modes", & + usage="RANGE {REAL} {REAL}", & + n_var=-1, type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="INVOLVED_ATOMS", & - description="Specifies the list of atoms on which the tracked eigenvector should have the highest value "// & - "similar to looking for the vibration of a set of atoms", & - usage="INVOLVED_ATOMS {integer} {integer} .. {integer}", & - n_var=-1, type_of_var=integer_t) + CALL keyword_create( & + keyword, name="INVOLVED_ATOMS", & + description="Specifies the list of atoms on which the tracked eigenvector should have the highest value "// & + "similar to looking for the vibration of a set of atoms", & + usage="INVOLVED_ATOMS {integer} {integer} .. {integer}", & + n_var=-1, type_of_var=integer_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/motion/mc/mc_ensembles.F b/src/motion/mc/mc_ensembles.F index ebd31eba11..fd42547870 100644 --- a/src/motion/mc/mc_ensembles.F +++ b/src/motion/mc/mc_ensembles.F @@ -712,8 +712,9 @@ CONTAINS EXIT ENDIF ENDDO - IF (molecule_type == 0) CALL cp_abort(__LOCATION__, & - 'Did not choose a molecule type to conf change...PMTRAION_MOL should not be all 0.0') + IF (molecule_type == 0) CALL cp_abort( & + __LOCATION__, & + 'Did not choose a molecule type to conf change...PMTRAION_MOL should not be all 0.0') ! now pick a molecule, automatically rejecting the move if the ! box is empty @@ -769,8 +770,9 @@ CONTAINS EXIT ENDIF ENDDO - IF (molecule_type == 0) CALL cp_abort(__LOCATION__, & - 'Did not choose a molecule type to translate...PMTRANS_MOL should not be all 0.0') + IF (molecule_type == 0) CALL cp_abort( & + __LOCATION__, & + 'Did not choose a molecule type to translate...PMTRANS_MOL should not be all 0.0') ! now pick a molecule of that type IF (ionode) & @@ -800,8 +802,9 @@ CONTAINS EXIT ENDIF ENDDO - IF (molecule_type == 0) CALL cp_abort(__LOCATION__, & - 'Did not choose a molecule type to rotate...PMROT_MOL should not be all 0.0') + IF (molecule_type == 0) CALL cp_abort( & + __LOCATION__, & + 'Did not choose a molecule type to rotate...PMROT_MOL should not be all 0.0') IF (ionode) & CALL find_mc_test_molecule(mc_molecule_info, & @@ -1183,9 +1186,8 @@ CONTAINS virial_stepsize(2) = 0.1 virial_stepsize(3) = 0.2 - nbins = CEILING(virial_cutoffs(1)/virial_stepsize(1)+(virial_cutoffs(2)- & - virial_cutoffs(1))/virial_stepsize(2)+(virial_cutoffs(3)- & - virial_cutoffs(2))/virial_stepsize(3)) + nbins = CEILING(virial_cutoffs(1)/virial_stepsize(1)+(virial_cutoffs(2)-virial_cutoffs(1))/ & + virial_stepsize(2)+(virial_cutoffs(3)-virial_cutoffs(2))/virial_stepsize(3)) ! figure out what the default write unit is iw = cp_logger_get_default_io_unit() diff --git a/src/motion/mc/mc_moves.F b/src/motion/mc/mc_moves.F index b669341cd0..be3e851653 100644 --- a/src/motion/mc/mc_moves.F +++ b/src/motion/mc/mc_moves.F @@ -2179,7 +2179,8 @@ CONTAINS exp_min_val, nswapmoves, & weight_old, start_atom_swap, nunits_tot(box_number), nunits, nunits(molecule_type), & mass(:, molecule_type), ldum, rdum, old_energy, & - ionode, .TRUE., mol_type(start_mol:end_mol), nchains(:, box_number), source, group, rng_stream, & + ionode, .TRUE., mol_type(start_mol:end_mol), nchains(:, box_number), & + source, group, rng_stream, & avbmc_atom=avbmc_atom(molecule_type), & rmin=avbmc_rmin(molecule_type), rmax=avbmc_rmax(molecule_type), move_type='out', & target_atom=target_atom) @@ -2191,7 +2192,8 @@ CONTAINS exp_min_val, nswapmoves, & weight_old, start_atom_swap, nunits_tot(box_number), nunits, nunits(molecule_type), & mass(:, molecule_type), ldum, rdum, old_energy, & - ionode, .TRUE., mol_type(start_mol:end_mol), nchains(:, box_number), source, group, rng_stream, & + ionode, .TRUE., mol_type(start_mol:end_mol), nchains(:, box_number), & + source, group, rng_stream, & avbmc_atom=avbmc_atom(molecule_type), & rmin=avbmc_rmin(molecule_type), rmax=avbmc_rmax(molecule_type), move_type='in', & target_atom=target_atom) @@ -2203,7 +2205,8 @@ CONTAINS exp_min_val, nswapmoves, & weight_new, start_atom_swap, nunits_tot(box_number), nunits, nunits(molecule_type), & mass(:, molecule_type), loverlap, new_energy, old_energy, & - ionode, .FALSE., mol_type(start_mol:end_mol), nchains(:, box_number), source, group, rng_stream, & + ionode, .FALSE., mol_type(start_mol:end_mol), nchains(:, box_number), & + source, group, rng_stream, & avbmc_atom=avbmc_atom(molecule_type), & rmin=avbmc_rmin(molecule_type), rmax=avbmc_rmax(molecule_type), move_type=move_type, & target_atom=target_atom) diff --git a/src/motion/mc/mc_types.F b/src/motion/mc/mc_types.F index bc53681922..eda0eaafce 100644 --- a/src/motion/mc/mc_types.F +++ b/src/motion/mc/mc_types.F @@ -1113,8 +1113,9 @@ CONTAINS WRITE (iw, *) 'Number of molecule types ', nmol_types WRITE (iw, *) '&MOLECULE sections found ', irep END IF - CALL cp_abort(__LOCATION__, & - 'Did not find MOLECULE sections for every molecule in the simulation (make sure both input files have all types)') + CALL cp_abort( & + __LOCATION__, & + 'Did not find MOLECULE sections for every molecule in the simulation (make sure both input files have all types)') ENDIF ENDIF diff --git a/src/motion/mc/tamc_run.F b/src/motion/mc/tamc_run.F index 33eeb2d70b..344e4cbf45 100644 --- a/src/motion/mc/tamc_run.F +++ b/src/motion/mc/tamc_run.F @@ -563,8 +563,9 @@ CONTAINS ! Open possible Shake output units simpar%info_constraint = cp_print_key_unit_nr(logger, constraint_section, "CONSTRAINT_INFO", & extension=".shakeLog", log_filename=.FALSE.) - simpar%lagrange_multipliers = cp_print_key_unit_nr(logger, constraint_section, & - "LAGRANGE_MULTIPLIERS", extension=".LagrangeMultLog", log_filename=.FALSE.) + simpar%lagrange_multipliers = cp_print_key_unit_nr( & + logger, constraint_section, & + "LAGRANGE_MULTIPLIERS", extension=".LagrangeMultLog", log_filename=.FALSE.) simpar%dump_lm = BTEST(cp_print_key_should_output(logger%iter_info, constraint_section, & "LAGRANGE_MULTIPLIERS"), cp_p_file) @@ -1045,7 +1046,8 @@ CONTAINS it1 = force_env%qs_env%sim_step IF (output_unit > 0) THEN WRITE (output_unit, '(a,l4)') "HMC|restart? ", force_env%meta_env%restart - WRITE (output_unit, '(a,3(f16.8,1x))') "HMC|Ep, Epx, Epz ", old_epx+force_env%meta_env%epot_s, old_epx, force_env%meta_env%epot_s + WRITE (output_unit, '(a,3(f16.8,1x))') & + "HMC|Ep, Epx, Epz ", old_epx+force_env%meta_env%epot_s, old_epx, force_env%meta_env%epot_s WRITE (output_unit, '(a)') "#HMC| No | z.. | theta.. | ff_z... | ff_z/n |" ENDIF DO i = 1, nstep @@ -1225,7 +1227,8 @@ CONTAINS CALL tamc_force(force_env, zpot=new_epz) new_energy = new_epx+new_epz IF (output_unit > 0) THEN - WRITE (output_unit, '(a,4(f16.8,1x))') "HMC|old Ep, Ekx, Epz, Epx ", old_epx+old_epz, hmc_ekin%initial_ekin, old_epz, old_epx + WRITE (output_unit, '(a,4(f16.8,1x))') & + "HMC|old Ep, Ekx, Epz, Epx ", old_epx+old_epz, hmc_ekin%initial_ekin, old_epz, old_epx WRITE (output_unit, '(a,4(f16.8,1x))') "HMC|new Ep, Ekx, Epz, Epx ", new_energy, hmc_ekin%final_ekin, new_epz, new_epx ENDIF energy_term = new_energy-old_epx-old_epz+hmc_ekin%final_ekin-hmc_ekin%initial_ekin diff --git a/src/motion/md_run.F b/src/motion/md_run.F index 585e4348c8..c44772634c 100644 --- a/src/motion/md_run.F +++ b/src/motion/md_run.F @@ -460,8 +460,9 @@ CONTAINS ! Open possible Shake output units simpar%info_constraint = cp_print_key_unit_nr(logger, constraint_section, "CONSTRAINT_INFO", & extension=".shakeLog", log_filename=.FALSE.) - simpar%lagrange_multipliers = cp_print_key_unit_nr(logger, constraint_section, & - "LAGRANGE_MULTIPLIERS", extension=".LagrangeMultLog", log_filename=.FALSE.) + simpar%lagrange_multipliers = cp_print_key_unit_nr( & + logger, constraint_section, & + "LAGRANGE_MULTIPLIERS", extension=".LagrangeMultLog", log_filename=.FALSE.) simpar%dump_lm = BTEST(cp_print_key_should_output(logger%iter_info, constraint_section, & "LAGRANGE_MULTIPLIERS"), cp_p_file) diff --git a/src/motion/simpar_methods.F b/src/motion/simpar_methods.F index 810c885c2f..7edc0551f3 100644 --- a/src/motion/simpar_methods.F +++ b/src/motion/simpar_methods.F @@ -240,10 +240,11 @@ CONTAINS IF (simpar%ensemble == langevin_ensemble .OR. & simpar%ensemble == reftraj_ensemble .OR. & simpar%do_respa) THEN - CALL cp_warn(__LOCATION__, & - "The variable timestep has been required, however "// & - "this option is not available either with the Langevin ensemble or with the multiple timestep schme. "// & - "The run will proceed with constant timestep, as read from input.") + CALL cp_warn( & + __LOCATION__, & + "The variable timestep has been required, however "// & + "this option is not available either with the Langevin ensemble or with the multiple timestep schme. "// & + "The run will proceed with constant timestep, as read from input.") END IF END IF END IF diff --git a/src/motion/thermostat/thermostat_methods.F b/src/motion/thermostat/thermostat_methods.F index 084601c25c..76feecd553 100644 --- a/src/motion/thermostat/thermostat_methods.F +++ b/src/motion/thermostat/thermostat_methods.F @@ -298,9 +298,10 @@ CONTAINS CALL get_atomic_kind_set(atomic_kind_set=atomic_kinds%els, shell_adiabatic=shell_adiabatic) region_sections => section_vals_get_subs_vals(thermo_shell_section, "DEFINE_REGION") CALL section_vals_val_get(thermo_shell_section, "REGION", i_val=region) - CALL setup_thermostat_info(thermostats%thermostat_info_shell, molecule_kinds_new%els, & - local_molecules, molecules_new, particles, region, simpar%ensemble, shell=shell_adiabatic, & - region_sections=region_sections, qmmm_env=qmmm_env) + CALL setup_thermostat_info( & + thermostats%thermostat_info_shell, molecule_kinds_new%els, & + local_molecules, molecules_new, particles, region, simpar%ensemble, shell=shell_adiabatic, & + region_sections=region_sections, qmmm_env=qmmm_env) IF (shell_adiabatic) THEN ! Initialize thermostat IF (thermostats%thermostat_shell%type_of_thermostat == do_thermo_nose) THEN @@ -558,7 +559,8 @@ CONTAINS !> \author Teodoro Laino ! ************************************************************************************************** SUBROUTINE apply_thermostat_particles(thermostat, force_env, molecule_kind_set, molecule_set, & - particle_set, local_molecules, local_particles, group, shell_adiabatic, shell_particle_set, & + particle_set, local_molecules, local_particles, & + group, shell_adiabatic, shell_particle_set, & core_particle_set, vel, shell_vel, core_vel) TYPE(thermostat_type), POINTER :: thermostat diff --git a/src/mp2.F b/src/mp2.F index f5556fa5a1..d562c29ca1 100644 --- a/src/mp2.F +++ b/src/mp2.F @@ -458,7 +458,8 @@ CONTAINS Emp2_AA = 0.0_dp Emp2_AA_Cou = 0.0_dp Emp2_AA_ex = 0.0_dp - CALL mp2_direct_energy(dimen, nelec_alpha, nelec_alpha, mp2_biel, mp2_env, C_alpha, Auto_alpha, Emp2_AA, Emp2_AA_Cou, Emp2_AA_ex, & + CALL mp2_direct_energy(dimen, nelec_alpha, nelec_alpha, mp2_biel, & + mp2_env, C_alpha, Auto_alpha, Emp2_AA, Emp2_AA_Cou, Emp2_AA_ex, & qs_env, rho, para_env, & unit_nr) IF (unit_nr > 0) WRITE (unit_nr, '(T3,A,T56,F25.14)') 'MP2 Energy Alpha-Alpha = ', Emp2_AA @@ -467,7 +468,8 @@ CONTAINS Emp2_BB = 0.0_dp Emp2_BB_Cou = 0.0_dp Emp2_BB_ex = 0.0_dp - CALL mp2_direct_energy(dimen, nelec_beta, nelec_beta, mp2_biel, mp2_env, C_beta, Auto_beta, Emp2_BB, Emp2_BB_Cou, Emp2_BB_ex, & + CALL mp2_direct_energy(dimen, nelec_beta, nelec_beta, mp2_biel, mp2_env, & + C_beta, Auto_beta, Emp2_BB, Emp2_BB_Cou, Emp2_BB_ex, & qs_env, rho, para_env, & unit_nr) IF (unit_nr > 0) WRITE (unit_nr, '(T3,A,T56,F25.14)') 'MP2 Energy Beta-Beta= ', Emp2_BB diff --git a/src/mp2_cphf.F b/src/mp2_cphf.F index 802a310e18..880dea919b 100644 --- a/src/mp2_cphf.F +++ b/src/mp2_cphf.F @@ -1950,8 +1950,9 @@ CONTAINS CALL cp_fm_set_all(residual, 0.0_dp) IF (.NOT. alpha_beta) THEN DO iiB = 1, iiter - residual%local_data(1:nrow_local, 1:ncol_local) = residual%local_data(1:nrow_local, 1:ncol_local)+ & - b_small(iiB, 1)*Ax(iiB)%matrix%local_data(1:nrow_local, 1:ncol_local) + residual%local_data(1:nrow_local, 1:ncol_local) = & + residual%local_data(1:nrow_local, 1:ncol_local)+ & + b_small(iiB, 1)*Ax(iiB)%matrix%local_data(1:nrow_local, 1:ncol_local) END DO residual%local_data(1:nrow_local, 1:ncol_local) = residual%local_data(1:nrow_local, 1:ncol_local)- & L_jb%local_data(1:nrow_local, 1:ncol_local) @@ -2020,8 +2021,9 @@ CONTAINS b_small(iiter, 1)*xn(iiter)%matrix%local_data(1:nrow_local, 1:ncol_local) ! The same for beta IF (alpha_beta) THEN - P_ia_beta%local_data(1:nrow_local_b, 1:ncol_local_b) = P_ia_beta%local_data(1:nrow_local_b, 1:ncol_local_b)+ & - b_small(iiter, 1)*xn_b(iiter)%matrix%local_data(1:nrow_local_b, 1:ncol_local_b) + P_ia_beta%local_data(1:nrow_local_b, 1:ncol_local_b) = & + P_ia_beta%local_data(1:nrow_local_b, 1:ncol_local_b)+ & + b_small(iiter, 1)*xn_b(iiter)%matrix%local_data(1:nrow_local_b, 1:ncol_local_b) ENDIF END DO diff --git a/src/mp2_direct_method.F b/src/mp2_direct_method.F index 924859ac0e..8afa606d33 100644 --- a/src/mp2_direct_method.F +++ b/src/mp2_direct_method.F @@ -857,10 +857,11 @@ CONTAINS BI1, C_T, mp2_biel, para_env, elements_ij_proc, & multiple, proc_map, BIb) ELSE - CALL transform_occupied_orbitals_second_big(dimen, iatom, jatom, iset, jset, & - nsgfa(iset), nsgfb(jset), Ni_occupied, Nj_occupied, j_batch_start, & - ij_elem_max, BI1, C_T, mp2_biel, para_env, elements_ij_proc, & - proc_map, BIb) + CALL transform_occupied_orbitals_second_big( & + dimen, iatom, jatom, iset, jset, & + nsgfa(iset), nsgfb(jset), Ni_occupied, Nj_occupied, j_batch_start, & + ij_elem_max, BI1, C_T, mp2_biel, para_env, elements_ij_proc, & + proc_map, BIb) END IF ELSE IF (.NOT. mp2_env%direct_canonical%big_send) THEN @@ -869,10 +870,11 @@ CONTAINS BI1, C_beta_T, mp2_biel, para_env, elements_ij_proc, & multiple, proc_map, BIb) ELSE - CALL transform_occupied_orbitals_second_big(dimen, iatom, jatom, iset, jset, & - nsgfa(iset), nsgfb(jset), Ni_occupied, Nj_occupied, j_batch_start, & - ij_elem_max, BI1, C_beta_T, mp2_biel, para_env, elements_ij_proc, & - proc_map, BIb) + CALL transform_occupied_orbitals_second_big( & + dimen, iatom, jatom, iset, jset, & + nsgfa(iset), nsgfb(jset), Ni_occupied, Nj_occupied, j_batch_start, & + ij_elem_max, BI1, C_beta_T, mp2_biel, para_env, elements_ij_proc, & + proc_map, BIb) END IF END IF END IF @@ -1086,10 +1088,11 @@ CONTAINS j_batch_start, BIb, C, Auto, elements_ij_proc, ij_list_proc, & nspins, Emp2, Emp2_Cou, Emp2_ex) ELSE - CALL transform_virtual_orbitals_and_accumulate_ABcase(dimen, occupied, occupied_beta, dimen-occupied, dimen-occupied_beta, & - i_batch_start, j_batch_start, & - BIb, C, C_beta, Auto, Auto_beta, & - elements_ij_proc, ij_list_proc, Emp2, Emp2_Cou) + CALL transform_virtual_orbitals_and_accumulate_ABcase( & + dimen, occupied, occupied_beta, dimen-occupied, dimen-occupied_beta, & + i_batch_start, j_batch_start, & + BIb, C, C_beta, Auto, Auto_beta, & + elements_ij_proc, ij_list_proc, Emp2, Emp2_Cou) DEALLOCATE (C_beta_T) END IF @@ -1616,7 +1619,8 @@ CONTAINS BIa = zero DO index_ij = 1, elements_ij_proc - CALL DGEMM('T', 'N', dimen, virtual, dimen, 1.0_dp, Bib(1, 1, index_ij), dimen, C(1, occupied+1), dimen, 0.0_dp, Bia(1, 1), dimen) + CALL DGEMM('T', 'N', dimen, virtual, dimen, 1.0_dp, Bib(1, 1, index_ij), & + dimen, C(1, occupied+1), dimen, 0.0_dp, Bia(1, 1), dimen) Bib(1:dimen, 1:virtual, index_ij) = Bia(1:dimen, 1:virtual) END DO diff --git a/src/mp2_gpw.F b/src/mp2_gpw.F index 60d8cd113f..4efabaaef8 100644 --- a/src/mp2_gpw.F +++ b/src/mp2_gpw.F @@ -386,19 +386,20 @@ CONTAINS ! RI-GPW integrals (same stuff for both RPA and MP2) IF (nspins == 2) THEN ! open shell case (RI) here the (ia|K) integrals are computed for both the alpha and beta components - CALL mp2_ri_gpw_compute_in(BIb_C, BIb_C_gw, ends_array, ends_B_virtual, sizes_array, & - sizes_B_virtual, starts_array, starts_B_virtual, & - dimen_RI, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & - atomic_kind_set, qs_kind_set, mo_coeff, nmo, homo, rho_r, rho_g, pot_g, & - mat_munu, sab_orb_sub, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & - mo_coeff_o, mo_coeff_v, mo_coeff_all, mo_coeff_gw, & - mp2_env%mp2_gpw%eps_filter, unit_nr, & - mp2_env%mp2_memory, mp2_env%calc_PQ_cond_num, calc_forces, blacs_env_sub, my_do_gw, & - starts_B_all, sizes_B_all, ends_B_all, gw_corr_lev_occ, gw_corr_lev_virt, & - BIb_C_beta, BIb_C_gw_beta, ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta, & - homo_beta, mo_coeff_o_beta, mo_coeff_v_beta, mo_coeff_all_beta, mo_coeff_gw_beta, & - do_im_time=do_im_time, mat_B_munu=mat_B_munu, ri_metric=ri_metric, & - ri_metric_gw=ri_metric_gw, my_Lrows=my_Lrows) + CALL mp2_ri_gpw_compute_in( & + BIb_C, BIb_C_gw, ends_array, ends_B_virtual, sizes_array, & + sizes_B_virtual, starts_array, starts_B_virtual, & + dimen_RI, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & + atomic_kind_set, qs_kind_set, mo_coeff, nmo, homo, rho_r, rho_g, pot_g, & + mat_munu, sab_orb_sub, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & + mo_coeff_o, mo_coeff_v, mo_coeff_all, mo_coeff_gw, & + mp2_env%mp2_gpw%eps_filter, unit_nr, & + mp2_env%mp2_memory, mp2_env%calc_PQ_cond_num, calc_forces, blacs_env_sub, my_do_gw, & + starts_B_all, sizes_B_all, ends_B_all, gw_corr_lev_occ, gw_corr_lev_virt, & + BIb_C_beta, BIb_C_gw_beta, ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta, & + homo_beta, mo_coeff_o_beta, mo_coeff_v_beta, mo_coeff_all_beta, mo_coeff_gw_beta, & + do_im_time=do_im_time, mat_B_munu=mat_B_munu, ri_metric=ri_metric, & + ri_metric_gw=ri_metric_gw, my_Lrows=my_Lrows) ELSE ! closed shell case (RI) CALL mp2_ri_gpw_compute_in(BIb_C, BIb_C_gw, ends_array, ends_B_virtual, sizes_array, & @@ -420,29 +421,32 @@ CONTAINS ! alpha-alpha and alpha-beta components IF (unit_nr > 0) WRITE (unit_nr, *) IF (unit_nr > 0) WRITE (unit_nr, '(T3,A)') 'Alpha (ia|' - CALL mp2_gpw_compute(Emp2, Emp2_Cou, Emp2_EX, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & - atomic_kind_set, qs_kind_set, mo_coeff, Eigenval, nmo, homo, rho_r, rho_g, pot_g, & - mat_munu, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & - mo_coeff_o, mo_coeff_v, mp2_env%mp2_gpw%eps_filter, unit_nr, & - mp2_env%mp2_memory, calc_ex, blacs_env_sub, & - homo_beta, mo_coeff_o_beta, mo_coeff_v_beta, Eigenval_beta, Emp2_AB) + CALL mp2_gpw_compute( & + Emp2, Emp2_Cou, Emp2_EX, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & + atomic_kind_set, qs_kind_set, mo_coeff, Eigenval, nmo, homo, rho_r, rho_g, pot_g, & + mat_munu, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & + mo_coeff_o, mo_coeff_v, mp2_env%mp2_gpw%eps_filter, unit_nr, & + mp2_env%mp2_memory, calc_ex, blacs_env_sub, & + homo_beta, mo_coeff_o_beta, mo_coeff_v_beta, Eigenval_beta, Emp2_AB) ! beta-beta component IF (unit_nr > 0) WRITE (unit_nr, *) IF (unit_nr > 0) WRITE (unit_nr, '(T3,A)') 'Beta (ia|' -CALL mp2_gpw_compute(Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & - atomic_kind_set, qs_kind_set, mo_coeff_beta, Eigenval_beta, nmo, homo_beta, rho_r, rho_g, pot_g, & - mat_munu, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & - mo_coeff_o_beta, mo_coeff_v_beta, mp2_env%mp2_gpw%eps_filter, unit_nr, & - mp2_env%mp2_memory, calc_ex, blacs_env_sub) + CALL mp2_gpw_compute( & + Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & + atomic_kind_set, qs_kind_set, mo_coeff_beta, Eigenval_beta, nmo, homo_beta, rho_r, rho_g, pot_g, & + mat_munu, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & + mo_coeff_o_beta, mo_coeff_v_beta, mp2_env%mp2_gpw%eps_filter, unit_nr, & + mp2_env%mp2_memory, calc_ex, blacs_env_sub) ELSE ! closed shell case - CALL mp2_gpw_compute(Emp2, Emp2_Cou, Emp2_EX, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & - atomic_kind_set, qs_kind_set, mo_coeff, Eigenval, nmo, homo, rho_r, rho_g, pot_g, & - mat_munu, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & - mo_coeff_o, mo_coeff_v, mp2_env%mp2_gpw%eps_filter, unit_nr, & - mp2_env%mp2_memory, calc_ex, blacs_env_sub) + CALL mp2_gpw_compute( & + Emp2, Emp2_Cou, Emp2_EX, qs_env, para_env, para_env_sub, color_sub, dft_control, cell, particle_set, & + atomic_kind_set, qs_kind_set, mo_coeff, Eigenval, nmo, homo, rho_r, rho_g, pot_g, & + mat_munu, pw_env_sub, poisson_env, auxbas_pw_pool, task_list_sub, & + mo_coeff_o, mo_coeff_v, mp2_env%mp2_gpw%eps_filter, unit_nr, & + mp2_env%mp2_memory, calc_ex, blacs_env_sub) END IF END IF @@ -571,30 +575,34 @@ CALL mp2_gpw_compute(Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, qs_env, para_env, para_en ! RI-MP2-GPW compute energy IF (nspins == 2) THEN ! alpha-alpha component - CALL mp2_ri_gpw_compute_en(Emp2, Emp2_Cou, Emp2_EX, BIb_C, mp2_env, para_env, para_env_sub, color_sub, & - ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, starts_array, starts_B_virtual, & - Eigenval, nmo, homo, dimen_RI, unit_nr, calc_forces, calc_ex, & - open_shell_SS=.TRUE.) + CALL mp2_ri_gpw_compute_en( & + Emp2, Emp2_Cou, Emp2_EX, BIb_C, mp2_env, para_env, para_env_sub, color_sub, & + ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, starts_array, starts_B_virtual, & + Eigenval, nmo, homo, dimen_RI, unit_nr, calc_forces, calc_ex, & + open_shell_SS=.TRUE.) ! beta-beta component - CALL mp2_ri_gpw_compute_en(Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, BIb_C_beta, mp2_env, para_env, para_env_sub, color_sub, & - ends_array, ends_B_virtual_beta, sizes_array, & - sizes_B_virtual_beta, starts_array, starts_B_virtual_beta, & - Eigenval_beta, nmo, homo_beta, dimen_RI, unit_nr, calc_forces, calc_ex, & - open_shell_SS=.TRUE.) + CALL mp2_ri_gpw_compute_en( & + Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, BIb_C_beta, mp2_env, para_env, para_env_sub, color_sub, & + ends_array, ends_B_virtual_beta, sizes_array, & + sizes_B_virtual_beta, starts_array, starts_B_virtual_beta, & + Eigenval_beta, nmo, homo_beta, dimen_RI, unit_nr, calc_forces, calc_ex, & + open_shell_SS=.TRUE.) ! alpha-beta case - CALL mp2_ri_gpw_compute_en(Emp2_d_AB, Emp2_AB, Emp2_d2_AB, BIb_C, mp2_env, para_env, para_env_sub, color_sub, & - ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, starts_array, starts_B_virtual, & - Eigenval, nmo, homo, dimen_RI, unit_nr, calc_forces, .FALSE., & - .FALSE., BIb_C_beta, homo_beta, Eigenval_beta, & - ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta) + CALL mp2_ri_gpw_compute_en( & + Emp2_d_AB, Emp2_AB, Emp2_d2_AB, BIb_C, mp2_env, para_env, para_env_sub, color_sub, & + ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, starts_array, starts_B_virtual, & + Eigenval, nmo, homo, dimen_RI, unit_nr, calc_forces, .FALSE., & + .FALSE., BIb_C_beta, homo_beta, Eigenval_beta, & + ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta) ELSE ! closed shell case - CALL mp2_ri_gpw_compute_en(Emp2, Emp2_Cou, Emp2_EX, BIb_C, mp2_env, para_env, para_env_sub, color_sub, & - ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, starts_array, starts_B_virtual, & - Eigenval, nmo, homo, dimen_RI, unit_nr, calc_forces, calc_ex) + CALL mp2_ri_gpw_compute_en( & + Emp2, Emp2_Cou, Emp2_EX, BIb_C, mp2_env, para_env, para_env_sub, color_sub, & + ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, starts_array, starts_B_virtual, & + Eigenval, nmo, homo, dimen_RI, unit_nr, calc_forces, calc_ex) END IF ! if we need forces time to calculate the MP2 non-separable contribution ! and start coputing the Largrangian @@ -806,7 +814,8 @@ CALL mp2_gpw_compute(Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, qs_env, para_env, para_en cell, particle_set, atomic_kind_set, qs_kind_set, mo_coeff, Eigenval, nmo, homo, & rho_r, rho_g, pot_g, mat_munu, pw_env_sub, & poisson_env, auxbas_pw_pool, task_list_sub, mo_coeff_o, mo_coeff_v, eps_filter, unit_nr, & - mp2_memory, calc_ex, blacs_env_sub, homo_beta, mo_coeff_o_beta, mo_coeff_v_beta, Eigenval_beta, Emp2_AB) + mp2_memory, calc_ex, blacs_env_sub, homo_beta, mo_coeff_o_beta, & + mo_coeff_v_beta, Eigenval_beta, Emp2_AB) REAL(KIND=dp) :: Emp2, Emp2_Cou, Emp2_EX TYPE(qs_environment_type), POINTER :: qs_env @@ -1196,7 +1205,8 @@ CALL mp2_gpw_compute(Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, qs_env, para_env, para_en ! and finally (ia|munu) CALL timeset(routineN//"_int", handle3) CALL cp_dbcsr_set(mat_munu%matrix, 0.0_dp) - CALL integrate_v_rspace(rho_r, hmat=mat_munu, qs_env=qs_env, calculate_forces=.FALSE., compute_tau=.FALSE., gapw=.FALSE., & + CALL integrate_v_rspace(rho_r, hmat=mat_munu, qs_env=qs_env, & + calculate_forces=.FALSE., compute_tau=.FALSE., gapw=.FALSE., & pw_env_external=pw_env_sub, task_list_external=task_list_sub) CALL timestop(handle3) @@ -1298,7 +1308,8 @@ CALL mp2_gpw_compute(Emp2_BB, Emp2_Cou_BB, Emp2_EX_BB, qs_env, para_env, para_en size_EX_send = exchange_group_sizes(proc_send, 3) ALLOCATE (BIb_send(my_B_size, size_EX_send, my_I_batch_size)) - BIb_send(1:my_B_size, 1:size_EX_send, 1:my_I_batch_size) = BIb_C(1:my_B_size, EX_start_send:EX_end_send, 1:my_I_batch_size) + BIb_send(1:my_B_size, 1:size_EX_send, 1:my_I_batch_size) = & + BIb_C(1:my_B_size, EX_start_send:EX_end_send, 1:my_I_batch_size) ! send and receive the exchange array CALL mp_sendrecv(BIb_send, proc_send, BIb_EX, proc_receive, para_env_exchange%group) diff --git a/src/mp2_ri_gpw.F b/src/mp2_ri_gpw.F index 9cfb92c3a6..3fb8bb1715 100644 --- a/src/mp2_ri_gpw.F +++ b/src/mp2_ri_gpw.F @@ -596,7 +596,8 @@ CONTAINS CALL timeset(routineN//"_E_Ex_2_gw", handle3) CALL copy_dbcsr_to_fm(matrix_in_jm_beta, fm_BIb_gw_beta) - CALL grep_my_integrals(para_env_sub, fm_BIb_gw_beta, BIb_C_gw_beta(i_counter, 1:my_B_all_size, 1:gw_corr_lev_total), & + CALL grep_my_integrals(para_env_sub, fm_BIb_gw_beta, & + BIb_C_gw_beta(i_counter, 1:my_B_all_size, 1:gw_corr_lev_total), & max_row_col_local_gw, & sub_proc_map, local_col_row_info_gw, & my_B_all_end, my_B_all_start) @@ -658,7 +659,8 @@ CONTAINS ! and finally (K|mu nu) CALL timeset(routineN//"_int_trunc", handle3) CALL cp_dbcsr_set(mat_munu%matrix, 0.0_dp) - CALL integrate_v_rspace(rho_r, hmat=mat_munu, qs_env=qs_env, calculate_forces=.FALSE., compute_tau=.FALSE., gapw=.FALSE., & + CALL integrate_v_rspace(rho_r, hmat=mat_munu, qs_env=qs_env, & + calculate_forces=.FALSE., compute_tau=.FALSE., gapw=.FALSE., & pw_env_external=pw_env_sub, task_list_external=task_list_sub) CALL timestop(handle3) @@ -1646,9 +1648,10 @@ CONTAINS ! integration result has to be scaled since from basis set differing exponent exp_q ! causes different normalization - L_local_col_q(offset-nsgfa(iset)+1:offset, i_counter) = I_ab(1:nsgfa(iset), 1)* & - (exp_q(1)/zeta(1, iset))**(la_max(iset)*0.5_dp+3.0_dp/4.0_dp)* & - (exp_q(1)/zetb(1, j_ref_set))**(lb_max(j_ref_set)*0.5_dp+3.0_dp/4.0_dp) + L_local_col_q(offset-nsgfa(iset)+1:offset, i_counter) = & + I_ab(1:nsgfa(iset), 1)* & + (exp_q(1)/zeta(1, iset))**(la_max(iset)*0.5_dp+3.0_dp/4.0_dp)* & + (exp_q(1)/zetb(1, j_ref_set))**(lb_max(j_ref_set)*0.5_dp+3.0_dp/4.0_dp) END IF DEALLOCATE (I_tmp2) @@ -1857,16 +1860,17 @@ CONTAINS I_tmp(1:ncoa_a, 1:nsgfb(jset)) = MATMUL(vac(1:ncoa_a, 1:ncoa_b), & sphi_b(1:ncoa_b, ref_at_se_sgf_ofs(jatom, jset, 3): & (ref_at_se_sgf_ofs(jatom, jset, 3)+nsgfb(jset)-1))) - I_tmp2(1:nsgfa(iset), 1:nsgfb(jset)) = I_tmp2(1:nsgfa(iset), 1:nsgfb(jset))- & - MATMUL(TRANSPOSE(sphi_a(1:ncoa_a, ref_at_se_sgf_ofs(iatom, iset, 3): & - (ref_at_se_sgf_ofs(iatom, iset, 3)+nsgfa(iset)-1))), & - I_tmp(1:ncoa_a, 1:nsgfb(jset)))/ & - (zeta(1, iset))**(la_max(iset)*0.5_dp+3.0_dp/4.0_dp)/ & - (zetb(1, jset))**(lb_max(jset)*0.5_dp+3.0_dp/4.0_dp)* & - exp_q(1)**(la_max(iset)*1.0_dp+3.0_dp/2.0_dp)* & - exp_q(1)**(lb_max(jset)*1.0_dp+3.0_dp/2.0_dp)/ & - (zeta(1, ref_at_se_sgf_ofs(iatom, iset, 2)))**(la_max(iset)*0.5_dp+3.0_dp/4.0_dp)/ & - (zetb(1, ref_at_se_sgf_ofs(jatom, jset, 2)))**(lb_max(jset)*0.5_dp+3.0_dp/4.0_dp) + I_tmp2(1:nsgfa(iset), 1:nsgfb(jset)) = & + I_tmp2(1:nsgfa(iset), 1:nsgfb(jset))- & + MATMUL(TRANSPOSE(sphi_a(1:ncoa_a, ref_at_se_sgf_ofs(iatom, iset, 3): & + (ref_at_se_sgf_ofs(iatom, iset, 3)+nsgfa(iset)-1))), & + I_tmp(1:ncoa_a, 1:nsgfb(jset)))/ & + (zeta(1, iset))**(la_max(iset)*0.5_dp+3.0_dp/4.0_dp)/ & + (zetb(1, jset))**(lb_max(jset)*0.5_dp+3.0_dp/4.0_dp)* & + exp_q(1)**(la_max(iset)*1.0_dp+3.0_dp/2.0_dp)* & + exp_q(1)**(lb_max(jset)*1.0_dp+3.0_dp/2.0_dp)/ & + (zeta(1, ref_at_se_sgf_ofs(iatom, iset, 2)))**(la_max(iset)*0.5_dp+3.0_dp/4.0_dp)/ & + (zetb(1, ref_at_se_sgf_ofs(jatom, jset, 2)))**(lb_max(jset)*0.5_dp+3.0_dp/4.0_dp) ! add contribution from (a|b)_s-(q_a|q_b)_s DO i = 1, nsgfa(iset) @@ -2692,11 +2696,12 @@ CONTAINS virtual = nmo-homo IF (my_alpha_beta_case) virtual_beta = nmo-homo_beta - CALL mp2_ri_get_sizes(mp2_env, para_env, para_env_sub, ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, & - starts_array, starts_B_virtual, homo, dimen_RI, unit_nr, color_sub, best_block_size, best_integ_group_size, block_size, & - integ_group_size, min_integ_group_size, my_B_size, my_B_virtual_end, my_B_virtual_start, my_group_L_size, & - my_group_L_start, my_group_L_end, ngroup, num_IJ_blocks, num_integ_group, pos_integ_group, virtual, my_alpha_beta_case, & - my_open_shell_SS, mem_for_aK, mem_for_comm, mem_for_iaK, mem_for_rep, mem_min, mem_per_group, mem_real) + CALL mp2_ri_get_sizes( & + mp2_env, para_env, para_env_sub, ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, & + starts_array, starts_B_virtual, homo, dimen_RI, unit_nr, color_sub, best_block_size, best_integ_group_size, block_size, & + integ_group_size, min_integ_group_size, my_B_size, my_B_virtual_end, my_B_virtual_start, my_group_L_size, & + my_group_L_start, my_group_L_end, ngroup, num_IJ_blocks, num_integ_group, pos_integ_group, virtual, my_alpha_beta_case, & + my_open_shell_SS, mem_for_aK, mem_for_comm, mem_for_iaK, mem_for_rep, mem_min, mem_per_group, mem_real) IF (my_alpha_beta_case) THEN my_B_virtual_start_beta = starts_B_virtual_beta(para_env_sub%mepos) @@ -2713,12 +2718,13 @@ CONTAINS ! now create a group that contains all the proc that have the same virtual starting point ! in the integ group ! sub_sub_color=para_env_sub%mepos - CALL mp2_ri_create_group(BIb_C, para_env, para_env_sub, homo, color_sub, & - sizes_array, calc_forces, & - comm_exchange, integ_group_size, my_B_size, iiB, my_group_L_end, & - my_group_L_size, my_group_L_size_orig, my_group_L_start, my_new_group_L_size, & - sub_sub_color, integ_group_pos2color_sub, new_sizes_array, proc_map, proc_map_rep, sizes_array_orig, & - sub_proc_map, ranges_info_array, para_env_exchange, para_env_rep, num_integ_group) + CALL mp2_ri_create_group( & + BIb_C, para_env, para_env_sub, homo, color_sub, & + sizes_array, calc_forces, & + comm_exchange, integ_group_size, my_B_size, iiB, my_group_L_end, & + my_group_L_size, my_group_L_size_orig, my_group_L_start, my_new_group_L_size, & + sub_sub_color, integ_group_pos2color_sub, new_sizes_array, proc_map, proc_map_rep, sizes_array_orig, & + sub_proc_map, ranges_info_array, para_env_exchange, para_env_rep, num_integ_group) ! ***************************************************************** ! ********** REPLICATION-BLOCKED COMMUNICATION SCHEME *********** @@ -2812,7 +2818,8 @@ CONTAINS IF (ij_index <= send_ij_index) THEN ! ij_counter_send=(ij_index-MIN(1,proc_send))*ngroup+proc_send - ij_counter_send = (ij_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+integ_group_pos2color_sub(proc_send) + ij_counter_send = (ij_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+ & + integ_group_pos2color_sub(proc_send) send_i = ij_map(ij_counter_send, 1) send_j = ij_map(ij_counter_send, 2) send_block_size = ij_map(ij_counter_send, 3) @@ -3021,7 +3028,8 @@ CONTAINS b_global = b+my_B_virtual_start_beta-1 DO a = 1, virtual Emp2_Cou = Emp2_Cou-local_ab(a, b)**2/ & - (Eigenval(homo+a)+Eigenval_beta(homo_beta+b_global)-Eigenval(my_i+iiB-1)-Eigenval_beta(my_j+jjB-1)) + (Eigenval(homo+a)+Eigenval_beta(homo_beta+b_global)- & + Eigenval(my_i+iiB-1)-Eigenval_beta(my_j+jjB-1)) END DO END DO END IF @@ -3039,7 +3047,8 @@ CONTAINS (Eigenval(homo+a_global)+Eigenval(homo+b_global)-Eigenval(my_i+iiB-1)-Eigenval(my_j+jjB-1)) IF (calc_forces .AND. (.NOT. my_alpha_beta_case)) & t_ab(a_global, b) = -(amp_fac*local_ab(a_global, b)-local_ab(b_global, a))/ & - (Eigenval(homo+a_global)+Eigenval(homo+b_global)-Eigenval(my_i+iiB-1)-Eigenval(my_j+jjB-1)) + (Eigenval(homo+a_global)+Eigenval(homo+b_global)- & + Eigenval(my_i+iiB-1)-Eigenval(my_j+jjB-1)) END DO END DO ! ... and then with external data @@ -3070,7 +3079,8 @@ CONTAINS (Eigenval(homo+a_global)+Eigenval(homo+b_global)-Eigenval(my_i+iiB-1)-Eigenval(my_j+jjB-1)) IF (calc_forces .AND. (.NOT. my_alpha_beta_case)) & t_ab(a_global, b) = -(amp_fac*local_ab(a_global, b)-external_ab(b, a))/ & - (Eigenval(homo+a_global)+Eigenval(homo+b_global)-Eigenval(my_i+iiB-1)-Eigenval(my_j+jjB-1)) + (Eigenval(homo+a_global)+Eigenval(homo+b_global)- & + Eigenval(my_i+iiB-1)-Eigenval(my_j+jjB-1)) END DO END DO @@ -3118,7 +3128,8 @@ CONTAINS IF (ij_index <= send_ij_index) THEN ! something to send ! ij_counter_send=(ij_index-MIN(1,proc_send))*ngroup+proc_send - ij_counter_send = (ij_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+integ_group_pos2color_sub(proc_send) + ij_counter_send = (ij_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+ & + integ_group_pos2color_sub(proc_send) send_i = ij_map(ij_counter_send, 1) send_j = ij_map(ij_counter_send, 2) send_block_size = ij_map(ij_counter_send, 3) @@ -3205,19 +3216,23 @@ CONTAINS ! Start counting the number of almost degenerate ij pairs according ! to eps_canonical IF (.NOT. my_alpha_beta_case) THEN - CALL quasi_degenerate_P_ij(mp2_env, Eigenval, homo, virtual, my_open_shell_ss, & - my_beta_beta_case, my_alpha_beta_case, Bib_C, unit_nr, dimen_RI, my_B_size, ngroup, num_integ_group, my_group_L_size, & - color_sub, ranges_info_array, para_env_exchange, para_env_sub, proc_map, & - my_B_virtual_start, my_B_virtual_end, sizes_array, ends_B_virtual, sizes_B_virtual, & - starts_B_virtual, sub_proc_map, integ_group_pos2color_sub, local_ab) + CALL quasi_degenerate_P_ij( & + mp2_env, Eigenval, homo, virtual, my_open_shell_ss, & + my_beta_beta_case, my_alpha_beta_case, Bib_C, unit_nr, dimen_RI, & + my_B_size, ngroup, num_integ_group, my_group_L_size, & + color_sub, ranges_info_array, para_env_exchange, para_env_sub, proc_map, & + my_B_virtual_start, my_B_virtual_end, sizes_array, ends_B_virtual, sizes_B_virtual, & + starts_B_virtual, sub_proc_map, integ_group_pos2color_sub, local_ab) ELSE - CALL quasi_degenerate_P_ij(mp2_env, Eigenval, homo, virtual, my_open_shell_ss, & - my_beta_beta_case, my_alpha_beta_case, Bib_C, unit_nr, dimen_RI, my_B_size, ngroup, num_integ_group, my_group_L_size, & - color_sub, ranges_info_array, para_env_exchange, para_env_sub, proc_map, & - my_B_virtual_start, my_B_virtual_end, sizes_array, ends_B_virtual, sizes_B_virtual, & - starts_B_virtual, sub_proc_map, integ_group_pos2color_sub, local_ab, BIb_C_beta, my_B_size_beta, & - ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta, my_B_virtual_start_beta, & - virtual_beta, homo_beta, Eigenval_beta, my_B_virtual_end_beta) + CALL quasi_degenerate_P_ij( & + mp2_env, Eigenval, homo, virtual, my_open_shell_ss, & + my_beta_beta_case, my_alpha_beta_case, Bib_C, unit_nr, dimen_RI, & + my_B_size, ngroup, num_integ_group, my_group_L_size, & + color_sub, ranges_info_array, para_env_exchange, para_env_sub, proc_map, & + my_B_virtual_start, my_B_virtual_end, sizes_array, ends_B_virtual, sizes_B_virtual, & + starts_B_virtual, sub_proc_map, integ_group_pos2color_sub, local_ab, BIb_C_beta, my_B_size_beta, & + ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta, my_B_virtual_start_beta, & + virtual_beta, homo_beta, Eigenval_beta, my_B_virtual_end_beta) ENDIF END IF @@ -3880,7 +3895,8 @@ CONTAINS sizes_array, calc_forces, & comm_exchange, integ_group_size, my_B_size, iiB, my_group_L_end, & my_group_L_size, my_group_L_size_orig, my_group_L_start, my_new_group_L_size, & - sub_sub_color, integ_group_pos2color_sub, new_sizes_array, proc_map, proc_map_rep, sizes_array_orig, & + sub_sub_color, integ_group_pos2color_sub, new_sizes_array, & + proc_map, proc_map_rep, sizes_array_orig, & sub_proc_map, ranges_info_array, para_env_exchange, para_env_rep, num_integ_group) REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :, :) :: BIb_C TYPE(cp_para_env_type), POINTER :: para_env, para_env_sub @@ -3999,10 +4015,14 @@ CONTAINS !> \param mem_real ... ! ************************************************************************************************** SUBROUTINE mp2_ri_get_sizes(mp2_env, para_env, para_env_sub, ends_array, ends_B_virtual, sizes_array, sizes_B_virtual, & - starts_array, starts_B_virtual, homo, dimen_RI, unit_nr, color_sub, best_block_size, best_integ_group_size, block_size, & - integ_group_size, min_integ_group_size, my_B_size, my_B_virtual_end, my_B_virtual_start, my_group_L_size, & - my_group_L_start, my_group_L_end, ngroup, num_IJ_blocks, num_integ_group, pos_integ_group, virtual, my_alpha_beta_case, & - my_open_shell_SS, mem_for_aK, mem_for_comm, mem_for_iaK, mem_for_rep, mem_min, mem_per_group, mem_real) + starts_array, starts_B_virtual, homo, dimen_RI, unit_nr, color_sub, & + best_block_size, best_integ_group_size, block_size, & + integ_group_size, min_integ_group_size, my_B_size, & + my_B_virtual_end, my_B_virtual_start, my_group_L_size, & + my_group_L_start, my_group_L_end, ngroup, num_IJ_blocks, num_integ_group, & + pos_integ_group, virtual, my_alpha_beta_case, & + my_open_shell_SS, mem_for_aK, mem_for_comm, & + mem_for_iaK, mem_for_rep, mem_min, mem_per_group, mem_real) TYPE(mp2_type), POINTER :: mp2_env TYPE(cp_para_env_type), POINTER :: para_env, para_env_sub INTEGER, ALLOCATABLE, DIMENSION(:) :: ends_array, ends_B_virtual, sizes_array, & @@ -5043,10 +5063,12 @@ CONTAINS !> \param my_B_virtual_end_beta ... ! ************************************************************************************************** SUBROUTINE quasi_degenerate_P_ij(mp2_env, Eigenval, homo, virtual, open_shell, & - beta_beta, alpha_beta, Bib_C, unit_nr, dimen_RI, my_B_size, ngroup, num_integ_group, my_group_L_size, & + beta_beta, alpha_beta, Bib_C, unit_nr, dimen_RI, & + my_B_size, ngroup, num_integ_group, my_group_L_size, & color_sub, ranges_info_array, para_env_exchange, para_env_sub, proc_map, & my_B_virtual_start, my_B_virtual_end, sizes_array, ends_B_virtual, sizes_B_virtual, & - starts_B_virtual, sub_proc_map, integ_group_pos2color_sub, local_ab, BIb_C_beta, my_B_size_beta, & + starts_B_virtual, sub_proc_map, integ_group_pos2color_sub, & + local_ab, BIb_C_beta, my_B_size_beta, & ends_B_virtual_beta, sizes_B_virtual_beta, starts_B_virtual_beta, my_B_virtual_start_beta, & virtual_beta, homo_beta, Eigenval_beta, my_B_virtual_end_beta) TYPE(mp2_type), POINTER :: mp2_env @@ -5194,7 +5216,8 @@ CONTAINS IF (ijk_index <= send_ijk_index) THEN ! something to send - ijk_counter_send = (ijk_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+integ_group_pos2color_sub(proc_send) + ijk_counter_send = (ijk_index-MIN(1, integ_group_pos2color_sub(proc_send)))* & + ngroup+integ_group_pos2color_sub(proc_send) IF (iloops .EQ. 1) THEN send_i = ijk_map(ijk_counter_send, 1) send_j = ijk_map(ijk_counter_send, 2) @@ -5368,7 +5391,8 @@ CONTAINS DO a = 1, my_B_size a_global = a+my_B_virtual_start-1 t_ab(a_global, b) = local_ab(a_global, b)/ & - (Eigenval(my_i)+Eigenval_beta(my_k)-Eigenval(homo+a_global)-Eigenval_beta(homo_beta+b_global)) + (Eigenval(my_i)+Eigenval_beta(my_k)-Eigenval(homo+a_global)- & + Eigenval_beta(homo_beta+b_global)) END DO END DO ELSE ! Alpha-beta for beta-beta density @@ -5377,7 +5401,8 @@ CONTAINS DO a = 1, my_B_size_beta a_global = a+my_B_virtual_start_beta-1 t_ab(a_global, b) = local_ab(a_global, b)/ & - (Eigenval_beta(my_i)+Eigenval(my_k)-Eigenval_beta(homo_beta+a_global)-Eigenval(homo+b_global)) + (Eigenval_beta(my_i)+Eigenval(my_k)-Eigenval_beta(homo_beta+a_global)- & + Eigenval(homo+b_global)) END DO END DO ENDIF @@ -5474,7 +5499,8 @@ CONTAINS DO a = 1, my_B_size a_global = a+my_B_virtual_start-1 local_ab(a_global, b) = local_ab(a_global, b)/ & - (Eigenval(my_j)+Eigenval_beta(my_k)-Eigenval(homo+a_global)-Eigenval_beta(homo_beta+b_global)) + (Eigenval(my_j)+Eigenval_beta(my_k)-Eigenval(homo+a_global)- & + Eigenval_beta(homo_beta+b_global)) END DO END DO ELSE ! Alpha-beta for beta-beta density @@ -5483,7 +5509,8 @@ CONTAINS DO a = 1, my_B_size_beta a_global = a+my_B_virtual_start_beta-1 local_ab(a_global, b) = local_ab(a_global, b)/ & - (Eigenval_beta(my_j)+Eigenval(my_k)-Eigenval_beta(homo_beta+a_global)-Eigenval(homo+b_global)) + (Eigenval_beta(my_j)+Eigenval(my_k)-Eigenval_beta(homo_beta+a_global)- & + Eigenval(homo+b_global)) END DO END DO ENDIF @@ -5512,7 +5539,8 @@ CONTAINS IF (ijk_index <= send_ijk_index) THEN ! somethig to send - ijk_counter_send = (ijk_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+integ_group_pos2color_sub(proc_send) + ijk_counter_send = (ijk_index-MIN(1, integ_group_pos2color_sub(proc_send)))*ngroup+ & + integ_group_pos2color_sub(proc_send) IF (iloops .EQ. 1) THEN send_i = ijk_map(ijk_counter_send, 1) send_j = ijk_map(ijk_counter_send, 2) diff --git a/src/optimize_basis_utils.F b/src/optimize_basis_utils.F index eeccd68270..8d474d9646 100644 --- a/src/optimize_basis_utils.F +++ b/src/optimize_basis_utils.F @@ -493,7 +493,8 @@ CONTAINS WRITE (UNIT=unit_nr, FMT="(30(1X,I0))") basis%subset(iset)%n, basis%subset(iset)%lmin, basis%subset(iset)%lmax, & basis%subset(iset)%nexp, basis%subset(iset)%l DO iexp = 1, basis%subset(iset)%nexp - WRITE (UNIT=unit_nr, FMT="(T2,F24.14,30(1X,ES24.14))") basis%subset(iset)%exps(iexp), basis%subset(iset)%coeff(iexp, :) + WRITE (UNIT=unit_nr, FMT="(T2,F24.14,30(1X,ES24.14))") & + basis%subset(iset)%exps(iexp), basis%subset(iset)%coeff(iexp, :) END DO END DO END IF diff --git a/src/pme.F b/src/pme.F index 83053cfbf8..1c103dab52 100644 --- a/src/pme.F +++ b/src/pme.F @@ -151,7 +151,8 @@ CONTAINS CPASSERT(ASSOCIATED(core_particle_set)) nshell = SIZE(shell_particle_set) CALL structure_factor_allocate(grid_s%bounds, npart, exp_igr, & - allocate_centre=.TRUE., allocate_shell_e=.TRUE., allocate_shell_centre=.TRUE., nshell=nshell) + allocate_centre=.TRUE., allocate_shell_e=.TRUE., & + allocate_shell_centre=.TRUE., nshell=nshell) ELSE CALL structure_factor_allocate(grid_s%bounds, npart, exp_igr, & diff --git a/src/preconditioner.F b/src/preconditioner.F index a3ea5a47b0..74cc77ea48 100644 --- a/src/preconditioner.F +++ b/src/preconditioner.F @@ -252,7 +252,8 @@ CONTAINS DEALLOCATE (preconditioner(ispin)%preconditioner) ENDDO DEALLOCATE (preconditioner) - CASE (ot_precond_none, ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_full_single_inverse) ! these are 'independent' + ! these are 'independent' + CASE (ot_precond_none, ot_precond_full_kinetic, ot_precond_s_inverse, ot_precond_full_single_inverse) ! do nothing CASE DEFAULT CPABORT("") diff --git a/src/pw/pw_spline_utils.F b/src/pw/pw_spline_utils.F index 762c1283db..f020c9d77b 100644 --- a/src/pw/pw_spline_utils.F +++ b/src/pw/pw_spline_utils.F @@ -2217,7 +2217,8 @@ CONTAINS coarse_coeffs(i-1, j, k) = coarse_coeffs(i-1, j, k) & +ww1(1)*vv4 coarse_coeffs(i, j, k) = coarse_coeffs(i, j, k) & - +ww1(4)*vv0+ww0(3)*vv1+ww1(3)*vv2+ww0(2)*vv3+ww1(2)*vv4+ww0(1)*vv5+ww1(1)*vv6 + +ww1(4)*vv0+ww0(3)*vv1+ww1(3)*vv2+ww0(2)*vv3+ & + ww1(2)*vv4+ww0(1)*vv5+ww1(1)*vv6 coarse_coeffs(i+1, j, k) = coarse_coeffs(i+1, j, k) & +ww1(4)*vv2+ww0(3)*vv3+ww1(3)*vv4+ww0(2)*vv5+ww1(2)*vv6 & +ww0(1)*vv7+ww1(1)*vv0 diff --git a/src/qmmm_se_energy.F b/src/qmmm_se_energy.F index ae555af07a..d09fe56c84 100644 --- a/src/qmmm_se_energy.F +++ b/src/qmmm_se_energy.F @@ -155,9 +155,10 @@ CONTAINS END SELECT anag = dft_control%qs_control%se_control%analytical_gradients ! Setup type for SE integral control - CALL setup_se_int_control_type(se_int_control, shortrange=.FALSE., do_ewald_r3=.FALSE., & - do_ewald_gks=.FALSE., integral_screening=dft_control%qs_control%se_control%integral_screening, & - max_multipole=do_multipole_none, pc_coulomb_int=.FALSE.) + CALL setup_se_int_control_type( & + se_int_control, shortrange=.FALSE., do_ewald_r3=.FALSE., & + do_ewald_gks=.FALSE., integral_screening=dft_control%qs_control%se_control%integral_screening, & + max_multipole=do_multipole_none, pc_coulomb_int=.FALSE.) ! Allocate the core Hamiltonian matrix CALL cp_dbcsr_allocate_matrix_set(ks_qmmm_env_loc%matrix_h, 1) diff --git a/src/qmmm_se_forces.F b/src/qmmm_se_forces.F index 07d2fcc575..448d7cada4 100644 --- a/src/qmmm_se_forces.F +++ b/src/qmmm_se_forces.F @@ -128,9 +128,10 @@ CONTAINS anag = dft_control%qs_control%se_control%analytical_gradients delta = dft_control%qs_control%se_control%delta ! Setup SE integral control type - CALL setup_se_int_control_type(se_int_control, shortrange=.FALSE., do_ewald_r3=.FALSE., & - do_ewald_gks=.FALSE., integral_screening=dft_control%qs_control%se_control%integral_screening, & - max_multipole=do_multipole_none, pc_coulomb_int=.FALSE.) + CALL setup_se_int_control_type( & + se_int_control, shortrange=.FALSE., do_ewald_r3=.FALSE., & + do_ewald_gks=.FALSE., integral_screening=dft_control%qs_control%se_control%integral_screening, & + max_multipole=do_multipole_none, pc_coulomb_int=.FALSE.) ! Create a fake semi-empirical type to handle the classical atom ALLOCATE (Forces_QM(3, number_qm_atoms)) diff --git a/src/qmmm_topology_util.F b/src/qmmm_topology_util.F index c37b591a43..44d9b14e44 100644 --- a/src/qmmm_topology_util.F +++ b/src/qmmm_topology_util.F @@ -71,10 +71,10 @@ CONTAINS .AND. (MINVAL(qmmm_env%qm_atom_index) > 0) CPASSERT(qmmm_index_in_range) DO iatm = 1, SIZE(qmmm_env%qm_atom_index) - topology%atom_info%id_atmname(qmmm_env%qm_atom_index(iatm)) = str2id(s2s("_QM_"// & - TRIM(id2str(topology%atom_info%id_atmname(qmmm_env%qm_atom_index(iatm)))))) - topology%atom_info%id_resname(qmmm_env%qm_atom_index(iatm)) = str2id(s2s("_QM_"// & - TRIM(id2str(topology%atom_info%id_resname(qmmm_env%qm_atom_index(iatm)))))) + topology%atom_info%id_atmname(qmmm_env%qm_atom_index(iatm)) = & + str2id(s2s("_QM_"//TRIM(id2str(topology%atom_info%id_atmname(qmmm_env%qm_atom_index(iatm)))))) + topology%atom_info%id_resname(qmmm_env%qm_atom_index(iatm)) = & + str2id(s2s("_QM_"//TRIM(id2str(topology%atom_info%id_resname(qmmm_env%qm_atom_index(iatm)))))) END DO ! ! Modify type for MM link atoms @@ -84,10 +84,10 @@ CONTAINS prefix_lnk = "_LNK000" WRITE (prefix_lnk(5:), '(I20)') iatm CALL compress(prefix_lnk, .TRUE.) - topology%atom_info%id_atmname(qmmm_env%mm_link_atoms(iatm)) = str2id(s2s(TRIM(prefix_lnk)// & - TRIM(id2str(topology%atom_info%id_atmname(qmmm_env%mm_link_atoms(iatm)))))) - topology%atom_info%id_resname(qmmm_env%mm_link_atoms(iatm)) = str2id(s2s(TRIM(prefix_lnk)// & - TRIM(id2str(topology%atom_info%id_resname(qmmm_env%mm_link_atoms(iatm)))))) + topology%atom_info%id_atmname(qmmm_env%mm_link_atoms(iatm)) = & + str2id(s2s(TRIM(prefix_lnk)//TRIM(id2str(topology%atom_info%id_atmname(qmmm_env%mm_link_atoms(iatm)))))) + topology%atom_info%id_resname(qmmm_env%mm_link_atoms(iatm)) = & + str2id(s2s(TRIM(prefix_lnk)//TRIM(id2str(topology%atom_info%id_resname(qmmm_env%mm_link_atoms(iatm)))))) END DO END IF ! diff --git a/src/qmmmx_update.F b/src/qmmmx_update.F index 5dbbd1db61..cd031077b4 100644 --- a/src/qmmmx_update.F +++ b/src/qmmmx_update.F @@ -183,8 +183,9 @@ CONTAINS from_nparticle_local = from_local_particles%n_el(from_iparticle_kind) IF (MINVAL(ABS(from_local_particles%list(from_iparticle_kind)%array(1:from_nparticle_local)- & to_iparticle_global)) == 0) THEN - from_iparticle_local = MINLOC(ABS( & - from_local_particles%list(from_iparticle_kind)%array(1:from_nparticle_local)-to_iparticle_global)) + from_iparticle_local = & + MINLOC(ABS(from_local_particles%list(from_iparticle_kind)%array(1:from_nparticle_local)- & + to_iparticle_global)) to_local_particles%local_particle_set(to_iparticle_kind)%rng(to_iparticle_local)%stream = & from_local_particles%local_particle_set(from_iparticle_kind)%rng(from_iparticle_local(1))%stream found_it = .TRUE. diff --git a/src/qmmmx_util.F b/src/qmmmx_util.F index 26ba1cfdc5..07ed71d9a6 100644 --- a/src/qmmmx_util.F +++ b/src/qmmmx_util.F @@ -273,10 +273,11 @@ CONTAINS ! (need intra molecule bond info, which isn't available for QM molecules yet) ! add core using hysteretic selection(core_list, r_core) + unbreakable bonds - CALL add_layer_hysteretically(nlist, particle_set, cell, nearest_dist, & - orig_full_labels, new_full_labels, n_new, new_indices, new_labels, & - force_mixing_label_QM_core_list, force_mixing_label_QM_core_list, force_mixing_label_QM_core, r_core, & - max_n_qm, adaptive_exclude_molecules, molecule_set, broken_bonds) + CALL add_layer_hysteretically( & + nlist, particle_set, cell, nearest_dist, & + orig_full_labels, new_full_labels, n_new, new_indices, new_labels, & + force_mixing_label_QM_core_list, force_mixing_label_QM_core_list, force_mixing_label_QM_core, r_core, & + max_n_qm, adaptive_exclude_molecules, molecule_set, broken_bonds) ![NB] should actually pass this back for making link sections? DEALLOCATE (broken_bonds) @@ -307,10 +308,11 @@ CONTAINS ENDIF ! add buffer using hysteretic selection (>= QM extended, r_buf) + unbreakable bonds - CALL add_layer_hysteretically(nlist, particle_set, cell, nearest_dist, & - orig_full_labels, new_full_labels, n_new, new_indices, new_labels, & - force_mixing_label_QM_dynamics, force_mixing_label_QM_core_list, force_mixing_label_buffer, r_buf, & - max_n_qm, adaptive_exclude_molecules, molecule_set, broken_bonds) + CALL add_layer_hysteretically( & + nlist, particle_set, cell, nearest_dist, & + orig_full_labels, new_full_labels, n_new, new_indices, new_labels, & + force_mixing_label_QM_dynamics, force_mixing_label_QM_core_list, force_mixing_label_buffer, r_buf, & + max_n_qm, adaptive_exclude_molecules, molecule_set, broken_bonds) ![NB] should actually pass this back for making link sections? DEALLOCATE (broken_bonds) diff --git a/src/qs_collocate_density.F b/src/qs_collocate_density.F index 9511c3707a..edb68e3179 100644 --- a/src/qs_collocate_density.F +++ b/src/qs_collocate_density.F @@ -1185,10 +1185,11 @@ CONTAINS ra(:) = pbc(qs_env%qmmm_env_qm%image_charge_pot%particles_all(atom_a)%r, cell) subpatch_pattern = 0 !lmax == 0 so set lmax_global to 0 - CALL collocate_pgf_product_rspace(0, qs_env%qmmm_env_qm%image_charge_pot%eta, & - 0, 0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, coeff(iatom), pab, 0, 0, rs_rho, & - cell, pw_env%cube_info(1), eps_rho_rspace, ga_gb_function=FUNC_AB, & - use_subpatch=.TRUE., subpatch_pattern=subpatch_pattern, lmax_global=0) + CALL collocate_pgf_product_rspace( & + 0, qs_env%qmmm_env_qm%image_charge_pot%eta, & + 0, 0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, coeff(iatom), pab, 0, 0, rs_rho, & + cell, pw_env%cube_info(1), eps_rho_rspace, ga_gb_function=FUNC_AB, & + use_subpatch=.TRUE., subpatch_pattern=subpatch_pattern, lmax_global=0) ENDDO ENDIF @@ -1384,10 +1385,11 @@ CONTAINS ra(:) = pbc(particle_set(iatom)%r, cell) subpatch_pattern = 0 ! la_max==0 so set lmax_global to 0 - CALL collocate_pgf_product_rspace(0, eta, & - 0, 0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, coeff(iatom), pab, 0, 0, rs_rho, & - cell, pw_env%cube_info(1), eps_rho_rspace, ga_gb_function=FUNC_AB, & - use_subpatch=.TRUE., subpatch_pattern=subpatch_pattern, lmax_global=0) + CALL collocate_pgf_product_rspace( & + 0, eta, & + 0, 0, 0.0_dp, 0, ra, (/0.0_dp, 0.0_dp, 0.0_dp/), 0.0_dp, coeff(iatom), pab, 0, 0, rs_rho, & + cell, pw_env%cube_info(1), eps_rho_rspace, ga_gb_function=FUNC_AB, & + use_subpatch=.TRUE., subpatch_pattern=subpatch_pattern, lmax_global=0) ENDDO ENDIF @@ -3436,12 +3438,13 @@ CONTAINS il = ilx+ily+ilz jl = jlx+jly+jlz kl = klx+kly+klz - coef_ijk(coef_map(il, jl, kl)) = coef_ijk(coef_map(il, jl, kl))+coef_xyz(coef_map(lx, ly, lz))* & - hmatgridp(1, 1, ilx)*hmatgridp(1, 2, jlx)*hmatgridp(1, 3, klx)* & - hmatgridp(2, 1, ily)*hmatgridp(2, 2, jly)*hmatgridp(2, 3, kly)* & - hmatgridp(3, 1, ilz)*hmatgridp(3, 2, jlz)*hmatgridp(3, 3, klz)* & - fac(lx)*fac(ly)*fac(lz)/ & - (fac(ilx)*fac(ily)*fac(ilz)*fac(jlx)*fac(jly)*fac(jlz)*fac(klx)*fac(kly)*fac(klz)) + coef_ijk(coef_map(il, jl, kl)) = & + coef_ijk(coef_map(il, jl, kl))+coef_xyz(coef_map(lx, ly, lz))* & + hmatgridp(1, 1, ilx)*hmatgridp(1, 2, jlx)*hmatgridp(1, 3, klx)* & + hmatgridp(2, 1, ily)*hmatgridp(2, 2, jly)*hmatgridp(2, 3, kly)* & + hmatgridp(3, 1, ilz)*hmatgridp(3, 2, jlz)*hmatgridp(3, 3, klz)* & + fac(lx)*fac(ly)*fac(lz)/ & + (fac(ilx)*fac(ily)*fac(ilz)*fac(jlx)*fac(jly)*fac(jlz)*fac(klx)*fac(kly)*fac(klz)) ENDDO ENDDO ENDDO diff --git a/src/qs_dftb_matrices.F b/src/qs_dftb_matrices.F index 2b69170537..76d533fff3 100644 --- a/src/qs_dftb_matrices.F +++ b/src/qs_dftb_matrices.F @@ -936,8 +936,9 @@ CONTAINS indder = 2+2*i+j dsblocks(indder)%block = 0.0_dp - dsblocks(indder)%block = dsblocks(indder)%block+(dsblock+dsblockm- & - dsblock1(:, :, i)-dsblock1(:, :, j)+2.0_dp*sblock)/(2.0_dp*ddr**2) + dsblocks(indder)%block = & + dsblocks(indder)%block+( & + dsblock+dsblockm-dsblock1(:, :, i)-dsblock1(:, :, j)+2.0_dp*sblock)/(2.0_dp*ddr**2) END DO END DO END IF @@ -1775,17 +1776,19 @@ CONTAINS CALL build_mm_pot(qpot(iatom), 1, eta_a(0), qmmm_env%added_charges%potentials, & qmmm_env%added_charges%added_particles, qmmm_env%added_charges%mm_atom_chrg, & qmmm_env%added_charges%mm_atom_index, mm_cell, iatom, rcutoff, particles_qm) - CALL build_mm_dpot(mcharge(iatom), 1, eta_a(0), qmmm_env%added_charges%potentials, & - qmmm_env%added_charges%added_particles, qmmm_env%added_charges%mm_atom_chrg, & - qmmm_env%added_charges%mm_atom_index, mm_cell, iatom, Forces_added_charges, Forces_QM(:, iqm), & - rcutoff, particles_qm) + CALL build_mm_dpot( & + mcharge(iatom), 1, eta_a(0), qmmm_env%added_charges%potentials, & + qmmm_env%added_charges%added_particles, qmmm_env%added_charges%mm_atom_chrg, & + qmmm_env%added_charges%mm_atom_index, mm_cell, iatom, Forces_added_charges, Forces_QM(:, iqm), & + rcutoff, particles_qm) CALL build_mm_pot(qpot(iatom), 2, alpha, qmmm_env%added_charges%potentials, & qmmm_env%added_charges%added_particles, qmmm_env%added_charges%mm_atom_chrg, & qmmm_env%added_charges%mm_atom_index, mm_cell, iatom, rcutoff, particles_qm) - CALL build_mm_dpot(mcharge(iatom), 2, alpha, qmmm_env%added_charges%potentials, & - qmmm_env%added_charges%added_particles, qmmm_env%added_charges%mm_atom_chrg, & - qmmm_env%added_charges%mm_atom_index, mm_cell, iatom, Forces_added_charges, Forces_QM(:, iqm), & - rcutoff, particles_qm) + CALL build_mm_dpot( & + mcharge(iatom), 2, alpha, qmmm_env%added_charges%potentials, & + qmmm_env%added_charges%added_particles, qmmm_env%added_charges%mm_atom_chrg, & + qmmm_env%added_charges%mm_atom_index, mm_cell, iatom, Forces_added_charges, Forces_QM(:, iqm), & + rcutoff, particles_qm) END IF END DO END DO diff --git a/src/qs_environment_types.F b/src/qs_environment_types.F index ff78eec731..aea706adf8 100644 --- a/src/qs_environment_types.F +++ b/src/qs_environment_types.F @@ -459,7 +459,8 @@ CONTAINS rho_buffer, rho_xc, pw_env, ewald_env, ewald_pw, & mpools, mpools_aux_fit, input, para_env, blacs_env, scf_control, rel_control, kinetic, qs_charges, & vppl, rho_core, rho_nlcc, rho_nlcc_g, ks_env, ks_qmmm_env, wf_history, scf_env, id_nr, local_particles, & - local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, molecule_set, subsys, cp_subsys, oce, rho_atom_set, & + local_molecules, distribution_2d, dbcsr_dist, molecule_kind_set, & + molecule_set, subsys, cp_subsys, oce, rho_atom_set, & task_list, & task_list_aux_fit, & task_list_soft, & diff --git a/src/qs_epr_hyp.F b/src/qs_epr_hyp.F index b446e56aa9..c22be5b51e 100644 --- a/src/qs_epr_hyp.F +++ b/src/qs_epr_hyp.F @@ -204,8 +204,9 @@ CONTAINS hypiso(iatom) = hypiso(iatom)+ & (rho_rad_h(1)%r_coef(ir, iso)-rho_rad_h(2)%r_coef(ir, iso))* & harmonics%slm(ia, iso)*grid_atom%wr(ir)*grid_atom%wa(ia)* & - 2._dp/(REAL(z, KIND=dp)*a_fine**2*(1._dp+2._dp*grid_atom%rad(ir)/ & - (REAL(z, KIND=dp)*a_fine**2))**2*fourpi*grid_atom%rad(ir)**2) + 2._dp/(REAL(z, KIND=dp)*a_fine**2* & + (1._dp+2._dp*grid_atom%rad(ir)/(REAL(z, KIND=dp)*a_fine**2))**2* & + fourpi*grid_atom%rad(ir)**2) hypanisotemp = hypanisotemp+ & (rho_rad_h(1)%r_coef(ir, iso)-rho_rad_h(2)%r_coef(ir, iso) & -(rho_rad_s(1)%r_coef(ir, iso)-rho_rad_s(2)%r_coef(ir, iso)))* & diff --git a/src/qs_gspace_mixing.F b/src/qs_gspace_mixing.F index f095b50486..92ac8b8100 100644 --- a/src/qs_gspace_mixing.F +++ b/src/qs_gspace_mixing.F @@ -747,10 +747,12 @@ CONTAINS valh = valh-G(jb)*mixing_store%dcpc_h_in(jb, iatom, ispin)%r_coef(j, i) vals = vals-G(jb)*mixing_store%dcpc_s_in(jb, iatom, ispin)%r_coef(j, i) END DO - rho_atom(iatom)%cpc_h(ispin)%r_coef(j, i) = alpha*rho_atom(iatom)%cpc_h(ispin)%r_coef(j, i)+ & - mixing_store%cpc_h_in(iatom, ispin)%r_coef(j, i)*(1._dp-alpha)+valh - rho_atom(iatom)%cpc_s(ispin)%r_coef(j, i) = alpha*rho_atom(iatom)%cpc_s(ispin)%r_coef(j, i)+ & - mixing_store%cpc_s_in(iatom, ispin)%r_coef(j, i)*(1._dp-alpha)+vals + rho_atom(iatom)%cpc_h(ispin)%r_coef(j, i) = & + alpha*rho_atom(iatom)%cpc_h(ispin)%r_coef(j, i)+ & + mixing_store%cpc_h_in(iatom, ispin)%r_coef(j, i)*(1._dp-alpha)+valh + rho_atom(iatom)%cpc_s(ispin)%r_coef(j, i) = & + alpha*rho_atom(iatom)%cpc_s(ispin)%r_coef(j, i)+ & + mixing_store%cpc_s_in(iatom, ispin)%r_coef(j, i)*(1._dp-alpha)+vals END DO END DO @@ -1841,10 +1843,13 @@ CONTAINS IF (rho_g(1)%pw%pw_grid%have_g0) ig1 = 2 DO ig = ig1, mixing_store%ig_max mixing_store%kerker_factor(ig) = MAX(g2(ig)/(g2(ig)+beta*beta), kmin) - mixing_store%special_metric(ig) = 1.0_dp+50.0_dp/8.0_dp*(1.0_dp+ & - COS(g_vec(1, ig))+COS(g_vec(2, ig))+COS(g_vec(3, ig))+COS(g_vec(1, ig))*COS(g_vec(2, ig))+ & - COS(g_vec(2, ig))*COS(g_vec(3, ig))+COS(g_vec(1, ig))*COS(g_vec(3, ig))+ & - COS(g_vec(1, ig))*COS(g_vec(2, ig))*COS(g_vec(3, ig))) + mixing_store%special_metric(ig) = & + 1.0_dp+50.0_dp/8.0_dp*( & + 1.0_dp+COS(g_vec(1, ig))+COS(g_vec(2, ig))+COS(g_vec(3, ig))+ & + COS(g_vec(1, ig))*COS(g_vec(2, ig))+ & + COS(g_vec(2, ig))*COS(g_vec(3, ig))+ & + COS(g_vec(1, ig))*COS(g_vec(3, ig))+ & + COS(g_vec(1, ig))*COS(g_vec(2, ig))*COS(g_vec(3, ig))) END DO nbuffer = mixing_store%nbuffer diff --git a/src/qs_integrate_potential_low.F b/src/qs_integrate_potential_low.F index 241fee7149..7ee347a5ee 100644 --- a/src/qs_integrate_potential_low.F +++ b/src/qs_integrate_potential_low.F @@ -287,11 +287,14 @@ CONTAINS IF (calculate_forces .AND. PRESENT(force_a)) THEN IF (my_compute_tau) THEN pabval = pab(o1+ico, o2+jco)*0.5_dp*ax*bx - CALL force_update(force_a, force_b, rab, pabval, ftza, ftzb, MAX(ax-1, 0), ay, az, MAX(bx-1, 0), by, bz, vab) + CALL force_update( & + force_a, force_b, rab, pabval, ftza, ftzb, MAX(ax-1, 0), ay, az, MAX(bx-1, 0), by, bz, vab) pabval = pab(o1+ico, o2+jco)*0.5_dp*ay*by - CALL force_update(force_a, force_b, rab, pabval, ftza, ftzb, ax, MAX(ay-1, 0), az, bx, MAX(by-1, 0), bz, vab) + CALL force_update( & + force_a, force_b, rab, pabval, ftza, ftzb, ax, MAX(ay-1, 0), az, bx, MAX(by-1, 0), bz, vab) pabval = pab(o1+ico, o2+jco)*0.5_dp*az*bz - CALL force_update(force_a, force_b, rab, pabval, ftza, ftzb, ax, ay, MAX(az-1, 0), bx, by, MAX(bz-1, 0), vab) + CALL force_update( & + force_a, force_b, rab, pabval, ftza, ftzb, ax, ay, MAX(az-1, 0), bx, by, MAX(bz-1, 0), vab) pabval = pab(o1+ico, o2+jco)*0.5_dp*(-ftza*bx) CALL force_update(force_a, force_b, rab, pabval, ftza, ftzb, ax+1, ay, az, MAX(bx-1, 0), by, bz, vab) pabval = pab(o1+ico, o2+jco)*0.5_dp*(-ftza*by) @@ -656,12 +659,13 @@ CONTAINS il = ilx+ily+ilz jl = jlx+jly+jlz kl = klx+kly+klz - coef_xyz(coef_map(lx, ly, lz)) = coef_xyz(coef_map(lx, ly, lz))+coef_ijk(coef_map(il, jl, kl))* & - hmatgridp(1, 1, ilx)*hmatgridp(1, 2, jlx)*hmatgridp(1, 3, klx)* & - hmatgridp(2, 1, ily)*hmatgridp(2, 2, jly)*hmatgridp(2, 3, kly)* & - hmatgridp(3, 1, ilz)*hmatgridp(3, 2, jlz)*hmatgridp(3, 3, klz)* & - fac(lx)*fac(ly)*fac(lz)/ & - (fac(ilx)*fac(ily)*fac(ilz)*fac(jlx)*fac(jly)*fac(jlz)*fac(klx)*fac(kly)*fac(klz)) + coef_xyz(coef_map(lx, ly, lz)) = & + coef_xyz(coef_map(lx, ly, lz))+coef_ijk(coef_map(il, jl, kl))* & + hmatgridp(1, 1, ilx)*hmatgridp(1, 2, jlx)*hmatgridp(1, 3, klx)* & + hmatgridp(2, 1, ily)*hmatgridp(2, 2, jly)*hmatgridp(2, 3, kly)* & + hmatgridp(3, 1, ilz)*hmatgridp(3, 2, jlz)*hmatgridp(3, 3, klz)* & + fac(lx)*fac(ly)*fac(lz)/ & + (fac(ilx)*fac(ily)*fac(ilz)*fac(jlx)*fac(jly)*fac(jlz)*fac(klx)*fac(kly)*fac(klz)) ENDDO ENDDO ENDDO diff --git a/src/qs_ks_utils.F b/src/qs_ks_utils.F index ae9eea526c..7fb4b4c344 100644 --- a/src/qs_ks_utils.F +++ b/src/qs_ks_utils.F @@ -792,7 +792,8 @@ CONTAINS IF (calculate_forces) THEN nforce = 0 DO i = 1, SIZE(force) - force(i)%ch_pulay(:, :) = force(i)%ch_pulay(:, :)*full_scaling+store_forces(1:3, nforce+1:nforce+SIZE(force(i)%ch_pulay, 2)) + force(i)%ch_pulay(:, :) = force(i)%ch_pulay(:, :)*full_scaling+ & + store_forces(1:3, nforce+1:nforce+SIZE(force(i)%ch_pulay, 2)) nforce = nforce+SIZE(force(i)%ch_pulay, 2) ENDDO ENDIF diff --git a/src/qs_linres_current.F b/src/qs_linres_current.F index 62bb0aa111..36927fa938 100644 --- a/src/qs_linres_current.F +++ b/src/qs_linres_current.F @@ -790,9 +790,10 @@ CONTAINS cp_dbcsr_row_block_sizes(mat_a), cp_dbcsr_col_block_sizes(mat_a), & cp_dbcsr_get_data_size(mat_a)) - IF (do_igaim) CALL cp_dbcsr_create(deltajp_d(1)%matrix, ' deltajp_d ', cp_dbcsr_distribution(mat_a), & - cp_dbcsr_get_matrix_type(mat_a), cp_dbcsr_row_block_sizes(mat_a), cp_dbcsr_col_block_sizes(mat_a), & - cp_dbcsr_get_data_size(mat_a)) + IF (do_igaim) CALL cp_dbcsr_create( & + deltajp_d(1)%matrix, ' deltajp_d ', cp_dbcsr_distribution(mat_a), & + cp_dbcsr_get_matrix_type(mat_a), cp_dbcsr_row_block_sizes(mat_a), cp_dbcsr_col_block_sizes(mat_a), & + cp_dbcsr_get_data_size(mat_a)) ELSE deltajp_a(1)%matrix => mat_a !mat_jp deltajp_b(1)%matrix => mat_b !mat_jp_rii diff --git a/src/qs_localization_methods.F b/src/qs_localization_methods.F index ca013cd9e7..0ac21cd00e 100644 --- a/src/qs_localization_methods.F +++ b/src/qs_localization_methods.F @@ -1618,7 +1618,8 @@ CONTAINS CALL dgemm("N", "N", nstate, n1, n1, 1.0_dp, rotmat(1, 1), nstate, rmat_loc(1, 1), n1+n2, 1.0_dp, gmat, nstate) ELSE CALL dgemm("N", "N", nstate, n1, n2, 1.0_dp, rotmat(1, k), nstate, rmat_loc(1, n2+1), n1+n2, 0.0_dp, gmat, nstate) - CALL dgemm("N", "N", nstate, n1, n1, 1.0_dp, rotmat(1, 1), nstate, rmat_loc(n2+1, n2+1), n1+n2, 1.0_dp, gmat, nstate) + CALL dgemm("N", "N", nstate, n1, n1, 1.0_dp, rotmat(1, 1), nstate, & + rmat_loc(n2+1, n2+1), n1+n2, 1.0_dp, gmat, nstate) END IF CALL dcopy(nstate*n1, gmat(1, 1), 1, rotmat(1, 1), 1) @@ -1631,8 +1632,9 @@ CONTAINS DO istate = 1, n1 DO jstate = 1, nstate DO i = 1, n2 - xyz_mix_ns(idim)%c_array(jstate, istate) = xyz_mix_ns(idim)%c_array(jstate, istate)+ & - c_array_partner(jstate, i, idim)*rmat_loc(il2+i-1, il1+istate-1) + xyz_mix_ns(idim)%c_array(jstate, istate) = & + xyz_mix_ns(idim)%c_array(jstate, istate)+ & + c_array_partner(jstate, i, idim)*rmat_loc(il2+i-1, il1+istate-1) END DO END DO END DO diff --git a/src/qs_neighbor_lists.F b/src/qs_neighbor_lists.F index 3cd5257e0e..059f8d67f6 100644 --- a/src/qs_neighbor_lists.F +++ b/src/qs_neighbor_lists.F @@ -1116,7 +1116,8 @@ CONTAINS subcell_scale = ((125.0_dp**3)/deth)**(1.0_dp/6.0_dp) ! guess the number of subcells for optimal performance, guard against crazy stuff triggered by very small rabm - nsubcell(:) = INT(MAX(1.0_dp, MIN(0.5_dp*subcells*subcell_scale/sab_max(:), 0.5_dp*subcells*subcell_scale/sab_max_guard(:)))) + nsubcell(:) = INT(MAX(1.0_dp, MIN(0.5_dp*subcells*subcell_scale/sab_max(:), & + 0.5_dp*subcells*subcell_scale/sab_max_guard(:)))) ! number of image cells to be considered ncell(:) = (INT(sab_max(:))+1)*periodic(:) diff --git a/src/qs_pdos.F b/src/qs_pdos.F index e37f5262d9..4efcf06570 100644 --- a/src/qs_pdos.F +++ b/src/qs_pdos.F @@ -771,7 +771,8 @@ CONTAINS END IF WRITE (UNIT=iw, FMT="(A,I0,A,I0,A,I0,A,F12.6,A)") & - "# Projected DOS for list ", ildos, " of ", ldos_p(ildos)%ldos%nlist, " atoms, at iteration step i = ", iterstep, & + "# Projected DOS for list ", ildos, " of ", ldos_p(ildos)%ldos%nlist, & + " atoms, at iteration step i = ", iterstep, & ", E(Fermi) = ", e_fermi, " a.u." IF (ldos_p(ildos)%ldos%separate_components) THEN ALLOCATE (tmp_str(0:0, 0:ldos_p(ildos)%ldos%maxl, -ldos_p(ildos)%ldos%maxl:ldos_p(ildos)%ldos%maxl)) diff --git a/src/qs_scf_post_gpw.F b/src/qs_scf_post_gpw.F index 23460f13e0..e6883f835b 100644 --- a/src/qs_scf_post_gpw.F +++ b/src/qs_scf_post_gpw.F @@ -282,7 +282,8 @@ CONTAINS my_localized_wfn = .FALSE. NULLIFY (admm_env, dft_control, pw_env, auxbas_pw_pool, pw_pools, mos, rho, & mo_coeff, ks_rmpv, matrix_s, qs_loc_env_homo, qs_loc_env_lumo, scf_control, & - unoccupied_orbs, unoccupied_orbs_stm, mo_eigenvalues, unoccupied_evals, unoccupied_evals_stm, molecule_set, mo_derivs, & + unoccupied_orbs, unoccupied_orbs_stm, mo_eigenvalues, unoccupied_evals, & + unoccupied_evals_stm, molecule_set, mo_derivs, & subsys, particles, input, print_key, kinetic_m, marked_states) NULLIFY (homo_localized, lumo_localized, lumo_ptr, rho_ao) @@ -802,10 +803,11 @@ CONTAINS ! Compute the molecular states IF (BTEST(cp_print_key_should_output(logger%iter_info, loc_print_section, & "MOLECULAR_STATES"), cp_p_file)) THEN - CALL construct_molecular_states(molecule_set, mo_local(ispin)%matrix, coeff(ispin)%matrix, & - evals(ispin)%array, ks_rmpv(ispin)%matrix, matrix_s(1)%matrix, qs_env, wf_r, wf_g, & - loc_print_section=loc_print_section, particles=particles, tag=TRIM(qs_loc_env%tag_mo), & - marked_states=marked_states_spin) + CALL construct_molecular_states( & + molecule_set, mo_local(ispin)%matrix, coeff(ispin)%matrix, & + evals(ispin)%array, ks_rmpv(ispin)%matrix, matrix_s(1)%matrix, qs_env, wf_r, wf_g, & + loc_print_section=loc_print_section, particles=particles, tag=TRIM(qs_loc_env%tag_mo), & + marked_states=marked_states_spin) IF (ASSOCIATED(marked_states_spin)) THEN IF (.NOT. ASSOCIATED(marked_states)) THEN ALLOCATE (marked_states(SIZE(marked_states_spin), dft_control%nspins, 2)) diff --git a/src/qs_scf_wfn_mix.F b/src/qs_scf_wfn_mix.F index 6e630f9756..69c17929e9 100644 --- a/src/qs_scf_wfn_mix.F +++ b/src/qs_scf_wfn_mix.F @@ -136,7 +136,8 @@ CONTAINS ! first get a copy of the proper orig IF (.NOT. ORIG_IS_VIRTUAL) THEN - CALL cp_fm_to_fm(mos(orig_spin_index)%mo_set%mo_coeff, matrix_x, 1, mos(orig_spin_index)%mo_set%nmo-orig_mo_index+1, 1) + CALL cp_fm_to_fm(mos(orig_spin_index)%mo_set%mo_coeff, matrix_x, 1, & + mos(orig_spin_index)%mo_set%nmo-orig_mo_index+1, 1) ELSE CALL cp_fm_to_fm(unoccupied_orbs(orig_spin_index)%matrix, matrix_x, 1, orig_mo_index, 1) ENDIF diff --git a/src/rpa_im_time.F b/src/rpa_im_time.F index d072208a91..77c1b82961 100644 --- a/src/rpa_im_time.F +++ b/src/rpa_im_time.F @@ -860,7 +860,8 @@ CONTAINS buffer_send%sizes(2) = n_entries_local_virt DO group_iter = 1, ngroup-1 - CALL mp_irecv(buffer_rec(group_iter)%sizes, proc_rec(group_iter), para_env_exch%group, req_array(group_iter, 2), tag=group_iter) + CALL mp_irecv(buffer_rec(group_iter)%sizes, proc_rec(group_iter), para_env_exch%group, & + req_array(group_iter, 2), tag=group_iter) CALL mp_isend(buffer_send%sizes, proc_send(group_iter), para_env_exch%group, req_array(group_iter, 1), tag=group_iter) END DO CALL mp_waitall(req_array(:, :)) @@ -874,7 +875,8 @@ CONTAINS ! get infos CALL timeset(routineN//"_comm_2", handle2) - CALL mp_irecv(buffer_rec(group_iter)%indx, proc_rec(group_iter), para_env_exch%group, req_array(group_iter, 2), tag=group_iter) + CALL mp_irecv(buffer_rec(group_iter)%indx, proc_rec(group_iter), para_env_exch%group, & + req_array(group_iter, 2), tag=group_iter) CALL mp_isend(buffer_info_virt, proc_send(group_iter), para_env_exch%group, req_array(group_iter, 1), tag=group_iter) CALL timestop(handle2) @@ -885,7 +887,8 @@ CONTAINS ! get actual data CALL timeset(routineN//"_comm_3", handle2) - CALL mp_irecv(buffer_rec(group_iter)%msg, proc_rec(group_iter), para_env_exch%group, req_array(group_iter, 2), tag=group_iter) + CALL mp_irecv(buffer_rec(group_iter)%msg, proc_rec(group_iter), para_env_exch%group, & + req_array(group_iter, 2), tag=group_iter) CALL mp_isend(buffer_data_virt, proc_send(group_iter), para_env_exch%group, req_array(group_iter, 1), tag=group_iter) CALL timestop(handle2) diff --git a/src/rpa_ri_gpw.F b/src/rpa_ri_gpw.F index bc76be3996..c0274fdf77 100644 --- a/src/rpa_ri_gpw.F +++ b/src/rpa_ri_gpw.F @@ -1964,7 +1964,8 @@ CONTAINS IF (unit_nr > 0) THEN WRITE (UNIT=unit_nr, FMT="(T3,A,T66,F15.4)") & "INTEG_INFO| Range for the minimax approximation:", E_Range - WRITE (UNIT=unit_nr, FMT="(T3,A,T54,A,T72,A)") "INTEG_INFO| Minimax parameters of the time grid:", "Weights", "Abscissas" + WRITE (UNIT=unit_nr, FMT="(T3,A,T54,A,T72,A)") & + "INTEG_INFO| Minimax parameters of the time grid:", "Weights", "Abscissas" DO jquad = 1, num_integ_points WRITE (UNIT=unit_nr, FMT="(T41,F20.10,F20.10)") tau_wj(jquad), tau_tj(jquad) END DO @@ -2839,7 +2840,8 @@ CONTAINS fm_mat_S_beta%local_data(iiB, jjB) = fm_mat_S_contour_def_beta%local_data(iiB, jjB) ! update - fm_mat_S_beta%local_data(iiB, jjB) = fm_mat_S_beta%local_data(iiB, jjB)*eigen_diff/(eigen_diff**2-omega**2) + fm_mat_S_beta%local_data(iiB, jjB) = & + fm_mat_S_beta%local_data(iiB, jjB)*eigen_diff/(eigen_diff**2-omega**2) END IF @@ -2869,7 +2871,8 @@ CONTAINS END SELECT t_end = m_walltime() - actual_flop_rate = 2.0_dp*REAL(dimen_ia_beta, KIND=dp)*dimen_RI*REAL(dimen_RI, KIND=dp)/(MAX(0.01_dp, t_end-t_start)) + actual_flop_rate = 2.0_dp*REAL(dimen_ia_beta, KIND=dp)* & + dimen_RI*REAL(dimen_RI, KIND=dp)/(MAX(0.01_dp, t_end-t_start)) IF (para_env_RPA%mepos == 0) my_flop_rate = my_flop_rate+actual_flop_rate my_num_dgemm_call = my_num_dgemm_call+1 @@ -3024,7 +3027,8 @@ CONTAINS DO iiB = 1, nrow_local nm_global = row_indices(iiB) DO jjB = 1, ncol_local - vec_W_gw(nm_global) = vec_W_gw(nm_global)+fm_mat_S_gw_work%local_data(iiB, jjB)*fm_mat_S_gw%local_data(iiB, jjB) + vec_W_gw(nm_global) = vec_W_gw(nm_global)+ & + fm_mat_S_gw_work%local_data(iiB, jjB)*fm_mat_S_gw%local_data(iiB, jjB) IF (my_open_shell) THEN vec_W_gw_beta(nm_global) = vec_W_gw_beta(nm_global)+ & fm_mat_S_gw_work_beta%local_data(iiB, jjB)*fm_mat_S_gw_beta%local_data(iiB, jjB) @@ -3189,12 +3193,13 @@ CONTAINS fermi_level_offset) IF (my_open_shell) THEN - CALL fit_and_continuation(vec_gw_energ_beta, vec_gw_energ_error_fit_beta, vec_omega_fit_gw, & - z_value_beta, m_value_beta, vec_Sigma_c_gw_beta, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 2), & - Eigenval_beta, Eigenval_scf_beta, n_level_gw, & - gw_corr_lev_occ_beta, num_poles, & - num_fit_points, max_iter_fit, crossing_search, homo_beta, check_fit, stop_crit, & - fermi_level_offset) + CALL fit_and_continuation( & + vec_gw_energ_beta, vec_gw_energ_error_fit_beta, vec_omega_fit_gw, & + z_value_beta, m_value_beta, vec_Sigma_c_gw_beta, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 2), & + Eigenval_beta, Eigenval_scf_beta, n_level_gw, & + gw_corr_lev_occ_beta, num_poles, & + num_fit_points, max_iter_fit, crossing_search, homo_beta, check_fit, stop_crit, & + fermi_level_offset) END IF @@ -3251,7 +3256,8 @@ CONTAINS index_contour_def = 1 ! only correct levels for which contour deformation is enabled - DO n_level_gw = contour_def_start-(homo_beta-gw_corr_lev_occ_beta), contour_def_end-(homo_beta-gw_corr_lev_occ_beta) + DO n_level_gw = contour_def_start-(homo_beta-gw_corr_lev_occ_beta), & + contour_def_end-(homo_beta-gw_corr_lev_occ_beta) ! reset the values from analytic continuation vec_gw_energ_beta(n_level_gw) = 0.0_dp @@ -3279,24 +3285,27 @@ CONTAINS ! print the quasiparticle energies and update Eigenval in case you do eigenvalue self-consistent GW IF (my_open_shell) THEN - CALL print_and_update_for_ev_sc(vec_gw_energ, vec_gw_energ_error_fit, & - z_value, m_value, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 1), Eigenval, & - Eigenval_last, Eigenval_scf, gw_corr_lev_occ, gw_corr_lev_virt, gw_corr_lev_tot, & - count_ev_sc_GW, crossing_search, homo, nmo, unit_nr, mp2_env%ri_g0w0%print_gw_details, & - do_alpha=.TRUE.) + CALL print_and_update_for_ev_sc( & + vec_gw_energ, vec_gw_energ_error_fit, & + z_value, m_value, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 1), Eigenval, & + Eigenval_last, Eigenval_scf, gw_corr_lev_occ, gw_corr_lev_virt, gw_corr_lev_tot, & + count_ev_sc_GW, crossing_search, homo, nmo, unit_nr, mp2_env%ri_g0w0%print_gw_details, & + do_alpha=.TRUE.) - CALL print_and_update_for_ev_sc(vec_gw_energ_beta, vec_gw_energ_error_fit_beta, & - z_value_beta, m_value_beta, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 2), Eigenval_beta, & - Eigenval_last_beta, Eigenval_scf_beta, gw_corr_lev_occ_beta, gw_corr_lev_virt_beta, gw_corr_lev_tot, & - count_ev_sc_GW, crossing_search, homo_beta, nmo, unit_nr, mp2_env%ri_g0w0%print_gw_details, & - do_beta=.TRUE.) + CALL print_and_update_for_ev_sc( & + vec_gw_energ_beta, vec_gw_energ_error_fit_beta, & + z_value_beta, m_value_beta, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 2), Eigenval_beta, & + Eigenval_last_beta, Eigenval_scf_beta, gw_corr_lev_occ_beta, gw_corr_lev_virt_beta, gw_corr_lev_tot, & + count_ev_sc_GW, crossing_search, homo_beta, nmo, unit_nr, mp2_env%ri_g0w0%print_gw_details, & + do_beta=.TRUE.) ELSE - CALL print_and_update_for_ev_sc(vec_gw_energ, vec_gw_energ_error_fit, & - z_value, m_value, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 1), Eigenval, & - Eigenval_last, Eigenval_scf, gw_corr_lev_occ, gw_corr_lev_virt, gw_corr_lev_tot, & - count_ev_sc_GW, crossing_search, homo, nmo, unit_nr, mp2_env%ri_g0w0%print_gw_details) + CALL print_and_update_for_ev_sc( & + vec_gw_energ, vec_gw_energ_error_fit, & + z_value, m_value, mp2_env%ri_g0w0%vec_Sigma_x_minus_vxc_gw(:, 1), Eigenval, & + Eigenval_last, Eigenval_scf, gw_corr_lev_occ, gw_corr_lev_virt, gw_corr_lev_tot, & + count_ev_sc_GW, crossing_search, homo, nmo, unit_nr, mp2_env%ri_g0w0%print_gw_details) END IF @@ -3806,8 +3815,9 @@ CONTAINS left_term_beta = left_term_beta+wj(jquad)* & (LOG(ONE+(M_ia_beta(iiB)-D_ia_beta(iiB)**2)/(omega**2+D_ia_beta(iiB)**2))- & (M_ia_beta(iiB)-D_ia_beta(iiB)**2)/(omega**2+D_ia_beta(iiB)**2)) - first_deriv_beta = first_deriv_beta+wj(jquad)*cottj(jquad)**2* & - ((-M_ia_beta(iiB)+D_ia_beta(iiB)**2)**2/((omega**2+D_ia_beta(iiB)**2)**2*(omega**2+M_ia_beta(iiB)))) + first_deriv_beta = & + first_deriv_beta+wj(jquad)*cottj(jquad)**2* & + ((-M_ia_beta(iiB)+D_ia_beta(iiB)**2)**2/((omega**2+D_ia_beta(iiB)**2)**2*(omega**2+M_ia_beta(iiB)))) END DO END IF diff --git a/src/rtp_admm_methods.F b/src/rtp_admm_methods.F index 3d77b5d284..40ec8dd2fc 100644 --- a/src/rtp_admm_methods.F +++ b/src/rtp_admm_methods.F @@ -507,7 +507,8 @@ CONTAINS ALLOCATE (matrix_k_tilde) CALL cp_dbcsr_init(matrix_k_tilde) CALL cp_dbcsr_create(matrix_k_tilde, 'MATRIX K_tilde', & - cp_dbcsr_distribution(matrix_ks(ispin)%matrix), cp_dbcsr_get_matrix_type(matrix_ks_aux_fit(ispin)%matrix), & + cp_dbcsr_distribution(matrix_ks(ispin)%matrix), & + cp_dbcsr_get_matrix_type(matrix_ks_aux_fit(ispin)%matrix), & cp_dbcsr_row_block_sizes(matrix_ks(ispin)%matrix), & cp_dbcsr_col_block_sizes(matrix_ks(ispin)%matrix), & cp_dbcsr_get_data_size(matrix_ks(ispin)%matrix), & diff --git a/src/se_fock_matrix_coulomb.F b/src/se_fock_matrix_coulomb.F index a1af1dc60f..504e7f786c 100644 --- a/src/se_fock_matrix_coulomb.F +++ b/src/se_fock_matrix_coulomb.F @@ -687,22 +687,24 @@ CONTAINS ALLOCATE (forces_r(3, natoms)) forces_g = 0.0_dp forces_r = 0.0_dp - CALL ewald_multipole_evaluate(ewald_env, ewald_pw, se_nonbond_env, cell, & - particle_set, local_particles, energy_local, energy_glob, e_neut, e_self, task, & - do_correction_bonded=.FALSE., do_forces=.TRUE., do_stress=use_virial, do_efield=.TRUE., & - charges=se_nddo_mpole%charge, dipoles=se_nddo_mpole%dipole, quadrupoles=se_nddo_mpole%quadrupole, & - forces_local=forces_g, forces_glob=forces_r, pv_glob=pv_glob, pv_local=pv_local, & - efield0=se_nddo_mpole%efield0, efield1=se_nddo_mpole%efield1, efield2=se_nddo_mpole%efield2, iw=iw, & - do_debug=.TRUE.) + CALL ewald_multipole_evaluate( & + ewald_env, ewald_pw, se_nonbond_env, cell, & + particle_set, local_particles, energy_local, energy_glob, e_neut, e_self, task, & + do_correction_bonded=.FALSE., do_forces=.TRUE., do_stress=use_virial, do_efield=.TRUE., & + charges=se_nddo_mpole%charge, dipoles=se_nddo_mpole%dipole, quadrupoles=se_nddo_mpole%quadrupole, & + forces_local=forces_g, forces_glob=forces_r, pv_glob=pv_glob, pv_local=pv_local, & + efield0=se_nddo_mpole%efield0, efield1=se_nddo_mpole%efield1, efield2=se_nddo_mpole%efield2, iw=iw, & + do_debug=.TRUE.) ! Only SR force have to be summed up.. the one in g-space are already fully local.. CALL mp_sum(forces_r, para_env%group) ELSE - CALL ewald_multipole_evaluate(ewald_env, ewald_pw, se_nonbond_env, cell, & - particle_set, local_particles, energy_local, energy_glob, e_neut, e_self, task, & - do_correction_bonded=.FALSE., do_forces=.FALSE., do_stress=.FALSE., do_efield=.TRUE., & - charges=se_nddo_mpole%charge, dipoles=se_nddo_mpole%dipole, quadrupoles=se_nddo_mpole%quadrupole, & - efield0=se_nddo_mpole%efield0, efield1=se_nddo_mpole%efield1, efield2=se_nddo_mpole%efield2, & - iw=iw, do_debug=.TRUE.) + CALL ewald_multipole_evaluate( & + ewald_env, ewald_pw, se_nonbond_env, cell, & + particle_set, local_particles, energy_local, energy_glob, e_neut, e_self, task, & + do_correction_bonded=.FALSE., do_forces=.FALSE., do_stress=.FALSE., do_efield=.TRUE., & + charges=se_nddo_mpole%charge, dipoles=se_nddo_mpole%dipole, quadrupoles=se_nddo_mpole%quadrupole, & + efield0=se_nddo_mpole%efield0, efield1=se_nddo_mpole%efield1, efield2=se_nddo_mpole%efield2, & + iw=iw, do_debug=.TRUE.) END IF CALL cp_print_key_finished_output(iw, logger, se_section, "PRINT%EWALD_INFO") diff --git a/src/semi_empirical_int_ana.F b/src/semi_empirical_int_ana.F index e66df24348..9f11df030e 100644 --- a/src/semi_empirical_int_ana.F +++ b/src/semi_empirical_int_ana.F @@ -574,16 +574,18 @@ CONTAINS IF (l_enuc) scale = scale*(2._dp*xab*EXP(-aab*rija*rija)) ELSEIF (sepi%z == 6 .AND. sepj%z == 6) THEN ! Special Case C-C - IF (l_denuc) dscale = dscale*(2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))+9.28_dp*EXP(-5.98_dp*rija)) & - -scale*2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))*aab*(1.0_dp+6.0_dp*0.0003_dp*rija**5)*drija & - -scale*9.28_dp*EXP(-5.98_dp*rija)*5.98_dp*drija + IF (l_denuc) dscale = & + dscale*(2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))+9.28_dp*EXP(-5.98_dp*rija)) & + -scale*2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))*aab*(1.0_dp+6.0_dp*0.0003_dp*rija**5)*drija & + -scale*9.28_dp*EXP(-5.98_dp*rija)*5.98_dp*drija IF (l_enuc) scale = scale*(2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))+9.28_dp*EXP(-5.98_dp*rija)) ELSEIF ((sepi%z == 8 .AND. sepj%z == 14) .OR. & (sepj%z == 8 .AND. sepi%z == 14)) THEN ! Special Case Si-O - IF (l_denuc) dscale = dscale*(2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))-0.0007_dp*EXP(-(rija-2.9_dp)**2)) & - -scale*2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))*aab*(1.0_dp+6.0_dp*0.0003_dp*rija**5)*drija+ & - scale*0.0007_dp*EXP(-(rija-2.9_dp)**2)*(2.0_dp*(rija-2.9_dp)*drija) + IF (l_denuc) dscale = & + dscale*(2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))-0.0007_dp*EXP(-(rija-2.9_dp)**2)) & + -scale*2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))*aab*(1.0_dp+6.0_dp*0.0003_dp*rija**5)*drija+ & + scale*0.0007_dp*EXP(-(rija-2.9_dp)**2)*(2.0_dp*(rija-2.9_dp)*drija) IF (l_enuc) scale = scale*(2._dp*xab*EXP(-aab*(rija+0.0003_dp*rija**6))-0.0007_dp*EXP(-(rija-2.9_dp)**2)) ELSE ! General Case diff --git a/src/semi_empirical_store_int_types.F b/src/semi_empirical_store_int_types.F index 7f6361f02f..eb99913c11 100644 --- a/src/semi_empirical_store_int_types.F +++ b/src/semi_empirical_store_int_types.F @@ -252,9 +252,10 @@ CONTAINS IF (store_int_env%compress) THEN ! Reset caches and containers DO i = 1, 64 - CALL hfx_reset_cache_and_container(store_int_env%integral_caches(i), & - store_int_env%integral_containers(i), store_int_env%memory_parameter%actual_memory_usage, & - .FALSE.) + CALL hfx_reset_cache_and_container( & + store_int_env%integral_caches(i), & + store_int_env%integral_containers(i), store_int_env%memory_parameter%actual_memory_usage, & + .FALSE.) END DO END IF END IF diff --git a/src/start/input_cp2k.F b/src/start/input_cp2k.F index 5079a07ded..971100a168 100644 --- a/src/start/input_cp2k.F +++ b/src/start/input_cp2k.F @@ -237,10 +237,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL cp_print_key_section_create(print_key, "GRID_INFORMATION", & - description="Controls the printing of information regarding the PW and RS grid structures"// & - " (ONLY for TEST run).", & - print_level=medium_print_level, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "GRID_INFORMATION", & + description="Controls the printing of information regarding the PW and RS grid structures"// & + " (ONLY for TEST run).", & + print_level=medium_print_level, filename="__STD_OUT__") CALL section_add_subsection(section, print_key) CALL section_release(print_key) @@ -632,11 +633,12 @@ CONTAINS repeats=.FALSE.) NULLIFY (keyword, print_key) - CALL keyword_create(keyword, name="MASTER_SLAVE", & - description="If a master-slave setup should be employed, in which one process is used to distribute the tasks. "// & - "This is most useful to load-balance if not all jobs have the same length, "// & - "and a lot of CPUs/groups are availabe.", & - usage="MASTER_SLAVE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="MASTER_SLAVE", & + description="If a master-slave setup should be employed, in which one process is used to distribute the tasks. "// & + "This is most useful to load-balance if not all jobs have the same length, "// & + "and a lot of CPUs/groups are availabe.", & + usage="MASTER_SLAVE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -673,15 +675,17 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="CYCLE", & - description="If farming should process all jobs in a cyclic way, stopping only if MAX_JOBS_PER_GROUP is exceeded.", & - usage="CYCLE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="CYCLE", & + description="If farming should process all jobs in a cyclic way, stopping only if MAX_JOBS_PER_GROUP is exceeded.", & + usage="CYCLE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="WAIT_TIME", & + CALL keyword_create( & + keyword, name="WAIT_TIME", & description="Time to wait [s] for a new task if no task is currently available, make this zero if no clock is available", & - usage="WAIT_TIME 0.1", default_r_val=0.5_dp) + usage="WAIT_TIME 0.1", default_r_val=0.5_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -704,10 +708,11 @@ CONTAINS CALL section_add_keyword(sub_section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="OUTPUT_FILE_NAME", & - description="the filename of the output file, if not specified will use the project name in the &GLOBAL section.", & - usage="OUTPUT_FILE_NAME my_input.inp", & - default_lc_val="") + CALL keyword_create( & + keyword, name="OUTPUT_FILE_NAME", & + description="the filename of the output file, if not specified will use the project name in the &GLOBAL section.", & + usage="OUTPUT_FILE_NAME my_input.inp", & + default_lc_val="") CALL section_add_keyword(sub_section, keyword) CALL keyword_release(keyword) @@ -719,19 +724,20 @@ CONTAINS CALL section_add_keyword(sub_section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="DEPENDENCIES", & - description="specifies a list of JOB_IDs on which the current job depends. "// & - "The current job will not be executed before all the dependencies have finished. "// & - "The keyword requires a MASTER_SLAVE farming run. "// & - "Beyond the default case, some special cases might arise: "// & - "1) circular dependencies will lead to a deadlock. "// & - "2) This keyword is not compatible with CYCLE. "// & - "3) MAX_JOBS_PER_GROUP is ignored (though only a total of MAX_JOBS_PER_GROUP*NGROUPS jobs will be executed) "// & - "4) dependencies on jobs that will not be executed (due to RESTART or MAX_JOBS_PER_GROUP) are ignored. "// & - "Additionally, note that, on some file systems, "// & - " output (restart) files might not be immediately available on all compute nodes,"// & - "potentially resulting in unexpected failures.", & - usage="DEPENDENCIES 13 1 7", type_of_var=integer_t, n_var=-1) + CALL keyword_create( & + keyword, name="DEPENDENCIES", & + description="specifies a list of JOB_IDs on which the current job depends. "// & + "The current job will not be executed before all the dependencies have finished. "// & + "The keyword requires a MASTER_SLAVE farming run. "// & + "Beyond the default case, some special cases might arise: "// & + "1) circular dependencies will lead to a deadlock. "// & + "2) This keyword is not compatible with CYCLE. "// & + "3) MAX_JOBS_PER_GROUP is ignored (though only a total of MAX_JOBS_PER_GROUP*NGROUPS jobs will be executed) "// & + "4) dependencies on jobs that will not be executed (due to RESTART or MAX_JOBS_PER_GROUP) are ignored. "// & + "Additionally, note that, on some file systems, "// & + " output (restart) files might not be immediately available on all compute nodes,"// & + "potentially resulting in unexpected failures.", & + usage="DEPENDENCIES 13 1 7", type_of_var=integer_t, n_var=-1) CALL section_add_keyword(sub_section, keyword) CALL keyword_release(keyword) CALL section_add_subsection(section, sub_section) diff --git a/src/start/input_cp2k_motion.F b/src/start/input_cp2k_motion.F index 124068c3aa..a632dcf987 100644 --- a/src/start/input_cp2k_motion.F +++ b/src/start/input_cp2k_motion.F @@ -223,10 +223,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="NVIRIAL", & - description="Use this many random orientations to compute the second virial coefficient (ENSEMBLE=VIRIAL)", & - usage="NVIRIAL {integer}", & - default_i_val=1000) + CALL keyword_create( & + keyword, name="NVIRIAL", & + description="Use this many random orientations to compute the second virial coefficient (ENSEMBLE=VIRIAL)", & + usage="NVIRIAL {integer}", & + default_i_val=1000) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -316,10 +317,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="VIRIAL_TEMPS", & - description="The temperatures you wish to compute the virial coefficient for. Only used if ensemble=VIRIAL.", & - usage="VIRIAL_TEMPS {real} {real} ... ", & - n_var=-1, type_of_var=real_t) + CALL keyword_create( & + keyword, name="VIRIAL_TEMPS", & + description="The temperatures you wish to compute the virial coefficient for. Only used if ensemble=VIRIAL.", & + usage="VIRIAL_TEMPS {real} {real} ... ", & + n_var=-1, type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -385,10 +387,11 @@ CONTAINS NULLIFY (keyword) - CALL keyword_create(keyword, name="PBIAS", & - description="The probability of swapping to an inner region in an AVBMC swap move for each molecule type.", & - usage="PBIAS {real} {real} ... ", & - n_var=-1, type_of_var=real_t) + CALL keyword_create( & + keyword, name="PBIAS", & + description="The probability of swapping to an inner region in an AVBMC swap move for each molecule type.", & + usage="PBIAS {real} {real} ... ", & + n_var=-1, type_of_var=real_t) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -788,18 +791,19 @@ CONTAINS CALL keyword_release(keyword) END IF - CALL keyword_create(keyword, name="OPTIMIZER", & - variants=(/"MINIMIZER"/), & - citations=(/Byrd1995/), & - description="Specify which method to use to perform a geometry optimization.", & - usage="OPTIMIZER {BFGS|LBFGS|CG}", & - enum_c_vals=s2a("BFGS", "LBFGS", "CG"), & - enum_desc=s2a("Most efficient minimizer, but only for 'small' systems, "// & - "as it relies on diagonalization of a full Hessian matrix", & - "Limit memory variant of the above, can also be applied to large systems, not as well fine-tuned", & - "conjugate gradients, robust minimizer (depending on the line search) also OK for large systems"), & - enum_i_vals=(/default_bfgs_method_id, default_lbfgs_method_id, default_cg_method_id/), & - default_i_val=default_bfgs_method_id) + CALL keyword_create( & + keyword, name="OPTIMIZER", & + variants=(/"MINIMIZER"/), & + citations=(/Byrd1995/), & + description="Specify which method to use to perform a geometry optimization.", & + usage="OPTIMIZER {BFGS|LBFGS|CG}", & + enum_c_vals=s2a("BFGS", "LBFGS", "CG"), & + enum_desc=s2a("Most efficient minimizer, but only for 'small' systems, "// & + "as it relies on diagonalization of a full Hessian matrix", & + "Limit memory variant of the above, can also be applied to large systems, not as well fine-tuned", & + "conjugate gradients, robust minimizer (depending on the line search) also OK for large systems"), & + enum_i_vals=(/default_bfgs_method_id, default_lbfgs_method_id, default_cg_method_id/), & + default_i_val=default_bfgs_method_id) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -871,9 +875,10 @@ CONTAINS description="Controls the printing properties during a geometry optimization run", & n_keywords=0, n_subsections=1, repeats=.TRUE.) NULLIFY (print_key) - CALL cp_print_key_section_create(print_key, "program_run_info", & - description="Controls the printing of basic information during the Geometry Optimization", & - print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + print_key, "program_run_info", & + description="Controls the printing of basic information during the Geometry Optimization", & + print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) CALL section_add_subsection(section, subsection) @@ -895,12 +900,13 @@ CONTAINS TYPE(section_type), POINTER :: print_key, subsection - CALL create_geoopt_section(section, label="SHELL_OPT", & - description="This section sets the environment for the optimization of the shell-core distances"// & - " that might turn to be necessary along a MD run using a shell-model potential. "// & - " The optimization procedure is activated when at least one of the shell-core "// & - "pairs becomes too elongated, i.e. when the assumption of point dipole is not longer valid.", & - just_optimizers=.TRUE.) + CALL create_geoopt_section( & + section, label="SHELL_OPT", & + description="This section sets the environment for the optimization of the shell-core distances"// & + " that might turn to be necessary along a MD run using a shell-model potential. "// & + " The optimization procedure is activated when at least one of the shell-core "// & + "pairs becomes too elongated, i.e. when the assumption of point dipole is not longer valid.", & + just_optimizers=.TRUE.) NULLIFY (print_key, subsection) @@ -940,37 +946,40 @@ CONTAINS " (2) Finite temperature optimization. ", just_optimizers=.TRUE.) NULLIFY (keyword, print_key, subsection) - CALL keyword_create(keyword, name="TYPE", & - description="Specify which kind of method to use for the optimization of the simulation cell", & - usage="TYPE (GEO_OPT|MD|DIRECT_CELL_OPT)", & - enum_c_vals=s2a("GEO_OPT", "MD", "DIRECT_CELL_OPT"), & - enum_desc=s2a( & - "Performs a geometry optimization (the GEO_OPT section must be defined) between cell optimization steps. "// & - " The stress tensor is computed at the optimized geometry.", & - "Performs a molecular dynamics run (the MD section needs must defined) for computing the stress tensor "// & - " used for the cell optimization.", & - "Performs a geometry and cell optimization at the same time."// & - " The stress tensor is computed at every step"), & - enum_i_vals=(/default_cell_geo_opt_id, default_cell_md_id, default_cell_direct_id/), & - default_i_val=default_cell_direct_id) + CALL keyword_create( & + keyword, name="TYPE", & + description="Specify which kind of method to use for the optimization of the simulation cell", & + usage="TYPE (GEO_OPT|MD|DIRECT_CELL_OPT)", & + enum_c_vals=s2a("GEO_OPT", "MD", "DIRECT_CELL_OPT"), & + enum_desc=s2a( & + "Performs a geometry optimization (the GEO_OPT section must be defined) between cell optimization steps. "// & + " The stress tensor is computed at the optimized geometry.", & + "Performs a molecular dynamics run (the MD section needs must defined) for computing the stress tensor "// & + " used for the cell optimization.", & + "Performs a geometry and cell optimization at the same time."// & + " The stress tensor is computed at every step"), & + enum_i_vals=(/default_cell_geo_opt_id, default_cell_md_id, default_cell_direct_id/), & + default_i_val=default_cell_direct_id) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="EXTERNAL_PRESSURE", & - description="Specifies the external pressure (1 value or the full 9 components of the pressure tensor) "// & - "applied during the cell optimization.", & - usage="EXTERNAL_PRESSURE {REAL} .. {REAL}", unit_str="bar", & - default_r_vals=(/cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, 0.0_dp, & - 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, & - 0.0_dp, 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar")/), n_var=-1) + CALL keyword_create( & + keyword, name="EXTERNAL_PRESSURE", & + description="Specifies the external pressure (1 value or the full 9 components of the pressure tensor) "// & + "applied during the cell optimization.", & + usage="EXTERNAL_PRESSURE {REAL} .. {REAL}", unit_str="bar", & + default_r_vals=(/cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, 0.0_dp, & + 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar"), 0.0_dp, & + 0.0_dp, 0.0_dp, cp_unit_to_cp2k(100.0_dp, "bar")/), n_var=-1) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="KEEP_ANGLES", & - description="Keep angles between the cell vectors constant, but allow the lenghts of the"// & - " cell vectors to change independently."// & - " Albeit general, this is most useful for triclinic cells, to enforce higher symmetry, see KEEP_SYMMETRY.", & - usage="KEEP_ANGLES TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="KEEP_ANGLES", & + description="Keep angles between the cell vectors constant, but allow the lenghts of the"// & + " cell vectors to change independently."// & + " Albeit general, this is most useful for triclinic cells, to enforce higher symmetry, see KEEP_SYMMETRY.", & + usage="KEEP_ANGLES TRUE", default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) @@ -1000,10 +1009,11 @@ CONTAINS print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) - CALL cp_print_key_section_create(print_key, "cell", & - description="Controls the printing of the cell eveytime a calculation using a new cell is started.", & - print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__", & - unit_str="angstrom") + CALL cp_print_key_section_create( & + print_key, "cell", & + description="Controls the printing of the cell eveytime a calculation using a new cell is started.", & + print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__", & + unit_str="angstrom") CALL section_add_subsection(subsection, print_key) CALL section_release(print_key) CALL section_add_subsection(section, subsection) @@ -1071,9 +1081,10 @@ CONTAINS CALL section_add_keyword(subsection, keyword) CALL keyword_release(keyword) - CALL create_geoopt_section(subsection2, label="ROT_OPT", & - description="This section sets the environment for the optimization of the rotation of the Dimer.", & - just_optimizers=.TRUE.) + CALL create_geoopt_section( & + subsection2, label="ROT_OPT", & + description="This section sets the environment for the optimization of the rotation of the Dimer.", & + just_optimizers=.TRUE.) NULLIFY (subsection3) CALL section_create(subsection3, name="PRINT", & description="Controls the printing properties during the dimer rotation optimization run", & @@ -1268,10 +1279,11 @@ CONTAINS CALL section_add_keyword(subsubsection, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="LINMIN_GRAD_ONLY", & - description="Use only the gradient, not the energy for line minimizations (e.g. in conjugate gradients).", & - usage="LINMIN_GRAD_ONLY T", & - default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) + CALL keyword_create( & + keyword, name="LINMIN_GRAD_ONLY", & + description="Use only the gradient, not the energy for line minimizations (e.g. in conjugate gradients).", & + usage="LINMIN_GRAD_ONLY T", & + default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(subsubsection, keyword) CALL keyword_release(keyword) @@ -1377,10 +1389,11 @@ CONTAINS CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) - CALL keyword_create(keyword, name="TRUST_RADIUS", & - description="Trust radius used in LBFGS. Not completely in dept tested. Negativ values means no trust radius is used.", & - usage="TRUST_RADIUS {real}", unit_str='angstrom', & - default_r_val=-1.0_dp) + CALL keyword_create( & + keyword, name="TRUST_RADIUS", & + description="Trust radius used in LBFGS. Not completely in dept tested. Negativ values means no trust radius is used.", & + usage="TRUST_RADIUS {real}", unit_str='angstrom', & + default_r_val=-1.0_dp) CALL section_add_keyword(section, keyword) CALL keyword_release(keyword) diff --git a/src/stm_images.F b/src/stm_images.F index c7aba48574..956d8c15c2 100644 --- a/src/stm_images.F +++ b/src/stm_images.F @@ -353,8 +353,8 @@ CONTAINS occ_tot(istates+1:istates+nstates(ispin)) = & occupation(ispin)%array(state_start(ispin):state_start(ispin)-1+nstates(ispin)) ELSE - occ_tot(istates+1:istates+nstates(ispin)) = alpha- & - occupation(ispin)%array(state_start(ispin):state_start(ispin)-1+nstates(ispin)) + occ_tot(istates+1:istates+nstates(ispin)) = & + alpha-occupation(ispin)%array(state_start(ispin):state_start(ispin)-1+nstates(ispin)) END IF istates = istates+nstates(ispin) ENDDO diff --git a/src/subsys/external_potential_types.F b/src/subsys/external_potential_types.F index f3a8882510..5f0bbb0261 100644 --- a/src/subsys/external_potential_types.F +++ b/src/subsys/external_potential_types.F @@ -1738,7 +1738,8 @@ CONTAINS END DO ! add to input section irep = irep+1 - WRITE (line_att, '(E24.16,1X,I0,100(1X,E24.16))') potential%alpha_nlcc(ipot), potential%nct_nlcc(ipot), & + WRITE (line_att, '(E24.16,1X,I0,100(1X,E24.16))') & + potential%alpha_nlcc(ipot), potential%nct_nlcc(ipot), & tmp_vals(1:potential%nct_nlcc(ipot)) CALL section_vals_val_set(potential_section, "_DEFAULT_KEYWORD_", i_rep_val=irep, & c_val=TRIM(line_att)) diff --git a/src/swarm/glbopt_input.F b/src/swarm/glbopt_input.F index 0d6993a18e..fa4f71576e 100644 --- a/src/swarm/glbopt_input.F +++ b/src/swarm/glbopt_input.F @@ -99,11 +99,12 @@ CONTAINS !CALL section_add_keyword(glbopt_section, keyword) !CALL keyword_release(keyword) - CALL cp_print_key_section_create(printkey, "PROGRESS_TRAJECTORY", & - description="Printkey to controll the writting of the progress trajectory. "// & - "This trajectory contains the minima, which are lower in energy than the by then lowerest.", & - print_level=low_print_level, common_iter_levels=1, & - filename="", unit_str="angstrom") + CALL cp_print_key_section_create( & + printkey, "PROGRESS_TRAJECTORY", & + description="Printkey to controll the writting of the progress trajectory. "// & + "This trajectory contains the minima, which are lower in energy than the by then lowerest.", & + print_level=low_print_level, common_iter_levels=1, & + filename="", unit_str="angstrom") CALL section_add_subsection(glbopt_section, printkey) CALL section_release(printkey) diff --git a/src/swarm/swarm_input.F b/src/swarm/swarm_input.F index a85b33fee2..61df978d7a 100644 --- a/src/swarm/swarm_input.F +++ b/src/swarm/swarm_input.F @@ -87,15 +87,17 @@ CONTAINS description="Controls the printing properties during a global optimization run", & n_keywords=0, n_subsections=1, repeats=.TRUE.) - CALL cp_print_key_section_create(printkey, "WORKER_RUN_INFO", & - description="Controls the printing of the worker's basic information during the global optimization", & - print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + printkey, "WORKER_RUN_INFO", & + description="Controls the printing of the worker's basic information during the global optimization", & + print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") CALL section_add_subsection(print_section, printkey) CALL section_release(printkey) - CALL cp_print_key_section_create(printkey, "MASTER_RUN_INFO", & - description="Controls the printing of the masters's basic information during the global optimization", & - print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") + CALL cp_print_key_section_create( & + printkey, "MASTER_RUN_INFO", & + description="Controls the printing of the masters's basic information during the global optimization", & + print_level=low_print_level, add_last=add_last_numeric, filename="__STD_OUT__") CALL section_add_subsection(print_section, printkey) CALL section_release(printkey) diff --git a/src/task_list_methods.F b/src/task_list_methods.F index 3b25edc937..accf05dad4 100644 --- a/src/task_list_methods.F +++ b/src/task_list_methods.F @@ -282,10 +282,11 @@ CONTAINS DEALLOCATE (basis_set_list) ! redistribute the task list so that all tasks map on the local rs grids - CALL distribute_tasks(rs_descs, task_list%ntasks, natoms, maxset, maxpgf, nimages, & - task_list%tasks, rval=task_list%dist_ab, atom_pair_send=task_list%atom_pair_send, & - atom_pair_recv=task_list%atom_pair_recv, symmetric=.TRUE., & - reorder_rs_grid_ranks=reorder_rs_grid_ranks, skip_load_balance_distributed=skip_load_balance_distributed) + CALL distribute_tasks( & + rs_descs, task_list%ntasks, natoms, maxset, maxpgf, nimages, & + task_list%tasks, rval=task_list%dist_ab, atom_pair_send=task_list%atom_pair_send, & + atom_pair_recv=task_list%atom_pair_recv, symmetric=.TRUE., & + reorder_rs_grid_ranks=reorder_rs_grid_ranks, skip_load_balance_distributed=skip_load_balance_distributed) ! If the rank order has changed, reallocate any of the distributed rs_grids diff --git a/src/tmc/input_cp2k_tmc.F b/src/tmc/input_cp2k_tmc.F index 91a6b1a06e..7879dfa5e0 100644 --- a/src/tmc/input_cp2k_tmc.F +++ b/src/tmc/input_cp2k_tmc.F @@ -52,10 +52,11 @@ CONTAINS TYPE(section_type), POINTER :: subsection CPASSERT(.NOT. ASSOCIATED(section)) - CALL section_create(section, name="TMC", & - description="A parallelized MC algorithm, presampling the configurations, espacially the Markov chain elements", & - citations=(/Schonherr2014/), & - n_keywords=1, n_subsections=1, repeats=.FALSE.) + CALL section_create( & + section, name="TMC", & + description="A parallelized MC algorithm, presampling the configurations, espacially the Markov chain elements", & + citations=(/Schonherr2014/), & + n_keywords=1, n_subsections=1, repeats=.FALSE.) NULLIFY (keyword, subsection) diff --git a/src/xc/xc.F b/src/xc/xc.F index adc31d666a..5129c7872f 100644 --- a/src/xc/xc.F +++ b/src/xc/xc.F @@ -349,7 +349,8 @@ CONTAINS diff = ABS(vxc_rho(ispin)%pw%cr3d(i, j, k)- & vxc_rho2(ispin)%pw%cr3d(i, j, k)) IF (ii == 1) THEN - PRINT*, "vxc", ispin, "=", vxc_rho(ispin)%pw%cr3d(i, j, k), "vs", vxc_rho2(ispin)%pw%cr3d(i, j, k), "diff=", diff + PRINT*, "vxc", ispin, "=", vxc_rho(ispin)%pw%cr3d(i, j, k), & + "vs", vxc_rho2(ispin)%pw%cr3d(i, j, k), "diff=", diff END IF IF (maxDiff < diff) THEN maxDiff = diff @@ -377,7 +378,8 @@ CONTAINS diff = ABS(vxc_tau(ispin)%pw%cr3d(i, j, k)- & vxc_tau2(ispin)%pw%cr3d(i, j, k)) IF (ii == 1) THEN - PRINT*, "vxc_tau", ispin, "=", vxc_tau(ispin)%pw%cr3d(i, j, k), "vs", vxc_tau2(ispin)%pw%cr3d(i, j, k), "diff=", diff + PRINT*, "vxc_tau", ispin, "=", vxc_tau(ispin)%pw%cr3d(i, j, k), & + "vs", vxc_tau2(ispin)%pw%cr3d(i, j, k), "diff=", diff END IF IF (maxDiff < diff) THEN maxDiff = diff diff --git a/src/xc/xc_atom.F b/src/xc/xc_atom.F index 65da6c3fde..5fad8d3956 100644 --- a/src/xc/xc_atom.F +++ b/src/xc/xc_atom.F @@ -255,9 +255,12 @@ CONTAINS DO ia = 1, na DO idir = 1, 3 IF (rho_set%norm_drho(ia, ir, 1) > drho_cutoff) THEN - vxg(idir, ia, ir, 1:2) = vxg(idir, ia, ir, 1:2)+ & - (rho_set%drhoa(idir)%array(ia, ir, 1)+rho_set%drhob(idir)%array(ia, ir, 1))* & - deriv_data(ia, ir, 1)*w(ia, ir)/rho_set%norm_drho(ia, ir, 1)*my_adiabatic_rescale_factor + vxg(idir, ia, ir, 1:2) = & + vxg(idir, ia, ir, 1:2)+( & + rho_set%drhoa(idir)%array(ia, ir, 1)+ & + rho_set%drhob(idir)%array(ia, ir, 1))* & + deriv_data(ia, ir, 1)*w(ia, ir)/rho_set%norm_drho(ia, ir, 1)* & + my_adiabatic_rescale_factor END IF END DO END DO