source: EXAMPLES/Python/minimization.py@ e40e335

Last change on this file since e40e335 was e40e335, checked in by baerbaer <baerbaer@…>, 16 years ago

Initial import to BerliOS corresponding to 3.0.4

git-svn-id: svn+ssh://svn.berlios.de/svnroot/repos/smmp/trunk@1 26dc1dd8-5c4e-0410-9ffe-d298b4865968

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