Skip to content

Residues

structure.pdb.numbering.residues.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.

structure.pdb.numbering.residues.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).