Names
structure.pdb.names.cli_replace_resnames()
¶
Command-line interface for renaming residues.
structure.pdb.names.cli_unify_water_labels()
¶
Command-line interface for unifying water residue and atom names.
structure.pdb.names.modify_lines(pdb_lines, fn_process, fn_args, fn_filter=None, include=None, exclude=None)
¶
structure.pdb.names.replace_atom_names(pdb_lines, orig_atom_name, new_atom_name)
¶
Replace all atom names with another.
PARAMETER | DESCRIPTION |
---|---|
pdb_lines |
List of lines in the PDB file.
TYPE:
|
orig_atom_name |
Original atom name to replace.
TYPE:
|
new_atom_name |
New atom name.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[str]
|
PDB lines with replace atom names. |
structure.pdb.names.replace_residue_names(pdb_lines, orig_resname, new_resname, fn_filter=None, include=None, exclude=None)
¶
Replace all instances of residue names with another.
PARAMETER | DESCRIPTION |
---|---|
pdb_lines |
List of lines in the PDB file.
TYPE:
|
orig_resname |
Original residue name to replace.
TYPE:
|
new_resname |
New residue name.
TYPE:
|
fn_filter |
Filter function to parse part of a line to see if it is in
TYPE:
|
include |
Only process lines where the result of
TYPE:
|
exclude |
Do not process lines where the result of
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[str]
|
PDB lines with replace residue names. |
structure.pdb.names.run_replace_resnames(pdb_path, resname_map, output_path=None, fn_filter=None, include=None, exclude=None)
¶
Replace residue names.
PARAMETER | DESCRIPTION |
---|---|
pdb_path |
Path to PDB file.
TYPE:
|
resname_map |
Original (key) and new (value) mapping of residue names to change.
TYPE:
|
output_path |
Path to save new PDB file. If
TYPE:
|
fn_filter |
Filter function to parse part of a line to see if it is in
TYPE:
|
include |
Only process lines where the result of
TYPE:
|
exclude |
Do not process lines where the result of
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
list[str]
|
PDB lines with changed residues. |
structure.pdb.names.run_unify_water_labels(pdb_path, atom_map=None, water_resname='WAT', water_atomnames=None, output_path=None)
¶
Ensure that water molecule atom names are O
, H1
, and H2
.
Warning
This has not been tested yet.
PARAMETER | DESCRIPTION |
---|---|
pdb_path |
Path to PDB file.
TYPE:
|
atom_map |
Water atom mappings for
TYPE:
|
water_atomnames |
Specifies what water atom names are eligible for replacement.
If
TYPE:
|
water_resname |
Residue name of the water molecules.
TYPE:
|
output_path |
Path to save new PDB file. If
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
Iterable[str]
|
PDB lines with changed residues. |