Hi,
I need to find the residue numbers of all water and other atoms (like metal atoms) inside the protein structure. and their immediate neighbours in terms of residue number. I use perl. But I don't know how to proceed, I don't need help in scripting but about the way to solve the problem.
I request help form experts in this field.Thanks in advance.
What do you mean by "immediate neighbours in terms of residue number"?
I answered this below assuming that you mean the neighboring protein atoms, but if you mean any neighboring atoms, or only other water/metal atoms, then you would just change the inner loop.
Immediate neighbour means the residues surrounding the water molecules in the 3 dimensional structure of protein. It can be any other residue including other water molecules. I just had a look at perlmol it seems helpful. But I wish to know how theoretically we can find them. It is by finding the centre of the protein structure and then surface, radius etc?
As I noted in my answer below, you can find neighbors based on distance between atom centers by simply calculating the euclidean distance:
sqrt((x1-x2)^2+(y1-y2)^2+(z1-z2)^2)
and calculating whether that distance is less than some threshold.However, I see you are now using the word "surface" and "radius", and I now notice the phrase "inside the protein structure" in your original question. So you are trying to identify water/metals that are within some molecular surface? You will need to define what that surface is (SAS, SES, VDW). Here are two resources with some examples and theory related to surfaces: https://web.archive.org/web/20120830152415/http://www.netsci.org/Science/Compchem/feature14e.html and http://www.cgl.ucsf.edu/chimera/data/surface-oct2013/surface.html