The program to generate a MM model is very simple. It recovers the system created in Step 3, applies an OPLS MM model (with the "
protein" parameter set), and then resaves the system for later use:
# . Set up a MM model.
mmModel = MMModelOPLS ( "protein" )
# . Get the system.
system = Unpickle ( "../step3/step3.pkl" )
# . Add the energy model.
system.DefineMMModel ( mmModel )
# . Save the system.
mmModel.ClearModelBuildingData ( )
Pickle ( "step4.pkl", system )
mmmodel.ClearModelBuildingData is unnecessary for the program to work but serves to reduce the size of the file
step4.pkl by eliminating irrelevant model-building data from the instance variable
This step will fail if there are definitions or parameters
missing from the OPLS parameter set. Generation of force field
parameters is a complex topic in its own right and will not be covered
in this tutorial. However, the Force Fields tutorial describes how to create a parameter
set or to augment an existing one if the appropriate definitions are at hand.