mod_tree Module


Uses

  • module~~mod_tree~~UsesGraph module~mod_tree mod_tree module~mod_fmm_utils mod_fmm_utils module~mod_tree->module~mod_fmm_utils module~mod_adjacency_mat mod_adjacency_mat module~mod_tree->module~mod_adjacency_mat module~mod_constants mod_constants module~mod_tree->module~mod_constants module~mod_fmm_utils->module~mod_constants module~mod_memory mod_memory module~mod_adjacency_mat->module~mod_memory iso_c_binding iso_c_binding module~mod_constants->iso_c_binding module~mod_memory->module~mod_constants module~mod_memory->iso_c_binding module~mod_io mod_io module~mod_memory->module~mod_io module~mod_io->module~mod_constants

Used by

  • module~~mod_tree~~UsedByGraph module~mod_tree mod_tree module~fmmlib_interface fmmlib_interface module~fmmlib_interface->module~mod_tree module~mod_ribtree mod_ribtree module~fmmlib_interface->module~mod_ribtree module~mod_octatree mod_octatree module~fmmlib_interface->module~mod_octatree module~mod_fmm mod_fmm module~fmmlib_interface->module~mod_fmm module~mod_ribtree->module~mod_tree module~mod_octatree->module~mod_tree proc~free_fmm free_fmm proc~free_fmm->module~mod_tree module~mod_fmm->module~mod_tree module~mod_electrostatics mod_electrostatics module~mod_electrostatics->module~fmmlib_interface proc~mmpol_init mmpol_init proc~mmpol_init->module~mod_electrostatics proc~electrostatic_for_grad electrostatic_for_grad proc~electrostatic_for_grad->module~mod_electrostatics proc~c_ommp_set_fmm_distance C_ommp_set_fmm_distance proc~c_ommp_set_fmm_distance->module~mod_electrostatics proc~ommp_get_polelec_energy ommp_get_polelec_energy proc~ommp_get_polelec_energy->module~mod_electrostatics module~mod_polarization mod_polarization proc~ommp_get_polelec_energy->module~mod_polarization proc~mmpol_init_from_xyz mmpol_init_from_xyz proc~mmpol_init_from_xyz->module~mod_electrostatics module~mod_mmpol mod_mmpol proc~mmpol_init_from_xyz->module~mod_mmpol module~mod_prm mod_prm proc~mmpol_init_from_xyz->module~mod_prm module~mod_mmpol->module~mod_electrostatics proc~init_eel_for_link_atom init_eel_for_link_atom proc~init_eel_for_link_atom->module~mod_electrostatics proc~init_eel_for_link_atom->module~mod_prm proc~mmpol_init_from_mmp mmpol_init_from_mmp proc~mmpol_init_from_mmp->module~mod_electrostatics proc~mmpol_init_from_mmp->module~mod_mmpol proc~rotate_multipoles rotate_multipoles proc~rotate_multipoles->module~mod_electrostatics proc~mmpol_init_from_hdf5 mmpol_init_from_hdf5 proc~mmpol_init_from_hdf5->module~mod_electrostatics proc~mmpol_init_from_hdf5->module~mod_mmpol proc~assign_mpoles assign_mpoles proc~assign_mpoles->module~mod_electrostatics proc~ommp_potential_mm2ext ommp_potential_mm2ext proc~ommp_potential_mm2ext->module~mod_electrostatics proc~fixedelec_geomgrad fixedelec_geomgrad proc~fixedelec_geomgrad->module~mod_electrostatics proc~ommp_get_fixedelec_energy ommp_get_fixedelec_energy proc~ommp_get_fixedelec_energy->module~mod_electrostatics module~mod_solvers mod_solvers module~mod_solvers->module~mod_electrostatics proc~tmatvec_otf TMatVec_otf proc~tmatvec_otf->module~mod_electrostatics proc~c_ommp_field_mm2ext C_ommp_field_mm2ext proc~c_ommp_field_mm2ext->module~mod_electrostatics proc~ommp_turn_pol_off ommp_turn_pol_off proc~ommp_turn_pol_off->module~mod_electrostatics proc~c_ommp_field_pol2ext C_ommp_field_pol2ext proc~c_ommp_field_pol2ext->module~mod_electrostatics module~ommp_interface ommp_interface module~ommp_interface->module~mod_electrostatics module~ommp_interface->module~mod_mmpol module~mod_iohdf5 mod_iohdf5 module~ommp_interface->module~mod_iohdf5 module~mod_qm_helper mod_qm_helper module~ommp_interface->module~mod_qm_helper module~mod_iohdf5->module~mod_electrostatics module~mod_iohdf5->module~mod_mmpol proc~ommp_set_default_matv ommp_set_default_matv proc~ommp_set_default_matv->module~mod_electrostatics proc~ommp_field_mm2ext ommp_field_mm2ext proc~ommp_field_mm2ext->module~mod_electrostatics proc~ommp_field_pol2ext ommp_field_pol2ext proc~ommp_field_pol2ext->module~mod_electrostatics proc~ommp_potential_mmpol2ext ommp_potential_mmpol2ext proc~ommp_potential_mmpol2ext->module~mod_electrostatics proc~mmpol_terminate mmpol_terminate proc~mmpol_terminate->module~mod_electrostatics proc~ommp_set_default_solver ommp_set_default_solver proc~ommp_set_default_solver->module~mod_electrostatics proc~ommp_set_external_field ommp_set_external_field proc~ommp_set_external_field->module~mod_electrostatics proc~ommp_set_external_field->module~mod_polarization proc~ommp_field_mmpol2ext ommp_field_mmpol2ext proc~ommp_field_mmpol2ext->module~mod_electrostatics proc~update_coordinates update_coordinates proc~update_coordinates->module~mod_electrostatics proc~electrostatic_for_ene electrostatic_for_ene proc~electrostatic_for_ene->module~mod_electrostatics proc~ommp_potential_pol2ext ommp_potential_pol2ext proc~ommp_potential_pol2ext->module~mod_electrostatics proc~rotation_geomgrad rotation_geomgrad proc~rotation_geomgrad->module~mod_electrostatics proc~mmpol_prepare mmpol_prepare proc~mmpol_prepare->module~mod_electrostatics proc~c_ommp_set_fmm_min_cell_size C_ommp_set_fmm_min_cell_size proc~c_ommp_set_fmm_min_cell_size->module~mod_electrostatics module~mod_polarization->module~mod_electrostatics module~mod_polarization->module~mod_mmpol proc~dipole_t dipole_T proc~dipole_t->module~mod_electrostatics proc~assign_pol assign_pol proc~assign_pol->module~mod_electrostatics proc~polelec_geomgrad polelec_geomgrad proc~polelec_geomgrad->module~mod_electrostatics proc~polelec_geomgrad->module~mod_polarization module~mod_prm->module~mod_electrostatics proc~polarization polarization proc~polarization->module~mod_solvers proc~ommp_system_from_qm_helper ommp_system_from_qm_helper proc~ommp_system_from_qm_helper->module~mod_mmpol proc~ommp_system_from_qm_helper->module~mod_prm proc~qm_helper_link_atom_geomgrad qm_helper_link_atom_geomgrad proc~qm_helper_link_atom_geomgrad->module~mod_mmpol module~mod_inputloader mod_inputloader module~mod_inputloader->module~mod_mmpol proc~r1_hdf5_read_array r1_hdf5_read_array proc~r1_hdf5_read_array->module~mod_mmpol proc~r2_hdf5_read_array r2_hdf5_read_array proc~r2_hdf5_read_array->module~mod_mmpol proc~i2_hdf5_read_array i2_hdf5_read_array proc~i2_hdf5_read_array->module~mod_mmpol proc~i1_hdf5_read_array i1_hdf5_read_array proc~i1_hdf5_read_array->module~mod_mmpol module~mod_qm_helper->module~mod_mmpol proc~qm_helper_vdw_energy qm_helper_vdw_energy proc~qm_helper_vdw_energy->module~mod_mmpol proc~qm_helper_init_vdw_prm qm_helper_init_vdw_prm proc~qm_helper_init_vdw_prm->module~mod_prm proc~init_bonded_for_link_atom init_bonded_for_link_atom proc~init_bonded_for_link_atom->module~mod_prm proc~l1_hdf5_read_array l1_hdf5_read_array proc~l1_hdf5_read_array->module~mod_mmpol proc~i3_hdf5_read_array i3_hdf5_read_array proc~i3_hdf5_read_array->module~mod_mmpol proc~ommp_terminate ommp_terminate proc~ommp_terminate->module~mod_mmpol proc~qm_helper_vdw_geomgrad qm_helper_vdw_geomgrad proc~qm_helper_vdw_geomgrad->module~mod_mmpol module~mod_geomgrad mod_geomgrad module~mod_geomgrad->module~mod_mmpol proc~ommp_create_link_atom ommp_create_link_atom proc~ommp_create_link_atom->module~mod_mmpol proc~ommp_create_link_atom->module~mod_qm_helper proc~r3_hdf5_read_array r3_hdf5_read_array proc~r3_hdf5_read_array->module~mod_mmpol proc~l2_hdf5_read_array l2_hdf5_read_array proc~l2_hdf5_read_array->module~mod_mmpol proc~c_ommp_full_geomgrad C_ommp_full_geomgrad proc~c_ommp_full_geomgrad->module~ommp_interface proc~c_ommp_update_coordinates C_ommp_update_coordinates proc~c_ommp_update_coordinates->module~mod_mmpol module~mod_ommp_c_interface mod_ommp_C_interface module~mod_ommp_c_interface->module~ommp_interface proc~ommp_fixedelec_geomgrad ommp_fixedelec_geomgrad proc~ommp_fixedelec_geomgrad->module~mod_geomgrad proc~c_ommp_qm_helper_use_frozen C_ommp_qm_helper_use_frozen proc~c_ommp_qm_helper_use_frozen->module~mod_qm_helper proc~c_ommp_qm_helper_get_cqm C_ommp_qm_helper_get_cqm proc~c_ommp_qm_helper_get_cqm->module~mod_qm_helper proc~c_ommp_qm_helper_get_v_m2n C_ommp_qm_helper_get_V_m2n proc~c_ommp_qm_helper_get_v_m2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_p2n C_ommp_qm_helper_get_E_p2n proc~c_ommp_qm_helper_get_e_p2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_h_n2m C_ommp_qm_helper_get_H_n2m proc~c_ommp_qm_helper_get_h_n2m->module~mod_qm_helper proc~ommp_qm_helper_vdw_energy ommp_qm_helper_vdw_energy proc~ommp_qm_helper_vdw_energy->module~mod_qm_helper proc~ommp_terminate_qm_helper ommp_terminate_qm_helper proc~ommp_terminate_qm_helper->module~mod_qm_helper proc~ommp_qm_helper_vdw_geomgrad ommp_qm_helper_vdw_geomgrad proc~ommp_qm_helper_vdw_geomgrad->module~mod_qm_helper proc~c_ommp_qm_helper_get_frozen C_ommp_qm_helper_get_frozen proc~c_ommp_qm_helper_get_frozen->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_n2p C_ommp_qm_helper_get_E_n2p proc~c_ommp_qm_helper_get_e_n2p->module~mod_qm_helper proc~ommp_full_geomgrad ommp_full_geomgrad proc~ommp_full_geomgrad->module~mod_geomgrad proc~ommp_polelec_geomgrad ommp_polelec_geomgrad proc~ommp_polelec_geomgrad->module~mod_geomgrad proc~c_ommp_qm_helper_get_g_n2p C_ommp_qm_helper_get_G_n2p proc~c_ommp_qm_helper_get_g_n2p->module~mod_qm_helper proc~ommp_init_qm_helper ommp_init_qm_helper proc~ommp_init_qm_helper->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_n2m C_ommp_qm_helper_get_E_n2m proc~c_ommp_qm_helper_get_e_n2m->module~mod_qm_helper proc~c_ommp_qm_helper_get_g_n2m C_ommp_qm_helper_get_G_n2m proc~c_ommp_qm_helper_get_g_n2m->module~mod_qm_helper proc~ommp_init_mmp ommp_init_mmp proc~ommp_init_mmp->module~mod_inputloader proc~c_ommp_qm_helper_use_nonbonded C_ommp_qm_helper_use_nonbonded proc~c_ommp_qm_helper_use_nonbonded->module~mod_qm_helper proc~ommp_init_xyz ommp_init_xyz proc~ommp_init_xyz->module~mod_inputloader proc~ommp_qm_helper_update_coord ommp_qm_helper_update_coord proc~ommp_qm_helper_update_coord->module~mod_qm_helper proc~ommp_qm_helper_link_atom_geomgrad ommp_qm_helper_link_atom_geomgrad proc~ommp_qm_helper_link_atom_geomgrad->module~mod_qm_helper proc~ommp_update_link_atoms_position ommp_update_link_atoms_position proc~ommp_update_link_atoms_position->module~mod_qm_helper proc~c_ommp_qm_helper_get_e_m2n C_ommp_qm_helper_get_E_m2n proc~c_ommp_qm_helper_get_e_m2n->module~mod_qm_helper proc~c_ommp_qm_helper_get_qm_atoms C_ommp_qm_helper_get_qm_atoms proc~c_ommp_qm_helper_get_qm_atoms->module~mod_qm_helper proc~c_ommp_qm_helper_get_npol C_ommp_qm_helper_get_npol proc~c_ommp_qm_helper_get_npol->module~mod_qm_helper proc~c_ommp_terminate_qm_helper C_ommp_terminate_qm_helper proc~c_ommp_terminate_qm_helper->module~mod_qm_helper proc~c_ommp_qm_helper_get_nmm C_ommp_qm_helper_get_nmm proc~c_ommp_qm_helper_get_nmm->module~mod_qm_helper proc~c_ommp_qm_helper_get_v_p2n C_ommp_qm_helper_get_V_p2n proc~c_ommp_qm_helper_get_v_p2n->module~mod_qm_helper

Contents


Derived Types

type, public ::  fmm_tree_type

Data structore to represent the tree for storing sources and targets of the fmm problem

Components

Type Visibility Attributes Name Initial
integer(kind=ip), public :: tree_degree = 0

Maximum number of children for each node

integer(kind=ip), public :: n_nodes = 0

Number of nodes in the tree

integer(kind=ip), public :: breadth = 0

Number of levels in the tree

integer(kind=ip), public, allocatable :: children(:,:)

For each node in the tree, its children (0 is the null element)

integer(kind=ip), public, allocatable :: parent(:)

For each node in the tree, its parent (0 is the null element)

integer(kind=ip), public, allocatable :: node_level(:)

For each node the level of the tree in which it is located (1-based)

logical(kind=lp), public, allocatable :: is_leaf(:)

For each node true if is a leaf and false otherwise

type(yale_sparse), public :: level_list

For each level, the list of the nodes contained

integer(kind=ip), public :: n_particles = 0

Number of particles stored in the tree

real(kind=rp), public, pointer :: particles_coords(:,:)

Pointer to particle coordinates

type(yale_sparse), public :: particle_list

List of particles contained in each node, for all non-leaf nodes this list should be empty

integer(kind=ip), public, allocatable :: particle_to_node(:)
real(kind=rp), public, allocatable :: node_centroid(:,:)

For each node its centroid (in cartesian coordinates)

real(kind=rp), public, allocatable :: node_dimension(:)

For each node, its dimension (or radius)

type(yale_sparse), public :: near_nl

List of nodes pair eligible for near-field

type(yale_sparse), public :: far_nl

List of nodes pair eligible for far-field


Subroutines

public subroutine allocate_tree(t)

Given a tree with all the dimension set, it allocates all the required arrays and data stractures for populating the tree

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(inout) :: t

public subroutine free_tree(t)

Frees all allocatable quantities contained inside a tree

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(inout) :: t

public subroutine print_tree(t)

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(in) :: t

Tree data structure

public subroutine tree_populate_farnear_lists_safe(t, min_dist_thr)

Just for testing, creates far and near list using a double loop algorithm, it is basically just the application of the following definition: 1. Two nodes are near IF they are both leaves and if the distance is below [min_dist_thr] 2. Two nodes are far IF none of their discendent are near 3. Descendent of two far nodes are not present in any list

Read more…

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(inout) :: t

Tree data structure to populate

real(kind=rp), intent(in), optional :: min_dist_thr

Minimum threshold for two nodes to be near, every nodes within this threshold are guaranteed to be near

private subroutine aggregative_pass(t, uncompressed_n_far, uncompressed_far)

Aggregates far nodes to upper levels of the tree. Operation are performed on uncompressed list

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(in) :: t
integer(kind=ip), intent(inout) :: uncompressed_n_far(t%n_nodes)
integer(kind=ip), intent(inout) :: uncompressed_far(:,:)

public subroutine tree_populate_farnear_lists(t, min_dist_thr)

Now compress in yale sparse format and delete the uncompressed lists

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(inout) :: t

Tree data structure to populate

real(kind=rp), intent(in), optional :: min_dist_thr

Minimum threshold for two nodes to be near, every nodes within this threshold are guaranteed to be near

public subroutine populate_leaf_list(t)

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(inout) :: t

Tree data structure to populate

public subroutine populate_level_list(t)

Arguments

Type IntentOptional Attributes Name
type(fmm_tree_type), intent(inout) :: t

Tree data structure to populate