Utils
link_resnames(resnames, linker='or')
¶
Convert a list of residue names into a formatted selection string.
PARAMETER | DESCRIPTION |
---|---|
resnames |
List of residue names to string together. |
linker |
String to link (e.g., put between) residue names.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
str
|
Formatted selection string.
TYPE:
|
Example
resnames = ["WAT", "HOH", "H2O"] formatted_string = format_resnames(resnames) print(formatted_string) resname WAT or resname HOH or resname H2O formatted_string = format_resnames(resnames, linker="and") print(formatted_string) resname WAT and resname HOH and resname H2O