opb_init Subroutine

public subroutine opb_init(bds, n, opbtype)

Uses

  • proc~~opb_init~~UsesGraph proc~opb_init opb_init module~mod_io mod_io proc~opb_init->module~mod_io module~mod_constants mod_constants proc~opb_init->module~mod_constants module~mod_memory mod_memory proc~opb_init->module~mod_memory module~mod_io->module~mod_constants iso_c_binding iso_c_binding module~mod_constants->iso_c_binding module~mod_memory->module~mod_io module~mod_memory->module~mod_constants module~mod_memory->iso_c_binding

Initialize arrays for out-of-plane bending potential calculation.

Arguments

Type IntentOptional Attributes Name
type(ommp_bonded_type), intent(inout) :: bds
integer(kind=ip) :: n

Number of out of plane Bending functions in the potential energy of the system

character(len=*) :: opbtype

Calls

proc~~opb_init~~CallsGraph proc~opb_init opb_init proc~fatal_error fatal_error proc~opb_init->proc~fatal_error proc~ommp_message ommp_message proc~opb_init->proc~ommp_message interface~mallocate mallocate proc~opb_init->interface~mallocate proc~fatal_error->proc~ommp_message proc~close_output close_output proc~fatal_error->proc~close_output proc~r_alloc3 r_alloc3 interface~mallocate->proc~r_alloc3 proc~i_alloc2 i_alloc2 interface~mallocate->proc~i_alloc2 proc~i_alloc1 i_alloc1 interface~mallocate->proc~i_alloc1 proc~r_alloc1 r_alloc1 interface~mallocate->proc~r_alloc1 proc~r_alloc2 r_alloc2 interface~mallocate->proc~r_alloc2 proc~i_alloc3 i_alloc3 interface~mallocate->proc~i_alloc3 proc~l_alloc1 l_alloc1 interface~mallocate->proc~l_alloc1 proc~l_alloc2 l_alloc2 interface~mallocate->proc~l_alloc2 proc~close_output->proc~ommp_message proc~memory_init memory_init proc~r_alloc3->proc~memory_init proc~chk_alloc chk_alloc proc~r_alloc3->proc~chk_alloc proc~i_alloc2->proc~memory_init proc~i_alloc2->proc~chk_alloc proc~i_alloc1->proc~memory_init proc~i_alloc1->proc~chk_alloc proc~r_alloc1->proc~memory_init proc~r_alloc1->proc~chk_alloc proc~r_alloc2->proc~memory_init proc~r_alloc2->proc~chk_alloc proc~i_alloc3->proc~memory_init proc~i_alloc3->proc~chk_alloc proc~l_alloc1->proc~memory_init proc~l_alloc1->proc~chk_alloc proc~l_alloc2->proc~memory_init proc~l_alloc2->proc~chk_alloc proc~chk_alloc->proc~fatal_error

Called by

proc~~opb_init~~CalledByGraph proc~opb_init opb_init proc~assign_opb assign_opb proc~assign_opb->proc~opb_init proc~mmpol_init_from_xyz mmpol_init_from_xyz proc~mmpol_init_from_xyz->proc~assign_opb proc~ommp_system_from_qm_helper ommp_system_from_qm_helper proc~ommp_system_from_qm_helper->proc~assign_opb proc~ommp_init_xyz ommp_init_xyz proc~ommp_init_xyz->proc~mmpol_init_from_xyz proc~c_ommp_system_from_qm_helper C_ommp_system_from_qm_helper proc~c_ommp_system_from_qm_helper->proc~ommp_system_from_qm_helper proc~c_ommp_init_xyz C_ommp_init_xyz proc~c_ommp_init_xyz->proc~ommp_init_xyz

Contents

Source Code


Source Code

    subroutine opb_init(bds, n, opbtype)
        !! Initialize arrays for out-of-plane bending potential calculation.   
        !! @todo Currently only Allinger functional form is supported 
        use mod_io, only: ommp_message
        use mod_constants, only: OMMP_VERBOSE_LOW
        use mod_memory, only: mallocate

        implicit none

        type(ommp_bonded_type), intent(inout) :: bds
        ! Bonded potential data structure
        integer(ip) :: n
        !! Number of out of plane Bending functions in the potential
        !! energy of the system
        character(len=*) :: opbtype

        select case(opbtype)
            case('allinger')
                continue
            case('w-d-c')
                call fatal_error('Out-of-plane bend W-D-C is not implemented')
            case default
                call ommp_message("Found OPB type: '"//opbtype//"'", OMMP_VERBOSE_LOW)
                call fatal_error('Out-of-plane type specified is not understood')
        end select

        if( n < 1 ) return
        bds%use_opb = .true.

        call mallocate('opb_init [opbat]', 4_ip, n, bds%opbat)
        call mallocate('opb_init [kopb]', n, bds%kopb)
        bds%nopb = n

    end subroutine opb_init