Commit 64ef5df4 authored by Jacob Durrant's avatar Jacob Durrant

Removed tools directory.

parent 6e444486
Pipeline #279 canceled with stages
......@@ -4,11 +4,12 @@ Changes
2.1
---
1. Now Python 3 compatible.
2. Fixed minor bug that assigned atoms with names like "HG21" to element "HG"
1. Updated version to 2.1.
2. Now Python 3 compatible.
3. Fixed minor bug that assigned atoms with names like "HG21" to element "HG"
rather than "H". No longer supporting element "HG".
3. Improved formatting (black) and docstrings.
4. Moved GUI wrapper to new `depreciated/` folder. This feature is no longer
4. Improved formatting (black) and docstrings.
5. Moved GUI wrapper to new `depreciated/` folder. This feature is no longer
supported.
2.0.3
......
# POVME 2.0.3 is released under the GNU General Public License (see
# POVME 2.1 is released under the GNU General Public License (see
# http://www.gnu.org/licenses/gpl.html). If you have any questions, comments,
# or suggestions, please don't hesitate to contact me, Jacob Durrant, at
# durrantj [at] pitt [dot] edu.
......@@ -34,7 +34,7 @@ from scipy.spatial.distance import cdist
from scipy.spatial.distance import pdist
from scipy.spatial.distance import squareform
version = "2.0.3"
version = "2.1"
def log(astr, parameters):
......@@ -673,7 +673,7 @@ def dx_freq(freq_mat, parameters):
"""
header_template = """# Data from POVME 2.0.3
header_template = """# Data from POVME 2.1
#
# FREQUENCY (unitless)
#
......
POVME 2.0.3
===========
POVME 2.1
=========
0\. License: GNU General Public License version 3
-------------------------------------------------
......@@ -36,7 +36,7 @@ If you use POVME in your work, please cite:
2. Durrant, J.D., L. Votapka, J. Sørensen, and R. E. Amaro (2014). "POVME 2.0:
An Enhanced Tool for Determining Pocket Shape and Volume Characteristics."
J. Chem. Theory Comput. 10(11):5047-5056.
2\. Align a PDB-formatted trajectory
------------------------------------
......@@ -81,7 +81,7 @@ pocket. It is similarly constructed from spheres and boxes:
PointsExclusionSphere -2.0 -2.0 -4.0 5.0
PointsExclusionBox -5.0 -7.0 2.0 10.0 10.0 10.0
```
5\. Create a field of equidistant points
----------------------------------------
......@@ -94,7 +94,7 @@ separating each of these equidistant points:
```
GridSpacing 1.0
```
6\. How to choose the inclusion and exclusion regions
-----------------------------------------------------
......@@ -108,7 +108,7 @@ file called point_field.pdb for visualization:
```
SavePoints true
```
7\. Specify the location of the receptor PDB file to analyze
------------------------------------------------------------
......@@ -119,7 +119,7 @@ location of the PDB receptor file that has the pocket you wish to analyze:
```PDBFileName my_receptor.pdb```
Note that this file can be a trajectory containing multiple frames.
8\. Remove points that are near receptor atoms
----------------------------------------------
......@@ -146,7 +146,7 @@ when the user defines an inclusion region that protrudes into the surrounding
solvent-occupying space. To activate the convex-hull feature:
```ConvexHullExclusion true```
10\. Remove points that are not contiguous with the primary pocket
------------------------------------------------------------------
......@@ -169,7 +169,7 @@ ContiguousPointsCriteria 3
```
Note that points that are "kitty-corner" from each other count as neighbors.
All pocket-occupying points within or contiguous to this region are retained,
but isolated patches of points that are not directly connected are deleted.
......@@ -226,8 +226,8 @@ OutputEqualNumPointsPerFrame true # Some visualization
SaveTabbedVolumeFile true # If true, POVME saves the calculated
# volumes to a file in a simple tabular
# format that can be easily pasted into
# popular spreadsheet programs like
# Microsoft Excel. The file is named
# popular spreadsheet programs like
# Microsoft Excel. The file is named
# {PREFIX}volumes.tabbed.txt
SaveVolumetricDensityMap true # If true, POVME saves a volumetric
......@@ -236,7 +236,7 @@ SaveVolumetricDensityMap true # If true, POVME save
# with each of the pocket-occupying
# points by calculating the fraction of
# all trajectory pocket volumes that
# include the given point. The file is
# include the given point. The file is
# named {PREFIX}volumetric_density.dx.
CompressOutput true # If you're short on disk space, POVME
......@@ -272,4 +272,4 @@ as an isosurface, the value of the isosurface expresses the fraction of time
displayed volume.
(README.md adapted from [this
website](http://rocce-vm0.ucsd.edu/data/sw/hosted/POVME/).)
\ No newline at end of file
website](http://rocce-vm0.ucsd.edu/data/sw/hosted/POVME/).)
import MDAnalysis
from sys import argv
#Get VMD-annotated PDB from user through sys.argv
script, pdb_file = argv
print("This script will create a PDB /n with the correct formatting for MDA")
#Creates a new Universe with user input
u = MDAnalysis.Universe(pdb_file, topology_format = 'PDB')
#Writes a new trajectory in the format MDAnalysis can work with
protein = u.select_atoms("protein")
with MDAnalysis.Writer("Another.pdb", multiframe=True) as pdb:
for ts in u.trajectory:
pdb.write(protein)
import matplotlib.pyplot as plt
from sys import argv
script, filename = argv
volumes = open(filename)
#This script creates an ordered dictionary vol_dic of the volumes in the data file.
#Variable names are arbitrary, just used to build the structure of the dictionary
import collections
vol_dic = collections.OrderedDict()
for line in volumes:
x = line.split(',')
y = line.split('\t')
a = y[0]
b = y[1]
c = len(b) - 1
b = b[0:c]
vol_dic[a] = float(b)
#Creates a list of the volumes from vol_dic
vol_list = list(vol_dic.values())
#Creates a list of the frames from vol_dic
frame_num = list(vol_dic.keys())
#Creates scatterplot, x = frames, y = volumes
plt.scatter(frame_num, vol_list, marker = '.', s = 50, c = 'orange')
# X axis label
plt.xlabel('Frame Number')
# Y axis label
plt.ylabel('Binding Pocket Volume')
# Plot Title
plt.title('Binding Pocket Volume Over Time')
#Sets parameters of X axis for viewing
plt.xticks(list(range(-1, len(frame_num), (len(frame_num)/10))))
plt.xlim([- 1, len(frame_num)])
# Shows plot
plt.savefig('Scatterplot.png')
\ No newline at end of file
from sys import argv
script, filename = argv
volumes = open(filename)
import collections
#This script creates an ordered dictionary vol_dic of the volumes in the data file.
#Variable names are arbitrary, just used to build the structure of the dictionary
vol_dic = collections.OrderedDict()
for line in volumes:
x = line.split(',')
y = line.split('\t')
a = y[0]
b = y[1]
c = len(b) - 1
b = b[0:c]
vol_dic[a] = float(b)
#Finds maximum value in volumes and stores as max_val
max_val = 0
for val in list(vol_dic.values()):
if val > max_val:
max_val = val
#Finds the frame of the maximum value and stores as max_val_frame
for frame, volume in list(vol_dic.items()):
if volume == max_val:
max_val_frame = frame
#Finds minimum value in volumes and stores as min_val
min_val = min(vol_dic.values())
#Finds frame of minimum volume and stores as min_val_frame
for frame, volume in list(vol_dic.items()):
if volume == min_val:
min_val_frame = frame
print("""
The maximum pocket volume of this data set is %r, at frame %r,
while the minimum pocket volume of this data set is %r, at frame %r.
""" % (max_val, max_val_frame, min_val, min_val_frame))
import MDAnalysis as mda
from sys import argv
#Get Multimodel PDB file from user through sys.argv
script, pdb_file = argv
#Get number of the POVME frame from User
frame_num = input("What is the frame number you want? ")
frame_num_int = int(frame_num)
frame_num_str = str(frame_num)
#Defining the universe object with the PDB file
u = mda.Universe(pdb_file)
#This designates the atom group(the protein) and position information
#Must be placed before Writer, not after!
protein = u.select_atoms("protein"), u.trajectory[frame_num_int].positions
#Feeds the necessary information into the PDB writer to create a PDB
with mda.Writer("MD_frame_" + frame_num_str + ".pdb",
start = frame_num_int,
multiframe = False) as pdb:
pdb.write(u)
print("Created new PDB file for specified frame, titled 'MD_frame_%r.pdb'" %frame_num)
print("Your POVME frame is titled 'POVME_frame_%r.pdb' " % frame_num)
\ No newline at end of file
import matplotlib.pyplot as plt
import numpy as np
from sys import argv
script, filename = argv
volumes = open(filename)
import collections
#This script creates an ordered dictionary vol_dic of the volumes in the data file.
#Variable names are arbitrary, just used to build the structure of the dictionary
vol_dic = collections.OrderedDict()
for line in volumes:
x = line.split(',')
y = line.split('\t')
a = y[0]
b = y[1]
c = len(b) - 1
b = b[0:c]
vol_dic[a] = float(b)
#Create a list of volume values, store in vol_list
vol_list = list(vol_dic.values())
#Sets bin parameters for the histogram
#bins = np.array([n for n in range(0, len(vol_list)#, 5)])
#Creates histogram, x = Volume, y = Group, parameters
plt.hist(vol_list, bins=20, alpha=0.75, histtype = 'bar', rwidth= .95, color = 'orange', align='mid')
# X axis label
plt.xlabel('Binding Pocket Volume')
# Y axis label
plt.ylabel('Frequency')
# Plot Title
plt.title('Frequency of Binding Pocket Volume')
# Show plot
plt.savefig("Histogram.png")
\ No newline at end of file
These files are from Ben Patty. For future release.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment