next up previous contents index
Next: TOP to Python correspondence Up: Converting TOP scripts to Previous: TOP commands and variables   Contents   Index


TOP models and alignments

In TOP, commands may operate implicitly on one or more of the standard models or alignments in memory. For example, ALIGN always operates on ALIGNMENT1, READ_MODEL always operates on MODEL1, and READ_MODEL2 always operates on MODEL2. MODEL2 is a `cut-down' model, used only for some operations (such as SUPERPOSE) and cannot be used to build full models, for example.

In Python, the models and alignments (and sequence databases, densities, etc.) are explicit, and are represented by classes. You can have as many models or alignments as you like, provided you have enough memory. Commands are simply methods of these classes. For example, consider the following:

env = environ()
aln = alignment(env)
aln.align(gap_penalties_1d=(900, 50))
This creates a new instance of the environ class (as above, this is used to provide default variables and the like), and calls it 'env' (you can call it whatever you like). This is then used to create a new alignment class object, called 'aln'. The following align() command then operates on the 'aln' alignment object. (Note, however, that new alignments are empty, so this example wouldn't do anything interesting.)


next up previous contents index
Next: TOP to Python correspondence Up: Converting TOP scripts to Previous: TOP commands and variables   Contents   Index
Automatic builds 2009-06-12