File: ProteinFriction.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 (40 lines) | stat: -rw-r--r-- 1,366 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
29
30
31
32
33
34
35
36
37
38
39
40
# Friction constants for protein C-alpha models
#
# Written by Konrad Hinsen
#

"""
A friction constant model for |C_alpha| models of proteins
"""

__docformat__ = 'restructuredtext'

import MMTK.ParticleProperties
from Scientific import N

def calphaFrictionConstants(protein, set=2):
    """
    :param protein: a |C_alpha| model protein
    :type protein: :class:`~MMTK.Proteins.Protein`
    :param set: the number of a friction constant set (1, 2, 3, or 4)
    :return: the estimated friction constants for the atoms in the protein
    :rtype: :class:`~MMTK.ParticleProperties.ParticleScalar`
    """
    radius = 1.5
    atoms = protein.atomCollection()
    f = MMTK.ParticleProperties.ParticleScalar(protein.universe())
    for chain in protein:
        for residue in chain:
            a = residue.peptide.C_alpha
            m = atoms.selectShell(a.position(), radius).mass()
            d = 3.*m/(4.*N.pi*radius**3)
            if set == 1:  # linear fit to initial slope
                f[a] = max(1000., 121.2*d-8600)
            elif set == 2:  # exponential fit 400 steps
                f[a] = max(1000., 68.2*d-5160)
            elif set == 3:  # exponential fit 200 steps
                f[a] = max(1000., 38.2*d-2160)
            elif set == 4:  # expansion fit 50 steps
                f[a] = max(1000., 20.4*d-500.)
                
    return f