I would like to extract x,y,z coordinates of any 3 atoms from a pdb file. How to rectify this error and make it generalized?
5 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Masha
el 28 de En. de 2023
Comentada: Masha
el 28 de En. de 2023
ubq=getpdb('1UBQ');
for n=[1,2,3]
Q(n)=[ubq.Model.Atom(n).X, ubq.Model.Atom(n).Y, ubq.Model.Atom(n).Z]
end
0 comentarios
Respuesta aceptada
Walter Roberson
el 28 de En. de 2023
% N = range of indices for example
N=1:7;
Q = [ubq.Model.Atom(N).X; ubq.Model.Atom(N).Y; ubq.Model.Atom(n).Z].';
This assumes that each X Y Z are scalars.
This code process an array with 3 columns. If 3 rows are acceptable then leave out the .'
Más respuestas (0)
Ver también
Categorías
Más información sobre Bioinformatics Toolbox en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!