seams-core v2.14.0
libyodaLib, the C++ engine of d-SEAMS
Loading...
Searching...
No Matches
ring::RingSearchIndex Struct Reference

Inverted index from an atom to the rings that contain it. More...

#include <src/include/internal/topo_bulk.hpp>

Public Member Functions

int atomCount () const
 Atoms the packed rows cover.

Public Attributes

std::vector< std::vector< int > > ringsContainingAtom
std::vector< int > ringOff
std::vector< int > ringCol
std::vector< int > atomRank
std::vector< std::array< int, 3 > > ringShift
 Integer minimum-image winding of each ring. Empty if no box was supplied.

Detailed Description

Inverted index from an atom to the rings that contain it.

The cage searches repeatedly ask which rings a given atom belongs to. Answering that by scanning every ring makes the searches quadratic in the ring count. One pass over the ring network answers it in constant time thereafter, and the ring indices in each row stay ascending, which is the order the searches previously visited them in.

findHC visits rings in the order of a key that does not use absolute coordinates: the sorted atom indices, then the unwrapped shift of the cycle. findDDC reports a maximum set of cages under the same key, so the cage count is independent of the order in which rings are claimed and does not change when the frame is translated.

Definition at line 82 of file topo_bulk.hpp.

Member Function Documentation

◆ atomCount()

int ring::RingSearchIndex::atomCount ( ) const
inlinenodiscard

Atoms the packed rows cover.

Definition at line 89 of file topo_bulk.hpp.

89 {
90 return ringOff.empty() ? 0 : static_cast<int>(ringOff.size()) - 1;
91 }
std::vector< int > ringOff
Definition topo_bulk.hpp:86

Member Data Documentation

◆ atomRank

std::vector<int> ring::RingSearchIndex::atomRank

Definition at line 92 of file topo_bulk.hpp.

◆ ringCol

std::vector<int> ring::RingSearchIndex::ringCol

Definition at line 87 of file topo_bulk.hpp.

◆ ringOff

std::vector<int> ring::RingSearchIndex::ringOff

Same rows as ringsContainingAtom, packed. ringCol[ringOff[a] .. ringOff[a+1]) is the ascending ring list of atom a. Empty when the index was not built.

Definition at line 86 of file topo_bulk.hpp.

◆ ringsContainingAtom

std::vector<std::vector<int> > ring::RingSearchIndex::ringsContainingAtom

Definition at line 83 of file topo_bulk.hpp.

◆ ringShift

std::vector<std::array<int, 3> > ring::RingSearchIndex::ringShift

Integer minimum-image winding of each ring. Empty if no box was supplied.

Definition at line 94 of file topo_bulk.hpp.


The documentation for this struct was generated from the following file: