LCOV - code coverage report
Current view: top level - src/motion - simpar_methods.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:dc34ec9) Lines: 160 164 97.6 %
Date: 2023-03-24 20:09:49 Functions: 2 2 100.0 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2023 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief  Methods for storing MD parameters type
      10             : !> \author CJM
      11             : !> \author Teodoro Laino [tlaino] - University of Zurich - 10.2008
      12             : !>         reorganization of the original routines/modules
      13             : ! **************************************************************************************************
      14             : MODULE simpar_methods
      15             :    USE bibliography,                    ONLY: Evans1983,&
      16             :                                               Kuhne2007,&
      17             :                                               Minary2003,&
      18             :                                               Rengaraj2020,&
      19             :                                               Ricci2003,&
      20             :                                               cite_reference
      21             :    USE cp_log_handling,                 ONLY: cp_get_default_logger,&
      22             :                                               cp_logger_type
      23             :    USE cp_output_handling,              ONLY: cp_print_key_finished_output,&
      24             :                                               cp_print_key_generate_filename,&
      25             :                                               cp_print_key_unit_nr
      26             :    USE cp_units,                        ONLY: cp_unit_from_cp2k
      27             :    USE input_constants,                 ONLY: &
      28             :         isokin_ensemble, langevin_ensemble, npe_f_ensemble, npe_i_ensemble, &
      29             :         nph_uniaxial_damped_ensemble, nph_uniaxial_ensemble, npt_f_ensemble, npt_i_ensemble, &
      30             :         npt_ia_ensemble, nvt_ensemble, reftraj_ensemble
      31             :    USE input_cp2k_md,                   ONLY: create_md_section
      32             :    USE input_enumeration_types,         ONLY: enum_i2c,&
      33             :                                               enumeration_type
      34             :    USE input_keyword_types,             ONLY: keyword_get,&
      35             :                                               keyword_type
      36             :    USE input_section_types,             ONLY: section_get_keyword,&
      37             :                                               section_release,&
      38             :                                               section_type,&
      39             :                                               section_vals_get,&
      40             :                                               section_vals_get_subs_vals,&
      41             :                                               section_vals_type,&
      42             :                                               section_vals_val_get
      43             :    USE kinds,                           ONLY: default_path_length,&
      44             :                                               dp
      45             :    USE simpar_types,                    ONLY: simpar_type
      46             : #include "../base/base_uses.f90"
      47             : 
      48             :    IMPLICIT NONE
      49             : 
      50             :    PRIVATE
      51             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'simpar_methods'
      52             :    PUBLIC :: read_md_section
      53             : 
      54             : CONTAINS
      55             : 
      56             : ! **************************************************************************************************
      57             : !> \brief Reads the MD section and setup the simulation parameters type
      58             : !> \param simpar ...
      59             : !> \param motion_section ...
      60             : !> \param md_section ...
      61             : !> \author Teodoro Laino
      62             : ! **************************************************************************************************
      63        1729 :    SUBROUTINE read_md_section(simpar, motion_section, md_section)
      64             :       TYPE(simpar_type), POINTER                         :: simpar
      65             :       TYPE(section_vals_type), POINTER                   :: motion_section, md_section
      66             : 
      67             :       CHARACTER(LEN=default_path_length)                 :: filename
      68             :       INTEGER                                            :: iprint, iw
      69             :       REAL(kind=dp)                                      :: tmp_r1, tmp_r2, tmp_r3
      70             :       TYPE(cp_logger_type), POINTER                      :: logger
      71             :       TYPE(enumeration_type), POINTER                    :: enum
      72             :       TYPE(keyword_type), POINTER                        :: keyword
      73             :       TYPE(section_type), POINTER                        :: section
      74             :       TYPE(section_vals_type), POINTER                   :: print_key
      75             : 
      76        1729 :       NULLIFY (logger, print_key, enum, keyword, section)
      77        1729 :       logger => cp_get_default_logger()
      78        1729 :       iw = cp_print_key_unit_nr(logger, md_section, "PRINT%PROGRAM_RUN_INFO", extension=".log")
      79             : 
      80        1729 :       CALL read_md_low(simpar, motion_section, md_section)
      81        1729 :       IF (iw > 0) WRITE (iw, *)
      82             : 
      83             :       ! Begin setup Langevin dynamics
      84        1729 :       IF (simpar%ensemble == langevin_ensemble) THEN
      85          42 :          CALL cite_reference(Ricci2003)
      86          42 :          IF (simpar%noisy_gamma > 0.0_dp) CALL cite_reference(Kuhne2007)
      87          42 :          IF (simpar%shadow_gamma > 0.0_dp) CALL cite_reference(Rengaraj2020)
      88             :          ! Normalization factor using a normal Gaussian random number distribution
      89          42 :          simpar%var_w = 2.0_dp*simpar%temp_ext*simpar%dt*(simpar%gamma + simpar%noisy_gamma)
      90          42 :          IF (iw > 0) THEN
      91          21 :             tmp_r1 = cp_unit_from_cp2k(simpar%gamma, "fs^-1")
      92          21 :             tmp_r2 = cp_unit_from_cp2k(simpar%noisy_gamma, "fs^-1")
      93          21 :             tmp_r3 = cp_unit_from_cp2k(simpar%shadow_gamma, "fs^-1")
      94             :             WRITE (UNIT=iw, FMT="(T2,A,T71,ES10.3)") &
      95          21 :                "LD| Gamma [1/fs] ", tmp_r1, &
      96          21 :                "LD| Noisy Gamma [1/fs]", tmp_r2, &
      97          21 :                "LD| Shadow Gamma [1/fs]", tmp_r3, &
      98          42 :                "LD| Variance [a.u.]", simpar%var_w
      99             :          END IF
     100             :       END IF
     101             : 
     102             :       ! Create section for output enumeration infos
     103        1729 :       CALL create_md_section(section)
     104        1729 :       keyword => section_get_keyword(section, "ENSEMBLE")
     105        1729 :       CALL keyword_get(keyword, enum=enum)
     106             : 
     107             :       ! Write MD setup information to output
     108        1729 :       IF (iw > 0) THEN
     109             :          WRITE (iw, '(T2,A)') &
     110         795 :             'MD_PAR| Molecular dynamics protocol (MD input parameters)'
     111             :          WRITE (iw, '(T2,A,T61,A20)') &
     112         795 :             'MD_PAR| Ensemble type', ADJUSTR(TRIM(enum_i2c(enum, simpar%ensemble)))
     113             :          WRITE (iw, '(T2,A,T61,I20)') &
     114         795 :             'MD_PAR| Number of time steps', simpar%nsteps
     115         795 :          IF (simpar%variable_dt) THEN
     116             :             WRITE (iw, '(T2,A)') &
     117           6 :                'MD_PAR| Variable time step is activated'
     118           6 :             tmp_r1 = cp_unit_from_cp2k(simpar%dt, "fs")
     119             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     120           6 :                'MD_PAR| Maximum time step [fs]', tmp_r1
     121           6 :             tmp_r1 = cp_unit_from_cp2k(simpar%dr_tol, "angstrom")
     122             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     123           6 :                'MD_PAR| Maximum atomic displacement permitted [A]', tmp_r1
     124             :          ELSE
     125         789 :             tmp_r1 = cp_unit_from_cp2k(simpar%dt, "fs")
     126             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     127         789 :                'MD_PAR| Time step [fs]', tmp_r1
     128             :          END IF
     129         795 :          tmp_r1 = cp_unit_from_cp2k(simpar%temp_ext, "K")
     130             :          WRITE (iw, '(T2,A,T61,F20.6)') &
     131         795 :             'MD_PAR| Temperature [K]', tmp_r1
     132         795 :          tmp_r1 = cp_unit_from_cp2k(simpar%temp_tol, "K")
     133             :          WRITE (iw, '(T2,A,T61,F20.6)') &
     134         795 :             'MD_PAR| Temperature tolerance [K]', tmp_r1
     135             : 
     136         795 :          IF (simpar%annealing) THEN
     137             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     138           2 :                'MD_PAR| Annealing ion factor', simpar%f_annealing
     139             :          END IF
     140             :          IF ((simpar%ensemble == npe_f_ensemble .OR. &
     141         795 :               simpar%ensemble == npe_i_ensemble) .AND. &
     142             :              simpar%annealing_cell) THEN
     143             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     144           1 :                'MD_PAR| Annealing cell factor', simpar%f_annealing_cell
     145             :          END IF
     146             :          IF (simpar%ensemble == npt_i_ensemble .OR. &
     147             :              simpar%ensemble == npt_ia_ensemble .OR. &
     148             :              simpar%ensemble == npt_f_ensemble .OR. &
     149         795 :              simpar%ensemble == npe_i_ensemble .OR. &
     150             :              simpar%ensemble == npe_f_ensemble) THEN
     151          76 :             tmp_r1 = cp_unit_from_cp2k(simpar%p_ext, "bar")
     152             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     153          76 :                'MD_PAR| Pressure [bar]', tmp_r1
     154          76 :             tmp_r1 = cp_unit_from_cp2k(simpar%tau_cell, "fs")
     155             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     156          76 :                'MD_PAR| Barostat time constant [fs]', tmp_r1
     157             :          END IF
     158         795 :          IF (simpar%ensemble == isokin_ensemble) THEN
     159           1 :             CALL cite_reference(Evans1983)
     160           1 :             CALL cite_reference(Minary2003)
     161             :             WRITE (iw, '(T2,A)') &
     162           1 :                'MD_PAR| Simulation using the isokinetic ensemble'
     163             :          END IF
     164         795 :          IF (simpar%constraint) THEN
     165             :             WRITE (iw, '(T2,A)') &
     166         151 :                'MD_PAR| Constraints activated'
     167             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     168         151 :                'MD_PAR| Tolerance for shake', simpar%shake_tol
     169             :          END IF
     170             : 
     171         795 :          print_key => section_vals_get_subs_vals(motion_section, "MD%PRINT%PROGRAM_RUN_INFO")
     172         795 :          CALL section_vals_val_get(print_key, "EACH%MD", i_val=iprint)
     173             :          WRITE (iw, '(T2,A,T63,I10,A)') &
     174         795 :             'MD_PAR| Print MD information every', iprint, ' step(s)'
     175             :          WRITE (iw, '(T2,A,T22,A,T71,A10)') &
     176         795 :             'MD_PAR| File type', 'Print frequency [steps]', 'File names'
     177             : 
     178         795 :          print_key => section_vals_get_subs_vals(motion_section, "PRINT%TRAJECTORY")
     179         795 :          CALL section_vals_val_get(print_key, "EACH%MD", i_val=iprint)
     180             :          filename = cp_print_key_generate_filename(logger, print_key, &
     181         795 :                                                    extension=".xyz", middle_name="pos", my_local=.FALSE.)
     182             :          WRITE (iw, '(T2,A,T22,I10,T33,A48)') &
     183         795 :             'MD_PAR| Coordinates', iprint, ADJUSTR(TRIM(filename))
     184             : 
     185             :          IF ((simpar%ensemble == nph_uniaxial_ensemble) .OR. &
     186             :              (simpar%ensemble == nph_uniaxial_damped_ensemble) .OR. &
     187             :              (simpar%ensemble == npt_i_ensemble) .OR. &
     188             :              (simpar%ensemble == npt_ia_ensemble) .OR. &
     189             :              (simpar%ensemble == npt_f_ensemble) .OR. &
     190         795 :              (simpar%ensemble == npe_i_ensemble) .OR. &
     191             :              (simpar%ensemble == npe_f_ensemble)) THEN
     192             : 
     193          79 :             print_key => section_vals_get_subs_vals(motion_section, "PRINT%CELL")
     194          79 :             CALL section_vals_val_get(print_key, "EACH%MD", i_val=iprint)
     195             :             filename = cp_print_key_generate_filename(logger, print_key, &
     196          79 :                                                       extension=".cell", my_local=.FALSE.)
     197             :             WRITE (iw, '(T2,A,T22,I10,T33,A48)') &
     198          79 :                'MD_PAR| Cell', iprint, ADJUSTR(TRIM(filename))
     199             :          END IF
     200             : 
     201         795 :          print_key => section_vals_get_subs_vals(motion_section, "PRINT%VELOCITIES")
     202         795 :          CALL section_vals_val_get(print_key, "EACH%MD", i_val=iprint)
     203             :          filename = cp_print_key_generate_filename(logger, print_key, &
     204         795 :                                                    extension=".xyz", middle_name="vel", my_local=.FALSE.)
     205             :          WRITE (iw, '(T2,A,T22,I10,T33,A48)') &
     206         795 :             'MD_PAR| Velocities', iprint, ADJUSTR(TRIM(filename))
     207             : 
     208         795 :          print_key => section_vals_get_subs_vals(motion_section, "MD%PRINT%ENERGY")
     209         795 :          CALL section_vals_val_get(print_key, "EACH%MD", i_val=iprint)
     210             :          filename = cp_print_key_generate_filename(logger, print_key, &
     211         795 :                                                    extension=".ener", my_local=.FALSE.)
     212             :          WRITE (iw, '(T2,A,T22,I10,T33,A48)') &
     213         795 :             'MD_PAR| Energies', iprint, ADJUSTR(TRIM(filename))
     214             : 
     215         795 :          print_key => section_vals_get_subs_vals(motion_section, "PRINT%RESTART")
     216         795 :          CALL section_vals_val_get(print_key, "EACH%MD", i_val=iprint)
     217             :          filename = cp_print_key_generate_filename(logger, print_key, &
     218         795 :                                                    extension=".restart", my_local=.FALSE.)
     219             :          WRITE (iw, '(T2,A,T22,I10,T33,A48)') &
     220         795 :             'MD_PAR| Dump', iprint, ADJUSTR(TRIM(filename))
     221             : 
     222         795 :          IF ((simpar%ensemble == nph_uniaxial_ensemble) .OR. &
     223             :              (simpar%ensemble == nph_uniaxial_damped_ensemble)) THEN
     224           3 :             WRITE (iw, '(T2,A)') 'SHOCK| Uniaxial shock parameters: '
     225           3 :             tmp_r1 = cp_unit_from_cp2k(simpar%v_shock, "m*s^-1")
     226             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     227           3 :                'SHOCK| Shock velocity [m/s]', tmp_r1
     228           3 :             tmp_r1 = cp_unit_from_cp2k(simpar%gamma_nph, "fs^-1")
     229             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     230           3 :                'SHOCK| Damping coefficient [1/fs]', tmp_r1
     231           3 :             tmp_r1 = cp_unit_from_cp2k(simpar%p0, "bar")
     232             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     233           3 :                'SHOCK| Pressure [bar]', tmp_r1
     234             :             WRITE (iw, '(T2,A,T61,F20.6)') &
     235           3 :                'SHOCK| Barostat mass [a.u.]', simpar%cmass
     236             :          END IF
     237             :          ! Print warning for temp_tol
     238         795 :          IF (simpar%temp_tol > 0.0_dp) THEN
     239             :             CALL cp_warn(__LOCATION__, &
     240             :                          "A temperature tolerance (TEMP_TOL) is used during the MD. "// &
     241          44 :                          "Due to the velocity rescaling algorithm jumps may appear in the conserved quantity.")
     242             :          END IF
     243             :          ! Print warning for annealing
     244         795 :          IF (simpar%annealing) THEN
     245             :             IF ((simpar%ensemble == nvt_ensemble) .OR. &
     246             :                 (simpar%ensemble == npt_i_ensemble) .OR. &
     247           2 :                 (simpar%ensemble == npt_ia_ensemble) .OR. &
     248             :                 (simpar%ensemble == npt_f_ensemble)) THEN
     249             :                CALL cp_abort(__LOCATION__, &
     250             :                              "Annealing of the ions has been required "// &
     251             :                              "even if the thermostat is active (nvt or npt_i or npt_ia or npt_f) "// &
     252           0 :                              "These two methods to control the temperature act one against the other.")
     253             :             END IF
     254             :          END IF
     255             :          ! Print warning for variable time step
     256         795 :          IF (simpar%variable_dt) THEN
     257             :             IF ((simpar%ensemble == langevin_ensemble) .OR. &
     258           6 :                 (simpar%ensemble == reftraj_ensemble) .OR. &
     259             :                 simpar%do_respa) THEN
     260             :                CALL cp_warn( &
     261             :                   __LOCATION__, &
     262             :                   "The variable timestep  has been required, however "// &
     263             :                   "this option is not available either with the Langevin ensemble or with the multiple timestep schme. "// &
     264           0 :                   "The run will proceed with constant timestep, as read from input.")
     265             :             END IF
     266             :          END IF
     267             :       END IF
     268        1729 :       CALL section_release(section)
     269             :       CALL cp_print_key_finished_output(iw, logger, md_section, &
     270        1729 :                                         "PRINT%PROGRAM_RUN_INFO")
     271             : 
     272        1729 :    END SUBROUTINE read_md_section
     273             : 
     274             : ! **************************************************************************************************
     275             : !> \brief Low Level: Parses the MD input section
     276             : !> \param simpar ...
     277             : !> \param motion_section ...
     278             : !> \param md_section ...
     279             : !> \author teo
     280             : ! **************************************************************************************************
     281        3458 :    SUBROUTINE read_md_low(simpar, motion_section, md_section)
     282             :       TYPE(simpar_type), POINTER                         :: simpar
     283             :       TYPE(section_vals_type), POINTER                   :: motion_section, md_section
     284             : 
     285             :       LOGICAL                                            :: explicit
     286             :       TYPE(section_vals_type), POINTER                   :: tmp_section
     287             : 
     288        1729 :       NULLIFY (tmp_section)
     289        1729 :       CALL section_vals_val_get(md_section, "ENSEMBLE", i_val=simpar%ensemble)
     290        1729 :       CALL section_vals_val_get(md_section, "STEPS", i_val=simpar%nsteps)
     291        1729 :       CALL section_vals_val_get(md_section, "MAX_STEPS", i_val=simpar%max_steps)
     292        1729 :       CALL section_vals_val_get(md_section, "TEMPERATURE", r_val=simpar%temp_ext)
     293        1729 :       CALL section_vals_val_get(md_section, "TEMP_TOL", r_val=simpar%temp_tol)
     294        1729 :       CALL section_vals_val_get(md_section, "ANGVEL_ZERO", l_val=simpar%angvel_zero)
     295        1729 :       CALL section_vals_val_get(md_section, "TEMP_KIND", l_val=simpar%temperature_per_kind)
     296        1729 :       CALL section_vals_val_get(md_section, "SCALE_TEMP_KIND", l_val=simpar%scale_temperature_per_kind)
     297        1729 :       CALL section_vals_val_get(md_section, "ANNEALING", r_val=simpar%f_annealing, explicit=simpar%annealing)
     298             :       CALL section_vals_val_get(md_section, "ANNEALING_CELL", r_val=simpar%f_annealing_cell, &
     299        1729 :                                 explicit=simpar%annealing_cell)
     300             :       CALL section_vals_val_get(md_section, "TEMPERATURE_ANNEALING", r_val=simpar%f_temperature_annealing, &
     301        1729 :                                 explicit=simpar%temperature_annealing)
     302             :       CALL section_vals_val_get(md_section, "DISPLACEMENT_TOL", r_val=simpar%dr_tol, &
     303        1729 :                                 explicit=simpar%variable_dt)
     304        1729 :       CALL section_vals_val_get(md_section, "TIMESTEP", r_val=simpar%dt)
     305             :       CALL section_vals_val_get(md_section, "INITIALIZATION_METHOD", &
     306        1729 :                                 i_val=simpar%initialization_method)
     307             :       ! Initialize dt_fact to 1.0
     308        1729 :       simpar%dt_fact = 1.0_dp
     309             : 
     310        1729 :       IF (simpar%ensemble == langevin_ensemble) THEN
     311          42 :          CALL section_vals_val_get(md_section, "LANGEVIN%GAMMA", r_val=simpar%gamma)
     312          42 :          CALL section_vals_val_get(md_section, "LANGEVIN%NOISY_GAMMA", r_val=simpar%noisy_gamma)
     313          42 :          CALL section_vals_val_get(md_section, "LANGEVIN%SHADOW_GAMMA", r_val=simpar%shadow_gamma)
     314             :       END IF
     315             : 
     316        1729 :       tmp_section => section_vals_get_subs_vals(motion_section, "CONSTRAINT")
     317        1729 :       CALL section_vals_get(tmp_section, explicit=simpar%constraint)
     318        1729 :       IF (simpar%constraint) THEN
     319         302 :          CALL section_vals_val_get(tmp_section, "SHAKE_TOLERANCE", r_val=simpar%shake_tol)
     320         302 :          IF (simpar%shake_tol <= EPSILON(0.0_dp)*1000.0_dp) &
     321             :             CALL cp_warn(__LOCATION__, &
     322             :                          "Shake tolerance lower than 1000*EPSILON, where EPSILON is the machine precision. "// &
     323           0 :                          "This may lead to numerical problems. Setting up shake_tol to 1000*EPSILON!")
     324         302 :          simpar%shake_tol = MAX(EPSILON(0.0_dp)*1000.0_dp, simpar%shake_tol)
     325             : 
     326         302 :          CALL section_vals_val_get(tmp_section, "ROLL_TOLERANCE", r_val=simpar%roll_tol)
     327         302 :          IF (simpar%roll_tol <= EPSILON(0.0_dp)*1000.0_dp) &
     328             :             CALL cp_warn(__LOCATION__, &
     329             :                          "Roll tolerance lower than 1000*EPSILON, where EPSILON is the machine precision. "// &
     330           0 :                          "This may lead to numerical problems. Setting up roll_tol to 1000*EPSILON!")
     331         302 :          simpar%roll_tol = MAX(EPSILON(0.0_dp)*1000.0_dp, simpar%roll_tol)
     332             :       END IF
     333             : 
     334        1729 :       IF (simpar%ensemble == nph_uniaxial_ensemble .OR. simpar%ensemble == nph_uniaxial_damped_ensemble) THEN
     335           6 :          tmp_section => section_vals_get_subs_vals(md_section, "MSST")
     336           6 :          CALL section_vals_val_get(tmp_section, "PRESSURE", r_val=simpar%p0)
     337           6 :          CALL section_vals_val_get(tmp_section, "ENERGY", r_val=simpar%e0)
     338           6 :          CALL section_vals_val_get(tmp_section, "VOLUME", r_val=simpar%v0)
     339           6 :          CALL section_vals_val_get(tmp_section, "GAMMA", r_val=simpar%gamma_nph)
     340           6 :          IF (simpar%gamma_nph /= 0.0_dp) simpar%ensemble = nph_uniaxial_damped_ensemble
     341           6 :          CALL section_vals_val_get(tmp_section, "CMASS", r_val=simpar%cmass)
     342           6 :          CALL section_vals_val_get(tmp_section, "VSHOCK", r_val=simpar%v_shock)
     343             :       END IF
     344             : 
     345        1889 :       SELECT CASE (simpar%ensemble)
     346             :       CASE (nph_uniaxial_damped_ensemble, nph_uniaxial_ensemble, &
     347             :             npt_f_ensemble, npt_i_ensemble, npt_ia_ensemble, npe_f_ensemble, npe_i_ensemble)
     348         160 :          tmp_section => section_vals_get_subs_vals(md_section, "BAROSTAT")
     349         160 :          CALL section_vals_val_get(tmp_section, "PRESSURE", r_val=simpar%p_ext)
     350        1889 :          CALL section_vals_val_get(tmp_section, "TIMECON", r_val=simpar%tau_cell)
     351             :       END SELECT
     352             : 
     353             :       ! RESPA
     354        1729 :       tmp_section => section_vals_get_subs_vals(md_section, "RESPA")
     355        1729 :       CALL section_vals_get(tmp_section, explicit=simpar%do_respa)
     356        1729 :       CALL section_vals_val_get(tmp_section, "FREQUENCY", i_val=simpar%n_time_steps)
     357        1729 :       simpar%multi_time_switch = simpar%do_respa
     358             : 
     359             :       ! CORE-SHELL MODEL
     360        1729 :       tmp_section => section_vals_get_subs_vals(md_section, "SHELL")
     361        1729 :       CALL section_vals_val_get(tmp_section, "TEMPERATURE", r_val=simpar%temp_sh_ext)
     362        1729 :       CALL section_vals_val_get(tmp_section, "TEMP_TOL", r_val=simpar%temp_sh_tol)
     363             : 
     364             :       CALL section_vals_val_get(tmp_section, "DISPLACEMENT_SHELL_TOL", r_val=simpar%dsc_tol, &
     365        1729 :                                 explicit=explicit)
     366        1729 :       simpar%variable_dt = simpar%variable_dt .OR. explicit
     367             :       ! ADIABATIC DYNAMICS
     368        1729 :       tmp_section => section_vals_get_subs_vals(md_section, "ADIABATIC_DYNAMICS")
     369        1729 :       CALL section_vals_val_get(tmp_section, "TEMP_FAST", r_val=simpar%temp_fast)
     370        1729 :       CALL section_vals_val_get(tmp_section, "TEMP_SLOW", r_val=simpar%temp_slow)
     371        1729 :       CALL section_vals_val_get(tmp_section, "TEMP_TOL_FAST", r_val=simpar%temp_tol_fast)
     372        1729 :       CALL section_vals_val_get(tmp_section, "TEMP_TOL_SLOW", r_val=simpar%temp_tol_slow)
     373        1729 :       CALL section_vals_val_get(tmp_section, "N_RESP_FAST", i_val=simpar%n_resp_fast)
     374             : 
     375             :       ! VELOCITY SOFTENING
     376        1729 :       tmp_section => section_vals_get_subs_vals(md_section, "VELOCITY_SOFTENING")
     377        1729 :       CALL section_vals_val_get(tmp_section, "STEPS", i_val=simpar%soften_nsteps)
     378        1729 :       CALL section_vals_val_get(tmp_section, "ALPHA", r_val=simpar%soften_alpha)
     379        1729 :       CALL section_vals_val_get(tmp_section, "DELTA", r_val=simpar%soften_delta)
     380        1729 :    END SUBROUTINE read_md_low
     381             : 
     382             : END MODULE simpar_methods

Generated by: LCOV version 1.15