Skip to content

Commit

Permalink
Bowman PES and adding the potennamecheck for the user type
Browse files Browse the repository at this point in the history
  • Loading branch information
Trovemaster committed May 16, 2024
1 parent f9d6efe commit 5819f84
Show file tree
Hide file tree
Showing 18 changed files with 944 additions and 18 deletions.
8 changes: 7 additions & 1 deletion fields.f90
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,7 @@ module fields
logical :: tetraatom_sing_resolve = .false.
integer(ik) :: krot = 0 ! The value of the krot quantum number (reference or maximal) to generate non-rigid basis sets
integer(ik) :: kmax = 0 ! The value of the kmax quantum number (maximal) to generate non-rigid basis sets
character(len=cl) :: potenname='GENERAL' ! name of the user type potential function (for control purposes)
!
end type JobT
!
Expand Down Expand Up @@ -3593,6 +3594,10 @@ subroutine FLReadInput(NPTorder,Npolyads,Natoms,Nmodes,Jrot)
!
pot_form_compact = .true.
!
case("NAME")
!
pot_form_compact = .true.
!
case("NPARAM")
!
call readi(Nparam)
Expand Down Expand Up @@ -5505,7 +5510,8 @@ subroutine FLsetMolecule
trove%Nbonds,trove%Nangles,trove%Ndihedrals,&
trove%dihedtype,&
trove%mass,trove%local_eq,&
force,forcename,ifit,pot_ind,trove%specparam,trove%potentype,trove%kinetic_type,&
force,forcename,ifit,pot_ind,trove%specparam,trove%potentype,trove%potenname,&
trove%kinetic_type,&
trove%IO_primitive,trove%chk_numerov_fname,&
trove%symmetry,trove%rho_border,trove%zmatrix,trove%frame)
!
Expand Down
14 changes: 13 additions & 1 deletion molecules.f90
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ module molecules
use kin_x2y2, only : MLkinetic_x2y2_bisect_EKE_sinrho

!
use pot_user, only : MLdipole,MLpoten,ML_MEP
use pot_user, only : MLdipole,MLpoten,ML_MEP,MLpoten_name
!
use symmetry, only : sym
!
Expand Down Expand Up @@ -385,6 +385,18 @@ subroutine MLdefine_potenfunc
!
MLpotentialfunc => MLpoten
!
select case(trim(molec%potenname))
!
case default
!
call MLpoten_name(molec%potenname)
!
case ('GENERAL')
!
! do nothing here as this means that the name of the user type PES was not defined
!
end select
!
case('POTEN_XY4_NIKITIN')
!
MLpotentialfunc => MLpoten_xy4_Nikitin
Expand Down
6 changes: 4 additions & 2 deletions moltype.f90
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ subroutine calc_func(x, y)
character(len=cl) :: symmetry ! molecular symmetry
character(len=cl) :: IO_primitive ! control writing/reading of primitive basis sets
character(len=cl) :: chk_primitive_fname ! filename to store primitive functions on a grid
character(len=cl) :: potenname ! name of the user type potential function (for control purposes)
!
!procedure(MLtemplate_poten),pointer :: potenfunc => null ()
!
Expand Down Expand Up @@ -314,7 +315,7 @@ subroutine calc_func(x, y)
subroutine MLinitialize_molec(Moltype,Coordinates,coords_transform,&
Nbonds,Nangles,Ndihedrals,dihedtype_,&
AtomMasses,local_eq, &
force_,forcename_,ifit_,pot_ind_,specparam,potentype,kinetic_type,&
force_,forcename_,ifit_,pot_ind_,specparam,potentype,potenname,kinetic_type,&
IO_primitive,chk_numerov_fname,&
symmetry_,rho_border,zmatrix_,frame)

Expand All @@ -333,7 +334,7 @@ subroutine MLinitialize_molec(Moltype,Coordinates,coords_transform,&
character(len=16),intent(in) :: forcename_(:)
real(ark), intent(in) :: specparam(:)
!
character(len=cl),intent(in) :: potentype,kinetic_type
character(len=cl),intent(in) :: potentype,kinetic_type,potenname
character(len=cl),intent(in) :: symmetry_
character(len=cl),intent(in) :: IO_primitive,chk_numerov_fname
real(ark) :: rho_border(2) ! rhomim, rhomax - borders
Expand Down Expand Up @@ -395,6 +396,7 @@ subroutine MLinitialize_molec(Moltype,Coordinates,coords_transform,&
!
molec%local_eq = local_eq
molec%potentype = potentype
molec%potenname = potenname
molec%kinetic_type = kinetic_type
molec%atomMasses = AtomMasses
molec%specparam = specparam
Expand Down
Loading

0 comments on commit 5819f84

Please sign in to comment.