Skip to content

Commit

Permalink
Motion: Barostat npt for frozen atoms in absolute coordinate
Browse files Browse the repository at this point in the history
  • Loading branch information
Clabaut Paul authored and oschuett committed Mar 13, 2022
1 parent b084517 commit a564af0
Show file tree
Hide file tree
Showing 28 changed files with 3,072 additions and 68 deletions.
7 changes: 4 additions & 3 deletions src/constraint.F
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ MODULE constraint
USE cp_para_types, ONLY: cp_para_env_type
USE distribution_1d_types, ONLY: distribution_1d_type
USE input_constants, ONLY: npt_f_ensemble,&
npt_i_ensemble
npt_i_ensemble,&
npt_ia_ensemble
USE input_section_types, ONLY: section_vals_get_subs_vals,&
section_vals_type
USE kinds, ONLY: default_string_length,&
Expand Down Expand Up @@ -380,7 +381,7 @@ SUBROUTINE shake_roll_control(gci, local_molecules, molecule_set, &
lagrange_mult = simpar%lagrange_multipliers
dump_lm = simpar%dump_lm
! setting up for roll
IF (simpar%ensemble == npt_i_ensemble) THEN
IF (simpar%ensemble == npt_i_ensemble .OR. simpar%ensemble == npt_ia_ensemble) THEN
CALL get_roll_matrix('SHAKE', r_shake, v_shake, vector_r, vector_v)
ELSE IF (simpar%ensemble == npt_f_ensemble) THEN
CALL get_roll_matrix('SHAKE', r_shake, v_shake, vector_r, vector_v, u)
Expand Down Expand Up @@ -527,7 +528,7 @@ SUBROUTINE rattle_roll_control(gci, local_molecules, molecule_set, &
lagrange_mult = simpar%lagrange_multipliers
dump_lm = simpar%dump_lm
! setting up for roll
IF (simpar%ensemble == npt_i_ensemble) THEN
IF (simpar%ensemble == npt_i_ensemble .OR. simpar%ensemble == npt_ia_ensemble) THEN
CALL get_roll_matrix('RATTLE', v_shake=r_rattle, vector_v=vector)
ELSE IF (simpar%ensemble == npt_f_ensemble) THEN
CALL get_roll_matrix('RATTLE', v_shake=r_rattle, vector_v=vector, u=u)
Expand Down
3 changes: 2 additions & 1 deletion src/input_constants.F
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ MODULE input_constants
langevin_ensemble = 10, &
npe_f_ensemble = 11, &
npe_i_ensemble = 12, &
nvt_adiabatic_ensemble = 13
nvt_adiabatic_ensemble = 13, &
npt_ia_ensemble = 14

INTEGER, PARAMETER, PUBLIC :: do_thermo_same_as_part = 100, &
do_thermo_nose = 101, &
Expand Down
10 changes: 5 additions & 5 deletions src/input_cp2k_check.F
Original file line number Diff line number Diff line change
Expand Up @@ -22,10 +22,10 @@ MODULE input_cp2k_check
cp_unit_set_type
USE input_constants, ONLY: &
do_region_global, do_thermo_al, do_thermo_csvr, do_thermo_gle, do_thermo_nose, &
do_thermo_same_as_part, negf_run, npt_f_ensemble, npt_i_ensemble, vdw_nl_LMKLL, &
xc_funct_b3lyp, xc_funct_beefvdw, xc_funct_blyp, xc_funct_bp, xc_funct_hcth120, &
xc_funct_no_shortcut, xc_funct_olyp, xc_funct_pade, xc_funct_pbe, xc_funct_pbe0, &
xc_funct_tpss, xc_funct_xwpbe, xc_none, xc_vdw_fun_nonloc
do_thermo_same_as_part, negf_run, npt_f_ensemble, npt_i_ensemble, npt_ia_ensemble, &
vdw_nl_LMKLL, xc_funct_b3lyp, xc_funct_beefvdw, xc_funct_blyp, xc_funct_bp, &
xc_funct_hcth120, xc_funct_no_shortcut, xc_funct_olyp, xc_funct_pade, xc_funct_pbe, &
xc_funct_pbe0, xc_funct_tpss, xc_funct_xwpbe, xc_none, xc_vdw_fun_nonloc
USE input_keyword_types, ONLY: keyword_type
USE input_parsing, ONLY: section_vals_parse
USE input_section_types, ONLY: &
Expand Down Expand Up @@ -550,7 +550,7 @@ SUBROUTINE handle_ext_restart(input_declaration, input_file, para_env, output_un
flag = check_restart(input_file, restart_file, "MOTION%MD")
IF (flag) THEN
CALL section_vals_val_get(input_file, "MOTION%MD%ENSEMBLE", i_val=ensemble)
IF (ensemble == npt_i_ensemble .OR. ensemble == npt_f_ensemble) THEN
IF (ensemble == npt_i_ensemble .OR. ensemble == npt_f_ensemble .OR. ensemble == npt_ia_ensemble) THEN
CALL section_vals_val_get(r_section, "RESTART_BAROSTAT_THERMOSTAT", l_val=flag)
check = check_restart(input_file, restart_file, "MOTION%MD%BAROSTAT")
CALL restart_thermostat(flag, input_file, restart_file, "MOTION%MD%BAROSTAT%THERMOSTAT", &
Expand Down
11 changes: 6 additions & 5 deletions src/motion/input_cp2k_md.F
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ MODULE input_cp2k_md
USE input_constants, ONLY: &
isokin_ensemble, langevin_ensemble, md_init_default, md_init_vib, npe_f_ensemble, &
npe_i_ensemble, nph_ensemble, nph_uniaxial_damped_ensemble, nph_uniaxial_ensemble, &
npt_f_ensemble, npt_i_ensemble, nve_ensemble, nvt_adiabatic_ensemble, nvt_ensemble, &
reftraj_ensemble
npt_f_ensemble, npt_i_ensemble, npt_ia_ensemble, nve_ensemble, nvt_adiabatic_ensemble, &
nvt_ensemble, reftraj_ensemble
USE input_cp2k_barostats, ONLY: create_barostat_section
USE input_cp2k_thermostats, ONLY: create_region_section,&
create_thermo_fast_section,&
Expand Down Expand Up @@ -80,7 +80,7 @@ SUBROUTINE create_md_section(section)
default_i_val=nve_ensemble, &
enum_c_vals=s2a("NVE", "NVT", "NPT_I", "NPT_F", "MSST", "MSST_DAMPED", &
"HYDROSTATICSHOCK", "ISOKIN", "REFTRAJ", "LANGEVIN", "NPE_F", &
"NPE_I", "NVT_ADIABATIC"), &
"NPE_I", "NVT_ADIABATIC", "NPT_IA"), &
enum_desc=s2a("constant energy (microcanonical)", &
"constant temperature and volume (canonical)", &
"constant temperature and pressure using an isotropic cell", &
Expand All @@ -93,12 +93,13 @@ SUBROUTINE create_md_section(section)
"langevin dynamics (constant temperature)", &
"constant pressure ensemble (no thermostat)", &
"constant pressure ensemble using an isotropic cell (no thermostat)", &
"adiabatic dynamics in constant temperature and volume ensemble (CAFES)"), &
"adiabatic dynamics in constant temperature and volume ensemble (CAFES)", &
"NPT_I ensemble with frozen atoms in absolute coordinate"), &
citations=(/Evans1983, VandeVondele2002, Minary2003/), &
enum_i_vals=(/nve_ensemble, nvt_ensemble, npt_i_ensemble, npt_f_ensemble, &
nph_uniaxial_ensemble, nph_uniaxial_damped_ensemble, nph_ensemble, isokin_ensemble, &
reftraj_ensemble, langevin_ensemble, npe_f_ensemble, npe_i_ensemble, &
nvt_adiabatic_ensemble/))
nvt_adiabatic_ensemble, npt_ia_ensemble/))
CALL section_add_keyword(section, keyword)
CALL keyword_release(keyword)

Expand Down

0 comments on commit a564af0

Please sign in to comment.