Atoms
Module for writing or modifying atom identifiers within PDB file lines.
write_atom_id(line, atom_id)
¶
Writes a new atom ID into a specific PDB line.
This function takes a PDB line and an integer representing the new atom ID.
It formats the atom ID to fit within the standard atom serial number columns
(columns 7-11, inclusive) of a PDB file line and then uses the write_in_pdb_line
utility function to insert this new ID into the line.
PARAMETER | DESCRIPTION |
---|---|
line
|
The PDB line to be modified. This should be a standard PDB format line, typically starting with "ATOM" or "HETATM".
TYPE:
|
atom_id
|
The new atom ID (serial number) to be written into the PDB line.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
The modified PDB line with the new atom ID written into the appropriate columns. |
Examples: