Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Fallback to coord input if format is unknown #594

Merged
merged 1 commit into from
Mar 2, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions src/io/reader.f90
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,11 @@ subroutine readMolecule(env, mol, unit, ftype)

type(structure_type) :: struc
type(error_type), allocatable :: error
integer :: ft

call read_structure(struc, unit, ftype, error)

ft = merge(filetype%tmol, ftype, ftype == filetype%unknown)
call read_structure(struc, unit, ft, error)
if (allocated(error)) then
call env%error(error%message)
return
Expand Down Expand Up @@ -90,7 +93,7 @@ subroutine readMolecule(env, mol, unit, ftype)
end if

mol = struc
mol%ftype = ftype
mol%ftype = ft

end subroutine readMolecule

Expand Down