Water
Command-line interface for unifying residue and atom names of water molecules in a PDB file.
add_pdb_water_subparser(subparsers)
¶
Adds the 'unify-wat' subcommand to the Simlify CLI for unifying water labels.
This function configures an argparse
subparser named 'unify-wat' which allows
users to specify a PDB file and an optional output path. The 'unify-wat'
command will standardize the residue and atom names of all water molecules
within the PDB file to a consistent format (e.g., residue name to 'HOH' and
oxygen atom name to 'O').
PARAMETER | DESCRIPTION |
---|---|
subparsers
|
An
|
RETURNS | DESCRIPTION |
---|---|
The configured |
The 'unify-wat' subcommand accepts the following arguments:
pdb_path
: Path to the input PDB file containing water molecules whose labels will be unified. This argument is optional. If not provided, the program might expect the path through other configuration mechanisms.- `--output: Path to the new PDB file where the water labels have been unified. If not provided, the output might overwrite the input file or be handled in another way by the underlying function.
The function sets the default action for this subparser to be the
cli_unify_water_labels
function, which will be called when the user invokes
the 'unify-wat' subcommand.
cli_unify_water_labels(args, parser)
¶
Command-line interface function to unify water residue and atom names in a PDB file.
This function serves as the entry point when the user executes the 'unify-wat'
subcommand of the Simlify CLI. It receives the parsed command-line arguments
and the argument parser object. It extracts the paths to the input PDB file
and the desired output PDB file and then calls the run_unify_water_labels
function from the simlify.structure.pdb.names
module to perform the
unification of water labels.
PARAMETER | DESCRIPTION |
---|---|
args
|
An
TYPE:
|
parser
|
The argument parser object for the 'unify-wat' subcommand. Although passed, it's not directly used in this specific implementation.
TYPE:
|
RETURNS | DESCRIPTION |
---|---|
None
|
None |
The function retrieves the following arguments from the args
object:
- pdb_path
: Path to the input PDB file.
- output
: Path to the output PDB file.
It then calls the
run_unify_water_labels
function with these paths to perform the standardization of water residue and
atom names.