Tinker9 70bd052 (Thu Nov 9 12:11:35 2023 -0800)
Loading...
Searching...
No Matches
Classes | Typedefs | Enumerations | Functions | Variables
Neighbor List

Neighbor lists and spatial decomposition. More...

Classes

struct  tinker::EnableEnumBitMask< Nbl >
 
struct  tinker::NBList
 Verlet list: pairwise neighbor list indices and storage. More...
 
class  tinker::Spatial
 
struct  tinker::Spatial::SortedAtom
 
struct  tinker::Spatial::Center
 
struct  tinker::Spatial::ScaleInfo
 

Typedefs

typedef GenericUnit< NBList, GenericUnitVersion::ENABLE_ON_DEVICE > tinker::NBListUnit
 
typedef GenericUnit< Spatial, GenericUnitVersion::DISABLE_ON_DEVICE > tinker::SpatialUnit
 

Enumerations

enum class  tinker::Nbl { tinker::Nbl::UNDEFINED = 0x00 , tinker::Nbl::DOUBLE_LOOP = 0x01 , tinker::Nbl::VERLET = 0x02 , tinker::Nbl::SPATIAL = 0x04 }
 

Functions

Nbl tinker::vlistVersion ()
 
Nbl tinker::clistVersion ()
 
Nbl tinker::mlistVersion ()
 For multipole, polarization, repulsion, etc. More...
 
Nbl tinker::ulistVersion ()
 For sparse preconditioner. More...
 
Nbl tinker::dsplistVersion ()
 For dispersion. More...
 
void tinker::nblistData (RcOp)
 Sets up data on device. More...
 
void tinker::nblistRefresh ()
 Updates the neighbor lists. More...
 
void tinker::spatialUpdate (SpatialUnit)
 

Variables

NBListUnit tinker::vlist_unit
 
NBListUnit tinker::clist_unit
 
NBListUnit tinker::mlist_unit
 
NBListUnit tinker::ulist_unit
 
NBListUnit tinker::dsplist_unit
 
SpatialUnit tinker::cspatial_v2_unit
 
SpatialUnit tinker::vspatial_v2_unit
 
SpatialUnit tinker::uspatial_v2_unit
 
SpatialUnit tinker::mspatial_v2_unit
 
SpatialUnit tinker::dspspatial_v2_unit
 
constexpr int tinker::cspatial_fresh_mask_echglj = 0x00000001
 

Detailed Description

Neighbor lists and spatial decomposition.


Class Documentation

◆ tinker::EnableEnumBitMask< Nbl >

struct tinker::EnableEnumBitMask< Nbl >

Static Public Attributes

static constexpr bool value = true
 

Member Data Documentation

◆ value

constexpr bool tinker::EnableEnumBitMask< Nbl >::value = true
staticconstexpr

◆ tinker::NBList

struct tinker::NBList

Verlet list: pairwise neighbor list indices and storage.

Public Member Functions

 ~NBList ()
 

Public Attributes

int * nlst
 number of sites in list for each atom More...
 
int * lst
 all of the sites in list More...
 
int * update
 update flag for each atom More...
 
realxold
 old x coordinates More...
 
realyold
 old y coordinates More...
 
realzold
 old z coordinates More...
 
const realx
 current x coordinates More...
 
const realy
 current y coordinates More...
 
const realz
 current z coordinates More...
 
int maxnlst
 max number of neighbors for each atom More...
 
real cutoff
 list cutoff distance More...
 
real buffer
 width of the neighbor list buffer region More...
 

Constructor & Destructor Documentation

◆ ~NBList()

tinker::NBList::~NBList ( )

Member Data Documentation

◆ buffer

real tinker::NBList::buffer

width of the neighbor list buffer region

◆ cutoff

real tinker::NBList::cutoff

list cutoff distance

◆ lst

int* tinker::NBList::lst

all of the sites in list

◆ maxnlst

int tinker::NBList::maxnlst

max number of neighbors for each atom

◆ nlst

int* tinker::NBList::nlst

number of sites in list for each atom

◆ update

int* tinker::NBList::update

update flag for each atom

◆ x

const real* tinker::NBList::x

current x coordinates

◆ xold

real* tinker::NBList::xold

old x coordinates

◆ y

const real* tinker::NBList::y

current y coordinates

◆ yold

real* tinker::NBList::yold

old y coordinates

◆ z

const real* tinker::NBList::z

current z coordinates

◆ zold

real* tinker::NBList::zold

old z coordinates

◆ tinker::Spatial

class tinker::Spatial

Public Member Functions

 ~Spatial ()
 

Static Public Member Functions

static void dataAlloc (SpatialUnit &u, int n, double cutoff, double buffer, const real *x, const real *y, const real *z, int nstype, int ns1, int(*js1)[2], int ns2, int(*js2)[2], int ns3, int(*js3)[2], int ns4, int(*js4)[2])
 
static void dataInit (SpatialUnit)
 
static void dataUpdateSorted (SpatialUnit)
 
template<class IMG >
static void RunStep5 (SpatialUnit u)
 

Public Attributes

ScaleInfo si1
 #ScaleInfo object 1. More...
 
ScaleInfo si2
 #ScaleInfo object 2. More...
 
ScaleInfo si3
 #ScaleInfo object 3. More...
 
ScaleInfo si4
 #ScaleInfo object 4. More...
 
SortedAtomsorted
 Sorted atoms. Length n. More...
 
int * bnum
 bnum[sorted[i].unsorted] = i. Length n. More...
 
Centerakc
 
Centerhalf
 Half box size and radius. Length nak. More...
 
int * iakpl
 
int * lst
 
int * iak
 
const realx
 Reference of the coordinates. More...
 
const realy
 Reference of the coordinates. More...
 
const realz
 Reference of the coordinates. More...
 
int * update
 
real cutoff
 Cutoff distance. More...
 
real buffer
 Cutoff buffer distance. More...
 
int fresh
 
int nakpl
 Length of iakpl. Multiple. More...
 
int niak
 Length of iak, not greater than LSTCAP*nak. More...
 
int n
 Number of atoms. More...
 

Static Public Attributes

static constexpr int BLOCK = 32
 
static constexpr int LSTCAP = 48
 Parameter for pre-allocating work arrays. More...
 

Friends

void nblistRefresh ()
 Updates the neighbor lists. More...
 
void spatialUpdate (SpatialUnit)
 
void spatialDataInit_cu (SpatialUnit)
 

Constructor & Destructor Documentation

◆ ~Spatial()

tinker::Spatial::~Spatial ( )

Member Function Documentation

◆ dataAlloc()

static void tinker::Spatial::dataAlloc ( SpatialUnit u,
int  n,
double  cutoff,
double  buffer,
const real x,
const real y,
const real z,
int  nstype,
int  ns1,
int(*)  js1[2],
int  ns2,
int(*)  js2[2],
int  ns3,
int(*)  js3[2],
int  ns4,
int(*)  js4[2] 
)
static

◆ dataInit()

static void tinker::Spatial::dataInit ( SpatialUnit  )
static

◆ dataUpdateSorted()

static void tinker::Spatial::dataUpdateSorted ( SpatialUnit  )
static

◆ RunStep5()

template<class IMG >
static void tinker::Spatial::RunStep5 ( SpatialUnit  u)
static

Friends And Related Function Documentation

◆ nblistRefresh

void nblistRefresh ( )
friend

Updates the neighbor lists.

◆ spatialDataInit_cu

void spatialDataInit_cu ( SpatialUnit  )
friend

◆ spatialUpdate

void spatialUpdate ( SpatialUnit  )
friend

Member Data Documentation

◆ akc

Center* tinker::Spatial::akc

Block centers and the logical flag for a centralized block of atoms. Length nak.

◆ BLOCK

constexpr int tinker::Spatial::BLOCK = 32
staticconstexpr

Number of atom per block. Equal to WARP_SIZE and sizeof(int).

◆ bnum

int* tinker::Spatial::bnum

bnum[sorted[i].unsorted] = i. Length n.

◆ buffer

real tinker::Spatial::buffer

Cutoff buffer distance.

◆ cutoff

real tinker::Spatial::cutoff

Cutoff distance.

◆ fresh

int tinker::Spatial::fresh

Logical flag for a fresh neighbor list, meaning no changes in the coordinates after the list construction.

◆ half

Center* tinker::Spatial::half

Half box size and radius. Length nak.

◆ iak

int* tinker::Spatial::iak

Block numbers Bi. Every Bi is duplicated several times to match its padded neighbors in lst. One Bi corresponds to BLOCK neighbors.

◆ iakpl

int* tinker::Spatial::iakpl

List of block pairs subject to exclusion rules. Length nakpl. The pair (x,y) was encoded via triangular number and stored as tri(x)+y.

◆ lst

int* tinker::Spatial::lst

Neighbors of a block of atoms. For a pair (Bi,Nij), Nij is the j-th neighbor of atoms in block Bi. These neighbors of Bi are padded with impossible atom number to make the count of Nij a multiple of BLOCK.

◆ LSTCAP

constexpr int tinker::Spatial::LSTCAP = 48
staticconstexpr

Parameter for pre-allocating work arrays.

◆ n

int tinker::Spatial::n

Number of atoms.

◆ nakpl

int tinker::Spatial::nakpl

Length of iakpl. Multiple.

◆ niak

int tinker::Spatial::niak

Length of iak, not greater than LSTCAP*nak.

◆ si1

ScaleInfo tinker::Spatial::si1

#ScaleInfo object 1.

◆ si2

ScaleInfo tinker::Spatial::si2

#ScaleInfo object 2.

◆ si3

ScaleInfo tinker::Spatial::si3

#ScaleInfo object 3.

◆ si4

ScaleInfo tinker::Spatial::si4

#ScaleInfo object 4.

◆ sorted

SortedAtom* tinker::Spatial::sorted

Sorted atoms. Length n.

◆ update

int* tinker::Spatial::update

Work array of length max(2*#n,128). One use is to store the logical flags during the list update.

◆ x

const real* tinker::Spatial::x

Reference of the coordinates.

◆ y

const real* tinker::Spatial::y

Reference of the coordinates.

◆ z

const real* tinker::Spatial::z

Reference of the coordinates.

◆ tinker::Spatial::SortedAtom

struct tinker::Spatial::SortedAtom

Sorted atoms.

Public Attributes

real x
 
real y
 
real z
 
int unsorted
 Original atom number. More...
 

Member Data Documentation

◆ unsorted

int tinker::Spatial::SortedAtom::unsorted

Original atom number.

◆ x

real tinker::Spatial::SortedAtom::x

◆ y

real tinker::Spatial::SortedAtom::y

◆ z

real tinker::Spatial::SortedAtom::z

◆ tinker::Spatial::Center

struct tinker::Spatial::Center

Public Attributes

real x
 
real y
 
real z
 
real w
 

Member Data Documentation

◆ w

real tinker::Spatial::Center::w

◆ x

real tinker::Spatial::Center::x

◆ y

real tinker::Spatial::Center::y

◆ z

real tinker::Spatial::Center::z

◆ tinker::Spatial::ScaleInfo

struct tinker::Spatial::ScaleInfo

Public Member Functions

void init ()
 
void set (int nns, int(*jjs)[2])
 

Public Attributes

int(* js )[2]
 Atom pairs of atoms with exclusion rules (of length ns). More...
 
unsigned int * bit0
 
int ns
 Number of pairs of atoms with exclusion rules. More...
 

Member Function Documentation

◆ init()

void tinker::Spatial::ScaleInfo::init ( )

◆ set()

void tinker::Spatial::ScaleInfo::set ( int  nns,
int(*)  jjs[2] 
)

Member Data Documentation

◆ bit0

unsigned int* tinker::Spatial::ScaleInfo::bit0

Bits array, stored as 32-bit unsigned integers (of length 32*cap_nakpl).

◆ js

int(* tinker::Spatial::ScaleInfo::js)[2]

Atom pairs of atoms with exclusion rules (of length ns).

◆ ns

int tinker::Spatial::ScaleInfo::ns

Number of pairs of atoms with exclusion rules.

Typedef Documentation

◆ NBListUnit

typedef GenericUnit<NBList, GenericUnitVersion::ENABLE_ON_DEVICE> tinker::NBListUnit

◆ SpatialUnit

typedef GenericUnit<Spatial, GenericUnitVersion::DISABLE_ON_DEVICE> tinker::SpatialUnit

Enumeration Type Documentation

◆ Nbl

enum class tinker::Nbl
strong
Enumerator
UNDEFINED 

Undefined.

DOUBLE_LOOP 

Double loop.

VERLET 

Verlet neighbor list.

SPATIAL 

Spatial decomposition.

Function Documentation

◆ clistVersion()

Nbl tinker::clistVersion ( )

For partial charge models and for VDW models that do not have a separate set of coordinates.

◆ dsplistVersion()

Nbl tinker::dsplistVersion ( )

For dispersion.

◆ mlistVersion()

Nbl tinker::mlistVersion ( )

For multipole, polarization, repulsion, etc.

◆ nblistData()

void tinker::nblistData ( RcOp  )

Sets up data on device.

◆ nblistRefresh()

void tinker::nblistRefresh ( )

Updates the neighbor lists.

◆ spatialUpdate()

void tinker::spatialUpdate ( SpatialUnit  )

◆ ulistVersion()

Nbl tinker::ulistVersion ( )

For sparse preconditioner.

◆ vlistVersion()

Nbl tinker::vlistVersion ( )

For Halgren Buffered 14-7 potential only, otherwise returns Nbl::UNDEFINED.

Variable Documentation

◆ clist_unit

NBListUnit tinker::clist_unit
extern

◆ cspatial_fresh_mask_echglj

constexpr int tinker::cspatial_fresh_mask_echglj = 0x00000001
constexpr

◆ cspatial_v2_unit

SpatialUnit tinker::cspatial_v2_unit
extern

◆ dsplist_unit

NBListUnit tinker::dsplist_unit
extern

◆ dspspatial_v2_unit

SpatialUnit tinker::dspspatial_v2_unit
extern

◆ mlist_unit

NBListUnit tinker::mlist_unit
extern

◆ mspatial_v2_unit

SpatialUnit tinker::mspatial_v2_unit
extern

◆ ulist_unit

NBListUnit tinker::ulist_unit
extern

◆ uspatial_v2_unit

SpatialUnit tinker::uspatial_v2_unit
extern

◆ vlist_unit

NBListUnit tinker::vlist_unit
extern

◆ vspatial_v2_unit

SpatialUnit tinker::vspatial_v2_unit
extern