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 and 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 3.1, Question 9 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.)