Euclidian distances between coordinates in pdb file

1 visualización (últimos 30 días)
akyanus
akyanus el 10 de En. de 2020
Editada: akyanus el 10 de En. de 2020
Hi everbody,
I want to calculate all the Euclidian from the pdb file. First of all, I extracted the lines that contains a specific element from the file.
After obtaining the element coordinates, I need the calculate all the Euclidian distances between two atoms(CA-CA) by x1, x2, x3 coordinates .For this, I have to use this formulation:
d =sqrt[(x1-x2)^2 +(x1-x3)^2+(x2-x3)^2], maybe with looping and I should obtain 76x76 matrix.
I attached the file. After that I need to plot all the entries of this matrix where the calculated
distance is <5.
I tried R studio, but I could not do this in R. Can you help for this?

Respuesta aceptada

Meg Noah
Meg Noah el 10 de En. de 2020
Solution:
% euclid
filename = '1UBQ_CA.txt';
CA_CA = readtable(filename);
[iatom1,iatom2] = meshgrid(1:76,1:76);
distance = zeros(76,76);
distance_CA_CA = sqrt((CA_CA.x1(iatom1)-CA_CA.x1(iatom2)).^2 + ...
(CA_CA.x2(iatom1)-CA_CA.x2(iatom2)).^2 + ...
(CA_CA.x3(iatom1)-CA_CA.x3(iatom2)).^2);

Más respuestas (0)

Categorías

Más información sobre Mining Geology en Help Center y File Exchange.

Etiquetas

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by