mirror of
https://github.com/cp2k/cp2k.git
synced 2026-07-28 22:25:32 -04:00
NONBONDED14: The option is no longer useful. Moreover cp2k would probably crash
when nonbonded and nonbonded14 flags would be different in an input file. There are no tests either that have such combination of input flags. Moreover: The name in the source code and the input are made consistent. It was also confusing to have a nonbonded flag and a nonbonded section in the FORCEFIELD section. svn-origin-rev: 10558
This commit is contained in:
parent
12fc7eb98a
commit
ff7cea6a02
14 changed files with 41 additions and 65 deletions
|
|
@ -40,13 +40,11 @@ MODULE fist_nonbond_env_types
|
|||
TYPE fist_nonbond_env_type
|
||||
INTEGER :: ref_count, id_nr, natom_types
|
||||
INTEGER :: counter, last_update, num_update
|
||||
! TODO: remove nonbonded14 option. it is an error-prone option that does not
|
||||
! offer any additional functionality compared to exclude and scaling options.
|
||||
! TODO: rename scale_cutoff into shift_cutoff. The term scaling gives the
|
||||
! impression that the interaction is multiplied by a constant factor, while
|
||||
! it actually refers to a constant shift to make the nonbonding interactions
|
||||
! coninuous at the cutoff radius.
|
||||
LOGICAL :: do_nonbonded14, do_nonbonded, scale_cutoff
|
||||
LOGICAL :: do_nonbonded, scale_cutoff
|
||||
CHARACTER ( len = default_string_length ) :: unit_type
|
||||
REAL (KIND=dp) :: lup, aup, ei_scale14, &
|
||||
vdw_scale14
|
||||
|
|
@ -205,14 +203,14 @@ CONTAINS
|
|||
!> \author Fawzi Mohamed
|
||||
! *****************************************************************************
|
||||
SUBROUTINE fist_nonbond_env_create(fist_nonbond_env, atomic_kind_set, &
|
||||
potparm14, potparm, nonbonded14, nonbonded, verlet_skin, ewald_rcut, &
|
||||
ei_scale14, vdw_scale14, scale_cutoff, error)
|
||||
potparm14, potparm, do_nonbonded, verlet_skin, ewald_rcut, ei_scale14, &
|
||||
vdw_scale14, scale_cutoff, error)
|
||||
TYPE(fist_nonbond_env_type), POINTER :: fist_nonbond_env
|
||||
TYPE(atomic_kind_type), DIMENSION(:), &
|
||||
POINTER :: atomic_kind_set
|
||||
TYPE(pair_potential_pp_type), OPTIONAL, &
|
||||
POINTER :: potparm14, potparm
|
||||
LOGICAL, INTENT(IN) :: nonbonded14, nonbonded
|
||||
LOGICAL, INTENT(IN) :: do_nonbonded
|
||||
REAL(KIND=dp), INTENT(IN) :: verlet_skin, ewald_rcut, &
|
||||
ei_scale14, vdw_scale14
|
||||
LOGICAL, INTENT(IN) :: scale_cutoff
|
||||
|
|
@ -239,8 +237,8 @@ CONTAINS
|
|||
NULLIFY(fist_nonbond_env%rshell_last_update_pbc)
|
||||
NULLIFY(fist_nonbond_env%rcore_last_update_pbc)
|
||||
CALL init_fist_nonbond_env(fist_nonbond_env, atomic_kind_set, potparm14, &
|
||||
potparm, nonbonded14, nonbonded, verlet_skin, ewald_rcut, ei_scale14, &
|
||||
vdw_scale14, scale_cutoff, error)
|
||||
potparm, do_nonbonded, verlet_skin, ewald_rcut, ei_scale14, vdw_scale14, &
|
||||
scale_cutoff, error)
|
||||
END SUBROUTINE fist_nonbond_env_create
|
||||
|
||||
! *****************************************************************************
|
||||
|
|
@ -250,15 +248,15 @@ CONTAINS
|
|||
!> see module cp_error_handling
|
||||
! *****************************************************************************
|
||||
SUBROUTINE init_fist_nonbond_env(fist_nonbond_env, atomic_kind_set, &
|
||||
potparm14, potparm, nonbonded14, nonbonded, verlet_skin, ewald_rcut, &
|
||||
ei_scale14, vdw_scale14, scale_cutoff, error)
|
||||
potparm14, potparm, do_nonbonded, verlet_skin, ewald_rcut, ei_scale14, &
|
||||
vdw_scale14, scale_cutoff, error)
|
||||
|
||||
TYPE(fist_nonbond_env_type), POINTER :: fist_nonbond_env
|
||||
TYPE(atomic_kind_type), DIMENSION(:), &
|
||||
POINTER :: atomic_kind_set
|
||||
TYPE(pair_potential_pp_type), OPTIONAL, &
|
||||
POINTER :: potparm14, potparm
|
||||
LOGICAL, INTENT(IN) :: nonbonded14, nonbonded
|
||||
LOGICAL, INTENT(IN) :: do_nonbonded
|
||||
REAL(KIND=dp), INTENT(IN) :: verlet_skin, ewald_rcut, &
|
||||
ei_scale14, vdw_scale14
|
||||
LOGICAL, INTENT(IN) :: scale_cutoff
|
||||
|
|
@ -286,8 +284,7 @@ CONTAINS
|
|||
NULLIFY (fist_nonbond_env%rlist_lowsq)
|
||||
NULLIFY (fist_nonbond_env%ij_kind_full_fac)
|
||||
fist_nonbond_env % unit_type = "ANGSTROM"
|
||||
fist_nonbond_env % do_nonbonded14 = nonbonded14
|
||||
fist_nonbond_env % do_nonbonded = nonbonded
|
||||
fist_nonbond_env % do_nonbonded = do_nonbonded
|
||||
fist_nonbond_env % lup = 0
|
||||
fist_nonbond_env % aup = 0
|
||||
fist_nonbond_env % ei_scale14 = ei_scale14
|
||||
|
|
@ -300,7 +297,7 @@ CONTAINS
|
|||
fist_nonbond_env%ref_count=1
|
||||
fist_nonbond_env%id_nr=last_fist_nonbond_env_id_nr
|
||||
last_fist_nonbond_env_id_nr=last_fist_nonbond_env_id_nr+1
|
||||
IF (nonbonded) THEN
|
||||
IF (do_nonbonded) THEN
|
||||
natom_types = 1
|
||||
! Determine size of kind arrays
|
||||
natom_types = SIZE(atomic_kind_set)
|
||||
|
|
|
|||
|
|
@ -222,8 +222,7 @@ MODULE force_field_types
|
|||
! *****************************************************************************
|
||||
TYPE force_field_type
|
||||
LOGICAL :: scale_cutoff,&
|
||||
nonbonded,&
|
||||
nonbonded14,&
|
||||
do_nonbonded,&
|
||||
electrostatics,&
|
||||
multiple_potential,&
|
||||
ignore_missing_critical
|
||||
|
|
|
|||
|
|
@ -149,10 +149,10 @@ CPSourceFileRef,&
|
|||
IF (unique_spline) potential_single_allocation = do_potential_single_allocation
|
||||
|
||||
CALL section_vals_val_get(ff_section,"MULTIPLE_POTENTIAL",l_val=ff_type%multiple_potential,error=error)
|
||||
CALL section_vals_val_get(ff_section,"NONBONDED",l_val=ff_type%nonbonded,error=error)
|
||||
CALL section_vals_val_get(ff_section,"DO_NONBONDED",l_val=ff_type%do_nonbonded,error=error)
|
||||
tmp_section => section_vals_get_subs_vals(ff_section,"NONBONDED",error=error)
|
||||
CALL section_vals_get(tmp_section,explicit=explicit,error=error)
|
||||
IF (explicit.AND.ff_type%nonbonded) THEN
|
||||
IF (explicit.AND.ff_type%do_nonbonded) THEN
|
||||
tmp_section2 => section_vals_get_subs_vals(tmp_section,"LENNARD-JONES",error=error)
|
||||
CALL section_vals_get(tmp_section2,explicit=explicit,n_repetition=nlj,error=error)
|
||||
ntot = 0
|
||||
|
|
@ -241,10 +241,9 @@ CPSourceFileRef,&
|
|||
END IF
|
||||
END IF
|
||||
|
||||
CALL section_vals_val_get(ff_section,"NONBONDED14",l_val=ff_type%nonbonded14,error=error)
|
||||
tmp_section => section_vals_get_subs_vals(ff_section,"NONBONDED14",error=error)
|
||||
CALL section_vals_get(tmp_section,explicit=explicit,error=error)
|
||||
IF (explicit.AND.ff_type%nonbonded14) THEN
|
||||
IF (explicit.AND.ff_type%do_nonbonded) THEN
|
||||
tmp_section2 => section_vals_get_subs_vals(tmp_section,"LENNARD-JONES",error=error)
|
||||
CALL section_vals_get(tmp_section2,explicit=explicit,n_repetition=nlj,error=error)
|
||||
ntot = 0
|
||||
|
|
|
|||
|
|
@ -260,11 +260,11 @@ CONTAINS
|
|||
CALL force_field_pack_shell ( particle_set, atomic_kind_set,&
|
||||
molecule_kind_set, molecule_set, root_section, subsys_section,&
|
||||
shell_particle_set, core_particle_set, cell, iw, inp_info, error)
|
||||
!-----------------------------------------------------------------------------
|
||||
!-----------------------------------------------------------------------------
|
||||
! 17. Set up potparm_nonbond14
|
||||
!-----------------------------------------------------------------------------
|
||||
IF (ff_type%nonbonded14) THEN
|
||||
IF (ff_type%do_nonbonded) THEN
|
||||
!-----------------------------------------------------------------------------
|
||||
!-----------------------------------------------------------------------------
|
||||
! 17. Set up potparm_nonbond14
|
||||
!-----------------------------------------------------------------------------
|
||||
! Move the data from the info structures to potparm_nonbond
|
||||
CALL force_field_pack_nonbond14(atomic_kind_set, ff_type, qmmm_env, iw, Ainfo,&
|
||||
chm_info, inp_info, gro_info, amb_info, potparm_nonbond14, ewald_env, &
|
||||
|
|
@ -275,12 +275,10 @@ CONTAINS
|
|||
CALL section_vals_val_get(mm_section,"FORCEFIELD%ZBL_SCATTERING",l_val=do_zbl,error=error)
|
||||
CALL force_field_pack_splines(atomic_kind_set, ff_type, iw2, iw3, iw4, &
|
||||
potparm_nonbond14, do_zbl, error)
|
||||
END IF
|
||||
!-----------------------------------------------------------------------------
|
||||
!-----------------------------------------------------------------------------
|
||||
! 18. Set up potparm_nonbond
|
||||
!-----------------------------------------------------------------------------
|
||||
IF (ff_type%nonbonded) THEN
|
||||
!-----------------------------------------------------------------------------
|
||||
!-----------------------------------------------------------------------------
|
||||
! 18. Set up potparm_nonbond
|
||||
!-----------------------------------------------------------------------------
|
||||
! Move the data from the info structures to potparm_nonbond
|
||||
CALL force_field_pack_nonbond(atomic_kind_set, ff_type, qmmm_env, &
|
||||
fatal, iw, Ainfo, chm_info, inp_info, gro_info, amb_info, &
|
||||
|
|
@ -300,8 +298,8 @@ CONTAINS
|
|||
CALL section_vals_val_get(mm_section,"NEIGHBOR_LISTS%VERLET_SKIN",&
|
||||
r_val=verlet_skin,error=error)
|
||||
CALL fist_nonbond_env_create (fist_nonbond_env, atomic_kind_set, &
|
||||
potparm_nonbond14, potparm_nonbond, ff_type%nonbonded14, &
|
||||
ff_type%nonbonded, verlet_skin, ewald_rcut, ff_type%ei_scale14, &
|
||||
potparm_nonbond14, potparm_nonbond, ff_type%do_nonbonded, &
|
||||
verlet_skin, ewald_rcut, ff_type%ei_scale14, &
|
||||
ff_type%vdw_scale14, ff_type%scale_cutoff, error)
|
||||
! Compute the electrostatic interaction cutoffs.
|
||||
CALL force_field_pack_eicut(atomic_kind_set, ff_type, potparm_nonbond, &
|
||||
|
|
|
|||
|
|
@ -288,21 +288,14 @@ CONTAINS
|
|||
CALL section_add_keyword(section,keyword,error=error)
|
||||
CALL keyword_release(keyword,error=error)
|
||||
|
||||
CALL keyword_create(keyword, name="NONBONDED",&
|
||||
CALL keyword_create(keyword, name="DO_NONBONDED",&
|
||||
description="Controls the computation of all the real-sapce "//&
|
||||
"(short-range) nonbonded interactions. This also "//&
|
||||
"includes the real-space corrections for excluded "//&
|
||||
"or scaled 1-2, 1-3 and 1-4 interactions. When set "//&
|
||||
"to F, the neighborlists are not created and all "//&
|
||||
"interactions that depend on them are not computed.",&
|
||||
usage="NONBONDED T",default_l_val=.TRUE.,lone_keyword_l_val=.TRUE.,&
|
||||
error=error)
|
||||
CALL section_add_keyword(section,keyword,error=error)
|
||||
CALL keyword_release(keyword,error=error)
|
||||
|
||||
CALL keyword_create(keyword, name="NONBONDED14",&
|
||||
description="Controls the computation of the nonbonded-14 interactions.",&
|
||||
usage="NONBONDED14 T",default_l_val=.TRUE.,lone_keyword_l_val=.TRUE.,&
|
||||
usage="DO_NONBONDED T",default_l_val=.TRUE.,lone_keyword_l_val=.TRUE.,&
|
||||
error=error)
|
||||
CALL section_add_keyword(section,keyword,error=error)
|
||||
CALL keyword_release(keyword,error=error)
|
||||
|
|
|
|||
|
|
@ -735,9 +735,9 @@ CONTAINS
|
|||
CALL section_vals_val_get(se_section,"NEIGHBOR_LISTS%VERLET_SKIN",&
|
||||
r_val=verlet_skin,error=error)
|
||||
CALL fist_nonbond_env_create(se_nonbond_env, atomic_kind_set, &
|
||||
nonbonded14=.FALSE., nonbonded=.TRUE., verlet_skin=verlet_skin, &
|
||||
ewald_rcut=ewald_rcut, ei_scale14=0.0_dp, vdw_scale14=0.0_dp, &
|
||||
scale_cutoff=.FALSE., error=error)
|
||||
do_nonbonded=.TRUE., verlet_skin=verlet_skin, ewald_rcut=ewald_rcut, &
|
||||
ei_scale14=0.0_dp, vdw_scale14=0.0_dp, scale_cutoff=.FALSE., &
|
||||
error=error)
|
||||
! Create and Setup NDDO multipole environment
|
||||
CALL nddo_mpole_setup(se_nddo_mpole, natom, error)
|
||||
CALL set_qs_env(qs_env,ewald_env=ewald_env, ewald_pw=ewald_pw,&
|
||||
|
|
|
|||
|
|
@ -161,8 +161,7 @@
|
|||
METHOD FIST
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
PARM_FILE_NAME ser_s.pot
|
||||
parmtype CHM
|
||||
&SPLINE
|
||||
|
|
@ -192,8 +191,7 @@
|
|||
METHOD FIST
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
PARM_FILE_NAME ala_s.pot
|
||||
parmtype CHM
|
||||
&SPLINE
|
||||
|
|
|
|||
|
|
@ -161,8 +161,7 @@
|
|||
METHOD FIST
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
PARM_FILE_NAME ser_s.pot
|
||||
parmtype CHM
|
||||
&SPLINE
|
||||
|
|
@ -192,8 +191,7 @@
|
|||
METHOD FIST
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
PARM_FILE_NAME ala_s.pot
|
||||
parmtype CHM
|
||||
&SPLINE
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
METHOD Fist
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
&CHARGE
|
||||
ATOM U
|
||||
CHARGE 0.0
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
METHOD Fist
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
&CHARGE
|
||||
ATOM U
|
||||
CHARGE 0.0
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
METHOD Fist
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
&CHARGE
|
||||
ATOM U
|
||||
CHARGE 0.0
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
METHOD Fist
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
&CHARGE
|
||||
ATOM U
|
||||
CHARGE 0.0
|
||||
|
|
|
|||
|
|
@ -3,8 +3,7 @@
|
|||
METHOD FIST
|
||||
&MM
|
||||
&FORCEFIELD
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
parm_file_name ../sample_pot/deca_ala.pot
|
||||
parmtype CHM
|
||||
&END FORCEFIELD
|
||||
|
|
|
|||
|
|
@ -13,8 +13,7 @@
|
|||
ATOM HT
|
||||
CHARGE 0.4238
|
||||
&END CHARGE
|
||||
NONBONDED F
|
||||
NONBONDED14 F
|
||||
DO_NONBONDED F
|
||||
&END FORCEFIELD
|
||||
&POISSON
|
||||
&EWALD
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue