File: harmonic_force_field.py

package info (click to toggle)
mmtk 2.7.9-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,788 kB
  • ctags: 6,600
  • sloc: python: 18,050; ansic: 12,400; makefile: 129; csh: 3
file content (28 lines) | stat: -rw-r--r-- 767 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Normal mode calculation using a simplified harmonic force field.
# For a description of the force field, see
#
#     K. Hinsen & G.R. Kneller
#     A simplified force field for describing vibrational protein dynamics
#     over the whole frequency range
#     J. Chem. Phys. 111, 10766 (1999)
#

from MMTK import *
from MMTK.Proteins import Protein
from MMTK.ForceFields import HarmonicForceField
from MMTK.NormalModes import VibrationalModes
from MMTK.Visualization import view

# Construct system
universe = InfiniteUniverse(HarmonicForceField())
universe.protein = Protein('bala1')

# Calculate normal modes
modes = VibrationalModes(universe)

# Print frequencies
for mode in modes:
    print mode

# Show animation of the first non-trivial mode 
view(modes[6])