Skip to content

Commit

Permalink
-lmo prints now list of basic atoms
Browse files Browse the repository at this point in the history
  • Loading branch information
gorges97 committed Jul 7, 2023
1 parent 7f2d096 commit 11df430
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 7 deletions.
3 changes: 3 additions & 0 deletions man/xtb.1.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -394,6 +394,9 @@ OUTPUT
*lmocent.coord*::
centers of the localized molecular orbitals

*basicatoms*::
list of atoms with lone pair, pi, or deltpi localized molecular orbital

*tmpxx*::
number of recommended modes for mode following

Expand Down
24 changes: 17 additions & 7 deletions src/local.f90
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ subroutine local(nat,at,nbf,nao,ihomo,xyz,z,focc,s,p,cmo,eig,q,etot,gbsa,basis,r
data lmostring/'sigma','LP ','pi ','delpi'/
logical l1,l2,l3,flip
integer LWORK,IWORK,LIWORK,INFO
integer :: iscreen,icoord,ilmoi,icent ! file handles
integer :: iscreen,icoord,ilmoi,icent, ibaseat ! file handles

call timing(t0,w0)
if(set%pr_local) then
Expand Down Expand Up @@ -276,7 +276,7 @@ subroutine local(nat,at,nbf,nao,ihomo,xyz,z,focc,s,p,cmo,eig,q,etot,gbsa,basis,r
if(set%pr_local) write(*,*) 'lmo centers(Z=2) and atoms on file <lmocent.coord>'
if(set%pr_local) write(*,*) 'LMO Fii/eV ncent charge center contributions...'
if(set%pr_local) call open_file(iscreen,'xtbscreen.xyz','w')

if(set%pr_local) call open_file(ibaseat,'basicatoms','w') ! print list of basic atoms (with LP or pi LMO)
allocate(tmpq(nat,n))
tmpq(1:nat,1:n)=qmo(1:nat,1:n)
maxlp=0
Expand Down Expand Up @@ -321,10 +321,18 @@ subroutine local(nat,at,nbf,nao,ihomo,xyz,z,focc,s,p,cmo,eig,q,etot,gbsa,basis,r
call lmotype(nat,at,xyz,ecent(i,1),ecent(i,2),ecent(i,3), &
& imem(1),imem(2),xcen(i),.true.,pithr,jdum)
endif
if(set%pr_local) write(*,'(i5,1x,a5,2f7.2,3f10.5,12(i5,a2,'':'',f6.2))') &
if(set%pr_local) then
write(*,'(i5,1x,a5,2f7.2,3f10.5,12(i5,a2,'':'',f6.2))') &
& i,lmostring(jdum),autoev*f(i),xcen(i),ecent(i,1:3), &
& (imem(j),toSymbol(at(imem(j))),qmo(j,i),j=1,idum)

if (jdum.eq.2) then
write(ibaseat,*) imem(1) ! LP
end if
if (jdum.gt.2) then ! for pi we print both atoms out
write(ibaseat,*) imem(1)
write(ibaseat,*) imem(2)
end if
end if
! write + LP/pi as H for protonation search
if(set%pr_local) then
if(jdum.gt.1) then
Expand Down Expand Up @@ -495,8 +503,10 @@ subroutine local(nat,at,nbf,nao,ihomo,xyz,z,focc,s,p,cmo,eig,q,etot,gbsa,basis,r
enddo
new=k

if(set%pr_local) call close_file(iscreen)

if(set%pr_local) then
call close_file(iscreen)
call close_file(ibaseat)
end if
deallocate(wbo)


Expand Down Expand Up @@ -557,7 +567,7 @@ subroutine local(nat,at,nbf,nao,ihomo,xyz,z,focc,s,p,cmo,eig,q,etot,gbsa,basis,r

if(set%pr_local) then
write(*,*)'files:'
write(*,*)'coordprot.0/xtbscreen.xyz/xtblmoinfo/lmocent.coord'
write(*,*)'coordprot.0/xtbscreen.xyz/xtblmoinfo/basicatoms/lmocent.coord'
write(*,*)'with protonation site input, xtbdock and'
write(*,*)'LMO center info written'
write(*,*)
Expand Down

0 comments on commit 11df430

Please sign in to comment.