!  Copyright (C) 2017 The authors of Py-ChemShell
!
!  This file is part of Py-ChemShell.
!
!  Py-ChemShell is free software: you can redistribute it and/or modify
!  it under the terms of the GNU Lesser General Public License as
!  published by the Free Software Foundation, either version 3 of the
!  License, or (at your option) any later version.
!
!  Py-ChemShell is distributed in the hope that it will be useful,
!  but WITHOUT ANY WARRANTY; without even the implied warranty of
!  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
!  GNU Lesser General Public License for more details.
!
!  You should have received a copy of the GNU Lesser General Public
!  License along with Py-ChemShell.  If not, see
!  <http://www.gnu.org/licenses/>.

module gulp_datatypes
    integer, parameter :: i4 = selected_int_kind(5)
    integer, parameter :: dp = kind(1.0d0)
endmodule

! Dummy routines to link against a library that 
! support ChemShell builds

!----------------------------------------------------------------      
subroutine getGulpFileNames(input, output, len)

    use gulp_datatypes
  
    implicit none
  
    character(*), intent(out) :: input
    character(*), intent(out) :: output
    integer(i4) , intent(in)  :: len
  
    ! TODO remove hardwired names, take from interface options instead
    input  = "_gulp.gin"
    output = "_gulp.gout"
  
endsubroutine getGulpFileNames
!----------------------------------------------------------------      

!----------------------------------------------------------------    
! do not get confused: here "root" does not refer to the "root" in Py-ChemShell task farming (see NWChem interface)
logical function opc_root() result(result)

  use ChemShellParallelModule, only : chemsh_parallel

  implicit none

  result = chemsh_parallel%is_root()

endfunction opc_root
!----------------------------------------------------------------      
