56#include "./base/base_uses.f90"
60 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'force_fields'
87 molecule_kind_set, molecule_set, ewald_env, fist_nonbond_env, &
88 root_section, para_env, qmmm, qmmm_env, subsys_section, mm_section, &
89 shell_particle_set, core_particle_set, cell)
99 LOGICAL,
INTENT(IN),
OPTIONAL :: qmmm
102 TYPE(
particle_type),
DIMENSION(:),
POINTER :: shell_particle_set, core_particle_set
105 CHARACTER(len=*),
PARAMETER :: routinen =
'force_field_control'
107 INTEGER :: exclude_ei, exclude_vdw, handle, iw
113 CALL timeset(routinen, handle)
136 IF (exclude_vdw ==
do_skip_14) ff_type%vdw_scale14 = 0.0_dp
137 IF (exclude_ei ==
do_skip_14) ff_type%ei_scale14 = 0.0_dp
142 SELECT CASE (ff_type%ff_type)
144 INQUIRE (file=ff_type%ff_file_name, exist=found)
145 IF (.NOT. found)
THEN
146 cpabort(
"Force field file missing")
151 cpabort(
"Force field type not implemented")
157 SELECT CASE (ff_type%ff_type)
167 cpabort(
"Force field type not implemented")
173 CALL print_pot_parameter_file(ff_type, mm_section)
178 CALL force_field_pack(particle_set, atomic_kind_set, molecule_kind_set, molecule_set, &
179 ewald_env, fist_nonbond_env, ff_type, root_section, qmmm, qmmm_env, mm_section, &
180 subsys_section, shell_particle_set=shell_particle_set, &
181 core_particle_set=core_particle_set, cell=cell)
187 molecule_set, mm_section, fist_nonbond_env%charges)
201 CALL timestop(handle)
211 SUBROUTINE print_pot_parameter_file(ff_type, mm_section)
216 CHARACTER(len=*),
PARAMETER :: routinen =
'print_pot_parameter_file'
218 INTEGER :: handle, i, iw, m
219 REAL(kind=
dp) :: eps, k, phi0, r0, sigma, theta0
222 CALL timeset(routinen, handle)
227 middle_name=
"force_field", extension=
".pot")
230 WRITE (iw, 1000)
"Force Field Parameter File dumped into CHARMM FF style"
232 SELECT CASE (ff_type%ff_type)
234 cpwarn(
"Dumping FF parameter file for CHARMM FF not implemented!")
239 DO i = 1,
SIZE(ff_type%amb_info%bond_a)
242 WRITE (iw, 2001) ff_type%amb_info%bond_a(i), &
243 ff_type%amb_info%bond_b(i), &
248 DO i = 1,
SIZE(ff_type%amb_info%bend_a)
251 WRITE (iw, 2002) ff_type%amb_info%bend_a(i), &
252 ff_type%amb_info%bend_b(i), &
253 ff_type%amb_info%bend_c(i), &
258 DO i = 1,
SIZE(ff_type%amb_info%torsion_a)
260 m = ff_type%amb_info%torsion_m(i)
262 WRITE (iw, 2003) ff_type%amb_info%torsion_a(i), &
263 ff_type%amb_info%torsion_b(i), &
264 ff_type%amb_info%torsion_c(i), &
265 ff_type%amb_info%torsion_d(i), &
270 DO i = 1,
SIZE(ff_type%amb_info%nonbond_a)
273 WRITE (iw, 2005) ff_type%amb_info%nonbond_a(i), &
278 cpwarn(
"Dumping FF parameter file for GROMOS FF not implemented!")
280 cpwarn(
"Dumping FF parameter file for INPUT FF not implemented!")
283 WRITE (iw,
'(/,A)')
"END"
286 "PRINT%FF_PARAMETER_FILE")
288 CALL timestop(handle)
2901000
FORMAT(
"*>>>>>>>", t12, a, t73,
"<<<<<<<")
2911001
FORMAT(/,
"BONDS", /,
"!", /,
"!V(bond) = Kb(b - b0)**2", /,
"!", /,
"!Kb: kcal/mole/A**2", /, &
292 "!b0: A", /,
"!", /,
"! atom type Kb b0", /,
"!")
2931002
FORMAT(/,
"ANGLES", /,
"!", /,
"!V(angle) = Ktheta(Theta - Theta0)**2", /,
"!", /, &
294 "!V(Urey-Bradley) = Kub(S - S0)**2", /,
"!", /,
"!Ktheta: kcal/mole/rad**2", /, &
295 "!Theta0: degrees", /,
"!Kub: kcal/mole/A**2 (Urey-Bradley)", /,
"!S0: A", /, &
296 "!", /,
"! atom types Ktheta Theta0 Kub S0", /,
"!")
2971003
FORMAT(/,
"DIHEDRALS", /,
"!", /,
"!V(dihedral) = Kchi(1 + cos(n(chi) - delta))", /, &
298 "!", /,
"!Kchi: kcal/mole", /,
"!n: multiplicity", /,
"!delta: degrees", /, &
299 "!", /,
"! atom types Kchi n delta", /,
"!")
3001005
FORMAT(/,
"NONBONDED", /,
"!", /, &
301 "!V(Lennard-Jones) = Eps,i,j[(Rmin,i,j/ri,j)**12 - 2(Rmin,i,j/ri,j)**6]", /, &
302 "!", /,
"!epsilon: kcal/mole, Eps,i,j = sqrt(eps,i * eps,j)", /, &
303 "!Rmin/2: A, Rmin,i,j = Rmin/2,i + Rmin/2,j", /,
"!", /, &
304 "!atom ignored epsilon Rmin/2 ignored eps,1-4 "// &
305 "Rmin/2,1-4", /,
"!")
3072001
FORMAT(a6, 1x, a6, 1x, 2f15.9)
3082002
FORMAT(a6, 1x, a6, 1x, a6, 1x, 2f15.9)
3092003
FORMAT(a6, 1x, a6, 1x, a6, 1x, a6, 1x, f15.9, i5, f15.9)
3102005
FORMAT(a6, 1x,
" 0.000000000", 2f15.9)
311 END SUBROUTINE print_pot_parameter_file
Define the atomic kind types and their sub types.
Handles all functions related to the CELL.
various routines to log and control the output. The idea is that decisions about where to log should ...
type(cp_logger_type) function, pointer, public cp_get_default_logger()
returns the default logger
routines to handle the output, The idea is to remove the decision of wheter to output and what to out...
integer function, public cp_print_key_unit_nr(logger, basis_section, print_key_path, extension, middle_name, local, log_filename, ignore_should_output, file_form, file_position, file_action, file_status, do_backup, on_file, is_new_file, mpi_io, fout)
...
subroutine, public cp_print_key_finished_output(unit_nr, logger, basis_section, print_key_path, local, ignore_should_output, on_file, mpi_io)
should be called after you finish working with a unit obtained with cp_print_key_unit_nr,...
integer, parameter, public cp_p_file
integer function, public cp_print_key_should_output(iteration_info, basis_section, print_key_path, used_print_key, first_time)
returns what should be done with the given property if btest(res,cp_p_store) then the property should...
real(kind=dp) function, public cp_unit_from_cp2k(value, unit_str, defaults, power)
converts from the internal cp2k units to the given unit
Define all structure types related to force field kinds.
integer, parameter, public do_ff_undef
integer, parameter, public do_ff_charmm
integer, parameter, public do_ff_g87
integer, parameter, public do_ff_g96
integer, parameter, public do_ff_amber
Define all structures types related to force_fields.
subroutine, public init_ff_type(ff_type)
Just NULLIFY and zero all the stuff
subroutine, public deallocate_ff_type(ff_type)
Just DEALLOCATE all the stuff
subroutine, public read_force_field_gromos(ff_type, para_env, mm_section)
Reads the GROMOS force_field.
subroutine, public read_force_field_charmm(ff_type, para_env, mm_section)
Reads the charmm force_field.
subroutine, public read_force_field_amber(ff_type, para_env, mm_section, particle_set)
Reads the AMBER force_field.
subroutine, public force_field_pack(particle_set, atomic_kind_set, molecule_kind_set, molecule_set, ewald_env, fist_nonbond_env, ff_type, root_section, qmmm, qmmm_env, mm_section, subsys_section, shell_particle_set, core_particle_set, cell)
Pack in all the information needed for the force_field.
subroutine, public force_field_qeff_output(particle_set, molecule_kind_set, molecule_set, mm_section, charges)
Compute the total qeff charges for each molecule kind and total system.
subroutine, public clean_intra_force_kind(molecule_kind_set, mm_section)
Removes UNSET force field types.
subroutine, public force_field_control(atomic_kind_set, particle_set, molecule_kind_set, molecule_set, ewald_env, fist_nonbond_env, root_section, para_env, qmmm, qmmm_env, subsys_section, mm_section, shell_particle_set, core_particle_set, cell)
If reading in from external file, make sure its there first
Defines the basic variable types.
integer, parameter, public dp
Interface to the message passing library MPI.
Define the molecule kind structure types and the corresponding functionality.
Define the data structure for the molecule information.
Define the data structure for the particle information.
Provides all information about an atomic kind.
Type defining parameters related to the simulation cell.
type of a logger, at the moment it contains just a print level starting at which level it should be l...
to build arrays of pointers
stores all the informations relevant to an mpi environment