CLI Inputs, Outputs, and Workflow Handoffs ========================================== This guide describes conventions shared by the command-line workflows in SilcsBio 2026.1.2. Each module chapter provides its commands, options, and step-specific input/output reference. You do not need readable implementation scripts to follow those instructions. .. _cli_project_layout: Working directory and file identity ----------------------------------- Run a workflow's steps from the same project directory unless its instructions explicitly say otherwise. A command may read earlier setup files even when its only visible argument is ``prot=...``. Copying just the input PDB into a new directory does not copy the state of a running or completed project. What to move depends on what you plan to do: * **View or use completed FragMaps:** keep and move the complete ``silcs_fragmaps_/`` bundle, including its matching ``.pdb``, ``maps/``, and any supplied viewing scripts/plugins. Pass the bundle's ``maps/`` directory, not its parent, to downstream ``mapsdir`` options. * **Continue, restart, or analyze an in-progress project:** preserve the workflow's project directory and step-specific setup, per-job directories, logs, progress/checkpoint files, and intermediate data. There is no universal minimal file list; use the module's handoff table. For example, SILCS-Biologics continuation depends on ``1_fragmap./`` and the matching protein inputs, while later stages also consume the corresponding PPI and Hotspots directories. Moving only a final map bundle is not enough to resume those calculations. For support or archival, also keep the exact input files, installation version, command, and non-default settings together with the project. .. list-table:: Reading command examples :header-rows: 1 :widths: 24 76 * - Convention - Meaning * - ``$SILCSBIODIR`` - Installed SilcsBio directory. Set this in the shell that launches the command. ``$GMXDIR`` is the directory containing the supported GROMACS executable, not the executable itself. * - ```` - A placeholder to replace, not literal shell input. For example, ``prot=target.pdb``. Do not copy angle brackets into a runnable command. * - ``key=value`` - One shell argument. Do not put spaces around ``=``. Quote an atom selection or coordinate list as shown in the module example. * - ``--option value`` - The option syntax used by many Python and standalone utilities. It is not interchangeable with ``key=value``. * - ```` - The naming stem selected by the workflow, usually the input filename without its extension. Ligands/cofactors and mode-specific setup can affect the stem; use the actual generated filenames. * - Relative output path - Relative to the project working directory, unless the table explicitly names an output-directory parameter. Use simple, distinct filenames and molecule identifiers. Do not assume every wrapper supports paths containing spaces. Keep a record of the input filenames, command, non-default options, installation version, and any local job-template settings. Default resource requests and scheduler behavior can depend on the installation's templates; they are not scientific protocol guarantees. .. _cli_input_preparation: Preparing inputs ---------------- * PDB files contain coordinates, not complete simulation parameters. Resolve missing atoms/residues, alternate conformations, termini, protonation, cofactors, and unsupported residue names before setup. Use the module's target-specific requirements for proteins, membranes, and RNA. * Ligand Mol2/SDF files must have the intended chemistry, bond orders, protonation, hydrogens, and three-dimensional coordinates. A file that opens in a viewer is not necessarily ready for parameterization or simulation. * A ligand directory and a multi-molecule SD file are different interfaces. Directory processing commonly reads one molecule per file; use ``sdfile`` where the module supports multiple records in one file. Preserve identifiers and check for collisions after splitting or converting files. * Structures, binding-site centers, and maps must share a coordinate frame. Moving only the protein or ligand does not move the grids. Use the PDB distributed with the FragMap bundle when preparing downstream calculations. * Keep map types distinct: occupancy, probability, GFE, and exclusion maps represent different quantities. Renaming a file does not convert its format, units, grid origin, spacing, or values. .. _cli_units_and_scores: Units and output interpretation ------------------------------- Follow the units specified by the producing command. Structure coordinates and SILCS binding-site distances are commonly in angstroms; GROMACS trajectory, analysis, and command options may use nm, ps, and kJ/mol instead. Do not transfer cutoffs or energy values between interfaces without checking their units. SILCS GFE and LGFE scores are reported in kcal/mol. A more negative LGFE is more favorable under that scoring protocol, but LGFE, intramolecular energy, intermolecular energy, ligand efficiency, occupancy, and predicted experimental activity are not interchangeable. Compare results produced with compatible maps, parameters, sampling, and collection settings. For CSV/SDF results, preserve the header/property names and molecule identifiers. Optional columns and properties can depend on collection settings. Do not infer column positions from an example produced with different options. A missing ligand, a failed calculation, an empty table, and a numerical zero are different outcomes; check the logs before using the results. .. _cli_completion: Submission, completion, and errors ---------------------------------- Setup, job submission, calculation, and collection are separate stages. A successful submission or an output directory's existence is not proof of scientific completion. 1. Inspect setup diagnostics and verify all expected systems or ligands exist. 2. Use the module's ``check_progress`` command where available. For commands reporting ``Q/R/E/F/NA``, these mean queued, running, successfully completed, failed, and not submitted. Consult the corresponding job logs for failures. 3. Before collection, check every requested job, not just the first completed job. Check that results cover all expected ligands, systems, clusters, or formulations. 4. Verify the step's documented final artifact and any required success marker. Some workflows explicitly require a preceding log to end with ``success``. Do not create or edit such markers to bypass a failed step. 5. If collection fails or produces incomplete data, retain the input, command, setup metadata, relevant job logs, and progress files when requesting support. .. _cli_retention: Rerunning and retaining results ------------------------------- There is no universal resume or overwrite behavior across modules. An existing directory may trigger a prompt, reuse previous state, or be replaced. Read the module's rerun instructions and use a separate output directory or project copy for a different protocol. Do not run two writers against the same result tree. Archive final scientific results together with the inputs and settings needed to interpret them. Retain intermediate trajectories and per-run maps if you intend to change analysis selections, fitting references, frame ranges, or map generation later. Cleanup commands are destructive and are not a prerequisite for using final results. Back up the project before cleanup. The examples in this guide illustrate command structure; they do not promise particular numerical results or replace completion checks. Packaged examples under ``$SILCSBIODIR/examples`` provide starting inputs where available; copy them into your own writable project instead of running inside the installation. Worked handoff: existing FragMaps to pose refinement ------------------------------------------------------------ This example uses the packaged SILCS ``3fly`` inputs. It illustrates the difference between a bundle root, a map directory, and a ligand directory: :: mkdir refinement_example cd refinement_example cp -R "$SILCSBIODIR/examples/silcs/silcs_fragmaps_3fly" . mkdir ligands cp "$SILCSBIODIR/examples/silcs/3fly_lig.sdf" ligands/ "$SILCSBIODIR/silcs-mc/1_run_silcsmc_local" \ prot=silcs_fragmaps_3fly/3fly.pdb \ mapsdir=silcs_fragmaps_3fly/maps ligdir=ligands The last command launches sampling jobs. After every job has completed, collect: :: "$SILCSBIODIR/silcs-mc/2_calc_lgfe_min_avg_sd" ligdir=ligands pdb=true The handoff is now ``3_silcsmc/lgfe.csv``, ``3_silcsmc/minconf.sdf``, and per-ligand collected structures under ``3_silcsmc/minconfpdb/``. Check ``3_silcsmc/did_not_finish.txt`` and the input/output molecule inventory. Retain the FragMap bundle and parameter settings if using these structures for further analysis or BML.