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

do not expect atom to be at the right position if its already there

parent 39a4a717
No related branches found
No related tags found
No related merge requests found
......@@ -260,9 +260,8 @@ void GromacsHydrogenConstructor::ApplyOnResidue(ost::mol::ResidueHandle& res, os
for(int b=0;b<number;++b){
//only add hydrogen if not already present!
atom = res.FindAtom(hydrogen_names[b]);
if(!atom.IsValid()){
atom = ed.InsertAtom(res,hydrogen_names[b],hydrogen_positions[b],"H");
}
if(!atom.IsValid()) atom = ed.InsertAtom(res,hydrogen_names[b],hydrogen_positions[b],"H");
else ed.SetAtomPos(atom,hydrogen_positions[b]);
}
}
}
......@@ -416,6 +415,7 @@ void GromacsBlockModifier::ApplyOnResidue(ost::mol::ResidueHandle& res, ost::mol
for(int j=0; j<number; ++j){
ost::mol::AtomHandle at = res.FindAtom(names[j]);
if(!at.IsValid()) at = ed.InsertAtom(res,names[j],positions[j],ele);
else ed.SetAtomPos(at,positions[j]);
ed.Connect(at, anchor_atoms[0]);
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment