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

Re: [IMP-dev] how can you retrieve the atom index from AtomDecorator ?




On Feb 2, 2009, at 1:40 AM, Keren Lasker wrote:


On Feb 2, 2009, at 1:39 AM, Daniel Russel wrote:


On Feb 2, 2009, at 1:23 AM, Keren Lasker wrote:

I see your point, but when you write a pdb file after reading it - sometime you want to keep the same atom indexes for analysis - can it be an option when reading a pdb file to store the indexes as well ? ( like in modeller)
Easy enough to add although it might be good enough to ensure that the hierarchy is traversed for writing in the same order in which it is read from the file.

Then the numbers will be the same and you don't have the issue of what to do with invalid indexes.
This is true if you do not read two pdbs separately to the same model and ask for the indexes of the second one.
True, but this will get screwed up on writing anyway as all the atoms need to have distinct ids in the written pdb. Or am I misunderstanding your scenario?

I guess I would propose having a "source_pdb_index" attribute (or something similar) in atoms, but that it always gets ignored on writing (since either it is already correct, in which case you might as well ignore it, or it is incorrect, in which case you have to ignore it).