MATLAB How to extract pdb data in Matlab

  • Thread starter Thread starter MiloBoots
  • Start date Start date
  • Tags Tags
    Data Matlab
Click For Summary
The discussion centers on extracting specific atomic coordinates from a PDB data file, focusing on separating the coordinates by element type, such as oxygen and nitrogen. The user has successfully obtained arrays for the x, y, and z coordinates of all atoms but seeks a method to filter these coordinates into distinct arrays for each element. They reference MATLAB functions like pdbread and provide links to relevant resources for reading and writing PDB files in MATLAB. The main challenge is developing a script that effectively filters the PDB data to achieve the desired output of separate coordinate arrays for each element type.
MiloBoots
Messages
2
Reaction score
0
Hey

I want to be able to extract the coordinates of different elements in a PDB data file. I have been able to extract the coordinates for all the atoms in 3 arrays in the x, y, z directions. However, I would like to have the x, y, z coordinates for each element separate. So an array for the positions of oxygen, an array for nitrogen etc.

For example, I use the line:Z=[gflstruct.Model.Atom.Z] to get the Z axis coordinates and similarly for X and Y.

I am struggling to come up with a script to run which filters through the pdb file and outputs the different arrays of coordinates for each element.

Thankyou
 
Physics news on Phys.org

Similar threads

  • · Replies 4 ·
Replies
4
Views
1K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 2 ·
Replies
2
Views
3K
Replies
2
Views
2K
  • · Replies 3 ·
Replies
3
Views
1K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 12 ·
Replies
12
Views
4K
  • · Replies 8 ·
Replies
8
Views
2K