Euclidian distances between coordinates in pdb file

2 ビュー (過去 30 日間)
akyanus
akyanus 2020 年 1 月 10 日
編集済み: akyanus 2020 年 1 月 10 日
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?

採用された回答

Meg Noah
Meg Noah 2020 年 1 月 10 日
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);
  1 件のコメント
akyanus
akyanus 2020 年 1 月 10 日
Hi meg,
Thank you for your responce. it is working.. :)

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File Exchange2-D and 3-D Plots についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by