In [1]:
import calculate_trimer_coordinates

calculate trimers

Points means the number of trimer.

T_points means the number trimer created within the error range.

R is the radius of the HIV virus r is the radius of each trimer

In [2]:
R = 400
r = 52.0769942809
In [3]:
calculate_trimer_coordinates.algorithm(R,r)
There are 417 points.
There are 0 T_points.
Out[3]:
417
In [4]:
import pointsPlot

pointsPlot.drawPoints([])
In [5]:
import linesPlot 
linesPlot.drawLines([], [])

Generate Relation Plot

tabulate relationship of R and trimer_number

Min Radius is start radius Max Radius is end radius Interval is increasing amount of each iteration

r is radius of trimmer, you could update r as well

In [6]:
minRadius = 600
maxRadius = 700
interval = 10
r = 52.0769942809

radius_list = []
number_of_trimers_list = []
column_data = []

while (minRadius <= maxRadius):
    radius_list.append(minRadius)
    number_of_trimers = calculate_trimer_coordinates.algorithm(minRadius,r,False)
    number_of_trimers_list.append(number_of_trimers)
    column_data.append([minRadius, number_of_trimers])
    minRadius += interval

Table of Radius and Number of Trimers Relation

In [7]:
import pandas as pd
pd.DataFrame(column_data, columns=["Radius", "Number of trimers"])   
Out[7]:
Radius Number of trimers
0 600 909
1 610 955
2 620 971
3 630 1019
4 640 1033
5 650 1074
6 660 1124
7 670 1157
8 680 1178
9 690 1185
10 700 1243

Plot of the relation

The x-axis is the radius and y-axis is the number of trimers

In [8]:
import matplotlib
import matplotlib.pyplot as plt

# figure 6    
fig, ax = plt.subplots()
ax.plot(radius_list, number_of_trimers_list)

ax.set(xlabel='Radius (Angstrom)', ylabel='number_of_trimers ',
       title='Radius and Number of Trimers Relation')
ax.grid()

fig.savefig("relation.png")
plt.show()

plot trimers from previous model

Render the PyMol model will take longer time when you have more trimmers in the previous model.

In [ ]:
import pymol_plot_trimer
pngFilePath = '/tmp/HIV.png'
r = 52.0769942809
pymol_plot_trimer.main(pngFilePath, r)
The default filename is points.
Input file name:points
Eg: R.pdb or R.pse
Input output file name:R.pdb
 PyMOL not running, entering library mode (experimental)
In [1]:
from IPython.display import Image
Image(filename='/tmp/HIV.png')
Out[1]:

Plot flatten Trimer

In [ ]:
import calculate_flatten_trimmer_coordinations
In [ ]:
calculate_flatten_trimmer_coordinations.plot()
In [ ]:
import pymol_2D_plot_trimer
pngFilePath = '/tmp/flattenHIV.png'
pymol_2D_plot_trimer.main(pngFilePath)
In [ ]:
from IPython.display import Image
Image(filename='/tmp/flattenHIV.png')
In [ ]: