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

fix for https://github.com/nwchemgit/nwchem/issues/926 #928

Merged
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
19 changes: 15 additions & 4 deletions src/NWints/rel/set_modelpotential_params.F
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ subroutine set_modelpotential_params(rtdb, geom, natoms)
character*32 pname
c
integer i,j,k
character*16 tagi ! tag of atom i
character*16 tagi ! tag of atom i
integer iptr
character*2 symi
character*16 elemi
double precision ci(3),chgi
Expand All @@ -41,8 +42,15 @@ subroutine set_modelpotential_params(rtdb, geom, natoms)
c map the model potential onto the geometry
do i = 1,natoms
if (.not.geom_cent_get(geom,i,tagi,ci,chgi))
& call errquit(pname//'geom_cent_get failed:i',911, GEOM_ERR)
status = geom_tag_to_element(tagi,symi,elemi,atni)
& call errquit(pname//'geom_cent_get failed:i',911, GEOM_ERR)
c handle bqs
if (inp_compare(.false.,tagi(1:2),'bq')) then
iptr=3
else
iptr=1
endif
if(.not.geom_tag_to_element(tagi(iptr:),symi,elemi,atni))
& call errquit(pname//'geom_tag2elem failed:i',i, GEOM_ERR)
call inp_lcase(symi)
cinit
do k = 1,50
Expand All @@ -62,8 +70,11 @@ subroutine set_modelpotential_params(rtdb, geom, natoms)
end if
end do ! j = 1,mpmaxelem
1984 continue
if(ga_nodeid().eq.0.and.(.not.status)) write(6,'(a,i3,2x,a)')
if(ga_nodeid().eq.0.and.(.not.status)) then
write(6,'(a,i3,2x,a)')
W ' modelpotential warning: no entry found for atom ',i,tagi
call errquit(' set_modelpotential error ',0,0)
endif
end do ! i = 1,natoms
c
c set parameters in rtdb
Expand Down