19#include "./base/base_uses.f90"
36 CHARACTER(len=*),
PARAMETER,
PRIVATE :: moduleN =
'qs_fb_env_types'
65 REAL(KIND=
dp),
DIMENSION(:),
POINTER :: rcut => null()
68 REAL(KIND=
dp) :: filter_temperature = -1.0_dp
69 REAL(KIND=
dp) :: auto_cutoff_scale = -1.0_dp
70 REAL(KIND=
dp) :: eps_default = -1.0_dp
71 LOGICAL :: collective_com = .false.
72 INTEGER,
DIMENSION(:),
POINTER :: local_atoms => null()
73 INTEGER :: nlocal_atoms = -1
83 TYPE(fb_env_data),
POINTER,
PRIVATE :: obj => null()
97 IF (
ASSOCIATED(fb_env%obj))
THEN
98 IF (
ASSOCIATED(fb_env%obj%rcut))
THEN
99 DEALLOCATE (fb_env%obj%rcut)
101 IF (
ASSOCIATED(fb_env%obj%local_atoms))
THEN
102 DEALLOCATE (fb_env%obj%local_atoms)
106 DEALLOCATE (fb_env%obj)
133 SUBROUTINE fb_env_associate(a, b)
138 END SUBROUTINE fb_env_associate
151 res =
ASSOCIATED(fb_env%obj)
163 cpassert(.NOT.
ASSOCIATED(fb_env%obj))
164 ALLOCATE (fb_env%obj)
165 NULLIFY (fb_env%obj%rcut)
168 fb_env%obj%filter_temperature = 0.0_dp
169 fb_env%obj%auto_cutoff_scale = 1.0_dp
170 fb_env%obj%eps_default = 0.0_dp
171 fb_env%obj%collective_com = .true.
172 NULLIFY (fb_env%obj%local_atoms)
173 fb_env%obj%nlocal_atoms = 0
183 SUBROUTINE fb_env_init(fb_env)
186 cpassert(
ASSOCIATED(fb_env%obj))
187 IF (
ASSOCIATED(fb_env%obj%rcut))
THEN
188 DEALLOCATE (fb_env%obj%rcut)
192 fb_env%obj%filter_temperature = 0.0_dp
193 fb_env%obj%auto_cutoff_scale = 1.0_dp
194 fb_env%obj%eps_default = 0.0_dp
195 fb_env%obj%collective_com = .true.
196 IF (
ASSOCIATED(fb_env%obj%local_atoms))
THEN
197 DEALLOCATE (fb_env%obj%local_atoms)
199 fb_env%obj%nlocal_atoms = 0
200 END SUBROUTINE fb_env_init
224 filter_temperature, &
233 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: rcut
234 REAL(kind=
dp),
INTENT(OUT),
OPTIONAL :: filter_temperature, auto_cutoff_scale, &
237 OPTIONAL :: atomic_halos
239 LOGICAL,
INTENT(OUT),
OPTIONAL :: collective_com
240 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: local_atoms
241 INTEGER,
INTENT(OUT),
OPTIONAL :: nlocal_atoms
243 cpassert(
ASSOCIATED(fb_env%obj))
244 IF (
PRESENT(rcut))
THEN
245 rcut => fb_env%obj%rcut
247 IF (
PRESENT(filter_temperature))
THEN
248 filter_temperature = fb_env%obj%filter_temperature
250 IF (
PRESENT(auto_cutoff_scale))
THEN
251 auto_cutoff_scale = fb_env%obj%auto_cutoff_scale
253 IF (
PRESENT(eps_default))
THEN
254 eps_default = fb_env%obj%eps_default
256 IF (
PRESENT(atomic_halos))
THEN
259 IF (
PRESENT(trial_fns))
THEN
260 trial_fns = fb_env%obj%trial_fns
262 IF (
PRESENT(collective_com))
THEN
263 collective_com = fb_env%obj%collective_com
265 IF (
PRESENT(local_atoms))
THEN
266 local_atoms => fb_env%obj%local_atoms
268 IF (
PRESENT(nlocal_atoms))
THEN
269 nlocal_atoms = fb_env%obj%nlocal_atoms
290 filter_temperature, &
299 REAL(kind=
dp),
DIMENSION(:),
OPTIONAL,
POINTER :: rcut
300 REAL(kind=
dp),
INTENT(IN),
OPTIONAL :: filter_temperature, auto_cutoff_scale, &
303 OPTIONAL :: atomic_halos
305 LOGICAL,
INTENT(IN),
OPTIONAL :: collective_com
306 INTEGER,
DIMENSION(:),
OPTIONAL,
POINTER :: local_atoms
307 INTEGER,
INTENT(IN),
OPTIONAL :: nlocal_atoms
309 cpassert(
ASSOCIATED(fb_env%obj))
310 IF (
PRESENT(rcut))
THEN
311 IF (
ASSOCIATED(fb_env%obj%rcut))
THEN
312 DEALLOCATE (fb_env%obj%rcut)
314 fb_env%obj%rcut => rcut
316 IF (
PRESENT(filter_temperature))
THEN
317 fb_env%obj%filter_temperature = filter_temperature
319 IF (
PRESENT(auto_cutoff_scale))
THEN
320 fb_env%obj%auto_cutoff_scale = auto_cutoff_scale
322 IF (
PRESENT(eps_default))
THEN
323 fb_env%obj%eps_default = eps_default
325 IF (
PRESENT(atomic_halos))
THEN
329 IF (
PRESENT(trial_fns))
THEN
332 IF (
PRESENT(collective_com))
THEN
333 fb_env%obj%collective_com = collective_com
335 IF (
PRESENT(local_atoms))
THEN
336 IF (
ASSOCIATED(fb_env%obj%local_atoms))
THEN
337 DEALLOCATE (fb_env%obj%local_atoms)
339 fb_env%obj%local_atoms => local_atoms
341 IF (
PRESENT(nlocal_atoms))
THEN
342 fb_env%obj%nlocal_atoms = nlocal_atoms
Defines the basic variable types.
integer, parameter, public dp
subroutine, public fb_atomic_halo_list_release(atomic_halos)
Releases an fb_atomic_halo_list object.
subroutine, public fb_atomic_halo_list_associate(a, b)
Associates one fb_atomic_halo_list object to another.
subroutine, public fb_atomic_halo_list_nullify(atomic_halos)
Nullifies a fb_atomic_halo_list object, note that it does not release the original object....
logical function, public fb_env_has_data(fb_env)
Checks if a fb_env object is associated with an actual data content or not.
subroutine, public fb_env_release(fb_env)
releases a given fb_env
subroutine, public fb_env_get(fb_env, rcut, filter_temperature, auto_cutoff_scale, eps_default, atomic_halos, trial_fns, collective_com, local_atoms, nlocal_atoms)
method to get attributes from a given fb_env object
subroutine, public fb_env_nullify(fb_env)
nullifies a fb_env object, note that this does not release the original object. This procedure is use...
subroutine, public fb_env_set(fb_env, rcut, filter_temperature, auto_cutoff_scale, eps_default, atomic_halos, trial_fns, collective_com, local_atoms, nlocal_atoms)
method to set attributes from a given fb_env object
subroutine, public fb_env_create(fb_env)
creates an empty fb_env object
subroutine, public fb_trial_fns_nullify(trial_fns)
nullifies the content of given object
subroutine, public fb_trial_fns_associate(a, b)
associates the content of an object to that of another object of the same type
subroutine, public fb_trial_fns_release(trial_fns)
releases given object
defines a fb_atomic_halo_list object
the object container which allows for the creation of an array of pointers to fb_env
the object container which allows for the creation of an array of pointers to fb_trial_fns objects