The chain_id is the ascii value for the letter stored in the PDB file. I think the main reason for directly returning an int instead of the char is that 26 is kind of a small limit.
3. Is there a nicer way to get a keyType for instance from its string ? In my example, I retrieved chainKey as the third element of the integer keys list returned by get_int_attributes(), this is not very satisfying, and I thought of resorting to a function such as :def getChainKey( chain ):for k in chain.get_int_attributes() :if k.get_string() == 'chain' :return kreturn NoneStill, I wonder if there is an IMP mechanism I am not aware of, that I should prefer instead.