diff --git a/modules/mol/base/src/impl/atom_impl.cc b/modules/mol/base/src/impl/atom_impl.cc index 29e2c565f9cb2bbaa0c272463cb5dfc552759310..3339ead628335fd62bfa23600a9a4a03dffacfcf 100644 --- a/modules/mol/base/src/impl/atom_impl.cc +++ b/modules/mol/base/src/impl/atom_impl.cc @@ -54,7 +54,6 @@ AtomImpl::AtomImpl(const EntityImplPtr& e, connector_list_(), fragment_(), state_(0), - index_(index) { EntityHandle ent = this->GetEntity(); diff --git a/modules/mol/base/src/impl/entity_impl.cc b/modules/mol/base/src/impl/entity_impl.cc index 4e311ddc0ad5b0bc01d165d6778865f27dcf09cf..58d2bce06a01c2240904c043b591b7608bb13bbf 100644 --- a/modules/mol/base/src/impl/entity_impl.cc +++ b/modules/mol/base/src/impl/entity_impl.cc @@ -147,6 +147,7 @@ void EntityImpl::ReplicateHierarchy(EntityImplPtr dest) e3=src_res->GetAtomList().end(); k!=e3; ++k) { AtomImplPtr src_atom=*k; AtomImplPtr dst_atom=dst_res->InsertAtom(src_atom); + dst_atom->SetIndex(src_atom->GetIndex()); } } } @@ -229,6 +230,7 @@ void EntityImpl::DoCopy(EntityImplPtr dest) // first copy the chain - residue - atom hierarchy before replicating the // bond network and the torsions dest->SetName(this->GetName()); + dest->next_index_=0; this->ReplicateHierarchy(dest); this->DoCopyBondsAndTorsions(dest); }