Thank you. Two things. First, my protein contains a ZN atom and gives a KeyError: 'CA' with the code below. BTW, does that mean biopython is still buggy? The second thing is that the output contains a lot of weird formatting "<vector 1.34,="" 0.22,="" -0.72="">", I only want the numbers. I also want to retrieve the residue letter of that CA atom I'm operating on.
from Bio.PDB import *
import numpy as np
CA_coordinates = np.array([])
p=PDBParser()
structure=p.get_structure('name', '1dsq_n.pdb')
for model in structure:
for chain in model:
for residue in chain:
CA_coordinates = np.append(CA_coordinates, residue['CA'].get_vector())