Type to search…

Prody

Introduction

ps
uv init prody --name prody-project
cd prody
uv add prody

File Parsers

Let’s start with parsing a protein structure and then keep working on that in this part.

File parser function names are prefixed with parse.

When using parsePDB(), usually an identifier will be sufficient. If corresponding file is found in the current working directory, it will be used, otherwise it will be downloaded from PDB servers.

Let’s parse structure 5uoj of p38 MAP kinase (MAPK):

python
from prody import *

p38 = parsePDB('5uoj')  # returns an AtomGroup object
print(p38)  # typing in a variable name will give some information

We see that this structure contains 3138 atoms.

@> 3138 atoms and 1 coordinate set(s) were parsed in 0.01s.
AtomGroup 5uoj

Now, similar to listing parser function names, we can use tab completion to inspect the p38 object:

Let’s use some of them to get information on the structure:

python
print(f"Num Atoms {p38.numAtoms()}")
print(f"Num Coordsets {p38.numCoordsets()}")  # returns number of models
print(f"Num Residues {p38.numResidues()}")  # water molecules also count as residues

You're reading a preview.

Sign in to read the full article. Any account opens 4 free articles a month; students and teachers read their course pages without limit.

Sign in