TABLE OF CONTENTS
ABINIT/m_potential_list [ Modules ]
NAME
m_potential_list
FUNCTION
This module contains the potential_list potential. It is made of list of pointers to potentials, and has all the functionality of a potential It is to represent the equation H=\sum_i H_i with dH/dx = \sum_i dH_i/dx Datatypes: * potential_list_t: list of abstract_potential_t, which is essentially a list of pointer to abstract_potential_t itself is also a effpot type, and its energy, 1st derivative to energy are the sum of all items. Subroutines: TODO: add this when F2003 doc style is determined.
COPYRIGHT
Copyright (C) 2001-2024 ABINIT group (hexu) This file is distributed under the terms of the GNU General Public License, see ~abinit/COPYING or http://www.gnu.org/copyleft/gpl.txt . For the initials of contributors, see ~abinit/doc/developers/contributors.txt .
SOURCE
29 #if defined HAVE_CONFIG_H 30 #include "config.h" 31 #endif 32 33 #include "abi_common.h" 34 35 module m_potential_list 36 use defs_basis 37 use m_abicore 38 use m_errors 39 use m_xmpi 40 use m_mpi_scheduler, only: init_mpi_info 41 use m_multibinit_dataset, only: multibinit_dtset_type 42 use m_abstract_potential, only: abstract_potential_t 43 use m_multibinit_cell, only: mbcell_t, mbsupercell_t 44 use m_hashtable_strval, only: hash_table_t 45 46 implicit none
defs_abitypes/effpot_pointer_t [ Types ]
[ Top ] [ defs_abitypes ] [ Types ]
NAME
effpot_pointer_t
FUNCTION
class pointer to abstract potentials. Only here because Fortran does not allow array of pointers! So we must put pointer to an type and make an array of this type. It should only be used in potential_list_t.
SOURCE
60 type, private:: effpot_pointer_t ! pointer to effpot 61 class(abstract_potential_t) , pointer :: ptr=>null() 62 end type effpot_pointer_t
defs_abitypes/potential_list_t [ Types ]
[ Top ] [ defs_abitypes ] [ Types ]
NAME
potential_list_t
FUNCTION
A potential which is made of a list of potentials. H=\sum_i H_i
SOURCE
74 type, public, extends(abstract_potential_t) :: potential_list_t 75 integer :: size=0 ! size is the USED number of potentials in the list 76 integer :: capacity=0 ! capacity is the number of places allocated for potentials 77 type(effpot_pointer_t), allocatable :: list(:) ! A list of pointer type to potentials 78 contains 79 procedure :: initialize ! make an empty list 80 procedure :: ipot ! return the i'th potential 81 procedure :: set_supercell ! pointer to supercell and set_supercell for all pot in list 82 procedure :: set_params 83 procedure :: finalize 84 procedure :: append ! add a potential to the list 85 procedure :: calculate ! each potential in list do calculate and then sum. 86 procedure :: get_delta_E ! currently only used in spin potential, 87 ! to calculate energy difference when one spin changes. 88 89 procedure :: get_delta_E_lwf ! currently only used in lwf potential, 90 end type potential_list_t