diff --git a/modules/mol/base/src/impl/atom_impl.hh b/modules/mol/base/src/impl/atom_impl.hh index c229a2d33450be0d00aded37d909ccfe87d49419..658184a4237e1696daf4a6b05d741231b21e3263 100644 --- a/modules/mol/base/src/impl/atom_impl.hh +++ b/modules/mol/base/src/impl/atom_impl.hh @@ -116,7 +116,13 @@ public: { if (element_!=ele) { element_=ele; + AtomProp* old_prop = prop_; prop_=impl::AtomProp::GetDefaultProps(element_); + if (old_prop && !old_prop->is_default) { + if(old_prop->has_anisou) this->SetAnisou(old_prop->anisou); + if(old_prop->charge != 0.0) this->SetCharge(old_prop->charge); + delete old_prop; + } } } bool HasDefaultProps() const { return prop_->is_default; }