<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hello all,<div><br></div><div>This seems like it should qualify as a bug. If I have an instance of iotbx_pdb_ext.input and I create a hierarchy with&nbsp;construct_hierarchy(), then I must retain the reference to that hierarchy or apparently I can never get it back:</div><div><br></div><blockquote class="webkit-indent-blockquote" style="margin: 0 0 0 40px; border: none; padding: 0px;"><div><font class="Apple-style-span" face="Monaco">&gt;&gt;&gt; hierarchy = my_pdb.construct_hierarchy()</font></div><div><font class="Apple-style-span" face="Monaco">&gt;&gt;&gt; def some_local_scope_function(a_pdb):</font></div><div><font class="Apple-style-span" face="Monaco">&nbsp; &nbsp; &nbsp; local_hierarchy = a_pdb.construct_hierarchy()</font></div><div><font class="Apple-style-span" face="Monaco">&gt;&gt;&gt; some_local_scope_function(my_pdb)</font></div><div><font class="Apple-style-span" face="Monaco">[�]</font></div><div><font class="Apple-style-span" face="Monaco">RuntimeError: atom has another parent atom_group already.</font></div></blockquote><div><font class="Apple-style-span" face="Monaco"><br></font></div><div>Wouldn't better behavior just return the previously constructed hierarchy given that multiple hierarchies can't be made? If each atom apparently remembers to which atom_group it belongs (and presumably on up), then shouldn't it make sense that an&nbsp;iotbx_pdb_ext.input be able to remember it's own hierarchy and produce it upon demand?</div><div><br></div><div>Looking at a iotbx_pdb_hierarchy_ext.root, I don't find a reference to the iotbx_pdb_ext.input from which it was created. So, although passing around a hierarchy might be the obvious work-around, the end-user still needs to do some accounting if said user wants to track which roots belong to which inputs, and vice versa.</div><div><br></div><div>James</div><div><br></div></body></html>