diff --git a/src/input_cp2k_motion_print.F b/src/input_cp2k_motion_print.F index cf7cb17bbb..c67068ff3a 100644 --- a/src/input_cp2k_motion_print.F +++ b/src/input_cp2k_motion_print.F @@ -319,8 +319,9 @@ CONTAINS END IF - CALL keyword_create(keyword, __LOCATION__, name="PRINT_ATOM_NAME", & - description="Write the atom name instead of the element symbol. Only valid for the XMOL format.", & + CALL keyword_create(keyword, __LOCATION__, name="PRINT_ATOM_KIND", & + description="Write the atom kind given in the subsys section instead of the element symbol. "// & + "Only valid for the XMOL format.", & usage="PRINT_ELEMENT_NAME logical", & default_l_val=.FALSE., lone_keyword_l_val=.TRUE.) CALL section_add_keyword(section, keyword) diff --git a/src/motion/mc/mc_ensembles.F b/src/motion/mc/mc_ensembles.F index 7754c88083..41c49e9787 100644 --- a/src/motion/mc/mc_ensembles.F +++ b/src/motion/mc/mc_ensembles.F @@ -146,7 +146,7 @@ CONTAINS molecules_file, moves_file LOGICAL :: ionode, lbias, ldiscrete, lhmc, & lnew_bias_env, loverlap, lreject, & - lstop, print_name, should_stop + lstop, print_kind, should_stop REAL(dp), DIMENSION(:), POINTER :: pbias, pmavbmc_mol, pmclus_box, & pmhmc_box, pmrot_mol, pmtraion_mol, & pmtrans_mol, pmvol_box @@ -203,8 +203,8 @@ CONTAINS CALL section_vals_val_get(root_section, "MOTION%PRINT%TRAJECTORY%UNIT", & c_val=unit_str) unit_conv = cp_unit_from_cp2k(1.0_dp, TRIM(unit_str)) - CALL section_vals_val_get(root_section, "MOTION%PRINT%TRAJECTORY%PRINT_ATOM_NAME", & - l_val=print_name) + CALL section_vals_val_get(root_section, "MOTION%PRINT%TRAJECTORY%PRINT_ATOM_KIND", & + l_val=print_kind) ! get some data out of mc_par CALL get_mc_par(mc_par(1)%mc_par, & @@ -393,7 +393,7 @@ CONTAINS ELSE CALL write_particle_coordinates(particles_old(ibox)%list%els, & com_crd, dump_xmol, 'POS', 'INITIAL BOX '//TRIM(ADJUSTL(cbox)), & - unit_conv=unit_conv, print_name=print_name) + unit_conv=unit_conv, print_kind=print_kind) ENDIF CALL open_file(file_name=data_file(ibox), & unit_number=data_unit(ibox), file_position='APPEND', & diff --git a/src/motion/neb_io.F b/src/motion/neb_io.F index f4d394bbc3..98230f4010 100644 --- a/src/motion/neb_io.F +++ b/src/motion/neb_io.F @@ -181,7 +181,7 @@ CONTAINS CHARACTER(LEN=default_string_length) :: line, title, unit_str INTEGER :: crd, ener, frc, handle, i, irep, ndig, & ndigl, ttst, vel - LOGICAL :: explicit, lval, print_name + LOGICAL :: explicit, lval, print_kind REAL(KIND=dp) :: f_ann, tmp_r1, unit_conv REAL(KIND=dp), ALLOCATABLE, DIMENSION(:) :: ekin, temperatures TYPE(cell_type), POINTER :: cell @@ -211,14 +211,14 @@ CONTAINS ! Gather units of measure for output CALL section_vals_val_get(neb_env%motion_print_section, "TRAJECTORY%UNIT", & c_val=unit_str) - CALL section_vals_val_get(neb_env%motion_print_section, "TRAJECTORY%PRINT_ATOM_NAME", & - l_val=print_name) + CALL section_vals_val_get(neb_env%motion_print_section, "TRAJECTORY%PRINT_ATOM_KIND", & + l_val=print_kind) unit_conv = cp_unit_from_cp2k(1.0_dp, TRIM(unit_str)) ! This information can be digested by Molden WRITE (UNIT=title, FMT="(A,I8,A,F20.10)") " i =", istep, ", E =", energies(irep) CALL write_particle_coordinates(particle_set, crd, dump_xmol, "POS", title, & cell=cell, array=coords%xyz(:, irep), unit_conv=unit_conv, & - print_name=print_name) + print_kind=print_kind) CALL m_flush(crd) END IF ! Dump Velocities @@ -226,13 +226,13 @@ CONTAINS ! Gather units of measure for output CALL section_vals_val_get(neb_env%motion_print_section, "VELOCITIES%UNIT", & c_val=unit_str) - CALL section_vals_val_get(neb_env%motion_print_section, "VELOCITIES%PRINT_ATOM_NAME", & - l_val=print_name) + CALL section_vals_val_get(neb_env%motion_print_section, "VELOCITIES%PRINT_ATOM_KIND", & + l_val=print_kind) unit_conv = cp_unit_from_cp2k(1.0_dp, TRIM(unit_str)) WRITE (UNIT=title, FMT="(A,I8,A,F20.10)") " i =", istep, ", E =", energies(irep) CALL write_particle_coordinates(particle_set, vel, dump_xmol, "VEL", title, & cell=cell, array=vels%xyz(:, irep), unit_conv=unit_conv, & - print_name=print_name) + print_kind=print_kind) CALL m_flush(vel) END IF ! Dump Forces @@ -240,13 +240,13 @@ CONTAINS ! Gather units of measure for output CALL section_vals_val_get(neb_env%motion_print_section, "FORCES%UNIT", & c_val=unit_str) - CALL section_vals_val_get(neb_env%motion_print_section, "FORCES%PRINT_ATOM_NAME", & - l_val=print_name) + CALL section_vals_val_get(neb_env%motion_print_section, "FORCES%PRINT_ATOM_KIND", & + l_val=print_kind) unit_conv = cp_unit_from_cp2k(1.0_dp, TRIM(unit_str)) WRITE (UNIT=title, FMT="(A,I8,A,F20.10)") " i =", istep, ", E =", energies(irep) CALL write_particle_coordinates(particle_set, frc, dump_xmol, "FRC", title, & cell=cell, array=forces%xyz(:, irep), unit_conv=unit_conv, & - print_name=print_name) + print_kind=print_kind) CALL m_flush(frc) END IF CALL cp_print_key_finished_output(crd, logger, neb_env%motion_print_section, & diff --git a/src/motion/pint_io.F b/src/motion/pint_io.F index b1b80633b3..fcabbe4b65 100644 --- a/src/motion/pint_io.F +++ b/src/motion/pint_io.F @@ -112,7 +112,7 @@ CONTAINS INTEGER :: handle, handle1, iat, ib, id, idim, & idir, ierr, outformat, should_output, & unit_nr - LOGICAL :: new_file, print_name + LOGICAL :: new_file, print_kind REAL(kind=dp) :: nb, ss, unit_conv, vv TYPE(cell_type), POINTER :: cell TYPE(cp_logger_type), POINTER :: logger @@ -157,7 +157,7 @@ CONTAINS basis_section=print_key) IF (.NOT. BTEST(should_output, cp_p_file)) CONTINUE - print_name = .FALSE. + print_kind = .FALSE. ! get units of measure for output (if available) CALL section_vals_val_get(print_key, "UNIT", & @@ -175,8 +175,8 @@ CONTAINS form = "FORMATTED" ext = "" CASE (dump_xmol) - CALL section_vals_val_get(print_key, "PRINT_ATOM_NAME", & - l_val=print_name) + CALL section_vals_val_get(print_key, "PRINT_ATOM_KIND", & + l_val=print_kind) form = "FORMATTED" ext = ".xyz" CASE default @@ -237,7 +237,7 @@ CONTAINS title=title(id), & cell=cell, & unit_conv=unit_conv, & - print_name=print_name) + print_kind=print_kind) CALL cp_print_key_finished_output(unit_nr, logger, & print_key, "", local=.FALSE.) diff --git a/src/motion_utils.F b/src/motion_utils.F index 02bf1ec663..22a0772ebc 100644 --- a/src/motion_utils.F +++ b/src/motion_utils.F @@ -301,7 +301,7 @@ CONTAINS LOGICAL :: charge_beta, charge_extended, & charge_occup, explicit, & my_extended_xmol_title, new_file, & - print_name + print_kind REAL(dp), ALLOCATABLE :: fml_array(:) REAL(KIND=dp) :: unit_conv TYPE(cell_type), POINTER :: cell @@ -346,7 +346,7 @@ CONTAINS charge_occup = .FALSE. charge_beta = .FALSE. charge_extended = .FALSE. - print_name = .FALSE. + print_kind = .FALSE. CALL force_env_get(force_env, cell=cell, subsys=subsys) IF (PRESENT(particles)) THEN @@ -391,8 +391,8 @@ CONTAINS ENDIF CASE (dump_xmol) my_extended_xmol_title = .FALSE. - CALL section_vals_val_get(root_section, "MOTION%PRINT%TRAJECTORY%PRINT_ATOM_NAME", & - l_val=print_name) + CALL section_vals_val_get(root_section, "MOTION%PRINT%TRAJECTORY%PRINT_ATOM_KIND", & + l_val=print_kind) IF (PRESENT(extended_xmol_title)) my_extended_xmol_title = extended_xmol_title ! This information can be digested by Molden IF (my_extended_xmol_title) THEN @@ -456,11 +456,11 @@ CONTAINS ENDIF ENDIF CALL write_particle_coordinates(particle_set, traj_unit, outformat, TRIM(id_wpc), TRIM(title), cell, & - array=fml_array, print_name=print_name) + array=fml_array, print_kind=print_kind) DEALLOCATE (fml_array) ELSE CALL write_particle_coordinates(particle_set, traj_unit, outformat, TRIM(id_wpc), TRIM(title), cell, & - unit_conv=unit_conv, print_name=print_name, & + unit_conv=unit_conv, print_kind=print_kind, & charge_occup=charge_occup, & charge_beta=charge_beta, & charge_extended=charge_extended) diff --git a/src/particle_methods.F b/src/particle_methods.F index 6e23c3fd61..624a713e04 100644 --- a/src/particle_methods.F +++ b/src/particle_methods.F @@ -170,7 +170,7 @@ CONTAINS !> \param charge_occup ... !> \param charge_beta ... !> \param charge_extended ... -!> \param print_name ... +!> \param print_kind ... !> \date 14.01.2002 !> \author MK !> \version 1.0 @@ -178,7 +178,7 @@ CONTAINS SUBROUTINE write_particle_coordinates(particle_set, iunit, output_format, & content, title, cell, array, unit_conv, & charge_occup, charge_beta, & - charge_extended, print_name) + charge_extended, print_kind) TYPE(particle_type), DIMENSION(:), POINTER :: particle_set INTEGER :: iunit, output_format @@ -187,7 +187,7 @@ CONTAINS REAL(KIND=dp), DIMENSION(:), INTENT(IN), OPTIONAL :: array REAL(KIND=dp), INTENT(IN), OPTIONAL :: unit_conv LOGICAL, INTENT(IN), OPTIONAL :: charge_occup, charge_beta, & - charge_extended, print_name + charge_extended, print_kind CHARACTER(len=*), PARAMETER :: routineN = 'write_particle_coordinates' @@ -198,7 +198,7 @@ CONTAINS INTEGER :: handle, iatom, natom LOGICAL :: dummy, my_charge_beta, & my_charge_extended, my_charge_occup, & - my_print_name + my_print_kind REAL(KIND=dp) :: angle_alpha, angle_beta, angle_gamma, & factor, qeff REAL(KIND=dp), ALLOCATABLE, DIMENSION(:, :) :: arr @@ -224,14 +224,14 @@ CONTAINS END IF SELECT CASE (output_format) CASE (dump_xmol) - my_print_name = .FALSE. - IF (PRESENT(print_name)) my_print_name = print_name + my_print_kind = .FALSE. + IF (PRESENT(print_kind)) my_print_kind = print_kind WRITE (iunit, "(I8)") natom WRITE (iunit, "(A)") TRIM(title) DO iatom = 1, natom CALL get_atomic_kind(atomic_kind=particle_set(iatom)%atomic_kind, & element_symbol=element_symbol) - IF (LEN_TRIM(element_symbol) == 0 .OR. my_print_name) THEN + IF (LEN_TRIM(element_symbol) == 0 .OR. my_print_kind) THEN CALL get_atomic_kind(atomic_kind=particle_set(iatom)%atomic_kind, & name=atm_name) dummy = qmmm_ff_precond_only_qm(id1=atm_name) diff --git a/tests/QMMM/SE/regtest-force-mixing/tyrosine_NVT.inp b/tests/QMMM/SE/regtest-force-mixing/tyrosine_NVT.inp index 56318c5c99..70d4b35e2d 100644 --- a/tests/QMMM/SE/regtest-force-mixing/tyrosine_NVT.inp +++ b/tests/QMMM/SE/regtest-force-mixing/tyrosine_NVT.inp @@ -3945,7 +3945,7 @@ &PRINT &TRAJECTORY FORMAT XYZ - PRINT_ATOM_NAME + PRINT_ATOM_KIND .TRUE. &EACH MD 1 &END EACH