Skip to content

Numbering

Standardizes residue ID numbering

assign_resid(line, current_resid, prev_original_resid)

Determines residue ID based on a consistent numbering scheme.

PARAMETER DESCRIPTION
line

Line that we are determining the residue ID to have.

TYPE: str

current_resid

Current residue ID that we are using.

TYPE: str | None

prev_original_resid

Previous residue ID from the PDB file that we are grouping together.

TYPE: str

RETURNS DESCRIPTION
str

Assigned residue ID for this line.

str

Next prev_original_resid.

cli_unify_resids()

Command-line interface for unifying residue IDs in PDB files.

run_unify_resids(pdb_path, output_path=None)

Unify residue ID in the PDB lines.

PARAMETER DESCRIPTION
pdb_path

Path to PDB file.

TYPE: str

output_path

Path to save new PDB file. If None, then no file is written.

TYPE: str | None DEFAULT: None

RETURNS DESCRIPTION
Iterable[str]

PDB file lines.

unify_resid(line, current_resid, prev_original_resid)

Unify residue ID in the PDB line based on previous ones.

PARAMETER DESCRIPTION
line

Line that we are modifying.

TYPE: str

current_resid

Current residue ID that we are using.

TYPE: str | None

prev_original_resid

Original residue ID from previous line in the PDB file.

TYPE: str

RETURNS DESCRIPTION
str

PDB line with the new residue ID.

str

Residue ID we are assigning this atom.

str

The original residue ID from line (i.e., the next prev_original_resid).