32 #include "../../base/base_uses.f90"
47 PUBLIC :: barostat_type, &
53 INTEGER :: ref_count = 0
55 REAL(kind=
dp) :: temp_ext = 0.0_dp
56 TYPE(npt_info_type),
POINTER :: npt(:, :) => null()
57 TYPE(section_vals_type),
POINTER :: section => null()
58 END TYPE barostat_type
62 CHARACTER(len=*),
PARAMETER,
PRIVATE :: modulen =
'barostat_types'
79 TYPE(barostat_type),
POINTER :: barostat
80 TYPE(section_vals_type),
POINTER :: md_section
81 TYPE(force_env_type),
POINTER :: force_env
82 TYPE(simpar_type),
POINTER :: simpar
83 TYPE(global_environment_type),
POINTER :: globenv
85 LOGICAL :: check, explicit
86 TYPE(cell_type),
POINTER :: cell
87 TYPE(section_vals_type),
POINTER :: barostat_section
89 check = .NOT.
ASSOCIATED(barostat)
101 barostat%ref_count = 1
102 barostat%section => barostat_section
103 NULLIFY (barostat%npt)
106 barostat%temp_ext = simpar%temp_baro_ext
110 cell, work_section=barostat_section)
114 IF (.NOT.
ASSOCIATED(barostat%npt))
THEN
122 CALL cp_abort(__location__,
"The screening of the components of "// &
123 "the virial is available only with the NPT_F ensemble!")
126 CALL cp_warn(__location__, &
127 "A barostat has been defined with an MD ensemble which does not support barostat! "// &
128 "Its definition will be ignored!")
141 TYPE(barostat_type),
POINTER :: barostat
145 IF (
ASSOCIATED(barostat))
THEN
146 check = barostat%ref_count > 0
148 barostat%ref_count = barostat%ref_count - 1
149 IF (barostat%ref_count < 1)
THEN
150 IF (
ASSOCIATED(barostat%npt))
THEN
151 DEALLOCATE (barostat%npt)
153 NULLIFY (barostat%section)
154 DEALLOCATE (barostat)
Barostat structure: module containing barostat available for MD.
integer, parameter, public do_clv_y
integer, parameter, public do_clv_xyz
integer, parameter, public do_clv_yz
subroutine, public create_barostat_type(barostat, md_section, force_env, simpar, globenv)
...
subroutine, public release_barostat_type(barostat)
...
integer, parameter, public do_clv_xy
integer, parameter, public do_clv_geo_center
integer, parameter, public do_clv_z
integer, parameter, public do_clv_fix_point
integer, parameter, public do_clv_xz
integer, parameter, public do_clv_x
Handles all functions related to the CELL.
subroutine, public initialize_npt(simpar, globenv, npt_info, cell, work_section)
...
Lumps all possible extended system variables into one type for easy access and passing.
Interface for the force calculations.
recursive subroutine, public force_env_get(force_env, in_use, fist_env, qs_env, meta_env, fp_env, subsys, para_env, potential_energy, additional_potential, kinetic_energy, harmonic_shell, kinetic_shell, cell, sub_force_env, qmmm_env, qmmmx_env, eip_env, pwdft_env, globenv, input, force_env_section, method_name_id, root_section, mixed_env, nnp_env, embed_env)
returns various attributes about the force environment
Define type storing the global information of a run. Keep the amount of stored data small....
Defines the basic variable types.
integer, parameter, public dp
Type for storing MD parameters.