LCOV - code coverage report
Current view: top level - src - force_field_types.F (source / functions) Hit Total Coverage
Test: CP2K Regtests (git:262480d) Lines: 434 437 99.3 %
Date: 2024-11-22 07:00:40 Functions: 10 15 66.7 %

          Line data    Source code
       1             : !--------------------------------------------------------------------------------------------------!
       2             : !   CP2K: A general program to perform molecular dynamics simulations                              !
       3             : !   Copyright 2000-2024 CP2K developers group <https://cp2k.org>                                   !
       4             : !                                                                                                  !
       5             : !   SPDX-License-Identifier: GPL-2.0-or-later                                                      !
       6             : !--------------------------------------------------------------------------------------------------!
       7             : 
       8             : ! **************************************************************************************************
       9             : !> \brief Define all structures types related to force_fields
      10             : !> \par History
      11             : !>      10.2008 Teodoro Laino [tlaino] - University of Zurich
      12             : !>      added native support for AMBER forcefield
      13             : !>      10.2014 Moved kind types into force_field_kind_types.F [Ole Schuett]
      14             : !> \author MK (29.08.2003)
      15             : ! **************************************************************************************************
      16             : MODULE force_field_types
      17             : 
      18             :    USE damping_dipole_types,            ONLY: damping_info_type
      19             :    USE force_field_kind_types,          ONLY: legendre_data_type
      20             :    USE kinds,                           ONLY: default_path_length,&
      21             :                                               default_string_length,&
      22             :                                               dp
      23             :    USE pair_potential_types,            ONLY: pair_potential_p_release,&
      24             :                                               pair_potential_p_type
      25             :    USE shell_potential_types,           ONLY: shell_p_release,&
      26             :                                               shell_p_type
      27             : #include "./base/base_uses.f90"
      28             : 
      29             :    IMPLICIT NONE
      30             : 
      31             :    PRIVATE
      32             : 
      33             :    CHARACTER(len=*), PARAMETER, PRIVATE :: moduleN = 'force_field_types'
      34             : 
      35             : ! *** Define the derived structure types ***
      36             : 
      37             : ! **************************************************************************************************
      38             :    TYPE input_info_type
      39             :       CHARACTER(LEN=default_string_length), POINTER :: charge_atm(:) => NULL()
      40             :       REAL(KIND=dp), POINTER                         :: charge(:) => NULL()
      41             :       CHARACTER(LEN=default_string_length), POINTER :: apol_atm(:) => NULL()
      42             :       REAL(KIND=dp), POINTER                         :: apol(:) => NULL()
      43             :       CHARACTER(LEN=default_string_length), POINTER :: cpol_atm(:) => NULL()
      44             :       REAL(KIND=dp), POINTER                         :: cpol(:) => NULL()
      45             :       INTEGER, POINTER                               :: bond_kind(:) => NULL()
      46             :       CHARACTER(LEN=default_string_length), POINTER :: bond_a(:) => NULL()
      47             :       CHARACTER(LEN=default_string_length), POINTER :: bond_b(:) => NULL()
      48             :       REAL(KIND=dp), POINTER                         :: bond_k(:, :) => NULL()
      49             :       REAL(KIND=dp), POINTER                         :: bond_r0(:) => NULL()
      50             :       REAL(KIND=dp), POINTER                         :: bond_cs(:) => NULL()
      51             :       INTEGER, POINTER                               :: bend_kind(:) => NULL()
      52             :       CHARACTER(LEN=default_string_length), POINTER :: bend_a(:) => NULL()
      53             :       CHARACTER(LEN=default_string_length), POINTER :: bend_b(:) => NULL()
      54             :       CHARACTER(LEN=default_string_length), POINTER :: bend_c(:) => NULL()
      55             :       REAL(KIND=dp), POINTER                         :: bend_k(:) => NULL()
      56             :       REAL(KIND=dp), POINTER                         :: bend_theta0(:) => NULL()
      57             :       REAL(KIND=dp), POINTER                         :: bend_cb(:) => NULL()
      58             :       REAL(KIND=dp), POINTER, DIMENSION(:)           :: bend_r012 => NULL(), &
      59             :                                                         bend_r032 => NULL(), &
      60             :                                                         bend_kbs12 => NULL(), &
      61             :                                                         bend_kbs32 => NULL(), &
      62             :                                                         bend_kss => NULL()
      63             :       TYPE(legendre_data_type), POINTER, DIMENSION(:):: bend_legendre => NULL()
      64             :       INTEGER, POINTER                               :: ub_kind(:) => NULL()
      65             :       CHARACTER(LEN=default_string_length), POINTER :: ub_a(:) => NULL()
      66             :       CHARACTER(LEN=default_string_length), POINTER :: ub_b(:) => NULL()
      67             :       CHARACTER(LEN=default_string_length), POINTER :: ub_c(:) => NULL()
      68             :       REAL(KIND=dp), POINTER                         :: ub_k(:, :) => NULL()
      69             :       REAL(KIND=dp), POINTER                         :: ub_r0(:) => NULL()
      70             :       INTEGER, POINTER                               :: torsion_kind(:) => NULL()
      71             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_a(:) => NULL()
      72             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_b(:) => NULL()
      73             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_c(:) => NULL()
      74             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_d(:) => NULL()
      75             :       REAL(KIND=dp), POINTER                         :: torsion_k(:) => NULL()
      76             :       INTEGER, POINTER                               :: torsion_m(:) => NULL()
      77             :       REAL(KIND=dp), POINTER                         :: torsion_phi0(:) => NULL()
      78             :       INTEGER, POINTER                               :: impr_kind(:) => NULL()
      79             :       CHARACTER(LEN=default_string_length), POINTER :: impr_a(:) => NULL()
      80             :       CHARACTER(LEN=default_string_length), POINTER :: impr_b(:) => NULL()
      81             :       CHARACTER(LEN=default_string_length), POINTER :: impr_c(:) => NULL()
      82             :       CHARACTER(LEN=default_string_length), POINTER :: impr_d(:) => NULL()
      83             :       REAL(KIND=dp), POINTER                         :: impr_k(:) => NULL()
      84             :       REAL(KIND=dp), POINTER                         :: impr_phi0(:) => NULL()
      85             :       INTEGER, POINTER                               :: opbend_kind(:) => NULL()
      86             :       CHARACTER(LEN=default_string_length), POINTER :: opbend_a(:) => NULL()
      87             :       CHARACTER(LEN=default_string_length), POINTER :: opbend_b(:) => NULL()
      88             :       CHARACTER(LEN=default_string_length), POINTER :: opbend_c(:) => NULL()
      89             :       CHARACTER(LEN=default_string_length), POINTER :: opbend_d(:) => NULL()
      90             :       REAL(KIND=dp), POINTER                         :: opbend_k(:) => NULL()
      91             :       REAL(KIND=dp), POINTER                         :: opbend_phi0(:) => NULL()
      92             :       TYPE(pair_potential_p_type), POINTER          :: nonbonded => NULL()
      93             :       TYPE(pair_potential_p_type), POINTER          :: nonbonded14 => NULL()
      94             :       TYPE(shell_p_type), DIMENSION(:), POINTER     :: shell_list => NULL()
      95             :       TYPE(damping_info_type), DIMENSION(:), POINTER :: damping_list => NULL()
      96             :    END TYPE input_info_type
      97             : 
      98             : ! **************************************************************************************************
      99             :    TYPE charmm_info_type
     100             :       CHARACTER(LEN=default_string_length), POINTER :: bond_a(:) => NULL()
     101             :       CHARACTER(LEN=default_string_length), POINTER :: bond_b(:) => NULL()
     102             :       REAL(KIND=dp), POINTER                         :: bond_k(:) => NULL()
     103             :       REAL(KIND=dp), POINTER                         :: bond_r0(:) => NULL()
     104             :       CHARACTER(LEN=default_string_length), POINTER :: bend_a(:) => NULL()
     105             :       CHARACTER(LEN=default_string_length), POINTER :: bend_b(:) => NULL()
     106             :       CHARACTER(LEN=default_string_length), POINTER :: bend_c(:) => NULL()
     107             :       REAL(KIND=dp), POINTER                         :: bend_k(:) => NULL()
     108             :       REAL(KIND=dp), POINTER                         :: bend_theta0(:) => NULL()
     109             :       CHARACTER(LEN=default_string_length), POINTER :: ub_a(:) => NULL()
     110             :       CHARACTER(LEN=default_string_length), POINTER :: ub_b(:) => NULL()
     111             :       CHARACTER(LEN=default_string_length), POINTER :: ub_c(:) => NULL()
     112             :       REAL(KIND=dp), POINTER                         :: ub_k(:) => NULL()
     113             :       REAL(KIND=dp), POINTER                         :: ub_r0(:) => NULL()
     114             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_a(:) => NULL()
     115             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_b(:) => NULL()
     116             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_c(:) => NULL()
     117             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_d(:) => NULL()
     118             :       REAL(KIND=dp), POINTER                         :: torsion_k(:) => NULL()
     119             :       INTEGER, POINTER                               :: torsion_m(:) => NULL()
     120             :       REAL(KIND=dp), POINTER                         :: torsion_phi0(:) => NULL()
     121             :       CHARACTER(LEN=default_string_length), POINTER :: impr_a(:) => NULL()
     122             :       CHARACTER(LEN=default_string_length), POINTER :: impr_b(:) => NULL()
     123             :       CHARACTER(LEN=default_string_length), POINTER :: impr_c(:) => NULL()
     124             :       CHARACTER(LEN=default_string_length), POINTER :: impr_d(:) => NULL()
     125             :       REAL(KIND=dp), POINTER                         :: impr_k(:) => NULL()
     126             :       REAL(KIND=dp), POINTER                         :: impr_phi0(:) => NULL()
     127             :       CHARACTER(LEN=default_string_length), POINTER :: nonbond_a(:) => NULL()
     128             :       REAL(KIND=dp), POINTER                        :: nonbond_eps(:) => NULL()
     129             :       REAL(KIND=dp), POINTER                        :: nonbond_rmin2(:) => NULL()
     130             :       CHARACTER(LEN=default_string_length), POINTER :: nonbond_a_14(:) => NULL()
     131             :       REAL(KIND=dp), POINTER                        :: nonbond_eps_14(:) => NULL()
     132             :       REAL(KIND=dp), POINTER                        :: nonbond_rmin2_14(:) => NULL()
     133             :    END TYPE charmm_info_type
     134             : 
     135             : ! **************************************************************************************************
     136             :    TYPE amber_info_type
     137             :       CHARACTER(LEN=default_string_length), POINTER :: bond_a(:) => NULL()
     138             :       CHARACTER(LEN=default_string_length), POINTER :: bond_b(:) => NULL()
     139             :       REAL(KIND=dp), POINTER                         :: bond_k(:) => NULL()
     140             :       REAL(KIND=dp), POINTER                         :: bond_r0(:) => NULL()
     141             :       CHARACTER(LEN=default_string_length), POINTER :: bend_a(:) => NULL()
     142             :       CHARACTER(LEN=default_string_length), POINTER :: bend_b(:) => NULL()
     143             :       CHARACTER(LEN=default_string_length), POINTER :: bend_c(:) => NULL()
     144             :       REAL(KIND=dp), POINTER                         :: bend_k(:) => NULL()
     145             :       REAL(KIND=dp), POINTER                         :: bend_theta0(:) => NULL()
     146             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_a(:) => NULL()
     147             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_b(:) => NULL()
     148             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_c(:) => NULL()
     149             :       CHARACTER(LEN=default_string_length), POINTER :: torsion_d(:) => NULL()
     150             :       REAL(KIND=dp), POINTER                         :: torsion_k(:) => NULL()
     151             :       INTEGER, POINTER                               :: torsion_m(:) => NULL()
     152             :       REAL(KIND=dp), POINTER                         :: torsion_phi0(:) => NULL()
     153             :       CHARACTER(LEN=default_string_length), POINTER :: nonbond_a(:) => NULL()
     154             :       REAL(KIND=dp), POINTER                        :: nonbond_eps(:) => NULL()
     155             :       REAL(KIND=dp), POINTER                        :: nonbond_rmin2(:) => NULL()
     156             :       INTEGER, POINTER                               :: raw_torsion_id(:, :) => NULL()
     157             :       REAL(KIND=dp), POINTER                         :: raw_torsion_k(:) => NULL()
     158             :       REAL(KIND=dp), POINTER                         :: raw_torsion_m(:) => NULL()
     159             :       REAL(KIND=dp), POINTER                         :: raw_torsion_phi0(:) => NULL()
     160             :    END TYPE amber_info_type
     161             : 
     162             : ! **************************************************************************************************
     163             :    TYPE gromos_info_type
     164             :       INTEGER                                        :: ff_gromos_type = -1
     165             :       REAL(KIND=dp), POINTER                         :: solvent_k(:) => NULL()
     166             :       REAL(KIND=dp), POINTER                         :: solvent_r0(:) => NULL()
     167             :       REAL(KIND=dp), POINTER                         :: bond_k(:) => NULL()
     168             :       REAL(KIND=dp), POINTER                         :: bond_r0(:) => NULL()
     169             :       REAL(KIND=dp), POINTER                         :: bend_k(:) => NULL()
     170             :       REAL(KIND=dp), POINTER                         :: bend_theta0(:) => NULL()
     171             :       REAL(KIND=dp), POINTER                         :: torsion_k(:) => NULL()
     172             :       INTEGER, POINTER                               :: torsion_m(:) => NULL()
     173             :       REAL(KIND=dp), POINTER                         :: torsion_phi0(:) => NULL()
     174             :       REAL(KIND=dp), POINTER                         :: impr_k(:) => NULL()
     175             :       REAL(KIND=dp), POINTER                         :: impr_phi0(:) => NULL()
     176             :       CHARACTER(LEN=default_string_length), POINTER :: nonbond_a(:) => NULL()
     177             :       REAL(KIND=dp), POINTER                        :: nonbond_c6(:, :) => NULL()
     178             :       REAL(KIND=dp), POINTER                        :: nonbond_c12(:, :) => NULL()
     179             :       CHARACTER(LEN=default_string_length), POINTER :: nonbond_a_14(:) => NULL()
     180             :       REAL(KIND=dp), POINTER                        :: nonbond_c6_14(:, :) => NULL()
     181             :       REAL(KIND=dp), POINTER                        :: nonbond_c12_14(:, :) => NULL()
     182             :    END TYPE gromos_info_type
     183             : 
     184             : ! **************************************************************************************************
     185             :    TYPE force_field_type
     186             :       LOGICAL                                   :: shift_cutoff = .FALSE., &
     187             :                                                    do_nonbonded = .FALSE., &
     188             :                                                    do_electrostatics = .FALSE., &
     189             :                                                    electrostatics = .FALSE., &
     190             :                                                    multiple_potential = .FALSE., &
     191             :                                                    ignore_missing_critical = .FALSE.
     192             :       INTEGER                                   :: ff_type = -1
     193             :       REAL(KIND=dp)                             :: rcut_nb = 0.0_dp
     194             :       REAL(KIND=dp)                             :: ei_scale14 = 0.0_dp
     195             :       REAL(KIND=dp)                             :: vdw_scale14 = 0.0_dp
     196             :       REAL(KIND=dp)                             :: eps_spline = 0.0_dp, &
     197             :                                                    max_energy = 0.0_dp, &
     198             :                                                    emax_spline = 0.0_dp, &
     199             :                                                    rlow_nb = 0.0_dp
     200             :       INTEGER                                   :: npoints = -1
     201             :       CHARACTER(LEN=default_path_length)       :: ff_file_name = ""
     202             :       TYPE(input_info_type), POINTER            :: inp_info => NULL()
     203             :       TYPE(charmm_info_type), POINTER           :: chm_info => NULL()
     204             :       TYPE(gromos_info_type), POINTER           :: gro_info => NULL()
     205             :       TYPE(amber_info_type), POINTER           :: amb_info => NULL()
     206             :    END TYPE force_field_type
     207             : 
     208             : ! *** Public subroutines ***
     209             : 
     210             :    PUBLIC :: init_ff_type, &
     211             :              deallocate_ff_type, &
     212             :              init_inp_info, &
     213             :              deallocate_inp_info
     214             : 
     215             : ! *** Public data types ***
     216             : 
     217             :    PUBLIC :: charmm_info_type, &
     218             :              amber_info_type, &
     219             :              gromos_info_type, &
     220             :              input_info_type, &
     221             :              force_field_type
     222             : 
     223             : CONTAINS
     224             : 
     225             : ! **************************************************************************************************
     226             : !> \brief 1. Just NULLIFY and zero all the stuff
     227             : !> \param ff_type ...
     228             : !> \author ikuo
     229             : ! **************************************************************************************************
     230        2639 :    SUBROUTINE init_ff_type(ff_type)
     231             :       TYPE(force_field_type), INTENT(INOUT)              :: ff_type
     232             : 
     233             : !-----------------------------------------------------------------------------
     234             : ! 1. Initialize
     235             : !-----------------------------------------------------------------------------
     236             : 
     237        2639 :       NULLIFY (ff_type%inp_info, ff_type%chm_info, ff_type%amb_info, ff_type%gro_info)
     238        2639 :       ALLOCATE (ff_type%inp_info)
     239        2639 :       ALLOCATE (ff_type%chm_info)
     240        2639 :       ALLOCATE (ff_type%gro_info)
     241        2639 :       ALLOCATE (ff_type%amb_info)
     242             : 
     243             :       !-----------------------------------------------------------------------------
     244             :       ! 2. Initialize and Nullify things in ff_type%inp_info
     245             :       !-----------------------------------------------------------------------------
     246        2639 :       CALL init_inp_info(ff_type%inp_info)
     247             : 
     248             :       !-----------------------------------------------------------------------------
     249             :       ! 3. Initialize and Nullify things in ff_type%chm_info
     250             :       !-----------------------------------------------------------------------------
     251        2639 :       CALL init_chm_info(ff_type%chm_info)
     252             : 
     253             :       !-----------------------------------------------------------------------------
     254             :       ! 4. Initialize and Nullify things in ff_type%gro_info
     255             :       !-----------------------------------------------------------------------------
     256        2639 :       CALL init_gromos_info(ff_type%gro_info)
     257             : 
     258             :       !-----------------------------------------------------------------------------
     259             :       ! 5. Initialize and Nullify things in ff_type%amb_info
     260             :       !-----------------------------------------------------------------------------
     261        2639 :       CALL init_amber_info(ff_type%amb_info)
     262             : 
     263        2639 :    END SUBROUTINE init_ff_type
     264             : 
     265             : ! **************************************************************************************************
     266             : !> \brief Specific function to initialize the gro_info
     267             : !> \param gro_info ...
     268             : !> \author ikuo
     269             : ! **************************************************************************************************
     270        2639 :    SUBROUTINE init_gromos_info(gro_info)
     271             :       TYPE(gromos_info_type), POINTER                    :: gro_info
     272             : 
     273        2639 :       NULLIFY (gro_info%solvent_k)
     274        2639 :       NULLIFY (gro_info%solvent_r0)
     275        2639 :       NULLIFY (gro_info%bond_k)
     276        2639 :       NULLIFY (gro_info%bond_r0)
     277        2639 :       NULLIFY (gro_info%bend_k)
     278        2639 :       NULLIFY (gro_info%bend_theta0)
     279        2639 :       NULLIFY (gro_info%torsion_k)
     280        2639 :       NULLIFY (gro_info%torsion_m)
     281        2639 :       NULLIFY (gro_info%torsion_phi0)
     282        2639 :       NULLIFY (gro_info%impr_k)
     283        2639 :       NULLIFY (gro_info%impr_phi0)
     284        2639 :       NULLIFY (gro_info%nonbond_a)
     285        2639 :       NULLIFY (gro_info%nonbond_c6)
     286        2639 :       NULLIFY (gro_info%nonbond_c12)
     287        2639 :       NULLIFY (gro_info%nonbond_a_14)
     288        2639 :       NULLIFY (gro_info%nonbond_c6_14)
     289        2639 :       NULLIFY (gro_info%nonbond_c12_14)
     290             : 
     291        2639 :    END SUBROUTINE init_gromos_info
     292             : 
     293             : ! **************************************************************************************************
     294             : !> \brief Specific function to initialize the chm_info
     295             : !> \param chm_info ...
     296             : !> \par History
     297             : !>      none
     298             : !> \author teo
     299             : ! **************************************************************************************************
     300        2639 :    SUBROUTINE init_chm_info(chm_info)
     301             :       TYPE(charmm_info_type), POINTER                    :: chm_info
     302             : 
     303        2639 :       NULLIFY (chm_info%bond_a)
     304        2639 :       NULLIFY (chm_info%bond_b)
     305        2639 :       NULLIFY (chm_info%bond_k)
     306        2639 :       NULLIFY (chm_info%bond_r0)
     307        2639 :       NULLIFY (chm_info%bend_a)
     308        2639 :       NULLIFY (chm_info%bend_b)
     309        2639 :       NULLIFY (chm_info%bend_c)
     310        2639 :       NULLIFY (chm_info%bend_k)
     311        2639 :       NULLIFY (chm_info%bend_theta0)
     312        2639 :       NULLIFY (chm_info%ub_a)
     313        2639 :       NULLIFY (chm_info%ub_b)
     314        2639 :       NULLIFY (chm_info%ub_c)
     315        2639 :       NULLIFY (chm_info%ub_k)
     316        2639 :       NULLIFY (chm_info%ub_r0)
     317        2639 :       NULLIFY (chm_info%torsion_a)
     318        2639 :       NULLIFY (chm_info%torsion_b)
     319        2639 :       NULLIFY (chm_info%torsion_c)
     320        2639 :       NULLIFY (chm_info%torsion_d)
     321        2639 :       NULLIFY (chm_info%torsion_k)
     322        2639 :       NULLIFY (chm_info%torsion_m)
     323        2639 :       NULLIFY (chm_info%torsion_phi0)
     324        2639 :       NULLIFY (chm_info%impr_a)
     325        2639 :       NULLIFY (chm_info%impr_b)
     326        2639 :       NULLIFY (chm_info%impr_c)
     327        2639 :       NULLIFY (chm_info%impr_d)
     328        2639 :       NULLIFY (chm_info%impr_k)
     329        2639 :       NULLIFY (chm_info%impr_phi0)
     330        2639 :       NULLIFY (chm_info%nonbond_a)
     331        2639 :       NULLIFY (chm_info%nonbond_eps)
     332        2639 :       NULLIFY (chm_info%nonbond_rmin2)
     333        2639 :       NULLIFY (chm_info%nonbond_a_14)
     334        2639 :       NULLIFY (chm_info%nonbond_eps_14)
     335        2639 :       NULLIFY (chm_info%nonbond_rmin2_14)
     336             : 
     337        2639 :    END SUBROUTINE init_chm_info
     338             : 
     339             : ! **************************************************************************************************
     340             : !> \brief Specific function to initialize the chm_info
     341             : !> \param amb_info ...
     342             : !> \par History
     343             : !>      none
     344             : !> \author teo
     345             : ! **************************************************************************************************
     346        2639 :    SUBROUTINE init_amber_info(amb_info)
     347             :       TYPE(amber_info_type), POINTER                     :: amb_info
     348             : 
     349        2639 :       NULLIFY (amb_info%bond_a)
     350        2639 :       NULLIFY (amb_info%bond_b)
     351        2639 :       NULLIFY (amb_info%bond_k)
     352        2639 :       NULLIFY (amb_info%bond_r0)
     353        2639 :       NULLIFY (amb_info%bend_a)
     354        2639 :       NULLIFY (amb_info%bend_b)
     355        2639 :       NULLIFY (amb_info%bend_c)
     356        2639 :       NULLIFY (amb_info%bend_k)
     357        2639 :       NULLIFY (amb_info%bend_theta0)
     358        2639 :       NULLIFY (amb_info%torsion_a)
     359        2639 :       NULLIFY (amb_info%torsion_b)
     360        2639 :       NULLIFY (amb_info%torsion_c)
     361        2639 :       NULLIFY (amb_info%torsion_d)
     362        2639 :       NULLIFY (amb_info%torsion_k)
     363        2639 :       NULLIFY (amb_info%torsion_m)
     364        2639 :       NULLIFY (amb_info%torsion_phi0)
     365        2639 :       NULLIFY (amb_info%nonbond_a)
     366        2639 :       NULLIFY (amb_info%nonbond_eps)
     367        2639 :       NULLIFY (amb_info%nonbond_rmin2)
     368        2639 :       NULLIFY (amb_info%raw_torsion_id)
     369        2639 :       NULLIFY (amb_info%raw_torsion_k)
     370        2639 :       NULLIFY (amb_info%raw_torsion_m)
     371        2639 :       NULLIFY (amb_info%raw_torsion_phi0)
     372             : 
     373        2639 :    END SUBROUTINE init_amber_info
     374             : 
     375             : ! **************************************************************************************************
     376             : !> \brief Specific function to initialize the inp_info
     377             : !> \param inp_info ...
     378             : !> \par History
     379             : !>      none
     380             : !> \author teo
     381             : ! **************************************************************************************************
     382        5672 :    SUBROUTINE init_inp_info(inp_info)
     383             :       TYPE(input_info_type), POINTER                     :: inp_info
     384             : 
     385        5672 :       NULLIFY (inp_info%charge_atm)
     386        5672 :       NULLIFY (inp_info%charge)
     387        5672 :       NULLIFY (inp_info%apol_atm)
     388        5672 :       NULLIFY (inp_info%apol)
     389        5672 :       NULLIFY (inp_info%cpol_atm)
     390        5672 :       NULLIFY (inp_info%cpol)
     391        5672 :       NULLIFY (inp_info%bond_kind)
     392        5672 :       NULLIFY (inp_info%bond_a)
     393        5672 :       NULLIFY (inp_info%bond_b)
     394        5672 :       NULLIFY (inp_info%bond_k)
     395        5672 :       NULLIFY (inp_info%bond_r0)
     396        5672 :       NULLIFY (inp_info%bond_cs)
     397        5672 :       NULLIFY (inp_info%bend_kind)
     398        5672 :       NULLIFY (inp_info%bend_a)
     399        5672 :       NULLIFY (inp_info%bend_b)
     400        5672 :       NULLIFY (inp_info%bend_c)
     401        5672 :       NULLIFY (inp_info%bend_k)
     402        5672 :       NULLIFY (inp_info%bend_theta0)
     403        5672 :       NULLIFY (inp_info%bend_cb)
     404        5672 :       NULLIFY (inp_info%bend_r012)
     405        5672 :       NULLIFY (inp_info%bend_r032)
     406        5672 :       NULLIFY (inp_info%bend_kbs12)
     407        5672 :       NULLIFY (inp_info%bend_kbs32)
     408        5672 :       NULLIFY (inp_info%bend_kss)
     409        5672 :       NULLIFY (inp_info%bend_legendre)
     410        5672 :       NULLIFY (inp_info%ub_kind)
     411        5672 :       NULLIFY (inp_info%ub_a)
     412        5672 :       NULLIFY (inp_info%ub_b)
     413        5672 :       NULLIFY (inp_info%ub_c)
     414        5672 :       NULLIFY (inp_info%ub_k)
     415        5672 :       NULLIFY (inp_info%ub_r0)
     416        5672 :       NULLIFY (inp_info%torsion_kind)
     417        5672 :       NULLIFY (inp_info%torsion_a)
     418        5672 :       NULLIFY (inp_info%torsion_b)
     419        5672 :       NULLIFY (inp_info%torsion_c)
     420        5672 :       NULLIFY (inp_info%torsion_d)
     421        5672 :       NULLIFY (inp_info%torsion_k)
     422        5672 :       NULLIFY (inp_info%torsion_m)
     423        5672 :       NULLIFY (inp_info%torsion_phi0)
     424        5672 :       NULLIFY (inp_info%impr_kind)
     425        5672 :       NULLIFY (inp_info%impr_a)
     426        5672 :       NULLIFY (inp_info%impr_b)
     427        5672 :       NULLIFY (inp_info%impr_c)
     428        5672 :       NULLIFY (inp_info%impr_d)
     429        5672 :       NULLIFY (inp_info%impr_k)
     430        5672 :       NULLIFY (inp_info%impr_phi0)
     431        5672 :       NULLIFY (inp_info%opbend_kind)
     432        5672 :       NULLIFY (inp_info%opbend_a)
     433        5672 :       NULLIFY (inp_info%opbend_b)
     434        5672 :       NULLIFY (inp_info%opbend_c)
     435        5672 :       NULLIFY (inp_info%opbend_d)
     436        5672 :       NULLIFY (inp_info%opbend_k)
     437        5672 :       NULLIFY (inp_info%opbend_phi0)
     438        5672 :       NULLIFY (inp_info%nonbonded)
     439        5672 :       NULLIFY (inp_info%nonbonded14)
     440        5672 :       NULLIFY (inp_info%shell_list)
     441        5672 :       NULLIFY (inp_info%damping_list)
     442             : 
     443        5672 :    END SUBROUTINE init_inp_info
     444             : 
     445             : ! **************************************************************************************************
     446             : !> \brief 1. Just DEALLOCATE all the stuff
     447             : !> \param ff_type ...
     448             : ! **************************************************************************************************
     449        2639 :    SUBROUTINE deallocate_ff_type(ff_type)
     450             :       TYPE(force_field_type), INTENT(INOUT)              :: ff_type
     451             : 
     452             : !-----------------------------------------------------------------------------
     453             : ! 1. DEALLOCATE things in ff_type%inp_info
     454             : !-----------------------------------------------------------------------------
     455             : 
     456        2639 :       CALL deallocate_inp_info(ff_type%inp_info)
     457             : 
     458             :       !-----------------------------------------------------------------------------
     459             :       ! 2. DEALLOCATE things in ff_type%chm_info
     460             :       !-----------------------------------------------------------------------------
     461        2639 :       CALL deallocate_chm_info(ff_type%chm_info)
     462             : 
     463             :       !-----------------------------------------------------------------------------
     464             :       ! 3. DEALLOCATE things in ff_type%gro_info
     465             :       !-----------------------------------------------------------------------------
     466        2639 :       CALL deallocate_gromos_info(ff_type%gro_info)
     467             : 
     468             :       !-----------------------------------------------------------------------------
     469             :       ! 4. DEALLOCATE things in ff_type%amb_info
     470             :       !-----------------------------------------------------------------------------
     471        2639 :       CALL deallocate_amb_info(ff_type%amb_info)
     472             : 
     473             :       !-----------------------------------------------------------------------------
     474             :       ! 5. DEALLOCATE things in ff_type
     475             :       !-----------------------------------------------------------------------------
     476        2639 :       IF (ASSOCIATED(ff_type%inp_info)) THEN
     477        2639 :          DEALLOCATE (ff_type%inp_info)
     478             :       END IF
     479        2639 :       IF (ASSOCIATED(ff_type%chm_info)) THEN
     480        2639 :          DEALLOCATE (ff_type%chm_info)
     481             :       END IF
     482        2639 :       IF (ASSOCIATED(ff_type%gro_info)) THEN
     483        2639 :          DEALLOCATE (ff_type%gro_info)
     484             :       END IF
     485        2639 :       IF (ASSOCIATED(ff_type%amb_info)) THEN
     486        2639 :          DEALLOCATE (ff_type%amb_info)
     487             :       END IF
     488             : 
     489        2639 :    END SUBROUTINE deallocate_ff_type
     490             : 
     491             : ! **************************************************************************************************
     492             : !> \brief Specific function to deallocate the gro_info
     493             : !> \param gro_info ...
     494             : !> \author ikuo
     495             : ! **************************************************************************************************
     496        2639 :    SUBROUTINE deallocate_gromos_info(gro_info)
     497             :       TYPE(gromos_info_type), POINTER                    :: gro_info
     498             : 
     499        2639 :       IF (ASSOCIATED(gro_info%solvent_k)) THEN
     500           8 :          DEALLOCATE (gro_info%solvent_k)
     501             :       END IF
     502        2639 :       IF (ASSOCIATED(gro_info%solvent_r0)) THEN
     503           8 :          DEALLOCATE (gro_info%solvent_r0)
     504             :       END IF
     505        2639 :       IF (ASSOCIATED(gro_info%bond_k)) THEN
     506          12 :          DEALLOCATE (gro_info%bond_k)
     507             :       END IF
     508        2639 :       IF (ASSOCIATED(gro_info%bond_r0)) THEN
     509          12 :          DEALLOCATE (gro_info%bond_r0)
     510             :       END IF
     511        2639 :       IF (ASSOCIATED(gro_info%bend_k)) THEN
     512          12 :          DEALLOCATE (gro_info%bend_k)
     513             :       END IF
     514        2639 :       IF (ASSOCIATED(gro_info%bend_theta0)) THEN
     515          12 :          DEALLOCATE (gro_info%bend_theta0)
     516             :       END IF
     517        2639 :       IF (ASSOCIATED(gro_info%torsion_k)) THEN
     518          12 :          DEALLOCATE (gro_info%torsion_k)
     519             :       END IF
     520        2639 :       IF (ASSOCIATED(gro_info%torsion_m)) THEN
     521          12 :          DEALLOCATE (gro_info%torsion_m)
     522             :       END IF
     523        2639 :       IF (ASSOCIATED(gro_info%torsion_phi0)) THEN
     524          12 :          DEALLOCATE (gro_info%torsion_phi0)
     525             :       END IF
     526        2639 :       IF (ASSOCIATED(gro_info%impr_k)) THEN
     527          12 :          DEALLOCATE (gro_info%impr_k)
     528             :       END IF
     529        2639 :       IF (ASSOCIATED(gro_info%impr_phi0)) THEN
     530          12 :          DEALLOCATE (gro_info%impr_phi0)
     531             :       END IF
     532        2639 :       IF (ASSOCIATED(gro_info%nonbond_a)) THEN
     533          12 :          DEALLOCATE (gro_info%nonbond_a)
     534             :       END IF
     535        2639 :       IF (ASSOCIATED(gro_info%nonbond_c6)) THEN
     536          12 :          DEALLOCATE (gro_info%nonbond_c6)
     537             :       END IF
     538        2639 :       IF (ASSOCIATED(gro_info%nonbond_c12)) THEN
     539          12 :          DEALLOCATE (gro_info%nonbond_c12)
     540             :       END IF
     541        2639 :       IF (ASSOCIATED(gro_info%nonbond_a_14)) THEN
     542          12 :          DEALLOCATE (gro_info%nonbond_a_14)
     543             :       END IF
     544        2639 :       IF (ASSOCIATED(gro_info%nonbond_c6_14)) THEN
     545          12 :          DEALLOCATE (gro_info%nonbond_c6_14)
     546             :       END IF
     547        2639 :       IF (ASSOCIATED(gro_info%nonbond_c12_14)) THEN
     548          12 :          DEALLOCATE (gro_info%nonbond_c12_14)
     549             :       END IF
     550             : 
     551        2639 :    END SUBROUTINE deallocate_gromos_info
     552             : 
     553             : ! **************************************************************************************************
     554             : !> \brief Specific function to deallocate the chm_info
     555             : !> \param chm_info ...
     556             : !> \par History
     557             : !>      none
     558             : !> \author teo
     559             : ! **************************************************************************************************
     560        2639 :    SUBROUTINE deallocate_chm_info(chm_info)
     561             :       TYPE(charmm_info_type), POINTER                    :: chm_info
     562             : 
     563        2639 :       IF (ASSOCIATED(chm_info%bond_a)) THEN
     564         878 :          DEALLOCATE (chm_info%bond_a)
     565             :       END IF
     566        2639 :       IF (ASSOCIATED(chm_info%bond_b)) THEN
     567         878 :          DEALLOCATE (chm_info%bond_b)
     568             :       END IF
     569        2639 :       IF (ASSOCIATED(chm_info%bond_k)) THEN
     570         878 :          DEALLOCATE (chm_info%bond_k)
     571             :       END IF
     572        2639 :       IF (ASSOCIATED(chm_info%bond_r0)) THEN
     573         878 :          DEALLOCATE (chm_info%bond_r0)
     574             :       END IF
     575        2639 :       IF (ASSOCIATED(chm_info%bend_a)) THEN
     576         816 :          DEALLOCATE (chm_info%bend_a)
     577             :       END IF
     578        2639 :       IF (ASSOCIATED(chm_info%bend_b)) THEN
     579         816 :          DEALLOCATE (chm_info%bend_b)
     580             :       END IF
     581        2639 :       IF (ASSOCIATED(chm_info%bend_c)) THEN
     582         816 :          DEALLOCATE (chm_info%bend_c)
     583             :       END IF
     584        2639 :       IF (ASSOCIATED(chm_info%bend_k)) THEN
     585         816 :          DEALLOCATE (chm_info%bend_k)
     586             :       END IF
     587        2639 :       IF (ASSOCIATED(chm_info%bend_theta0)) THEN
     588         816 :          DEALLOCATE (chm_info%bend_theta0)
     589             :       END IF
     590        2639 :       IF (ASSOCIATED(chm_info%ub_a)) THEN
     591         154 :          DEALLOCATE (chm_info%ub_a)
     592             :       END IF
     593        2639 :       IF (ASSOCIATED(chm_info%ub_b)) THEN
     594         154 :          DEALLOCATE (chm_info%ub_b)
     595             :       END IF
     596        2639 :       IF (ASSOCIATED(chm_info%ub_c)) THEN
     597         154 :          DEALLOCATE (chm_info%ub_c)
     598             :       END IF
     599        2639 :       IF (ASSOCIATED(chm_info%ub_k)) THEN
     600         154 :          DEALLOCATE (chm_info%ub_k)
     601             :       END IF
     602        2639 :       IF (ASSOCIATED(chm_info%ub_r0)) THEN
     603         154 :          DEALLOCATE (chm_info%ub_r0)
     604             :       END IF
     605        2639 :       IF (ASSOCIATED(chm_info%torsion_a)) THEN
     606         356 :          DEALLOCATE (chm_info%torsion_a)
     607             :       END IF
     608        2639 :       IF (ASSOCIATED(chm_info%torsion_b)) THEN
     609         356 :          DEALLOCATE (chm_info%torsion_b)
     610             :       END IF
     611        2639 :       IF (ASSOCIATED(chm_info%torsion_c)) THEN
     612         356 :          DEALLOCATE (chm_info%torsion_c)
     613             :       END IF
     614        2639 :       IF (ASSOCIATED(chm_info%torsion_d)) THEN
     615         356 :          DEALLOCATE (chm_info%torsion_d)
     616             :       END IF
     617        2639 :       IF (ASSOCIATED(chm_info%torsion_k)) THEN
     618         356 :          DEALLOCATE (chm_info%torsion_k)
     619             :       END IF
     620        2639 :       IF (ASSOCIATED(chm_info%torsion_m)) THEN
     621         356 :          DEALLOCATE (chm_info%torsion_m)
     622             :       END IF
     623        2639 :       IF (ASSOCIATED(chm_info%torsion_phi0)) THEN
     624         356 :          DEALLOCATE (chm_info%torsion_phi0)
     625             :       END IF
     626        2639 :       IF (ASSOCIATED(chm_info%impr_a)) THEN
     627         124 :          DEALLOCATE (chm_info%impr_a)
     628             :       END IF
     629        2639 :       IF (ASSOCIATED(chm_info%impr_b)) THEN
     630         124 :          DEALLOCATE (chm_info%impr_b)
     631             :       END IF
     632        2639 :       IF (ASSOCIATED(chm_info%impr_c)) THEN
     633         124 :          DEALLOCATE (chm_info%impr_c)
     634             :       END IF
     635        2639 :       IF (ASSOCIATED(chm_info%impr_d)) THEN
     636         124 :          DEALLOCATE (chm_info%impr_d)
     637             :       END IF
     638        2639 :       IF (ASSOCIATED(chm_info%impr_k)) THEN
     639         124 :          DEALLOCATE (chm_info%impr_k)
     640             :       END IF
     641        2639 :       IF (ASSOCIATED(chm_info%impr_phi0)) THEN
     642         124 :          DEALLOCATE (chm_info%impr_phi0)
     643             :       END IF
     644        2639 :       IF (ASSOCIATED(chm_info%nonbond_a)) THEN
     645         878 :          DEALLOCATE (chm_info%nonbond_a)
     646             :       END IF
     647        2639 :       IF (ASSOCIATED(chm_info%nonbond_eps)) THEN
     648         878 :          DEALLOCATE (chm_info%nonbond_eps)
     649             :       END IF
     650        2639 :       IF (ASSOCIATED(chm_info%nonbond_rmin2)) THEN
     651         878 :          DEALLOCATE (chm_info%nonbond_rmin2)
     652             :       END IF
     653        2639 :       IF (ASSOCIATED(chm_info%nonbond_a_14)) THEN
     654         166 :          DEALLOCATE (chm_info%nonbond_a_14)
     655             :       END IF
     656        2639 :       IF (ASSOCIATED(chm_info%nonbond_eps_14)) THEN
     657         166 :          DEALLOCATE (chm_info%nonbond_eps_14)
     658             :       END IF
     659        2639 :       IF (ASSOCIATED(chm_info%nonbond_rmin2_14)) THEN
     660         166 :          DEALLOCATE (chm_info%nonbond_rmin2_14)
     661             :       END IF
     662             : 
     663        2639 :    END SUBROUTINE deallocate_chm_info
     664             : 
     665             : ! **************************************************************************************************
     666             : !> \brief Specific function to deallocate the chm_info
     667             : !> \param amb_info ...
     668             : !> \par History
     669             : !>      none
     670             : !> \author Teodoro Laino [tlaino] - University of Zurich 10.2008
     671             : ! **************************************************************************************************
     672        2639 :    SUBROUTINE deallocate_amb_info(amb_info)
     673             :       TYPE(amber_info_type), POINTER                     :: amb_info
     674             : 
     675        2639 :       IF (ASSOCIATED(amb_info%bond_a)) THEN
     676          14 :          DEALLOCATE (amb_info%bond_a)
     677             :       END IF
     678        2639 :       IF (ASSOCIATED(amb_info%bond_b)) THEN
     679          14 :          DEALLOCATE (amb_info%bond_b)
     680             :       END IF
     681        2639 :       IF (ASSOCIATED(amb_info%bond_k)) THEN
     682          14 :          DEALLOCATE (amb_info%bond_k)
     683             :       END IF
     684        2639 :       IF (ASSOCIATED(amb_info%bond_r0)) THEN
     685          14 :          DEALLOCATE (amb_info%bond_r0)
     686             :       END IF
     687        2639 :       IF (ASSOCIATED(amb_info%bend_a)) THEN
     688          14 :          DEALLOCATE (amb_info%bend_a)
     689             :       END IF
     690        2639 :       IF (ASSOCIATED(amb_info%bend_b)) THEN
     691          14 :          DEALLOCATE (amb_info%bend_b)
     692             :       END IF
     693        2639 :       IF (ASSOCIATED(amb_info%bend_c)) THEN
     694          14 :          DEALLOCATE (amb_info%bend_c)
     695             :       END IF
     696        2639 :       IF (ASSOCIATED(amb_info%bend_k)) THEN
     697          14 :          DEALLOCATE (amb_info%bend_k)
     698             :       END IF
     699        2639 :       IF (ASSOCIATED(amb_info%bend_theta0)) THEN
     700          14 :          DEALLOCATE (amb_info%bend_theta0)
     701             :       END IF
     702        2639 :       IF (ASSOCIATED(amb_info%torsion_a)) THEN
     703          14 :          DEALLOCATE (amb_info%torsion_a)
     704             :       END IF
     705        2639 :       IF (ASSOCIATED(amb_info%torsion_b)) THEN
     706          14 :          DEALLOCATE (amb_info%torsion_b)
     707             :       END IF
     708        2639 :       IF (ASSOCIATED(amb_info%torsion_c)) THEN
     709          14 :          DEALLOCATE (amb_info%torsion_c)
     710             :       END IF
     711        2639 :       IF (ASSOCIATED(amb_info%torsion_d)) THEN
     712          14 :          DEALLOCATE (amb_info%torsion_d)
     713             :       END IF
     714        2639 :       IF (ASSOCIATED(amb_info%torsion_k)) THEN
     715          14 :          DEALLOCATE (amb_info%torsion_k)
     716             :       END IF
     717        2639 :       IF (ASSOCIATED(amb_info%torsion_m)) THEN
     718          14 :          DEALLOCATE (amb_info%torsion_m)
     719             :       END IF
     720        2639 :       IF (ASSOCIATED(amb_info%torsion_phi0)) THEN
     721          14 :          DEALLOCATE (amb_info%torsion_phi0)
     722             :       END IF
     723        2639 :       IF (ASSOCIATED(amb_info%nonbond_a)) THEN
     724          14 :          DEALLOCATE (amb_info%nonbond_a)
     725             :       END IF
     726        2639 :       IF (ASSOCIATED(amb_info%nonbond_eps)) THEN
     727          14 :          DEALLOCATE (amb_info%nonbond_eps)
     728             :       END IF
     729        2639 :       IF (ASSOCIATED(amb_info%nonbond_rmin2)) THEN
     730          14 :          DEALLOCATE (amb_info%nonbond_rmin2)
     731             :       END IF
     732        2639 :       IF (ASSOCIATED(amb_info%raw_torsion_id)) THEN
     733          12 :          DEALLOCATE (amb_info%raw_torsion_id)
     734             :       END IF
     735        2639 :       IF (ASSOCIATED(amb_info%raw_torsion_k)) THEN
     736          12 :          DEALLOCATE (amb_info%raw_torsion_k)
     737             :       END IF
     738        2639 :       IF (ASSOCIATED(amb_info%raw_torsion_m)) THEN
     739          12 :          DEALLOCATE (amb_info%raw_torsion_m)
     740             :       END IF
     741        2639 :       IF (ASSOCIATED(amb_info%raw_torsion_phi0)) THEN
     742          12 :          DEALLOCATE (amb_info%raw_torsion_phi0)
     743             :       END IF
     744             : 
     745        2639 :    END SUBROUTINE deallocate_amb_info
     746             : 
     747             : ! **************************************************************************************************
     748             : !> \brief Specific function to deallocate the inp_info
     749             : !> \param inp_info ...
     750             : !> \par History
     751             : !>      none
     752             : !> \author teo
     753             : ! **************************************************************************************************
     754        5672 :    SUBROUTINE deallocate_inp_info(inp_info)
     755             :       TYPE(input_info_type), POINTER                     :: inp_info
     756             : 
     757             :       INTEGER                                            :: i
     758             : 
     759        5672 :       IF (ASSOCIATED(inp_info%charge_atm)) THEN
     760        2079 :          DEALLOCATE (inp_info%charge_atm)
     761             :       END IF
     762        5672 :       IF (ASSOCIATED(inp_info%charge)) THEN
     763        2079 :          DEALLOCATE (inp_info%charge)
     764             :       END IF
     765        5672 :       IF (ASSOCIATED(inp_info%apol_atm)) THEN
     766          34 :          DEALLOCATE (inp_info%apol_atm)
     767             :       END IF
     768        5672 :       IF (ASSOCIATED(inp_info%apol)) THEN
     769          34 :          DEALLOCATE (inp_info%apol)
     770             :       END IF
     771        5672 :       IF (ASSOCIATED(inp_info%cpol_atm)) THEN
     772           0 :          DEALLOCATE (inp_info%cpol_atm)
     773             :       END IF
     774        5672 :       IF (ASSOCIATED(inp_info%cpol)) THEN
     775           0 :          DEALLOCATE (inp_info%cpol)
     776             :       END IF
     777        5672 :       IF (ASSOCIATED(inp_info%bond_kind)) THEN
     778         975 :          DEALLOCATE (inp_info%bond_kind)
     779             :       END IF
     780        5672 :       IF (ASSOCIATED(inp_info%bond_a)) THEN
     781         975 :          DEALLOCATE (inp_info%bond_a)
     782             :       END IF
     783        5672 :       IF (ASSOCIATED(inp_info%bond_b)) THEN
     784         975 :          DEALLOCATE (inp_info%bond_b)
     785             :       END IF
     786        5672 :       IF (ASSOCIATED(inp_info%bond_k)) THEN
     787         975 :          DEALLOCATE (inp_info%bond_k)
     788             :       END IF
     789        5672 :       IF (ASSOCIATED(inp_info%bond_r0)) THEN
     790         975 :          DEALLOCATE (inp_info%bond_r0)
     791             :       END IF
     792        5672 :       IF (ASSOCIATED(inp_info%bond_cs)) THEN
     793         975 :          DEALLOCATE (inp_info%bond_cs)
     794             :       END IF
     795        5672 :       IF (ASSOCIATED(inp_info%bend_kind)) THEN
     796         939 :          DEALLOCATE (inp_info%bend_kind)
     797             :       END IF
     798        5672 :       IF (ASSOCIATED(inp_info%bend_a)) THEN
     799         939 :          DEALLOCATE (inp_info%bend_a)
     800             :       END IF
     801        5672 :       IF (ASSOCIATED(inp_info%bend_b)) THEN
     802         939 :          DEALLOCATE (inp_info%bend_b)
     803             :       END IF
     804        5672 :       IF (ASSOCIATED(inp_info%bend_c)) THEN
     805         939 :          DEALLOCATE (inp_info%bend_c)
     806             :       END IF
     807        5672 :       IF (ASSOCIATED(inp_info%bend_k)) THEN
     808         939 :          DEALLOCATE (inp_info%bend_k)
     809             :       END IF
     810        5672 :       IF (ASSOCIATED(inp_info%bend_theta0)) THEN
     811         939 :          DEALLOCATE (inp_info%bend_theta0)
     812             :       END IF
     813        5672 :       IF (ASSOCIATED(inp_info%bend_legendre)) THEN
     814        3058 :          DO i = 1, SIZE(inp_info%bend_legendre)
     815        3058 :             IF (ASSOCIATED(inp_info%bend_legendre(i)%coeffs)) THEN
     816        2119 :                DEALLOCATE (inp_info%bend_legendre(i)%coeffs)
     817        2119 :                NULLIFY (inp_info%bend_legendre(i)%coeffs)
     818             :             END IF
     819             :          END DO
     820         939 :          DEALLOCATE (inp_info%bend_legendre)
     821         939 :          NULLIFY (inp_info%bend_legendre)
     822             :       END IF
     823        5672 :       IF (ASSOCIATED(inp_info%bend_cb)) THEN
     824         939 :          DEALLOCATE (inp_info%bend_cb)
     825             :       END IF
     826        5672 :       IF (ASSOCIATED(inp_info%bend_r012)) THEN
     827         939 :          DEALLOCATE (inp_info%bend_r012)
     828             :       END IF
     829        5672 :       IF (ASSOCIATED(inp_info%bend_r032)) THEN
     830         939 :          DEALLOCATE (inp_info%bend_r032)
     831             :       END IF
     832        5672 :       IF (ASSOCIATED(inp_info%bend_kbs12)) THEN
     833         939 :          DEALLOCATE (inp_info%bend_kbs12)
     834             :       END IF
     835        5672 :       IF (ASSOCIATED(inp_info%bend_kbs32)) THEN
     836         939 :          DEALLOCATE (inp_info%bend_kbs32)
     837             :       END IF
     838        5672 :       IF (ASSOCIATED(inp_info%bend_kss)) THEN
     839         939 :          DEALLOCATE (inp_info%bend_kss)
     840             :       END IF
     841        5672 :       IF (ASSOCIATED(inp_info%ub_kind)) THEN
     842         939 :          DEALLOCATE (inp_info%ub_kind)
     843             :       END IF
     844        5672 :       IF (ASSOCIATED(inp_info%ub_a)) THEN
     845         939 :          DEALLOCATE (inp_info%ub_a)
     846             :       END IF
     847        5672 :       IF (ASSOCIATED(inp_info%ub_b)) THEN
     848         939 :          DEALLOCATE (inp_info%ub_b)
     849             :       END IF
     850        5672 :       IF (ASSOCIATED(inp_info%ub_c)) THEN
     851         939 :          DEALLOCATE (inp_info%ub_c)
     852             :       END IF
     853        5672 :       IF (ASSOCIATED(inp_info%ub_k)) THEN
     854         939 :          DEALLOCATE (inp_info%ub_k)
     855             :       END IF
     856        5672 :       IF (ASSOCIATED(inp_info%ub_r0)) THEN
     857         939 :          DEALLOCATE (inp_info%ub_r0)
     858             :       END IF
     859        5672 :       IF (ASSOCIATED(inp_info%torsion_kind)) THEN
     860           6 :          DEALLOCATE (inp_info%torsion_kind)
     861             :       END IF
     862        5672 :       IF (ASSOCIATED(inp_info%torsion_a)) THEN
     863           6 :          DEALLOCATE (inp_info%torsion_a)
     864             :       END IF
     865        5672 :       IF (ASSOCIATED(inp_info%torsion_b)) THEN
     866           6 :          DEALLOCATE (inp_info%torsion_b)
     867             :       END IF
     868        5672 :       IF (ASSOCIATED(inp_info%torsion_c)) THEN
     869           6 :          DEALLOCATE (inp_info%torsion_c)
     870             :       END IF
     871        5672 :       IF (ASSOCIATED(inp_info%torsion_d)) THEN
     872           6 :          DEALLOCATE (inp_info%torsion_d)
     873             :       END IF
     874        5672 :       IF (ASSOCIATED(inp_info%torsion_k)) THEN
     875           6 :          DEALLOCATE (inp_info%torsion_k)
     876             :       END IF
     877        5672 :       IF (ASSOCIATED(inp_info%torsion_m)) THEN
     878           6 :          DEALLOCATE (inp_info%torsion_m)
     879             :       END IF
     880        5672 :       IF (ASSOCIATED(inp_info%torsion_phi0)) THEN
     881           6 :          DEALLOCATE (inp_info%torsion_phi0)
     882             :       END IF
     883        5672 :       IF (ASSOCIATED(inp_info%impr_kind)) THEN
     884           8 :          DEALLOCATE (inp_info%impr_kind)
     885             :       END IF
     886        5672 :       IF (ASSOCIATED(inp_info%impr_a)) THEN
     887           8 :          DEALLOCATE (inp_info%impr_a)
     888             :       END IF
     889        5672 :       IF (ASSOCIATED(inp_info%impr_b)) THEN
     890           8 :          DEALLOCATE (inp_info%impr_b)
     891             :       END IF
     892        5672 :       IF (ASSOCIATED(inp_info%impr_c)) THEN
     893           8 :          DEALLOCATE (inp_info%impr_c)
     894             :       END IF
     895        5672 :       IF (ASSOCIATED(inp_info%impr_d)) THEN
     896           8 :          DEALLOCATE (inp_info%impr_d)
     897             :       END IF
     898        5672 :       IF (ASSOCIATED(inp_info%impr_k)) THEN
     899           8 :          DEALLOCATE (inp_info%impr_k)
     900             :       END IF
     901        5672 :       IF (ASSOCIATED(inp_info%impr_phi0)) THEN
     902           8 :          DEALLOCATE (inp_info%impr_phi0)
     903             :       END IF
     904        5672 :       IF (ASSOCIATED(inp_info%opbend_kind)) THEN
     905           2 :          DEALLOCATE (inp_info%opbend_kind)
     906             :       END IF
     907        5672 :       IF (ASSOCIATED(inp_info%opbend_a)) THEN
     908           2 :          DEALLOCATE (inp_info%opbend_a)
     909             :       END IF
     910        5672 :       IF (ASSOCIATED(inp_info%opbend_b)) THEN
     911           2 :          DEALLOCATE (inp_info%opbend_b)
     912             :       END IF
     913        5672 :       IF (ASSOCIATED(inp_info%opbend_c)) THEN
     914           2 :          DEALLOCATE (inp_info%opbend_c)
     915             :       END IF
     916        5672 :       IF (ASSOCIATED(inp_info%opbend_d)) THEN
     917           2 :          DEALLOCATE (inp_info%opbend_d)
     918             :       END IF
     919        5672 :       IF (ASSOCIATED(inp_info%opbend_k)) THEN
     920           2 :          DEALLOCATE (inp_info%opbend_k)
     921             :       END IF
     922        5672 :       IF (ASSOCIATED(inp_info%opbend_phi0)) THEN
     923           2 :          DEALLOCATE (inp_info%opbend_phi0)
     924             :       END IF
     925        5672 :       IF (ASSOCIATED(inp_info%nonbonded)) THEN
     926        1755 :          CALL pair_potential_p_release(inp_info%nonbonded)
     927             :       END IF
     928        5672 :       IF (ASSOCIATED(inp_info%nonbonded14)) THEN
     929         274 :          CALL pair_potential_p_release(inp_info%nonbonded14)
     930             :       END IF
     931        5672 :       IF (ASSOCIATED(inp_info%shell_list)) THEN
     932         258 :          CALL shell_p_release(inp_info%shell_list)
     933             :       END IF
     934        5672 :       IF (ASSOCIATED(inp_info%damping_list)) THEN
     935          10 :          DEALLOCATE (inp_info%damping_list)
     936             :       END IF
     937             : 
     938        5672 :    END SUBROUTINE deallocate_inp_info
     939             : 
     940           0 : END MODULE force_field_types

Generated by: LCOV version 1.15