32 int typeI,
int typeJ) {
41 for (
int iatom = 0; iatom < yCloud->nop; iatom++) {
44 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
47 if (itr == yCloud->idIndexMap.end()) {
48 std::cerr <<
"Something is wrong with your idIndexMap!\n";
51 iatomIndex = itr->first;
61 for (
int iatom = 0; iatom < yCloud->nop; iatom++) {
62 if (yCloud->pts[iatom].type != typeI) {
66 for (
int jatom = 0; jatom < yCloud->nop; jatom++) {
67 if (yCloud->pts[jatom].type != typeJ) {
78 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
80 if (gotI == yCloud->idIndexMap.end()) {
81 std::cerr <<
"Something is wrong with your idIndexMap!\n";
84 iatomIndex = gotI->first;
88 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
90 if (gotJ == yCloud->idIndexMap.end()) {
91 std::cerr <<
"Something is wrong with your idIndexMap!\n";
94 jatomIndex = gotJ->first;
131 for (
int iatom = 0; iatom < yCloud->nop; iatom++) {
134 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
137 if (itr == yCloud->idIndexMap.end()) {
138 std::cerr <<
"Something is wrong with your idIndexMap!\n";
141 iatomIndex = itr->first;
150 for (
int iatom = 0; iatom < yCloud->nop - 1; iatom++) {
151 if (yCloud->pts[iatom].type != typeI) {
155 for (
int jatom = iatom + 1; jatom < yCloud->nop; jatom++) {
156 if (yCloud->pts[jatom].type != typeI) {
161 if (r_ij > rcutoff) {
167 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
169 if (gotI == yCloud->idIndexMap.end()) {
170 std::cerr <<
"Something is wrong with your idIndexMap!\n";
173 iatomIndex = gotI->first;
177 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
179 if (gotJ == yCloud->idIndexMap.end()) {
180 std::cerr <<
"Something is wrong with your idIndexMap!\n";
183 jatomIndex = gotJ->first;
220 for (
int iatom = 0; iatom < yCloud->nop; iatom++) {
223 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
226 if (itr == yCloud->idIndexMap.end()) {
227 std::cerr <<
"Something is wrong with your idIndexMap!\n";
230 iatomIndex = itr->first;
239 for (
int iatom = 0; iatom < yCloud->nop - 1; iatom++) {
240 if (yCloud->pts[iatom].type != typeI) {
244 for (
int jatom = iatom + 1; jatom < yCloud->nop; jatom++) {
245 if (yCloud->pts[jatom].type != typeI) {
250 if (r_ij > rcutoff) {
256 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
258 if (gotI == yCloud->idIndexMap.end()) {
259 std::cerr <<
"Something is wrong with your idIndexMap!\n";
262 iatomIndex = gotI->first;
266 yCloud->idIndexMap.begin(), yCloud->idIndexMap.end(),
268 if (gotJ == yCloud->idIndexMap.end()) {
269 std::cerr <<
"Something is wrong with your idIndexMap!\n";
272 jatomIndex = gotJ->first;
303 for (
int iatom = 0; iatom < yCloud->nop; iatom++) {
311 for (
int iatom = 0; iatom < yCloud->nop - 1; iatom++) {
313 for (
int jatom = iatom + 1; jatom < yCloud->nop; jatom++) {
346 int iatomID, jatomID;
347 int iatomIndex, jatomIndex;
352 for (
int iatom = 0; iatom < nList.size(); iatom++) {
353 iatomID = nList[iatom][0];
355 auto gotI = yCloud->idIndexMap.find(iatomID);
356 if (gotI != yCloud->idIndexMap.end()) {
357 iatomIndex = gotI->second;
360 nnumNeighbours = nList[iatomIndex].
size() - 1;
368 for (
int jatom = 1; jatom <= nnumNeighbours; jatom++) {
369 jatomID = nList[iatomIndex][jatom];
372 auto gotJ = yCloud->idIndexMap.find(jatomID);
373 if (gotJ != yCloud->idIndexMap.end()) {
374 jatomIndex = gotJ->second;
395 nList.
swap(tempEmpty);
double periodicDist(molSys::PointCloud< molSys::Point< double >, double > *yCloud, int iatom, int jatom)
Inline generic function for obtaining the unwrapped periodic distance between two particles,...
std::vector< std::vector< int > > neighList(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI, int typeJ)
All these functions use atom IDs and not indices.
std::vector< std::vector< int > > halfNeighList(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI=1)
std::vector< std::vector< int > > neighListO(double rcutoff, molSys::PointCloud< molSys::Point< double >, double > *yCloud, int typeI)
std::vector< std::vector< int > > neighbourListByIndex(molSys::PointCloud< molSys::Point< double >, double > *yCloud, std::vector< std::vector< int >> nList)
int clearNeighbourList(std::vector< std::vector< int >> &nList)
Erases memory for a vector of vectors for the neighbour list.
std::vector< std::vector< int > > getNewNeighbourListByIndex(molSys::PointCloud< molSys::Point< double >, double > *yCloud, double cutoff)
Header file for neighbour list generation.
This contains a collection of points; contains information for a particular frame.
This contains per-particle information.