Skip to content
Snippets Groups Projects
Commit 2ac19885 authored by Studer Gabriel's avatar Studer Gabriel
Browse files

don't assume the bb_list to have valid peptide bonds to enforce consistency with DSSP

parent 44f0aa14
Branches
Tags
No related merge requests found
......@@ -130,10 +130,9 @@ void SSAgreementEnvListener::ClearEnvironment(const BackboneScoreEnv& base_env,
env_data_[*i + 1].valid_h_pos = false;
}
// we call FindOptimalDonors for the deleted residues.
// the only thing that will happen:
// according donor_for_one_ / donor_for_two_ gets set to -1
FindOptimalDonors(*i);
// its no donor anymore
donor_for_one_[*i] = -1;
donor_for_two_[*i] = -1;
}
std::set<int> stuff_to_update;
......@@ -155,7 +154,6 @@ void SSAgreementEnvListener::SetTemporaryInteractions(
temp_start_idx_ = start_idx;
temp_size_ = bb_list.size();
// lets first copy over all the data from the bb_list, as well as one before
// and one after
int idx = std::max(0, temp_start_idx_ - 1);
......@@ -204,9 +202,13 @@ void SSAgreementEnvListener::SetTemporaryInteractions(
connected_to_next_[temp_start_idx_-1] = 0;
}
// the bb_list is assumed to be connected
// connection of bb_list itself
for(int i = 0; i < temp_size_ - 1; ++i) {
connected_to_next_[temp_start_idx_+1] = 1;
if(geom::Length2(bb_list.GetC(i) - bb_list.GetN(i+1)) <= 6.25) {
connected_to_next_[temp_start_idx_+i] = 1;
} else {
connected_to_next_[temp_start_idx_+i] = 0;
}
}
// lets see whether the last residue is connected
......@@ -220,8 +222,8 @@ void SSAgreementEnvListener::SetTemporaryInteractions(
connected_to_next_[temp_start_idx_+temp_size_-1] = 0;
}
// let's finally update the hydrogen positions of all bb_list residues
// and the one residue after
// set h positions of all loop residues, as well as the one
// residue after (if present)
idx = temp_start_idx_;
end = temp_start_idx_ + temp_size_;
if(static_cast<uint>(end) < idx_handler_->GetNumResidues()) ++end;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment