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

[modeller_usage] problem with Chain.join()



I cannot get Chain.join() working properly for multi-chain PDB files. 

For example, for PDB code 2YFH, which has chains A, B, C, D, E, F,:
* when I join D and E I get A, B, C, D, F as expected
* but if I try to join A and B I get A, F only


To reproduce run the following script:
-----
from modeller import *

env = environ()

mdl = model(env)
mdl.read(file='2yfh')

print "before:"
for c in mdl.chains:
    print c
    
mdl.chains['A'].join(mdl.chains['B'])

print "after:"
for c in mdl.chains:
    print c
    
mdl.write('out.pdb')

print "reading new file:"
mdl1 = model(env)
mdl1.read('out.pdb')


for c in mdl1.chains:
    print c

------------
will print in the log:
before:
<Chain 'A'>
<Chain 'B'>
<Chain 'C'>
<Chain 'D'>
<Chain 'E'>
<Chain 'F'>
after:
<Chain 'A'>
<Chain 'F'>
<Chain 'F'>
<Chain 'F'>
<Chain 'F'>
reading new file:
relabel_387W> Model has multiple chains, and they do not all have a unique
              chain ID. Suggest you relabel them as A, B, C, etc.
relabel_469W> At least one residue number in the model is duplicated.
              (First duplication is residue "    1", chain " A".)
              Suggest you renumber the residues and/or chains to
              avoid selecting the wrong residues (e.g. with model_segment).
<Chain 'A'>
<Chain 'A'>
<Chain 'F'>


Tested with Modeller 9v8 and Modeller 9v9.

Is it a bug or expected behavior?

Best regards,
Jan Kosinski