1 | #!/usr/bin/env python
|
---|
2 | #
|
---|
3 | # Copyright 2007 Frank Eisenmenger, U.H.E. Hansmann,
|
---|
4 | # Jan H. Meinke, Sandipan Mohanty
|
---|
5 | #
|
---|
6 | """Minimize the energy of met-enkaphalin starting from a given structure using
|
---|
7 | conjugate gradient.
|
---|
8 | """
|
---|
9 | # Adds the source directory to Python's search path.
|
---|
10 | import sys
|
---|
11 | sys.path.append('../..')
|
---|
12 | import smmp, universe, protein
|
---|
13 |
|
---|
14 | # Initialize the Universe to T=300K with the ECEPP/3 force field, no solvent
|
---|
15 | # term (st = 0) and the sub directory SMMP/ as library path. Except for the
|
---|
16 | # solvent term, these are the default values. Alternatively, we could have
|
---|
17 | # written
|
---|
18 | # myUniverse = universe.Universe(st=0)
|
---|
19 | # to get the same result.
|
---|
20 | myUniverse = universe.Universe(T=300, ff = 'ecepp3', st = 0, libdir ='SMMP/')
|
---|
21 | # Create a new protein object from the sequence file ../enkefa.seq and
|
---|
22 | # set the dihedral angles according to the values given in ../enkefa.var.
|
---|
23 | p = protein.Protein('../1bdd.pdb')
|
---|
24 | # Make myUniverse aware of p.
|
---|
25 | myUniverse.add(p)
|
---|
26 |
|
---|
27 | maxNumberOfIterations = 10
|
---|
28 | maxNumberOfSweepsPerIteration = 15000
|
---|
29 | desiredPrecision = 1.0e-7
|
---|
30 |
|
---|
31 | smmp.regul(1, maxNumberOfIterations, maxNumberOfSweepsPerIteration, desiredPrecision)
|
---|