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.

Oups, thanks Daniel, I missed that method in the documentation :

c0.get_as_chain().get_id()

does the trick.

I still have a question concerning the nice way for retrieving attribute Keys

 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 k
    return None

Still, I wonder if there is an IMP mechanism I am not aware of, that I should prefer instead.

    --Ben.S