Skip to content

Commit

Permalink
Fix #214
Browse files Browse the repository at this point in the history
  • Loading branch information
martin-steinegger committed Feb 20, 2024
1 parent 38e5e93 commit 75a50f7
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/strucclustutils/GemmiWrapper.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,12 +352,14 @@ void GemmiWrapper::updateStructure(void * void_st, const std::string& filename,
Vec3 n_atom = {NAN, NAN, NAN};
Vec3 c_atom = {NAN, NAN, NAN};
float ca_atom_bfactor;
bool hasCA = false;
for (gemmi::Atom &atom : res.atoms) {
if (atom.name == "CA") {
ca_atom.x = atom.pos.x;
ca_atom.y = atom.pos.y;
ca_atom.z = atom.pos.z;
ca_atom_bfactor = atom.b_iso;
hasCA = true;
} else if (atom.name == "CB") {
cb_atom.x = atom.pos.x;
cb_atom.y = atom.pos.y;
Expand All @@ -372,6 +374,9 @@ void GemmiWrapper::updateStructure(void * void_st, const std::string& filename,
c_atom.z = atom.pos.z;
}
}
if(hasCA == false){
continue;
}
ca_bfactor.push_back(ca_atom_bfactor);
ca.push_back(ca_atom);
cb.push_back(cb_atom);
Expand Down

0 comments on commit 75a50f7

Please sign in to comment.