write_molfile Subroutine

public subroutine write_molfile(self, unit, comment_line)

Write molecular structure data to a molfile

Arguments

Type IntentOptional Attributes Name
class(structure_type), intent(in) :: self

Instance of the molecular structure data

integer, intent(in) :: unit

File handle

character(len=*), intent(in), optional :: comment_line

Optional comment line


Source Code

subroutine write_molfile(self, unit, comment_line)
   !> Instance of the molecular structure data
   class(structure_type), intent(in) :: self
   !> File handle
   integer, intent(in) :: unit
   !> Optional comment line
   character(len=*), intent(in), optional :: comment_line

   ! Switch to V3000 format if we exceed V2000 limits
   if (self%nat > v2k_max .or. self%nbd > v2k_max) then
      call write_molfile_v3k(self, unit, comment_line)
   else
      call write_molfile_v2k(self, unit, comment_line)
   end if

end subroutine write_molfile