Skip to content
Permalink
Browse files

folder name change and README minor format

  • Loading branch information...
ShantaoL committed Sep 16, 2015
1 parent feb882e commit 872a0de29bfb6d86ab07682e187389bfaf66f536
Showing with 21,316 additions and 0 deletions.
  1. +71 −0 interior_residue/add_zeros_to_fnm.py
  2. +106 −0 interior_residue/calpha_modes.py
  3. +268 −0 interior_residue/correlate_motions_ver2.py
  4. +113 −0 interior_residue/get_highest_btwnss_edges_frm_gn_output.py
  5. +136 −0 interior_residue/just_make_simplified_pdb__CA_LINES_ONLY.py
  6. +132 −0 interior_residue/just_make_simplified_pdb_and_rm_HETATM.py
  7. +271 −0 interior_residue/make_contact_map.py
  8. +29 −0 interior_residue/mod_cont_map_for_gn.py
  9. +27 −0 interior_residue/networkTools/Community.h
  10. +84 −0 interior_residue/networkTools/Flow.c
  11. +91 −0 interior_residue/networkTools/Flow.h
  12. BIN interior_residue/networkTools/Flow.o
  13. +197 −0 interior_residue/networkTools/GNCommunities.c
  14. BIN interior_residue/networkTools/GNCommunities.o
  15. +121 −0 interior_residue/networkTools/GNCommunities_ORIG.c
  16. +2,132 −0 interior_residue/networkTools/Graph.c
  17. +301 −0 interior_residue/networkTools/Graph.h
  18. BIN interior_residue/networkTools/Graph.o
  19. +84 −0 interior_residue/networkTools/GraphNetwork.c
  20. +2,105 −0 interior_residue/networkTools/Graph_ORIG.c
  21. +2,120 −0 interior_residue/networkTools/Graph_mem_freed.c
  22. +2,132 −0 interior_residue/networkTools/Graph_prv.c
  23. +306 −0 interior_residue/networkTools/List.c
  24. +212 −0 interior_residue/networkTools/List.h
  25. BIN interior_residue/networkTools/List.o
  26. +60 −0 interior_residue/networkTools/Makefile
  27. +163 −0 interior_residue/networkTools/SuboptimalPaths.c
  28. BIN interior_residue/networkTools/SuboptimalPaths.o
  29. +168 −0 interior_residue/networkTools/Tree.c
  30. +119 −0 interior_residue/networkTools/Tree.h
  31. BIN interior_residue/networkTools/Tree.o
  32. +271 −0 interior_residue/networkTools/alignment.c
  33. +122 −0 interior_residue/networkTools/alignment.h
  34. BIN interior_residue/networkTools/gncommunities
  35. +393 −0 interior_residue/networkTools/networkComparison.c
  36. +107 −0 interior_residue/networkTools/networkComparison.h
  37. +140 −0 interior_residue/networkTools/networkEvolution.c
  38. BIN interior_residue/networkTools/subopt
  39. +122 −0 interior_residue/residues__2__resids_types_chains.py
  40. +113 −0 interior_residue/residues__2__resids_types_chains_wo_VMD.py
  41. +22 −0 interior_residue/top_nm.pl
  42. BIN surface_residue/.DS_Store
  43. +71 −0 surface_residue/add_zeros_to_fnm.py
  44. +106 −0 surface_residue/calpha_modes.py
  45. +35 −0 surface_residue/code_pack/Makefile
  46. +281 −0 surface_residue/code_pack/bindingSiteMeasures.c
  47. +29 −0 surface_residue/code_pack/bindingSiteMeasures.h
  48. BIN surface_residue/code_pack/bindingSiteMeasures.o
  49. BIN surface_residue/code_pack/bindingSites
  50. +608 −0 surface_residue/code_pack/bindingSites.c
  51. BIN surface_residue/code_pack/bindingSites.o
  52. +147 −0 surface_residue/code_pack/modes.c
  53. +28 −0 surface_residue/code_pack/modes.h
  54. BIN surface_residue/code_pack/modes.o
  55. +207 −0 surface_residue/code_pack/network.c
  56. +58 −0 surface_residue/code_pack/network.h
  57. BIN surface_residue/code_pack/network.o
  58. +85 −0 surface_residue/code_pack/pdbFile.c
  59. +37 −0 surface_residue/code_pack/pdbFile.h
  60. BIN surface_residue/code_pack/pdbFile.o
  61. +1,650 −0 surface_residue/code_pack/surfaceProbe.c
  62. +149 −0 surface_residue/code_pack/surfaceProbe.h
  63. BIN surface_residue/code_pack/surfaceProbe.o
  64. +1,654 −0 surface_residue/code_pack/surfaceProbe2.c
  65. +1,649 −0 surface_residue/code_pack/surfaceProbe_ORIG.c
  66. +466 −0 surface_residue/code_pack/transformations.c
  67. +70 −0 surface_residue/code_pack/transformations.h
  68. BIN surface_residue/code_pack/transformations.o
  69. +153 −0 surface_residue/gap_theory_calculations.py
  70. +201 −0 surface_residue/get_box_size_to_det_num_MC_steps.py
  71. +222 −0 surface_residue/identify_high_confidence_BL_sites.py
  72. +136 −0 surface_residue/just_make_simplified_pdb__CA_LINES_ONLY.py
  73. +132 −0 surface_residue/just_make_simplified_pdb_and_rm_HETATM.py
  74. +282 −0 surface_residue/map_raw_sites__to__BL_sites.py
  75. +22 −0 surface_residue/top_nm.pl
@@ -0,0 +1,71 @@
import numpy as np
import sys
import os
#from math import exp
#from Bio.PDB import *


'''
For each FNM file -- add 0-vectors to so that 10 modes are avail
USAGE:
python add_zeros_to_fnm.py
stdin/stdout
'''



def check_if_list_has_only_floats(list_to_check):
status = True
list_of_float_like_chars = ("-", ".", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9")
for element in list_to_check:
for charact in element:
if charact not in list_of_float_like_chars:
return False
return status


num_modes = 0
avail_fnm_file_lines = list()
fnm_file_to_rd = sys.stdin
mode___2___num_vectors = {}
number_of_vectors_in_mode = 0 ## re-setting the counter
for line in fnm_file_to_rd:
avail_fnm_file_lines.append(line)
if line[0] is not "#": ## ie, if we're not at file header
ln_elmnts = list()
ln_elmnts = line.split()
if "BEGIN MODE" in line:
num_modes += 1
mode_indx = int(ln_elmnts[2])
number_of_vectors_in_mode = 0 ## re-setting the counter
if (len(ln_elmnts) == 3) and (check_if_list_has_only_floats(ln_elmnts)):
number_of_vectors_in_mode += 1
if line[0:3] == "END":
mode___2___num_vectors[mode_indx] = number_of_vectors_in_mode
fnm_file_to_rd.close()
#for mode in mode___2___num_vectors:
# print fnm_file + " mode: " + str(mode) + " num_modes: " + str(num_modes)

out_file_name_to_wrt = sys.stdout
for avail_line in avail_fnm_file_lines:
out_file_name_to_wrt.write(avail_line)


num_remaining_modes_to_print = 10 - num_modes
starting_mode = 17 - num_remaining_modes_to_print
mode_to_print = starting_mode
while mode_to_print <= 16:
out_file_name_to_wrt.write("BEGIN MODE " + str(mode_to_print) + "\n")
vect = 0
while vect < number_of_vectors_in_mode:
out_file_name_to_wrt.write("0.0000000000 0.0000000000 0.0000000000\n")
vect += 1
out_file_name_to_wrt.write("END\n\n")
mode_to_print += 1
out_file_name_to_wrt.close()


#print "\n\n --- run complete -- \n\n"

@@ -0,0 +1,106 @@
#!python

# This example shows how to calculate approximate low-frequency
# modes for big proteins. For a description of the techniques,
# see
#
# K. Hinsen
# Analysis of domain motions by approximate normal mode calculations
# Proteins 33, 417 (1998)
#
# and
#
# K. Hinsen, A.J. Petrescu, S. Dellerue, M.C. Bellissent-Funel, G.R. Kneller
# Harmonicity in slow protein dynamics
# Chem. Phys. 261, 25 (2000)
#
##
#
# Adaptation by Simon Mitternacht 2010-2011.
#


from MMTK import *
from MMTK.Proteins import Protein
from MMTK.Proteins import PeptideChain
from MMTK.ForceFields import CalphaForceField
from MMTK.FourierBasis import FourierBasis, estimateCutoff
from MMTK.NormalModes import NormalModes, VibrationalModes, SparseMatrixSubspaceNormalModes
from numpy import *
import sys
import re


# top_nm.pl only reads the first 20 modes before exiting. This results in a broken pipe error.
# Prevent calpha_modes.py from crashing by ignoring SIGPIPE signal.
import signal
signal.signal(signal.SIGPIPE, signal.SIG_DFL)



def modes_in_sequential_order(protein,modes):
modes_inseq = []
for mode in modes: #[modes.rawMode(i) for i in xrange(len(modes))]:
tmp_mode = []
for chain in protein:
for residue in chain.residues():
tmp = mode[residue.peptide.C_alpha]
norm = 1#math.sqrt(residue.mass())
tmp_vec = [tmp.x()/norm, tmp.y()/norm, tmp.z()/norm]
tmp_mode.append(tmp_vec)
modes_inseq.append(tmp_mode)
return modes_inseq



if (len(sys.argv) != 2 and len(sys.argv) != 3):
print "Usage: %s pdb [v|f]" % sys.argv[0]
print "Outputs the 10 % lowest frequency normal modes,to stdout. "
print "Second optional argument specifies if VibrationalModes or FourierBasis should be used."
exit()


# Check CL arguments
pdb_file = sys.argv[1]
type = "auto"
if (len(sys.argv) > 2):
arg = sys.argv[2]
if (arg != 'v' and arg != 'f'):
sys.stderr.write("Argument \'%s\' invalid" % arg)
exit()
type = arg

# Construct system
universe = InfiniteUniverse(CalphaForceField(2.5))
universe.protein = Protein(pdb_file, model='calpha')

# Find a reasonable basis set size and cutoff
cutoff = None
if (type == "auto") or (type == "f"):
nbasis = max(10, universe.numberOfAtoms()/10)
cutoff, nbasis = estimateCutoff(universe, nbasis)

# calculate modes for first system
if (cutoff is None):
# Do full normal mode calculation
print "# VibrationalModes"
modes = VibrationalModes(universe)
print "# %d" % len(modes)
else:
# Do subspace mode calculation with Fourier basis for large proteins
print "# FourierBasis: cutoff = %d, nbasis = %d" % (cutoff, nbasis)
subspace = FourierBasis(universe, cutoff)
subspace.may_modify = 1
modes = SparseMatrixSubspaceNormalModes(universe, subspace)

modes_seq = modes_in_sequential_order(universe.protein, modes)
N = min(len(modes_seq),3*universe.numberOfAtoms()/10+6)

for i in range(6,N):
print "BEGIN MODE %d" % ((i+1))
for d in modes_seq[i]:
print "%.10f %.10f %.10f" % (d[0], d[1], d[2])
print "END"
print ""


0 comments on commit 872a0de

Please sign in to comment.
You can’t perform that action at this time.