{"action":"created","comment":{"url":"https://api.github.com/repos/dftbplus/dftbplus/pulls/comments/175903112","pull_request_review_id":105512498,"id":175903112,"diff_hunk":"@@ -0,0 +1,243 @@\n+!--------------------------------------------------------------------------------------------------!\n+!  DFTB+: general package for performing fast atomistic simulations                                !\n+!  Copyright (C) 2017  DFTB+ developers group                                                      !\n+!                                                                                                  !\n+!  See the LICENSE file for terms of usage and distribution.                                       !\n+!--------------------------------------------------------------------------------------------------!\n+\n+#:include 'common.fypp'\n+\n+!> H5 H-bond correction. Scales the gamma function at short-range\n+!> in pairs of hydrogen and an H-bond acceptor element.\n+!> See http://dx.doi.org/10.1021/acs.jctc.7b00629 for details.\n+module h5correction\n+  use accuracy\n+  implicit none\n+  private\n+\n+  public :: H5Corr, H5Corr_init\n+\n+  !> Internal data of the H5 correction\n+  type :: H5Corr\n+    !> Global parameters\n+    real(dp) :: rScale, wScale\n+    !> Nr. of rpecies\n+    integer :: nSpecies\n+    !> Species names for H5 correction\n+    character(mc), allocatable :: speciesName(:)\n+    !> Elementwise parameters for species\n+    real(dp), allocatable :: elementPara(:)\n+\n+  contains\n+\n+    procedure :: printH5Setup\n+    procedure :: getParams\n+    procedure :: scaleShortGamma\n+    procedure :: scaleShortGammaDeriv\n+\n+  end type H5Corr\n+\n+contains\n+\n+  !> Initialization of a H5Corr instance.\n+  subroutine H5Corr_init(this, nType, typeNames, r, w, elePara)\n+    !> Initialised instance at return.\n+    type(H5Corr), intent(out) :: this\n+    !> Number of atom types/species\n+    integer, intent(in) :: nType\n+    !> Names of the species\n+    character(mc), allocatable, intent(in) :: typeNames(:)\n+    !> r - global parameter\n+    real(dp), intent(in) :: r\n+    !> w - global parameter\n+    real(dp), intent(in) :: w\n+    !> elementwise scaling factors\n+    real(dp), allocatable :: elePara(:)\n+\n+    ! Local vars\n+    integer :: iSp\n+\n+    ! Save system information used by H5\n+    this%nSpecies = nType\n+    this%speciesName = typeNames\n+\n+    ! Save H5 parameters\n+    this%rScale = r\n+    this%wScale = w\n+    this%elementPara = elePara\n+\n+    ! Initialize the parameters\n+    ! If value of the parameter is -1.0, it was not read from the input,\n+    ! and default value will be used\n+    if (this%rScale == -1.0_dp) then\n+            this%rScale = 0.714_dp\n+    end if\n+\n+    if (this%wScale == -1.0_dp) then\n+            this%wScale = 0.25_dp\n+    end if\n+\n+    do iSp = 1, this%nSpecies\n+      if (this%elementPara(iSp) == -1.0_dp) then\n+        ! Default values taken from the paper for O,N and S, zero for other elements\n+        if (this%speciesName(iSp) == \"O\") then\n+          this%elementPara(iSp) =  0.06_dp\n+        else if (this%speciesName(iSp) == \"N\") then\n+          this%elementPara(iSp) = 0.18_dp\n+        else if (this%speciesName(iSp) == \"S\") then\n+          this%elementPara(iSp) =  0.21_dp\n+        else\n+          this%elementPara(iSp) = 0.0_dp\n+        end if\n+      end if\n+    end do\n+\n+  end subroutine H5Corr_init\n+\n+  !> Print all the parameters for debugging\n+  subroutine printH5Setup(this)\n+    ! Arguments\n+    class(H5Corr), intent(in) :: this\n+    ! Local variables\n+    integer :: iSp1\n+\n+     write(37,*) \"H5 setup:\"","path":"prog/dftb+/lib_dftb/h5correction.F90","position":104,"original_position":104,"commit_id":"7c4eb4bf883ac7459c1bed5e5ee6615dd5d48729","original_commit_id":"7c4eb4bf883ac7459c1bed5e5ee6615dd5d48729","user":{"login":"bhourahine","id":9715491,"avatar_url":"https://avatars3.githubusercontent.com/u/9715491?v=4","gravatar_id":"","url":"https://api.github.com/users/bhourahine","html_url":"https://github.com/bhourahine","followers_url":"https://api.github.com/users/bhourahine/followers","following_url":"https://api.github.com/users/bhourahine/following{/other_user}","gists_url":"https://api.github.com/users/bhourahine/gists{/gist_id}","starred_url":"https://api.github.com/users/bhourahine/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bhourahine/subscriptions","organizations_url":"https://api.github.com/users/bhourahine/orgs","repos_url":"https://api.github.com/users/bhourahine/repos","events_url":"https://api.github.com/users/bhourahine/events{/privacy}","received_events_url":"https://api.github.com/users/bhourahine/received_events","type":"User","site_admin":false},"body":"Specific number units may cause problems, please use the newunit feature of Fortran 2008 (or set an id in the same way the main code opens files).","created_at":"2018-03-20T19:58:36Z","updated_at":"2018-03-20T19:58:36Z","html_url":"https://github.com/dftbplus/dftbplus/pull/125#discussion_r175903112","pull_request_url":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/dftbplus/dftbplus/pulls/comments/175903112"},"html":{"href":"https://github.com/dftbplus/dftbplus/pull/125#discussion_r175903112"},"pull_request":{"href":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125"}}},"pull_request":{"url":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125","id":175943552,"html_url":"https://github.com/dftbplus/dftbplus/pull/125","diff_url":"https://github.com/dftbplus/dftbplus/pull/125.diff","patch_url":"https://github.com/dftbplus/dftbplus/pull/125.patch","issue_url":"https://api.github.com/repos/dftbplus/dftbplus/issues/125","number":125,"state":"open","locked":false,"title":"H5 correction","user":{"login":"Honza-R","id":12073173,"avatar_url":"https://avatars0.githubusercontent.com/u/12073173?v=4","gravatar_id":"","url":"https://api.github.com/users/Honza-R","html_url":"https://github.com/Honza-R","followers_url":"https://api.github.com/users/Honza-R/followers","following_url":"https://api.github.com/users/Honza-R/following{/other_user}","gists_url":"https://api.github.com/users/Honza-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Honza-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Honza-R/subscriptions","organizations_url":"https://api.github.com/users/Honza-R/orgs","repos_url":"https://api.github.com/users/Honza-R/repos","events_url":"https://api.github.com/users/Honza-R/events{/privacy}","received_events_url":"https://api.github.com/users/Honza-R/received_events","type":"User","site_admin":false},"body":"Implementation of the H5 correction for hydrogen bonds, and the associated small modification of the D3 dispersion allowing complete DFTB3-D3H5 calculations. Comes with tests and description of the input in the manual.","created_at":"2018-03-19T15:53:07Z","updated_at":"2018-03-20T19:58:36Z","closed_at":null,"merged_at":null,"merge_commit_sha":"bf90216fff5e29b3d18b6a4bb700025fb5567a73","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125/commits","review_comments_url":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125/comments","review_comment_url":"https://api.github.com/repos/dftbplus/dftbplus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/dftbplus/dftbplus/issues/125/comments","statuses_url":"https://api.github.com/repos/dftbplus/dftbplus/statuses/7c4eb4bf883ac7459c1bed5e5ee6615dd5d48729","head":{"label":"Honza-R:h5_correction","ref":"h5_correction","sha":"7c4eb4bf883ac7459c1bed5e5ee6615dd5d48729","user":{"login":"Honza-R","id":12073173,"avatar_url":"https://avatars0.githubusercontent.com/u/12073173?v=4","gravatar_id":"","url":"https://api.github.com/users/Honza-R","html_url":"https://github.com/Honza-R","followers_url":"https://api.github.com/users/Honza-R/followers","following_url":"https://api.github.com/users/Honza-R/following{/other_user}","gists_url":"https://api.github.com/users/Honza-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Honza-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Honza-R/subscriptions","organizations_url":"https://api.github.com/users/Honza-R/orgs","repos_url":"https://api.github.com/users/Honza-R/repos","events_url":"https://api.github.com/users/Honza-R/events{/privacy}","received_events_url":"https://api.github.com/users/Honza-R/received_events","type":"User","site_admin":false},"repo":{"id":124508916,"name":"dftbplus","full_name":"Honza-R/dftbplus","owner":{"login":"Honza-R","id":12073173,"avatar_url":"https://avatars0.githubusercontent.com/u/12073173?v=4","gravatar_id":"","url":"https://api.github.com/users/Honza-R","html_url":"https://github.com/Honza-R","followers_url":"https://api.github.com/users/Honza-R/followers","following_url":"https://api.github.com/users/Honza-R/following{/other_user}","gists_url":"https://api.github.com/users/Honza-R/gists{/gist_id}","starred_url":"https://api.github.com/users/Honza-R/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Honza-R/subscriptions","organizations_url":"https://api.github.com/users/Honza-R/orgs","repos_url":"https://api.github.com/users/Honza-R/repos","events_url":"https://api.github.com/users/Honza-R/events{/privacy}","received_events_url":"https://api.github.com/users/Honza-R/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/Honza-R/dftbplus","description":"DFTB+ general package for performing fast atomistic simulations","fork":true,"url":"https://api.github.com/repos/Honza-R/dftbplus","forks_url":"https://api.github.com/repos/Honza-R/dftbplus/forks","keys_url":"https://api.github.com/repos/Honza-R/dftbplus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Honza-R/dftbplus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Honza-R/dftbplus/teams","hooks_url":"https://api.github.com/repos/Honza-R/dftbplus/hooks","issue_events_url":"https://api.github.com/repos/Honza-R/dftbplus/issues/events{/number}","events_url":"https://api.github.com/repos/Honza-R/dftbplus/events","assignees_url":"https://api.github.com/repos/Honza-R/dftbplus/assignees{/user}","branches_url":"https://api.github.com/repos/Honza-R/dftbplus/branches{/branch}","tags_url":"https://api.github.com/repos/Honza-R/dftbplus/tags","blobs_url":"https://api.github.com/repos/Honza-R/dftbplus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Honza-R/dftbplus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Honza-R/dftbplus/git/refs{/sha}","trees_url":"https://api.github.com/repos/Honza-R/dftbplus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Honza-R/dftbplus/statuses/{sha}","languages_url":"https://api.github.com/repos/Honza-R/dftbplus/languages","stargazers_url":"https://api.github.com/repos/Honza-R/dftbplus/stargazers","contributors_url":"https://api.github.com/repos/Honza-R/dftbplus/contributors","subscribers_url":"https://api.github.com/repos/Honza-R/dftbplus/subscribers","subscription_url":"https://api.github.com/repos/Honza-R/dftbplus/subscription","commits_url":"https://api.github.com/repos/Honza-R/dftbplus/commits{/sha}","git_commits_url":"https://api.github.com/repos/Honza-R/dftbplus/git/commits{/sha}","comments_url":"https://api.github.com/repos/Honza-R/dftbplus/comments{/number}","issue_comment_url":"https://api.github.com/repos/Honza-R/dftbplus/issues/comments{/number}","contents_url":"https://api.github.com/repos/Honza-R/dftbplus/contents/{+path}","compare_url":"https://api.github.com/repos/Honza-R/dftbplus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Honza-R/dftbplus/merges","archive_url":"https://api.github.com/repos/Honza-R/dftbplus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Honza-R/dftbplus/downloads","issues_url":"https://api.github.com/repos/Honza-R/dftbplus/issues{/number}","pulls_url":"https://api.github.com/repos/Honza-R/dftbplus/pulls{/number}","milestones_url":"https://api.github.com/repos/Honza-R/dftbplus/milestones{/number}","notifications_url":"https://api.github.com/repos/Honza-R/dftbplus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Honza-R/dftbplus/labels{/name}","releases_url":"https://api.github.com/repos/Honza-R/dftbplus/releases{/id}","deployments_url":"https://api.github.com/repos/Honza-R/dftbplus/deployments","created_at":"2018-03-09T08:08:36Z","updated_at":"2018-03-19T14:12:28Z","pushed_at":"2018-03-19T15:49:11Z","git_url":"git://github.com/Honza-R/dftbplus.git","ssh_url":"git@github.com:Honza-R/dftbplus.git","clone_url":"https://github.com/Honza-R/dftbplus.git","svn_url":"https://github.com/Honza-R/dftbplus","homepage":"http://www.dftbplus.org","size":3281,"stargazers_count":0,"watchers_count":0,"language":"Fortran","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"dftbplus:master","ref":"master","sha":"3b5064479bc2a0ecfa4169f8e7b9609e3342f8b5","user":{"login":"dftbplus","id":24522763,"avatar_url":"https://avatars1.githubusercontent.com/u/24522763?v=4","gravatar_id":"","url":"https://api.github.com/users/dftbplus","html_url":"https://github.com/dftbplus","followers_url":"https://api.github.com/users/dftbplus/followers","following_url":"https://api.github.com/users/dftbplus/following{/other_user}","gists_url":"https://api.github.com/users/dftbplus/gists{/gist_id}","starred_url":"https://api.github.com/users/dftbplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dftbplus/subscriptions","organizations_url":"https://api.github.com/users/dftbplus/orgs","repos_url":"https://api.github.com/users/dftbplus/repos","events_url":"https://api.github.com/users/dftbplus/events{/privacy}","received_events_url":"https://api.github.com/users/dftbplus/received_events","type":"Organization","site_admin":false},"repo":{"id":93144454,"name":"dftbplus","full_name":"dftbplus/dftbplus","owner":{"login":"dftbplus","id":24522763,"avatar_url":"https://avatars1.githubusercontent.com/u/24522763?v=4","gravatar_id":"","url":"https://api.github.com/users/dftbplus","html_url":"https://github.com/dftbplus","followers_url":"https://api.github.com/users/dftbplus/followers","following_url":"https://api.github.com/users/dftbplus/following{/other_user}","gists_url":"https://api.github.com/users/dftbplus/gists{/gist_id}","starred_url":"https://api.github.com/users/dftbplus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dftbplus/subscriptions","organizations_url":"https://api.github.com/users/dftbplus/orgs","repos_url":"https://api.github.com/users/dftbplus/repos","events_url":"https://api.github.com/users/dftbplus/events{/privacy}","received_events_url":"https://api.github.com/users/dftbplus/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/dftbplus/dftbplus","description":"DFTB+ general package for performing fast atomistic simulations","fork":false,"url":"https://api.github.com/repos/dftbplus/dftbplus","forks_url":"https://api.github.com/repos/dftbplus/dftbplus/forks","keys_url":"https://api.github.com/repos/dftbplus/dftbplus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/dftbplus/dftbplus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/dftbplus/dftbplus/teams","hooks_url":"https://api.github.com/repos/dftbplus/dftbplus/hooks","issue_events_url":"https://api.github.com/repos/dftbplus/dftbplus/issues/events{/number}","events_url":"https://api.github.com/repos/dftbplus/dftbplus/events","assignees_url":"https://api.github.com/repos/dftbplus/dftbplus/assignees{/user}","branches_url":"https://api.github.com/repos/dftbplus/dftbplus/branches{/branch}","tags_url":"https://api.github.com/repos/dftbplus/dftbplus/tags","blobs_url":"https://api.github.com/repos/dftbplus/dftbplus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/dftbplus/dftbplus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/dftbplus/dftbplus/git/refs{/sha}","trees_url":"https://api.github.com/repos/dftbplus/dftbplus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/dftbplus/dftbplus/statuses/{sha}","languages_url":"https://api.github.com/repos/dftbplus/dftbplus/languages","stargazers_url":"https://api.github.com/repos/dftbplus/dftbplus/stargazers","contributors_url":"https://api.github.com/repos/dftbplus/dftbplus/contributors","subscribers_url":"https://api.github.com/repos/dftbplus/dftbplus/subscribers","subscription_url":"https://api.github.com/repos/dftbplus/dftbplus/subscription","commits_url":"https://api.github.com/repos/dftbplus/dftbplus/commits{/sha}","git_commits_url":"https://api.github.com/repos/dftbplus/dftbplus/git/commits{/sha}","comments_url":"https://api.github.com/repos/dftbplus/dftbplus/comments{/number}","issue_comment_url":"https://api.github.com/repos/dftbplus/dftbplus/issues/comments{/number}","contents_url":"https://api.github.com/repos/dftbplus/dftbplus/contents/{+path}","compare_url":"https://api.github.com/repos/dftbplus/dftbplus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/dftbplus/dftbplus/merges","archive_url":"https://api.github.com/repos/dftbplus/dftbplus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/dftbplus/dftbplus/downloads","issues_url":"https://api.github.com/repos/dftbplus/dftbplus/issues{/number}","pulls_url":"https://api.github.com/repos/dftbplus/dftbplus/pulls{/number}","milestones_url":"https://api.github.com/repos/dftbplus/dftbplus/milestones{/number}","notifications_url":"https://api.github.com/repos/dftbplus/dftbplus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/dftbplus/dftbplus/labels{/name}","releases_url":"https://api.github.com/repos/dftbplus/dftbplus/releases{/id}","deployments_url":"https://api.github.com/repos/dftbplus/dftbplus/deployments","created_at":"2017-06-02T08:26:33Z","updated_at":"2018-03-17T14:41:31Z","pushed_at":"2018-03-20T18:17:32Z","git_url":"git://github.com/dftbplus/dftbplus.git","ssh_url":"git@github.com:dftbplus/dftbplus.git","clone_url":"https://github.com/dftbplus/dftbplus.git","svn_url":"https://github.com/dftbplus/dftbplus","homepage":"http://www.dftbplus.org","size":3220,"stargazers_count":46,"watchers_count":46,"language":"Fortran","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":12,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":26,"open_issues":12,"watchers":46,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125"},"html":{"href":"https://github.com/dftbplus/dftbplus/pull/125"},"issue":{"href":"https://api.github.com/repos/dftbplus/dftbplus/issues/125"},"comments":{"href":"https://api.github.com/repos/dftbplus/dftbplus/issues/125/comments"},"review_comments":{"href":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125/comments"},"review_comment":{"href":"https://api.github.com/repos/dftbplus/dftbplus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/dftbplus/dftbplus/pulls/125/commits"},"statuses":{"href":"https://api.github.com/repos/dftbplus/dftbplus/statuses/7c4eb4bf883ac7459c1bed5e5ee6615dd5d48729"}},"author_association":"NONE"}}
{"actor":{"display_login":"bhourahine"}}