next up previous contents index
Next: environ.io default Up: The environ class: MODELLER Previous: The environ class: MODELLER   Contents   Index

environ() -- create a new MODELLER environment

rand_seed = <int:1>   random seed
restyp_lib_file = <str:1>   residue type library file

Description:
This creates a new environ object. rand_seed is used to seed the random number generator used throughout MODELLER, and should be set to a negative integer between $-2$ and $-50000$ if you do not want to use the default value. restyp_lib_file specifies the file to read the residue type library from; if unspecified, the default ('restyp.lib') file is used. This file contains the mapping between one-letter residue types and CHARMM and PDB names; see the FAQ Section 1.8, Question 10 for the format of this file.

You can assign the new environ object to the Python variable 'env' with the following:

env = environ()

You can release the object from memory when you no longer need it in standard Python fashion, either by an explicit del(env) or by reassigning env to some other object.

You can set a MODELLER default value by assigning to this env object; e.g., to set the default sequence/sequence alignment penalties, you can use:

env.gap_penalties_1d = (-900., -50.)

When you create new MODELLER objects (such as model or alignment objects) they require an environ object, which they use for their own default values. Note that each object gets a copy of the environment, so it is not affected by any changes you make to the global environment after its creation. You can, however, modify the object's own environment directly, by assigning to its .env member:

env = environ()
env.cluster_cut = 2.0 # New objects will use cluster_cut = 2.0 by default
mdl = model(env) # This 'mdl' object gets cluster_cut = 2.0
mdl.env.cluster_cut = 1.0 # cluster_cut is now 1.0, but only for 'mdl'

If in doubt, set anything you need to set within environ before you create any objects, or always specify parameters explicitly rather than relying on defaults. (You can also turn on verbose logging with log.verbose() to see which defaults are being used in each case.)


next up previous contents index
Next: environ.io default Up: The environ class: MODELLER Previous: The environ class: MODELLER   Contents   Index
Ben Webb 2006-02-28