mod_neighbor_list Module


Uses

  • module~~mod_neighbor_list~~UsesGraph module~mod_neighbor_list mod_neighbor_list module~mod_io mod_io module~mod_neighbor_list->module~mod_io module~mod_adjacency_mat mod_adjacency_mat module~mod_neighbor_list->module~mod_adjacency_mat module~mod_memory mod_memory module~mod_neighbor_list->module~mod_memory module~mod_constants mod_constants module~mod_io->module~mod_constants module~mod_adjacency_mat->module~mod_memory module~mod_memory->module~mod_io module~mod_memory->module~mod_constants iso_c_binding iso_c_binding module~mod_memory->iso_c_binding module~mod_constants->iso_c_binding

Used by

  • module~~mod_neighbor_list~~UsedByGraph module~mod_neighbor_list mod_neighbor_list proc~vdw_init vdw_init proc~vdw_init->module~mod_neighbor_list proc~vdw_set_cutoff vdw_set_cutoff proc~vdw_set_cutoff->module~mod_neighbor_list proc~vdw_geomgrad vdw_geomgrad proc~vdw_geomgrad->module~mod_neighbor_list proc~vdw_terminate vdw_terminate proc~vdw_terminate->module~mod_neighbor_list proc~vdw_potential vdw_potential proc~vdw_potential->module~mod_neighbor_list module~mod_nonbonded mod_nonbonded module~mod_nonbonded->module~mod_neighbor_list proc~qm_helper_init_vdw qm_helper_init_vdw proc~qm_helper_init_vdw->module~mod_nonbonded proc~ommp_create_link_atom ommp_create_link_atom proc~ommp_create_link_atom->module~mod_nonbonded module~mod_link_atom mod_link_atom proc~ommp_create_link_atom->module~mod_link_atom module~mod_mmpol mod_mmpol proc~ommp_create_link_atom->module~mod_mmpol module~mod_qm_helper mod_qm_helper proc~ommp_create_link_atom->module~mod_qm_helper proc~mmpol_terminate mmpol_terminate proc~mmpol_terminate->module~mod_nonbonded proc~qm_helper_vdw_geomgrad qm_helper_vdw_geomgrad proc~qm_helper_vdw_geomgrad->module~mod_nonbonded proc~qm_helper_vdw_geomgrad->module~mod_link_atom proc~qm_helper_vdw_geomgrad->module~mod_mmpol module~mod_link_atom->module~mod_nonbonded proc~ommp_set_vdw_cutoff ommp_set_vdw_cutoff proc~ommp_set_vdw_cutoff->module~mod_nonbonded proc~qm_helper_terminate qm_helper_terminate proc~qm_helper_terminate->module~mod_nonbonded proc~ommp_full_geomgrad ommp_full_geomgrad proc~ommp_full_geomgrad->module~mod_nonbonded module~mod_geomgrad mod_geomgrad proc~ommp_full_geomgrad->module~mod_geomgrad module~mod_mmpol->module~mod_nonbonded module~mod_mmpol->module~mod_link_atom proc~ommp_get_vdw_energy ommp_get_vdw_energy proc~ommp_get_vdw_energy->module~mod_nonbonded proc~assign_vdw assign_vdw proc~assign_vdw->module~mod_nonbonded proc~mmpol_init_from_hdf5 mmpol_init_from_hdf5 proc~mmpol_init_from_hdf5->module~mod_nonbonded proc~mmpol_init_from_hdf5->module~mod_mmpol module~mod_qm_helper->module~mod_nonbonded module~mod_qm_helper->module~mod_mmpol proc~ommp_vdw_geomgrad ommp_vdw_geomgrad proc~ommp_vdw_geomgrad->module~mod_nonbonded module~mod_iohdf5 mod_iohdf5 module~mod_iohdf5->module~mod_nonbonded module~mod_iohdf5->module~mod_mmpol proc~qm_helper_vdw_energy qm_helper_vdw_energy proc~qm_helper_vdw_energy->module~mod_nonbonded proc~qm_helper_vdw_energy->module~mod_link_atom proc~qm_helper_vdw_energy->module~mod_mmpol 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~ommp_terminate_qm_helper ommp_terminate_qm_helper proc~ommp_terminate_qm_helper->module~mod_qm_helper 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~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~i1_hdf5_read_array i1_hdf5_read_array proc~i1_hdf5_read_array->module~mod_mmpol module~mod_inputloader mod_inputloader module~mod_inputloader->module~mod_mmpol proc~mmpol_init_from_xyz mmpol_init_from_xyz proc~mmpol_init_from_xyz->module~mod_mmpol proc~i2_hdf5_read_array i2_hdf5_read_array proc~i2_hdf5_read_array->module~mod_mmpol proc~mmpol_init_from_mmp mmpol_init_from_mmp proc~mmpol_init_from_mmp->module~mod_mmpol proc~r2_hdf5_read_array r2_hdf5_read_array proc~r2_hdf5_read_array->module~mod_mmpol proc~qm_helper_link_atom_geomgrad qm_helper_link_atom_geomgrad proc~qm_helper_link_atom_geomgrad->module~mod_link_atom proc~qm_helper_link_atom_geomgrad->module~mod_mmpol proc~ommp_get_bond_energy ommp_get_bond_energy proc~ommp_get_bond_energy->module~mod_link_atom proc~ommp_get_full_bnd_energy ommp_get_full_bnd_energy proc~ommp_get_full_bnd_energy->module~mod_link_atom proc~ommp_get_torsion_energy ommp_get_torsion_energy proc~ommp_get_torsion_energy->module~mod_link_atom 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~ommp_qm_helper_update_coord ommp_qm_helper_update_coord proc~ommp_qm_helper_update_coord->module~mod_qm_helper 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_terminate_qm_helper C_ommp_terminate_qm_helper proc~c_ommp_terminate_qm_helper->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~ommp_bond_geomgrad ommp_bond_geomgrad proc~ommp_bond_geomgrad->module~mod_link_atom proc~ommp_init_qm_helper ommp_init_qm_helper proc~ommp_init_qm_helper->module~mod_qm_helper proc~ommp_torsion_geomgrad ommp_torsion_geomgrad proc~ommp_torsion_geomgrad->module~mod_link_atom 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~c_ommp_qm_helper_get_cqm C_ommp_qm_helper_get_cqm proc~c_ommp_qm_helper_get_cqm->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~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~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_full_bnd_geomgrad ommp_full_bnd_geomgrad proc~ommp_full_bnd_geomgrad->module~mod_link_atom proc~ommp_update_link_atoms_position ommp_update_link_atoms_position proc~ommp_update_link_atoms_position->module~mod_link_atom proc~ommp_update_link_atoms_position->module~mod_qm_helper proc~update_coordinates update_coordinates proc~update_coordinates->module~mod_link_atom module~ommp_interface ommp_interface module~ommp_interface->module~mod_mmpol module~ommp_interface->module~mod_qm_helper module~ommp_interface->module~mod_iohdf5 module~mod_geomgrad->module~mod_mmpol proc~ommp_terminate ommp_terminate proc~ommp_terminate->module~mod_mmpol proc~r3_hdf5_read_array r3_hdf5_read_array proc~r3_hdf5_read_array->module~mod_mmpol proc~i3_hdf5_read_array i3_hdf5_read_array proc~i3_hdf5_read_array->module~mod_mmpol proc~l1_hdf5_read_array l1_hdf5_read_array proc~l1_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_update_coordinates C_ommp_update_coordinates proc~c_ommp_update_coordinates->module~mod_mmpol 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~ommp_get_link_atom_coordinates ommp_get_link_atom_coordinates proc~ommp_get_link_atom_coordinates->module~mod_link_atom 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~ommp_qm_helper_vdw_geomgrad ommp_qm_helper_vdw_geomgrad proc~ommp_qm_helper_vdw_geomgrad->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_system_from_qm_helper ommp_system_from_qm_helper proc~ommp_system_from_qm_helper->module~mod_mmpol proc~ommp_get_angle_energy ommp_get_angle_energy proc~ommp_get_angle_energy->module~mod_link_atom 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~r1_hdf5_read_array r1_hdf5_read_array proc~r1_hdf5_read_array->module~mod_mmpol module~mod_polarization mod_polarization module~mod_polarization->module~mod_mmpol proc~ommp_angle_geomgrad ommp_angle_geomgrad proc~ommp_angle_geomgrad->module~mod_link_atom 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 proc~ommp_init_mmp ommp_init_mmp proc~ommp_init_mmp->module~mod_inputloader proc~ommp_fixedelec_geomgrad ommp_fixedelec_geomgrad proc~ommp_fixedelec_geomgrad->module~mod_geomgrad proc~c_ommp_full_geomgrad C_ommp_full_geomgrad proc~c_ommp_full_geomgrad->module~ommp_interface module~mod_ommp_c_interface mod_ommp_C_interface module~mod_ommp_c_interface->module~ommp_interface proc~ommp_init_xyz ommp_init_xyz proc~ommp_init_xyz->module~mod_inputloader proc~ommp_polelec_geomgrad ommp_polelec_geomgrad proc~ommp_polelec_geomgrad->module~mod_geomgrad proc~polelec_geomgrad polelec_geomgrad proc~polelec_geomgrad->module~mod_polarization proc~ommp_get_polelec_energy ommp_get_polelec_energy proc~ommp_get_polelec_energy->module~mod_polarization proc~ommp_set_external_field ommp_set_external_field proc~ommp_set_external_field->module~mod_polarization

Contents


Derived Types

type, public ::  ommp_neigh_list

Components

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

Number of particles in the system

real(kind=rp), public :: cutoff

Cutoff distance for the neighbor list

integer(kind=ip), public :: cellf = 1

Number of subdivision of 'standard' cell. If you create smaller cells (cutoff/cellf) you can sensibly increase the performanc of the algorithm. See 10.1016/S0010-4655(98)00203-3

real(kind=rp), public :: celld

Dimension of each cell

integer(kind=ip), public :: ncell(3)

Number of cell along each dimension

integer(kind=ip), public :: ncells

Total number of cells

real(kind=rp), public :: offset(3)

Coordinates offset along each dimension (that is the minimum value of each coordinate.

integer(kind=ip), public :: nneigh

Number of neighbor cells

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

Offsets of neighbor cells

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

Cell of each particle

type(yale_sparse), public :: c2p

Particles contained in each cell, sparse matrix format


Subroutines

public subroutine nl_init(nl, c, cutoff, f)

Arguments

Type IntentOptional Attributes Name
type(ommp_neigh_list), intent(inout) :: nl

Neigh list object to initialize

real(kind=rp), intent(in) :: c(:,:)

Coordinates in input

real(kind=rp), intent(in) :: cutoff

Cut off distance

integer(kind=ip), intent(in) :: f

Subdivision required for each cell

public subroutine nl_terminate(nl)

Arguments

Type IntentOptional Attributes Name
type(ommp_neigh_list), intent(inout) :: nl

public subroutine nl_update(nl, c)

TODO this should be improved

Arguments

Type IntentOptional Attributes Name
type(ommp_neigh_list), intent(inout) :: nl

Neigh list object to initialize

real(kind=rp), intent(in) :: c(3,nl%n)

Coordinates in input

public subroutine get_ith_nl(nl, i, c, neigh, dist, nn)

Once that the neighbor list have been initialized and updated, this function provide a logical array for atom i with all interactions that should be computed and corresponding distances.

Arguments

Type IntentOptional Attributes Name
type(ommp_neigh_list), intent(in) :: nl

Neigh list object

integer(kind=ip), intent(in) :: i

Index of atom for which the neigbor list is required

real(kind=rp), intent(in) :: c(3,nl%n)

Coordinates in input

integer(kind=ip), intent(out) :: neigh(nl%n)

Integer array with neighbors' indexes. Only the first nn elements are valid

real(kind=rp), intent(out) :: dist(nl%n)

Array for returning distances. Only the first nn elements are valid

integer(kind=ip), intent(out) :: nn

Number of neighbors