
.. _spruce_opt_params:
.. include:: ../../apps-substitutions

.. program:: spruce

=======================
Optional Parameters
=======================

Input Options
--------------

.. option:: -ligand_names <names>

   If multiple ligands are in the structure but only a specific ones are desired,
   they can be specified here. Examples are either the three letter code "LIG", or in
   case of a peptide "VAL-GLU-TYS-PHE-ALA". Multiple different ligands, should be separated by commas,
   "LIG,GIL,INH".

   .. seealso::

      * :ref:`OEStructureMetadata <OESpruce_OEStructureMetadata>` in the **Spruce TK** manual.
      * :ref:`OEHeterogenMetadata <OESpruce_OEHeterogenMetadata>` in the **Spruce TK** manual.

.. option:: -map <filename>

   Input electron density map from X-ray crystallography, to be used for Iridium score calculation.
   Accepted formats are structure factor CIF files (``.cif``, ``.cif.gz``) and legacy MTZ files (``.mtz``).
   Structure factor CIF files are the current format provided by the RCSB; MTZ files are supported for backward compatibility.

.. option:: -metadata <filename>

   Metadata json file containing OEStructureMetadata. Using this can be a way to indicate desired ligands,
   tautomers to use for ligands, structure sequence etc., as well as structure title for output file names.
   The -generate_tautomers option should be set to false and -opt_expt_protons to true to only consider
   the desired ligands. More details along with an example metadata file can be found at :ref:`spruce_examples_make_design_units_using_metadata`.
   The :ref:`OESpruce::OEStructureMetadataToJson <OESpruce_OEStructureMetadataToJson>` fucntion can be used to create an appropriate json file as well.
   
   .. seealso::

      * :ref:`OEStructureMetadata <OESpruce_OEStructureMetadata>` in the **Spruce TK** manual.
      * :ref:`OESequenceMetadata <OESpruce_OESequenceMetadata>` in the **Spruce TK** manual.
      * :ref:`OEHeterogenMetadata <OESpruce_OEHeterogenMetadata>` in the **Spruce TK** manual.

.. option:: -ref <filename>

   Reference OEDesignUnit indicating the proper biological unit and relevant binding site.

.. option:: -site_residue <residue identifier>

   Input option to specify a binding site using a single residue specification if apo (or holo).
   The format is "name:num:insert code:chainid", e.g. "ASP:25: :A" indicating Aspartic acid 25 in chain A. Note: A blank/whitespace
   character is used for the insert code, which is a typical use case.

   .. seealso::

      * :ref:`OEMakeDesignUnits <OESpruce_OEMakeDesignUnits>` in the **Spruce TK** manual. This API exposes the ``siteResidue`` argument.
      * :ref:`OEMakeBioDesignUnits <OESpruce_OEMakeBioDesignUnits>` in the **Spruce TK** manual.

.. option:: -add_receptors

   Option to add OEReceptors onto the design units

   [Default=true]

   .. seealso::

      * :ref:`OEDocking::OEMakeReceptor <OEDocking_OEMakeReceptor>` in the **OEDocking TK** manual. This API takes an :ref:`OEDesignUnit <OEBio_OEDesignUnit>` argument.

Output Options
--------------

.. option:: -out <out>

   Write to a user specified file. Enforces \*.oedu format. Can be used with :option:`-warts`
   to write multiple files, one per design unit.

.. option:: -warts

   Option to add warts "_#" to the user supplied filename, when writing multiple design units.

   [Default=false]

.. option:: -prefix <prefix>

   Prefix used to name output files, default is blank

.. option:: -log <logfile>

   The argument for this flag specifies the name of
   the log file. This overrides any specified prefix.
   The default will be spruce_output.log, if no prefix is specified.

.. option:: -settings_file <settingsfile>

   (Alias: -settings)

   The argument for this flag specifies the name of
   the settings file. This overrides any specified prefix.
   The default will be spruce_settings.param, if no prefix is specified.

.. option:: -verbose

   Triggers copious logging output.

   [Default=false]

.. option:: -write_biounits

   Option to write intermediate Bio-DesignUnits, which can be used with *enumsites* to site to potential allosteric sites later.

   [Default=false]


Split Parameters
--------------------------

.. option:: -altloc <method>

   Parameter determining how alternate locations are handled. The *primary* option, collapses alternate locations,
   whereas the *enumerate* option attempts to set detected alternate locations, A, B, etc.

   [Default=enumerate]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetAlternateLocationHandling <OESpruce_OEDesignUnitSplitOptions_SetAlternateLocationHandling>` in the **Spruce TK** manual.

.. option:: -cofactor_codes <codes>

   Mechanism to define 3 letter codes that should be recognized as co-factors if not done automatically, e.g. "ATP",
   or "ATP,NAD"

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetCofactorCodes <OESpruce_OEDesignUnitSplitOptions_SetCofactorCodes>` in the **Spruce TK** manual.

.. option:: -excipient_codes

   Mechanism to define 3 letter codes that should be recognized as excipients if not done automatically, e.g. "GOL",
   or "GOL,DMS"

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetExcipientCodes <OESpruce_OEDesignUnitSplitOptions_SetExcipientCodes>` in the **Spruce TK** manual.

.. option:: -lipid_codes <codes>

   Mechanism to define 3 letter codes that should be recognized as lipids if not done automatically, e.g. "PGR",
   or "PGR,CHL"

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetLipidCodes <OESpruce_OEDesignUnitSplitOptions_SetLipidCodes>` in the **Spruce TK** manual.

.. option:: -make_packing_residues

   Option to generate packing residues, both for visualization, but also for Iridium classification

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetMakePackingResidues <OESpruce_OEDesignUnitSplitOptions_SetMakePackingResidues>` in the **Spruce TK** manual.

.. option:: -min_lig_atoms

   Parameter determining the min number of atoms a ligand molecule can have.
   A reason to lower this number would be for small fragments that need to be classified as ligands

   [Default=8]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetMinLigAtoms <OESpruce_OEDesignUnitSplitOptions_SetMinLigAtoms>` in the **Spruce TK** manual.

.. option:: -max_lig_atoms

   Parameter determining the max number of atoms a ligand molecule can have.
   A reasons to increase this number could be for peptidic ligands

   [Default=100]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetMaxLigAtoms <OESpruce_OEDesignUnitSplitOptions_SetMaxLigAtoms>` in the **Spruce TK** manual.

.. option:: -max_lig_residues

   Parameter determining the max number of residues a ligand molecule can have.
   A reasons to increase this number could be for peptidic ligands

   [Default=5]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetMaxLigResidues <OESpruce_OEDesignUnitSplitOptions_SetMaxLigResidues>` in the **Spruce TK** manual.

.. option:: -max_sys_atoms

   Parameter limiting the max number of atoms in the entire system that spruce will allow for processing.
   If this limit is reached e.g. due to a large systems or symmetry expansion resulting in a larger than expected
   system, spruce will stop processing and return false.

   [Default=50,000]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetMaxSystemAtoms <OESpruce_OEDesignUnitSplitOptions_SetMaxSystemAtoms>` in the **Spruce TK** manual.

.. option:: -target

   Parameter telling the system what the "target" is. This is particularly helpful for systems containing
   both protein and nucleic acids, where the automated system does not correctly identify the nucleic acid as the target
   of interest. Allowed values are protein or nucleic.

   [Default=protein]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitSplitOptions::SetTargetComponentID <OESpruce_OEDesignUnitSplitOptions_SetTargetComponentID>` in the **Spruce TK** manual.

Enumerate Sites Parameters
--------------------------

.. option:: -add_interactions

   Option to add OEInteractionHints to the design unit(s)

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetAddInteractionHints <OESpruce_OEDesignUnitEnumerateSitesOptions_SetAddInteractionHints>` in the **Spruce TK** manual.

.. option:: -add_style

   Option to add visualization style to the design unit(s)

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetAddStyle <OESpruce_OEDesignUnitEnumerateSitesOptions_SetAddStyle>` in the **Spruce TK** manual.

.. option:: -collapse_nonsite_alts

   Option to deduplicate structures with different alternate locations if those alternate locations
   are far from the binding site

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetCollapseNonSiteAlts <OESpruce_OEDesignUnitEnumerateSitesOptions_SetCollapseNonSiteAlts>` in the **Spruce TK** manual.

.. option:: -duplicate_removal

   Option to deduplicate identical structures resulting from symmetry operations

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetDuplicateRemoval <OESpruce_OEDesignUnitEnumerateSitesOptions_SetDuplicateRemoval>` in the **Spruce TK** manual.

.. option:: -enum_cofactors_sites

   Option to generate design units with sites based on components classified as co-factors

   [Default=false]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetEnumerateCofactorSites <OESpruce_OEDesignUnitEnumerateSitesOptions_SetEnumerateCofactorSites>` in the **Spruce TK** manual.

.. option:: -restrict_to_refsite

   Option to skip generating design units for sites identified, that do not match a provided reference design unit

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetRestrictToRefSite <OESpruce_OEDesignUnitEnumerateSitesOptions_SetRestrictToRefSite>` in the **Spruce TK** manual.

.. option:: -site_size <value>

   Distance from the ligand used to determine the size of the site

   [Default=5.0 (angstroms)]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitEnumerateSitesOptions::SetSiteSize <OESpruce_OEDesignUnitEnumerateSitesOptions_SetSiteSize>` in the **Spruce TK** manual.

.. option:: -superpose

   Option to superpose generated design units, if multiple. If a reference is provided, the first generated
   design unit will be superposed onto the reference structure, and subsequent structures onto that one.

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEMakeDesignUnitOptions::SetSuperpose <OESpruce_OEMakeDesignUnitOptions_SetSuperpose>` in the **Spruce TK** manual.

.. option:: -superpose_method <method>

   The method to use for superposition

   ==============  ======================================================================================
   Method          Description
   ==============  ======================================================================================
   global          Global Sequence Alignment to identify CA pairs
   --------------  --------------------------------------------------------------------------------------
   site            Global Sequence Alignment to identity CA pairs - focusing on the subset in active site
   --------------  --------------------------------------------------------------------------------------
   ddm             Superposition using the Distance Difference Matrix method (DDM)
   --------------  --------------------------------------------------------------------------------------
   sse             Superposition using an overlap of Secondary Structure Elements (SSE)
   --------------  --------------------------------------------------------------------------------------
   weighted        Superposition weighting residues by B-factor or occupancy
   --------------  --------------------------------------------------------------------------------------
   sitehopper      Superposition based on binding site similarities (sitehopper)
   --------------  --------------------------------------------------------------------------------------
   GlobalSequence  Alias for global — Global Sequence Alignment to identify CA pairs
   --------------  --------------------------------------------------------------------------------------
   DDMatrix        Alias for ddm — Superposition using the Distance Difference Matrix method
   --------------  --------------------------------------------------------------------------------------
   SiteSequence    Alias for site — Global Sequence Alignment focusing on the active site
   ==============  ======================================================================================

   .. seealso::

      * :ref:`OESpruce::OEMakeDesignUnitOptions::SetSuperpositionMethod <OESpruce_OEMakeDesignUnitOptions_SetSuperpositionMethod>` in the **Spruce TK** manual.

Build Parameters
----------------

.. option:: -build_cterm_caps

   Option to cap broken c-termini in protein chains

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitBuildOptions::SetCapCTermini <OESpruce_OEDesignUnitBuildOptions_SetCapCTermini>` in the **Spruce TK** manual.

.. option:: -build_nterm_caps

   Option to cap broken n-termini in protein chains

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitBuildOptions::SetCapNTermini <OESpruce_OEDesignUnitBuildOptions_SetCapNTermini>` in the **Spruce TK** manual.

.. option:: -build_loops

   Option to build loops for gaps in the protein structure

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitBuildOptions::SetBuildLoops <OESpruce_OEDesignUnitBuildOptions_SetBuildLoops>` in the **Spruce TK** manual.

.. option:: -build_sidechains

   Option to build missing or partial protein sidechains

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitBuildOptions::SetBuildSidechains <OESpruce_OEDesignUnitBuildOptions_SetBuildSidechains>` in the **Spruce TK** manual.

.. option:: -enum_pockets

   Option to detect pockets and generate design units from them

   [Default=false]

Sidechain Build Parameters
--------------------------

.. option:: -sc_delete_clashing_solvent

   Option to allow build steps to remove clashing solvent

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OESidechainBuilderOptions::SetDeleteClashingSolvent <OESpruce_OESidechainBuilderOptions_SetDeleteClashingSolvent>` in the **Spruce TK** manual.

.. option:: -rot_coverage <value>

   Coverage of rotamer libraries to use, a lower number can be used to speed up
   side chain re-building skipping lower probability side-chain rotamers.

   [Default=100.0]

   .. seealso::

      * :ref:`OESpruce::OESidechainBuilderOptions::SetRotamerCoverage <OESpruce_OESidechainBuilderOptions_SetRotamerCoverage>` in the **Spruce TK** manual.

.. option:: -rot_library <value>

   Rotamer library used for building sidechains and loops. Allowed values are 'richardson2016',
   'dunbrack', 'richardson'.

   [Default=richardson2016]

   .. seealso::

      * :ref:`OESpruce::OESidechainBuilderOptions::SetRotamerLibrary <OESpruce_OESidechainBuilderOptions_SetRotamerLibrary>` in the **Spruce TK** manual.

Loop Build Parameters
---------------------

.. option:: -build_with_crystalpacking

   Include packing residues when building loops

   [Default=false]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetUsePackingResidues <OESpruce_OELoopBuilderOptions_SetUsePackingResidues>` in the **Spruce TK** manual.

.. option:: -loop_db_filename <filename>

   Database containing loop templates

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetLoopDBFilename <OESpruce_OELoopBuilderOptions_SetLoopDBFilename>` in the **Spruce TK** manual.

.. option:: -crop_length <value>

   Anchor residues on the protein to crop back for a better fit, results in longer loops being built

   [Default=1]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetCropLength <OESpruce_OELoopBuilderOptions_SetCropLength>` in the **Spruce TK** manual.

.. option:: -transform_threshold <value>

   Number of loops to allow through the sidechain clash checker. No matter this number, will process all with an identical sequence to target.

   [Default=25]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetTransformThreshold <OESpruce_OELoopBuilderOptions_SetTransformThreshold>` in the **Spruce TK** manual.

.. option:: -strict_proline_match

   Fuzzy matches in the loop database have to have proline in exact locations of sequence.

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetStrictProlineMatch <OESpruce_OELoopBuilderOptions_SetStrictProlineMatch>` in the **Spruce TK** manual.

.. option:: -loop_distance_buffer <value>

   Fuzzy matches in the loop database has to have distance between anchor atoms correct, +/- buffer distance

   [Default=1.0]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetConnectBufferDistance <OESpruce_OELoopBuilderOptions_SetConnectBufferDistance>` in the **Spruce TK** manual.

.. option:: -bb_clash_threshold <value>

   Loops from the database where more than the threshold fraction of the backbone atoms clash, are rejected

   [Default=0.25]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetBackboneClashRejectThreshold <OESpruce_OELoopBuilderOptions_SetBackboneClashRejectThreshold>` in the **Spruce TK** manual.

.. option:: -loop_clash_threshold <value>

   Loops from the database where more than the threshold fraction of the loops atoms in addition to the backbone clashing ones clash, are rejected

   [Default=0.2]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetLoopClashRejectThreshold <OESpruce_OELoopBuilderOptions_SetLoopClashRejectThreshold>` in the **Spruce TK** manual.

.. option:: -opt_shell <value>

   Include atoms within this distance in the loop optimization, larger distance results in slower optimization

   [Default=15.0]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationShell <OESpruce_OELoopBuilderOptions_SetOptimizationShell>` in the **Spruce TK** manual.

.. option:: -opt_tolerance <value>

   Tolerance for the loop optimization, smaller numbers result in slower optimization

   [Default=0.001]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationTolerance <OESpruce_OELoopBuilderOptions_SetOptimizationTolerance>` in the **Spruce TK** manual.

.. option:: -opt_stage1_iter_multiplier <value>

   Number of steps per number of residues in the loop for the first stage optimizer

   [Default=5]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationStage1IterMultiplier <OESpruce_OELoopBuilderOptions_SetOptimizationStage1IterMultiplier>` in the **Spruce TK** manual.

.. option:: -opt_stage2_iter_multiplier <value>

   Number of steps per number of residues in the loop for the second stage optimizer

   [Default=10]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationStage2IterMultiplier <OESpruce_OELoopBuilderOptions_SetOptimizationStage2IterMultiplier>` in the **Spruce TK** manual.

.. option:: -incl_solvation <value>

   Include simple solvation model when building loops

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationUseSolventModel <OESpruce_OELoopBuilderOptions_SetOptimizationUseSolventModel>` in the **Spruce TK** manual.

.. option:: -incl_SA_term <value>

   Include solvent accessible surface area term when ranking the loops

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationInclSurfaceAreaTerm <OESpruce_OELoopBuilderOptions_SetOptimizationInclSurfaceAreaTerm>` in the **Spruce TK** manual.

.. option:: -max_eval_loops <value>

   Maximum number of loops to connect and minimize

   [Default=5]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetOptimizationMaxLoops <OESpruce_OELoopBuilderOptions_SetOptimizationMaxLoops>` in the **Spruce TK** manual.

.. option:: -build_disulfidebridges <value>

   Allow the loop builder to build disulfide brides during loop modeling (if possible)

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetAllowBuildDisulfideBridges <OESpruce_OELoopBuilderOptions_SetAllowBuildDisulfideBridges>` in the **Spruce TK** manual.

.. option:: -build_tails

   Option to build missing terminal residues from sequence database

   [Default=false]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetBuildTails <OESpruce_OELoopBuilderOptions_SetBuildTails>` in the **Spruce TK** manual.

.. option:: -seqalign_gap_penalty <value>

   Gap penalty for sequence alignment during loop building

   [Default=-10]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetSeqAlignGapPenalty <OESpruce_OELoopBuilderOptions_SetSeqAlignGapPenalty>` in the **Spruce TK** manual.

.. option:: -seqalign_extend_penalty <value>

   Gap extension penalty for sequence alignment during loop building

   [Default=-2]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetSeqAlignExtendPenalty <OESpruce_OELoopBuilderOptions_SetSeqAlignExtendPenalty>` in the **Spruce TK** manual.

.. option:: -reject_clashing_loops_postminimization

   Reject loops that clash after minimization

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetRejectClashingLoopsPostMinimization <OESpruce_OELoopBuilderOptions_SetRejectClashingLoopsPostMinimization>` in the **Spruce TK** manual.

.. option:: -delete_existing_residues

   Delete existing residues in the loop region before building

   [Default=false]

   .. seealso::

      * :ref:`OESpruce::OELoopBuilderOptions::SetDeleteExistingResidues <OESpruce_OELoopBuilderOptions_SetDeleteExistingResidues>` in the **Spruce TK** manual.


Cap Build Parameters
--------------------

.. option:: -cap_delete_clashing_solvent

   Option to allow build steps to remove clashing solvent

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OECapBuilderOptions::SetDeleteClashingSolvent <OESpruce_OECapBuilderOptions_SetDeleteClashingSolvent>` in the **Spruce TK** manual.

.. option:: -allow_truncate

   Option to allow terminal residue to converted to cap, if cap will otherwise clash

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OECapBuilderOptions::SetAllowTruncate <OESpruce_OECapBuilderOptions_SetAllowTruncate>` in the **Spruce TK** manual.

Prep Parameters
---------------

.. option:: -charge_radii

   Option to assign partial charge and radii

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitPrepOptions::SetAssignPartialChargesAndRadii <OESpruce_OEDesignUnitPrepOptions_SetAssignPartialChargesAndRadii>` in the **Spruce TK** manual.

.. option:: -protonate

   Option add and optimize protons in the system

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEDesignUnitPrepOptions::SetProtonate <OESpruce_OEDesignUnitPrepOptions_SetProtonate>` in the **Spruce TK** manual.

.. option:: -strict_protonate

   Option to use strict protonation, disabling tautomer generation for heterogens

   [Default=false]

Protonation Parameters
----------------------

.. option:: -generate_tautomers

   Option to generate and use tautomers in the hydrogen network optimization

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEProtonateDesignUnitOptions::SetGenerateTautomers <OESpruce_OEProtonateDesignUnitOptions_SetGenerateTautomers>` in the **Spruce TK** manual.

.. option:: -het_group_nbr_dist <value>

   Distance between heterogens used to determine optimization clusters for protonation

   [Default=3.5 (angstroms)]

   .. seealso::

      * :ref:`OESpruce::OEProtonateDesignUnitOptions::SetHetGroupNbrDist <OESpruce_OEProtonateDesignUnitOptions_SetHetGroupNbrDist>` in the **Spruce TK** manual.

.. option:: -opt_expt_protons

   Option to optimize hydrogens assigned in the experiment.

   [Default=false]

   .. seealso::

      * :ref:`OESpruce::OEProtonateDesignUnitOptions::SetOptimizeExpProtons <OESpruce_OEProtonateDesignUnitOptions_SetOptimizeExpProtons>` in the **Spruce TK** manual.

.. option:: -flip_bias_scale

   Bias scale for flippable groups (e.g. HIS/ASN/GLN) during hydrogen placement

   [Default=1.0]

   .. seealso::

      * :ref:`OESpruce::OEProtonateDesignUnitOptions::SetPlaceHydrogensOptions <OESpruce_OEProtonateDesignUnitOptions_SetPlaceHydrogensOptions>` in the **Spruce TK** manual.

Biological Unit Extraction Parameters
-------------------------------------

.. option:: -bu_superpose

   Option to superpose the biological units

   [Default=false]

   .. seealso::

      * :ref:`OESpruce::OEBioUnitExtractionOptions::SetSuperpose <OESpruce_OEBioUnitExtractionOptions_SetSuperpose>` in the **Spruce TK** manual.

.. option:: -max_bu_atoms

   Option to limit the size of BUs processed based on number of atoms

   [Default=50,000]

   .. seealso::

      * :ref:`OESpruce::OEBioUnitExtractionOptions::SetMaxAtoms <OESpruce_OEBioUnitExtractionOptions_SetMaxAtoms>` in the **Spruce TK** manual.

.. option:: -max_bu_parts

   Option to limit the size of BUs processed based on number of parts

   [Default=24]

   .. seealso::

      * :ref:`OESpruce::OEBioUnitExtractionOptions::SetMaxParts <OESpruce_OEBioUnitExtractionOptions_SetMaxParts>` in the **Spruce TK** manual.

.. option:: -min_align_score

   Option to specify minimum sequence alignment score

   [Default=200]

   .. seealso::

      * :ref:`OESpruce::OEBioUnitExtractionOptions::SetMinScore <OESpruce_OEBioUnitExtractionOptions_SetMinScore>` in the **Spruce TK** manual.

.. option:: -pref_author_record

   Option where the author BIOMT record is preferred over the software generated one

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OEBioUnitExtractionOptions::SetPreferAuthorRecord <OESpruce_OEBioUnitExtractionOptions_SetPreferAuthorRecord>` in the **Spruce TK** manual.

Enumerate Pocket Parameters
-----------------------------

.. option:: -pocketMask

   Option to set the subset of design unit components to be used for pocket finding. Multiple components can be combined as a comma separated string to create the input.

   [Default=true]

.. option:: -min_pocket_surf_area

   Option to set minimum surface area of detected pocket.

   [Default=150.0]

   .. seealso::

      * :ref:`OESpruce::OEPocketOptions::SetMinSurfaceArea <OESpruce_OEPocketOptions_SetMinSurfaceArea>` in the **Spruce TK** manual.

.. option:: -max_pocket_surf_area

   Option to set maximum surface area of detected pocket.

   [Default=3000.0]

   .. seealso::

      * :ref:`OESpruce::OEPocketOptions::SetMaxSurfaceArea <OESpruce_OEPocketOptions_SetMaxSurfaceArea>` in the **Spruce TK** manual.

.. option:: -pocket_burial_factor

   Option to set the factor used to distinguish pockets from the general surface.

   [Default=1.4]

   .. seealso::

      * :ref:`OESpruce::OEPocketOptions::SetBurialFactor <OESpruce_OEPocketOptions_SetBurialFactor>` in the **Spruce TK** manual.

OEReceptor Parameters
--------------------------

.. option:: -targetMask

   Subset of design unit components to be used as target for the receptor. Multiple components can be combined as a comma separated string to create the input

   [Default=protein,nucleic,cofactors,metals,lipids,other_proteins,other_nucleics,other_ligands,other_cofactors]

   Please see more details at :ref:`SPRUCE <chapter_spruce>` and :ref:`ReceptorInDU`.

Special Parameters
--------------------------

.. option:: -no_prep

   Option to skip all preparation steps. This will supersede any other optional flags set.

   [Default=false]

Filter Options Parameters
--------------------------

.. option:: -allow_filter_error

   Option to allow running spruce prep even when structure fails spruce filter.

   [Default=false]

.. option:: -fix_res_names

   Option to fix incorrect residue names.

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetFixNames <OESpruce_OESpruceFilterOptions_SetFixNames>` in the **Spruce TK** manual.

.. option:: -fix_res_states

   Option to fix incorrect residue states.

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetFixResStates <OESpruce_OESpruceFilterOptions_SetFixResStates>` in the **Spruce TK** manual.

.. option:: -fix_bonds_to_metals

   Option to fix incorrect covalent bonds to metals.

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetFixBondsToMetals <OESpruce_OESpruceFilterOptions_SetFixBondsToMetals>` in the **Spruce TK** manual.

.. option:: -fix_bb_atoms

   Option to fix protein backbone atom states.

   [Default=true]
   

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetFixBackboneAtoms <OESpruce_OESpruceFilterOptions_SetFixBackboneAtoms>` in the **Spruce TK** manual.

.. option:: -fix_float_res

   Option to delete floating residues

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetDeleteFloatingRes <OESpruce_OESpruceFilterOptions_SetDeleteFloatingRes>` in the **Spruce TK** manual.

.. option:: -fix_chainID

   Option to fix missing chain ID

   [Default=true]
   

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetFixChainIDs <OESpruce_OESpruceFilterOptions_SetFixChainIDs>` in the **Spruce TK** manual.

.. option:: -fix_covalent_bond

   Option to fix incorrect covalent bonds to halogens

   [Default=true]

   .. seealso::

      * :ref:`OESpruce::OESpruceFilterOptions::SetFixInvalidCovalentBonds <OESpruce_OESpruceFilterOptions_SetFixInvalidCovalentBonds>` in the **Spruce TK** manual.

.. option:: -allow_validation_error

   Option to allow writing OEDesignUnits even if they fail validation

   [Default=true]
