Skip to content

Commit

Permalink
added check for krot when forming rotational basis to reduce its size
Browse files Browse the repository at this point in the history
  • Loading branch information
Trovemaster committed Sep 11, 2023
1 parent 7b280c0 commit bc1cfa5
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 17 deletions.
19 changes: 17 additions & 2 deletions fields.f90
Original file line number Diff line number Diff line change
Expand Up @@ -664,6 +664,7 @@ subroutine FLReadInput(NPTorder,Npolyads,Natoms,Nmodes,Jrot)
!
logical :: eof,zmat_defined,basis_defined,equil_defined,pot_defined,symmetry_defined,extF_defined,refer_defined,chk_defined
logical :: kinetic_defined,pot_form_compact = .false.,extF_form_compact = .false.
logical :: krot_defined = .false.
character(len=cl) :: Molecule,pot_coeff_type,exfF_coeff_type,chk_type,controlstep
character(len=wl) :: w,ioname,w_t
real(rk) :: lfact,f_t, func_coef
Expand Down Expand Up @@ -2015,6 +2016,7 @@ subroutine FLReadInput(NPTorder,Npolyads,Natoms,Nmodes,Jrot)
! we use range(1) to store the Jrot value
!
job%bset(imode)%range(1) = Jrot
job%bset(imode)%range(2) = Jrot
!
case("KROT","K")
!
Expand All @@ -2025,13 +2027,12 @@ subroutine FLReadInput(NPTorder,Npolyads,Natoms,Nmodes,Jrot)
job%bset(imode)%range(2) = i_t
trove%krot = i_t
if (trove%kmax==0) trove%kmax = i_t
krot_defined = .true.
!
case("KMAX")
!
call readi(i_t)
!
! we use range(1) to store the Jrot value
!
trove%kmax = i_t
!
case("OVRLP","DVRPOINTS","DPOINTS")
Expand Down Expand Up @@ -3210,6 +3211,8 @@ subroutine FLReadInput(NPTorder,Npolyads,Natoms,Nmodes,Jrot)
call readi(Jrot)
job%bset(0)%range(1) = Jrot
!
if (.not.krot_defined) job%bset(0)%range(2) = Jrot
!
case("4")
!
call readi(intensity%j(1))
Expand Down Expand Up @@ -4810,6 +4813,11 @@ subroutine FLReadInput(NPTorder,Npolyads,Natoms,Nmodes,Jrot)
if (trim(trove%symmetry)=='C2VN'.and.sym%N<job%bset(0)%range(2)) then
write (out,"('FLinput: The C2VN number',i5,' must be defined and equal to (or <) krot',i5)") sym%N,job%bset(0)%range(2)
stop 'FLinput - The C2VN number is undefined or too small'
endif
!
if (trim(trove%symmetry)=='CSN'.and.sym%N<job%bset(0)%range(2)) then
write (out,"('FLinput: The CSN number',i5,' must be defined and equal to (or <) krot',i5)") sym%N,job%bset(0)%range(2)
stop 'FLinput - The C2VN number is undefined or too small'
endif
!
if (.not.refer_defined) then
Expand Down Expand Up @@ -16747,6 +16755,13 @@ subroutine fingerprintRead
if (bs_%range(2)/=job%bset(imode)%range(2)) then
write (out,"('fingerprintRead: parameters mismatch for ',i9,'th mode:')") imode
write (out,"('range2 (stored) /= range (given) : ',2i8)") bs_%range(2),job%bset(imode)%range(2)
!
!
if (imode==0) then
write(out,"('** For now we allow the rotational basis range(2) to deviate from chk**')")
write(out,"('** in order not to break chk from older calculations. **')")
cycle
endif
stop 'fingerprintRead - parameters mismatch:range'
end if
!
Expand Down
20 changes: 6 additions & 14 deletions perturbation.f90
Original file line number Diff line number Diff line change
Expand Up @@ -4841,7 +4841,7 @@ subroutine PT_conctracted_rotational_bset(j)
!type(FLbasissetT),intent(in) :: bs(0:PT%Nmodes) ! Basis set specifications: range and type

integer(ik) :: dimen,nroots,ideg,ndeg,nu(0:PT%Nmodes),alloc,iroot,icount,k0,i
integer(ik) :: irepr,tau0,Ncount
integer(ik) :: irepr,tau0,Ncount,kmax
real(rk) :: zpe
integer(ik),allocatable :: count_index(:,:)
real(rk),allocatable :: eigenvects(:,:)
Expand All @@ -4850,19 +4850,6 @@ subroutine PT_conctracted_rotational_bset(j)
real(ark) :: MaxEigenvects
!
integer(ik) :: isym,Ntotal(sym%Nrepresen),ilarge_coeff
!type(MOrepres_arkT),pointer :: irr(:)

!integer(ik) :: ibstype,Nclasses,imode,i,iclasses,dimen,alloc,npoints,io_slot,pshift
!integer(ik) :: v,bs_size,ilevel,k,ipol,ib,i_eq(PT%Nmodes),Nirr(sym%Nrepresen)
!integer(ik) :: ipoint_t,iclass,charact(sym%Noper),irepr,iroot,Npar,gamma,info,jlevel
!character(len=cl) :: unitfname ,char_,diag_
!real(ark) :: f_value,f_prim,f_t
!integer(ik) :: nroots,jrot,icount,ideg,kdeg,ndeg,Ncount,tau0,k0,ioper
!integer(ik) :: jpoint,jdeg,im1,im2,level_degen,Nelem,ielem,jroot
!type(PTlevelT),pointer :: cf
!integer(ik),parameter :: mpoints = 100
!logical :: reduced_model

!
! The contracted basis set field has to be allocated before this stage:
!
Expand Down Expand Up @@ -4901,7 +4888,10 @@ subroutine PT_conctracted_rotational_bset(j)
iroot = 1
icount = 1
contr(0)%max_degen = 1
kmax = job%bset(0)%range(2)
do k0 = 1,j
!
if (k0>kmax) cycle
!
do tau0 = 0,1
!
Expand Down Expand Up @@ -4956,6 +4946,8 @@ subroutine PT_conctracted_rotational_bset(j)
PT%rot_primindex(0)%tau = mod(j,2)
!
do k0 = 1,j
!
if (k0>kmax) cycle
!
do tau0 = 0,1
!
Expand Down
2 changes: 1 addition & 1 deletion symmetry.f90
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ subroutine SymmetryInitialize(sym_group)
!write(*,*) sym%label(j)
enddo
!
sym%label(1:2)=(/'A''','B"'/)
sym%label(1:2)=(/'A''','A"'/)
!
! generators and the product table
!
Expand Down

0 comments on commit bc1cfa5

Please sign in to comment.