std::vector<std::size_t> temp; temp.resize(0),
PiHelixPreference = PiHelicesPreferencez;
ResInfoMap = &ResInfoMatrix;
- pp_stretch = _pp_stretch;
SecondaryStructuresStatusMap.resize(ResInfoMatrix.size());
SecondaryStructuresStringLine.resize(ResInfoMatrix.size(), '~');
}
SecondaryStructuresStatusMap[i].setStatus(secondaryStructureTypes::Bridge);
SecondaryStructuresStatusMap[j].setBridge(&(SecondaryStructuresStatusMap[i]), i, bridgeTypes::ParallelBridge);
SecondaryStructuresStatusMap[j].setStatus(secondaryStructureTypes::Bridge);
+ break;
}
case bridgeTypes::AntiParallelBridge : {
SecondaryStructuresStatusMap[i].setBridge(&(SecondaryStructuresStatusMap[j]), j, bridgeTypes::AntiParallelBridge);
SecondaryStructuresStatusMap[i].setStatus(secondaryStructureTypes::Bridge);
SecondaryStructuresStatusMap[j].setBridge(&(SecondaryStructuresStatusMap[i]), i, bridgeTypes::AntiParallelBridge);
SecondaryStructuresStatusMap[j].setStatus(secondaryStructureTypes::Bridge);
+ break;
}
default :
continue;
// std::cout << (*ResInfoMap)[i].info->nr << " " << *((*ResInfoMap)[i].info->name) << std::endl;
// }
- std::cout.precision(5);
- for(std::size_t i{0}; i < ResInfoMap->size(); ++i, std::cout << std::endl << std::endl){
- 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[0] << " 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[0] ;
- }
- else {
- std::cout << " has no acceptor[0]" ;
- }
- std::cout << std::endl << "Also, " << (*ResInfoMap)[i].info->nr << " " << *((*ResInfoMap)[i].info->name);
- if ( (*ResInfoMap)[i].donor[1] != nullptr ){
- std::cout << " has donor[1] = " << (*ResInfoMap)[i].donor[1]->nr << " " << *((*ResInfoMap)[i].donor[1]->name) << " with E = " << (*ResInfoMap)[i].donorEnergy[1] << " and" ;
- }
- else {
- std::cout << " has no donor[1] and" ;
- }
- if ( (*ResInfoMap)[i].acceptor[1] != nullptr ){
- std::cout << " has acceptor[1] = " << (*ResInfoMap)[i].acceptor[1]->nr << " " << *((*ResInfoMap)[i].acceptor[1]->name) << " with E = " << (*ResInfoMap)[i].acceptorEnergy[1] ;
- }
- else {
- std::cout << " has no acceptor[1]" ;
- }
- }
+// std::cout.precision(5);
+// for(std::size_t i{0}; i < ResInfoMap->size(); ++i, std::cout << std::endl << std::endl){
+// 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[0] << " 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[0] ;
+// }
+// else {
+// std::cout << " has no acceptor[0]" ;
+// }
+// std::cout << std::endl << "Also, " << (*ResInfoMap)[i].info->nr << " " << *((*ResInfoMap)[i].info->name);
+// if ( (*ResInfoMap)[i].donor[1] != nullptr ){
+// std::cout << " has donor[1] = " << (*ResInfoMap)[i].donor[1]->nr << " " << *((*ResInfoMap)[i].donor[1]->name) << " with E = " << (*ResInfoMap)[i].donorEnergy[1] << " and" ;
+// }
+// else {
+// std::cout << " has no donor[1] and" ;
+// }
+// if ( (*ResInfoMap)[i].acceptor[1] != nullptr ){
+// std::cout << " has acceptor[1] = " << (*ResInfoMap)[i].acceptor[1]->nr << " " << *((*ResInfoMap)[i].acceptor[1]->name) << " with E = " << (*ResInfoMap)[i].acceptorEnergy[1] ;
+// }
+// else {
+// std::cout << " has no acceptor[1]" ;
+// }
+// }
/*Write Data*/
v43[j] *= gmx::c_nm2A;
z[j] *= gmx::c_nm2A;
}
- for(std::size_t i{XX}, j{j + 1}, k{i + 2}; i <= ZZ; ++i, ++j, ++k){
+ for(std::size_t i{XX}, j{i + 1}, k{i + 2}; i <= ZZ; ++i, ++j, ++k){
if (j > 2){
j -= 3;
}
x[i] = (z[j] * v43[k]) - (z[k] * v43[j]);
}
- for(std::size_t i{XX}, j{j + 1}, k{i + 2}; i <= ZZ; ++i, ++j, ++k){
+ for(std::size_t i{XX}, j{i + 1}, k{i + 2}; i <= ZZ; ++i, ++j, ++k){
if (j > 2){
j -= 3;
}
y[i] = (z[j] * x[k]) - (z[k] * x[j]);
}
-// std::cout << "v12 = " << v12[0] << ", " << v12[1] << ", " << v12[2] << std::endl;
-// std::cout << "v43 = " << v43[0] << ", " << v43[1] << ", " << v43[2] << std::endl;
-// std::cout << "z = " << z[0] << ", " << z[1] << ", " << z[2] << std::endl;
-// std::cout << "p = " << p[0] << ", " << p[1] << ", " << p[2] << std::endl;
-// std::cout << "x = " << x[0] << ", " << x[1] << ", " << x[2] << std::endl;
-// std::cout << "y = " << y[0] << ", " << y[1] << ", " << y[2] << std::endl;
+ std::cout << "v12 = " << v12[0] << ", " << v12[1] << ", " << v12[2] << std::endl;
+ std::cout << "v43 = " << v43[0] << ", " << v43[1] << ", " << v43[2] << std::endl;
+ std::cout << "z = " << z[0] << ", " << z[1] << ", " << z[2] << std::endl;
+ std::cout << "p = " << p[0] << ", " << p[1] << ", " << p[2] << std::endl;
+ std::cout << "x = " << x[0] << ", " << x[1] << ", " << x[2] << std::endl;
+ std::cout << "y = " << y[0] << ", " << y[1] << ", " << y[2] << std::endl;
u = (x[XX] * x[XX]) + (x[YY] * x[YY]) + (x[ZZ] * x[ZZ]);
v = (y[XX] * y[XX]) + (y[YY] * y[YY]) + (y[ZZ] * y[ZZ]);
-// std::cout << "u = " << u << std::endl;
-// std::cout << "v = " << v << std::endl;
+ std::cout << "u = " << u << std::endl;
+ std::cout << "v = " << v << std::endl;
if (u > 0 and v > 0){
u = ((p[XX] * x[XX]) + (p[YY] * x[YY]) + (p[ZZ] * x[ZZ])) / std::sqrt(u);
v = ((p[XX] * y[XX]) + (p[YY] * y[YY]) + (p[ZZ] * y[ZZ])) / std::sqrt(v);
-// std::cout << "new u = " << u << std::endl;
-// std::cout << "new v = " << v << std::endl;
+ std::cout << "new u = " << u << std::endl;
+ std::cout << "new v = " << v << std::endl;
if (u != 0 or v != 0){
result = std::atan2(v, u) * gmx::c_rad2Deg;
-// std::cout << "result = " << result << std::endl;
+ std::cout << "result = " << result << std::endl;
}
}
return result;