﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	blockedby	blocking	notify_on_close	platform	project
599	"""Transplanting"" a model loses track of children"	Tristan Croll	Tom Goddard	"Hi all,

I'm trying to do some rearrangements of my data handling for the Clipper plugin, to make it all work more neatly with the ChimeraX framework. What I'm aiming for is something like the following:


{{{
class CrystalStructure(Model):
  '''
  Master container class for a crystal structure, designed to act as the
  head node of a Model tree with the following general format:
  
  CrystalStructure
    |
    -- master model (AtomicStructure)
    |
    -- symmetry copies (SymModels)
    |    |
    |    -- AtomicStructure
    |    |
    |    -- AtomicStructure
    |    |
    |    -- ...
    |
    -- reciprocal space data (MTZData)
    |    |
    |    -- clippper.HKL_info
    |    |
    |    -- clipper.HKL_data_Flag
    |    |
    |    -- clipper.HKL_data_F_Phi
    |    |
    |    -- ...
    |
    -- real-space maps (XMapSet)
         |
         -- 2mFo-Fc (Volume)
         |
         -- ...
  '''

}}}

... so that everything associated with the model remains together in the one neat tree in the Models panel etc. I'd like to be able to initiate it from an already-loaded AtomicStructure, which would necessitate removing the AtomicStructure from the existing tree and adding it to the CrystalStructure model. This works to an extent. When I've loaded a single Atomic model:

from chimerax.core.models import Model
m = session.models.list()[0]
newm = Model('test', session)
session.models.remove([m])
newm.add([m])
session.models.add([newm])

... gives me m subordinate to newm as I wanted - BUT any children of m (e.g. the 'missing structure' PseudobondGroup) disappear. That's not the behaviour I expected - I think the sensible thing would be to have copying/moving behave just like directories in the filesystem - everything below the chosen node comes along with it. "	defect	closed	major	Alpha2	Infrastructure		not a bug						all	ChimeraX
