if( proLINE.compare("PRO") == 0 ){
IndexMap[i].is_proline = true;
}
- IndexMap[i].prevResi = &(IndexMap[i - 1]);
-
- IndexMap[i - 1].nextResi = &(IndexMap[i]);
-
-// std::cout << "Resi " << IndexMap[i].info->nr << *(IndexMap[i].info->name) << std::endl;
-// std::cout << "Prev resi is " << IndexMap[i].prevResi->info->nr << *(IndexMap[i].prevResi->info->name) << std::endl;
-// std::cout << "Prev resi's next resi is " << IndexMap[i - 1].nextResi->info->nr << *(IndexMap[i - 1].nextResi->info->name) << std::endl;
- std::cout << IndexMap[i].prevResi->info->nr;
- std::cout << *(IndexMap[i - 1].prevResi->info->name) ;
- std::cout << " have CA = " << IndexMap[i].prevResi->getIndex(backboneAtomTypes::AtomCA) ;
- std::cout << " C = " << IndexMap[i].prevResi->getIndex(backboneAtomTypes::AtomC);
- std::cout << " O = " << IndexMap[i].prevResi->getIndex(backboneAtomTypes::AtomO);
- std::cout << " N = " << IndexMap[i].prevResi->getIndex(backboneAtomTypes::AtomN);
- std::cout << " H = " << IndexMap[i].prevResi->getIndex(backboneAtomTypes::AtomH) << std::endl;
}
std::string atomname(*(top.atoms()->atomname[static_cast<std::size_t>(*ai)]));
// std::cout << "Atom " << atomname << " №" << *ai << " From Resi " << *(top.atoms()->resinfo[i].name) << " №" << resicompare << std::endl;
// }
}
+
+ for (std::size_t j {1}; j < IndexMap.size(); ++j){
+ IndexMap[j].prevResi = &(IndexMap[j - 1]);
+
+ IndexMap[j - 1].nextResi = &(IndexMap[j]);
+
+// std::cout << "Resi " << IndexMap[i].info->nr << *(IndexMap[i].info->name) << std::endl;
+// std::cout << "Prev resi is " << IndexMap[i].prevResi->info->nr << *(IndexMap[i].prevResi->info->name) << std::endl;
+// std::cout << "Prev resi's next resi is " << IndexMap[i - 1].nextResi->info->nr << *(IndexMap[i - 1].nextResi->info->name) << std::endl;
+ std::cout << IndexMap[j].prevResi->info->nr;
+ std::cout << *(IndexMap[j].prevResi->info->name) ;
+ std::cout << " have CA = " << IndexMap[j].prevResi->getIndex(backboneAtomTypes::AtomCA) ;
+ std::cout << " C = " << IndexMap[j].prevResi->getIndex(backboneAtomTypes::AtomC);
+ std::cout << " O = " << IndexMap[j].prevResi->getIndex(backboneAtomTypes::AtomO);
+ std::cout << " N = " << IndexMap[j].prevResi->getIndex(backboneAtomTypes::AtomN);
+ std::cout << " H = " << IndexMap[j].prevResi->getIndex(backboneAtomTypes::AtomH) << std::endl;
+ }
}
void DsspTool::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc)