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

mdl = <model>   Model to take residue numbers from
aln = <alignment>   Alignment between the two models

Description:
This command transfers residue numbers and chain ids from mdl to MODEL. It uses the current alignment if present, otherwise a 1:1 correspondence is assumed. mdl and 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.

log.level(output=1, notes=1, warnings=1, errors=1, memory=0)
env = environ()

# 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')



Ben Webb 2005-04-21