get_structure_reader Subroutine

public subroutine get_structure_reader(reader, ftype)

Retrieve reader for corresponding file type

Arguments

Type IntentOptional Attributes Name
procedure(structure_reader), intent(out), pointer :: reader

Reader for the specified file type

integer, intent(in) :: ftype

File type to read


Source Code

subroutine get_structure_reader(reader, ftype)

   !> Reader for the specified file type
   procedure(structure_reader), pointer, intent(out) :: reader

   !> File type to read
   integer, intent(in) :: ftype

   nullify(reader)

   select case(ftype)
   case(filetype%xyz)
      reader => read_xyz

   case(filetype%molfile)
      reader => read_molfile

   case(filetype%qcschema)
      reader => read_qcschema

   case(filetype%cjson)
      reader => read_cjson

   case(filetype%pdb)
      reader => read_pdb

   case(filetype%gen)
      reader => read_genformat

   case(filetype%sdf)
      reader => read_sdf

   case(filetype%vasp)
      reader => read_vasp

   case(filetype%tmol)
      reader => read_coord

   case(filetype%gaussian)
      reader => read_gaussian_external

   case(filetype%aims)
      reader => read_aims

   case(filetype%qchem)
      reader => read_qchem

   end select

end subroutine get_structure_reader