4

I am trying to find whether the two atoms that belong to two different chains would be considered as 'bound' or not. This based on the fact that if the distance (euclidian, which could be find through the given x,y,z coordinates) is shorter than the van der Waals of the two atoms plus 0.5A then it is considered bound. The problem is that I didn't understand how to calculate the van der Waals for each atom. Because in PDB, the atom names are like CB1, CA etc. and not a single atom. I know Waals radii for N for instance. I can write the code to calculate the atomic distance between the atoms but I failed to do the van der Waals part, which is essential. Here is the code I have written to extract the information from the two chains and the link for the PDB:

http://www.rcsb.org/pdb/explore.do?structureId=3KUD

a = open('3kud.pdb', 'r') # opening the PDB file
b = a.readlines()  # reading the file line by line
c = [x.strip('\n') for x in b]  # extracting '\n' from each line
d = []
# Creating a function that extract information from the given PDB list(only the ATOM parts)
def pdbread():
    global c # calling c in order to define d based on c.
    global d # empty list that contains all the atoms in the list
    for i in range(len(c)):
        if c[i].startswith('ATOM'):
            d.append(c[i])
        else:
            continue
    return d
print 'The atom part of the given PDB file', pdbread()

w = []  # I, then, splitted the given whole atom list part so that each column could be read on the file.
for i in range(len(d)):
    line = d[i].split()
    w.append(line)
    Chain_A = []
    Chain_B = []
    for z in w:
        if z[4] == 'A':
            Chain_A.append(z)
        if z[4] == 'B':
            Chain_B.append(z)

print 'Splitted form of the atom part of the PDB file', w
print 'Chain A :', Chain_A
print 'Chain B:', Chain_B

I can create for loop between those two chains and compare the distances as long as I get how to calculate the van der Waals radii between two atoms that might interact with one another.

EDIT: I decided to move forward by assuming each atom is the first letter such that CB, OG1, are Carbon and Oxygen respectively and will going to take their van der Waals value. Nevertheless, I am still struggling to write the code to create for loop between two chains and calculate the distance in the form of if 'vanderWaalsOfatomOfChainA + vanderWaalsOfatomOfChainB + 0.5' > 'Their distance based on the euclidian formula': etc.

EDIT: I managed to add the van der Waals radius to each list in the Chain_A and Chain_B here is the code:

for z in w:
    if z[2][0] == 'N':
        z.append(1.55)
    if z[2][0] == 'O':
        z.append(1.52)
    if z[2][0] == 'C':
        z.append(1.7)
    if z[2][0] == 'S':
        z.append(1.8)
    if z[2][0] == 'H':
        z.append(1.2)

But all I need is to find out how to create a for loop for both of the chains. I mean I have to compare all the atoms of A and B. 12. slot in each list gives the van der Waals radius and I need to calculate 12th of each list of A plus 12th of each list of B plus 0.5 and compare it to the euclidian formula!

FINAL EDIT: Wrote this code but it doesn't work! Based on this idea, I have to compare each element of Chain_A with Chain_B.

A_binding = []
B_binding = []
for x,y in zip(Chain_A, Chain_B):
    if x[12] + y[12] + 0.5 > sqrt((float(x[6])-float(y[6]))**2 + (float(x[7])-float(y[7]))**2 + (float(x[8])-float(y[8]))**2):
        A_binding.append(x)
        B_binding.append(y)
print A_binding
print B_binding
aleatha
  • 93
  • 2
  • 8

2 Answers2

0

Maybe this could help you :

Atoms force field values

The part which interest you is epsilon_vdw_PDB()[0]. It gives you all atoms van der waalz values. This file comes from a recent project I've made, and was given by my teachers.

By the way, why don't you make 2 for loops ? One for the chain A and the other for chain B. I didn't try your code, but the lenght of A might be different from B. When you use zip(), the lenght of the 2 objects inside () must be equal I think (didn't verify).

Biopy
  • 167
  • 1
  • 5
  • 15
0

Usually, interacting atoms are identified using 4 Angstrom distance cutoff. Use NeighborSearch from Bio.PDB. It is fast and will make your script much shorter.

mahaswap
  • 76
  • 8