*/
-
-/* Запилить версию поиска всех остатков против всех. Медленно, но как в дссп.
- Расхождение может разного восприятия доноров и акцепторовю=. Поменять.
- Пролин отдельное говно (где ассайн гидроген).
-*/
-
#include "dssptools.h"
#include <algorithm>
bool secondaryStructures::hasHBondBetween(std::size_t Donor, std::size_t Acceptor) const{
if( ( (*ResInfoMap)[Donor].acceptor[0] == (*ResInfoMap)[Acceptor].info && (*ResInfoMap)[Donor].acceptorEnergy[0] < HBondEnergyCutOff ) ||
( (*ResInfoMap)[Donor].acceptor[1] == (*ResInfoMap)[Acceptor].info && (*ResInfoMap)[Donor].acceptorEnergy[1] < HBondEnergyCutOff ) ){
- std::cout << "HBind Exist" << std::endl;
+ std::cout << "HBond Exist" << std::endl;
}
return ( ( (*ResInfoMap)[Donor].acceptor[0] == (*ResInfoMap)[Acceptor].info && (*ResInfoMap)[Donor].acceptorEnergy[0] < HBondEnergyCutOff ) ||
( (*ResInfoMap)[Donor].acceptor[1] == (*ResInfoMap)[Acceptor].info && (*ResInfoMap)[Donor].acceptorEnergy[1] < HBondEnergyCutOff ) );
analyzeTurnsAndHelicesPatterns();
analyzePPHelicesPatterns();
+ for(std::size_t i{0}; i < ResInfoMap->size(); ++i){
+ std::cout << (*ResInfoMap)[i].info->nr << *((*ResInfoMap)[i].info->name) ;
+ if ( (*ResInfoMap)[i].donor[0] != nullptr ){
+ std::cout << " has donor[0] = " << (*ResInfoMap)[i].donor[0]->nr << ((*ResInfoMap)[i].donor[0]->name) << " with E = " << (*ResInfoMap)[i].donorEnergy << " and" ;
+ }
+ else {
+ std::cout << " has no donor[0] and" ;
+ }
+ if ( (*ResInfoMap)[i].acceptor[0] != nullptr ){
+ std::cout << " has acceptor[0] = " << (*ResInfoMap)[i].acceptor[0]->nr << ((*ResInfoMap)[i].acceptor[0]->name) << " with E = " << (*ResInfoMap)[i].acceptorEnergy ;
+ }
+ else {
+ std::cout << " has no acceptor[0]" ;
+ }
+ }
+
/*Write Data*/
for(std::size_t i {0}; i < SecondaryStructuresStatusMap.size(); ++i){
}
}
}
- else {
- std::cerr << "PRO DETECTED! THIS IS RESI № " << Donor.info->nr << std::endl; //IT WORKS JUST FINE WITH proLINE.compare("PRO") != 0
- }
+// else {
+// std::cerr << "PRO DETECTED! THIS IS RESI № " << Donor.info->nr << std::endl; //IT WORKS JUST FINE
+// }
if (HbondEnergy < Donor.acceptorEnergy[0]){
Donor.acceptor[1] = Donor.acceptor[0];
// std::cout << "Atom " << atomname << " №" << *ai << " From Resi " << *(top.atoms()->resinfo[i].name) << " №" << resicompare << std::endl;
// }
}
-
- std::cout << "initAnalyzyz ended" << std::endl;
}
void DsspTool::analyzeFrame(int frnr, const t_trxframe &fr, t_pbc *pbc)
{
- std::cout << "Logic started" << std::endl;
-
switch(initParams.NBS){
case (NBSearchMethod::Classique): {
IndexMap[pair.refIndex()].getIndex(backboneAtomTypes::AtomCA), IndexMap[pair.testIndex()].getIndex(backboneAtomTypes::AtomCA), fr, pbc)
< minimalCAdistance){
calculateHBondEnergy(IndexMap[pair.refIndex()], IndexMap[pair.testIndex()], fr, pbc);
- if (&(IndexMap[pair.testIndex()]) != &(IndexMap[pair.refIndex() + 1])){
+ if (IndexMap[pair.testIndex()].info != IndexMap[pair.refIndex() + 1].info){
calculateHBondEnergy(IndexMap[pair.testIndex()], IndexMap[pair.refIndex()], fr, pbc);
}
}
IndexMap[as_.getResiI()].getIndex(backboneAtomTypes::AtomCA), IndexMap[as_.getResiJ()].getIndex(backboneAtomTypes::AtomCA), fr, pbc)
< minimalCAdistance){
calculateHBondEnergy(IndexMap[as_.getResiI()], IndexMap[as_.getResiJ()], fr, pbc);
- if (&(IndexMap[as_.getResiJ()]) != &(IndexMap[as_.getResiI() + 1])){
+ if (IndexMap[as_.getResiJ()].info != IndexMap[as_.getResiI() + 1].info){
calculateHBondEnergy(IndexMap[as_.getResiJ()], IndexMap[as_.getResiI()], fr, pbc);
}
}
}
}
- for(std::size_t i {0}; i < IndexMap.size(); ++i){
- std::cout << i + 1 << " " << *(IndexMap[i].info->name) << std::endl;
- }
+// for(std::size_t i {0}; i < IndexMap.size(); ++i){
+// std::cout << i + 1 << " " << *(IndexMap[i].info->name) << std::endl;
+// }
PatternSearch.initiateSearch(IndexMap, initParams.PPHelices);
calculateBends(fr, pbc);