next up previous contents index
Next: model.rename_segments() rename Up: The model class: handling Previous: model.transfer_xyz() copy   Contents   Index

model.res_num_from() -- residue numbers from MODEL2 to MODEL

res_num_from(mdl, aln)
This command transfers residue numbers and chain ids from mdl to the model. mdl and the current model must correspond to the first and second protein in the alignment, aln, respectively.

Example: examples/commands/transfer_res_numb.py


# Example for: model.res_num_from()

# This will transfer residue numbers and chain ids from model2 to model.

from modeller import *

log.level(output=1, notes=1, warnings=1, errors=1, memory=0)
env = environ()
env.io.atom_files_directory = ['../atom_files']

# Read an alignment for the transfer
aln = alignment(env, file='toxin.ali', align_codes=('2ctx', '1fas'))
# Read the template and target models:
mdl2 = model(env, file='2ctx')
mdl  = model(env, file='1fas')
# Transfer the residue and chain ids and write out the new MODEL:
mdl.res_num_from(mdl2, aln)
mdl.write(file='1fas.ini')



Automatic builds 2008-10-07