[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [IMP-dev] IMP.atom.Chain.set_id()



fyi, figured out how to do that:

IMP.atom.Chain(IMP.atom.get_by_type(mh,IMP.atom.CHAIN_TYPE)[0]).set_id('A')
mh.get_leaves(mh)[0]).get_id() == 'A'

so the point is that the hierarchy contains a particle which is the actual chain, which one needs to select it and change its chain id.



On Oct 31, 2011, at 5:36 PM, Keren Lasker wrote:

> 
> yes, i want to change the chain id of the molecule.
> i just realized i have to do set_id on each leave in order for that to work. it seems weird that changing the chain id of the root is not enough, but it probably has to do with being general.
> so, i will keep setting id to each leave for now ... 
> On Oct 31, 2011, at 5:32 PM, Dave Barkan wrote:
> 
>> what about
>> 
>> IMP.atom.get_chain(IMP.atom.get_leaves(mh)[0]).get_id() == 'A' 
>> get_chain() returns an object which has its id as an attribute.
>> 
>> On 10/31/11 5:29 PM, Keren Lasker wrote:
>>> hi:
>>> 
>>> IMP.atom.Chain(mh).set_id('A')  does not result in:
>>> IMP.atom.get_chain(IMP.atom.get_leaves(mh)[0]) == 'A' 
>>> 
>>> what am i doing wrong?
>>> 
>>> thanks, keren.
>>> 
>>> _______________________________________________
>>> IMP-dev mailing list
>>> 
>>> 
>>> https://salilab.org/mailman/listinfo/imp-dev
>>> 
>>>   
>>> 
>> 
>> _______________________________________________
>> IMP-dev mailing list
>> 
>> https://salilab.org/mailman/listinfo/imp-dev
> 
> _______________________________________________
> IMP-dev mailing list
> 
> https://salilab.org/mailman/listinfo/imp-dev