next up previous contents index
Next: model.orient() center Up: The model class: handling Previous: model.to_iupac() standardize   Contents   Index

model.reorder_atoms() -- standardize order of MODEL atoms

reorder_atoms()
Requirements:
topology library

This routine reorders atoms within the residues of MODEL so that they follow the order in the current residue topology library.

Example: examples/commands/reorder_atoms.py


# Example for: model.reorder_atoms()

# This will standardize the order of atoms in the model.

from modeller import *

env = environ()
env.io.atom_files_directory = '../atom_files'

# Order the atoms according to a topology library:
env.libs.topology.read(file='$(LIB)/top_heav.lib')

mdl = model(env, file='1fas')
mdl.reorder_atoms()
mdl.write(file='1fas.ini1')



Ben Webb 2008-02-01