### Quick Start Score Options
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/analysis/score-commands.md
Convenient options for quick setup, including specifying native PDBs for CARMS calculations, weight sets, and patch files.
```bash
-in:file:native native PDB if CaRMS is required
```
```bash
-score:weights weights weight set or weights file
```
```bash
-score:patch patch patch set
```
--------------------------------
### AbinitioRelax Command Line Example
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/structure_prediction/abinitio-relax.md
Basic command to run AbinitioRelax with essential input files and options. Ensure the database path is correctly set for your Rosetta installation.
```bash
../../bin/AbinitioRelax.linuxgccrelease \
-in:file:native ./input_files/1elw.pdb \
-in:file:frag3 ./input_files/aa1elwA03_05.200_v1_3 \
-in:file:frag9 ./input_files/aa1elwA09_05.200_v1_3 \
-database path/to/rosetta/main/database \
-abinitio:relax \
-nstruct 1 \
-out:file:silent 1elwA_silent.out \
-out:path /my/path
```
--------------------------------
### Example Rosetta Script with SetupPoissonBoltzmannPotential and DeltaDdg Filter
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/Movers/movers_pages/SetupPoissonBoltzmannPotentialMover.md
This example demonstrates how to integrate SetupPoissonBoltzmannPotential with a DeltaDdg filter. It shows the necessary score function definition, mover setup, and filter configuration, including the use of SavePoseMover to defer prescoring and ensure correct PB calculation timing.
```xml
# defers scoring till the ref pose is saved
# init PB
# save the reference pose
...
```
--------------------------------
### Install applicake
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/PyRosetta/PyTXMS.md
Install the applicake framework using pip.
```bash
pip install applicake
```
--------------------------------
### Download and Install R from Source
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/FeaturesReporter/rscripts/FeaturesSettingUpR.md
Steps to download, extract, configure, compile, and install R from its source tarball. Ensure the installation path is specified correctly.
```bash
cd /tmp
wget http://mirrors.ibiblio.org/pub/mirrors/CRAN/src/base/R-2/R-2.12.1.tar.gz
tar -xzvf R-2.12.1.tar.gz
rm R-2.12.1.tar.gz
cd R-2.12.1
./configure --prefix=
make
make check
make install
cd ..
#make sure the newly installed R works and is on the path:
R --version | grep "R version"
```
--------------------------------
### ddG Mover with Poisson-Boltzmann Setup
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/Movers/movers_pages/ddGMover.md
This example demonstrates how to configure the ddG mover to utilize the Poisson-Boltzmann energy method. It requires the SetupPoissonBoltzmannPotential mover to be initialized first, specifying the score function, charged chains, and the path to the APBS executable. The ddG mover then uses this setup for its calculations.
```xml
patch PB term
...
Initialize PB
some mover
use PB-enabled ddg as if filter
more filtering
```
--------------------------------
### Install pdb-tools
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/PyRosetta/PyTXMS.md
Install pdb-tools for cleaning PDB files.
```bash
pip install pdb-tools
```
--------------------------------
### Example Cluster Command
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/utilities/cluster.md
An example command to run the cluster application with specific input and output configurations.
```bash
cluster -database /path/to/rosetta/main/database -in:file:silent silent.out -in::file::binary_silentfile -in::file::fullatom -native 1a19.pdb
```
--------------------------------
### Annotated JD2ResourceManagerJobInputter Example
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/ResourceManager-Details.md
An annotated example demonstrating the setup of a single job with starting structure and symmetry definitions using ResourceManager.
```xml
Each ResourceLocator provides a locator_id -> istreams map to initialize a resource
The "startstruct_locator" takes path relative to /path/to/input/pdbs
and returns the contents of the file. This is referenced below in the
Resources block to initialize the starting structure.
The "symmetry_definitions_locator" takes a path relative to
/path/to/input/symmetry_definitions and returns the contents of the file.
This is referenced below in the Resources block to initialize the starting structure.
Each ResourceOptions defines non-default options for how a resource
should be constructed from the istream input provided by the ResourceLocator
The "pdb_options" is a PoseFromPDBOptions and is used when loading
a pose from data in the protein databank PDB format. Here, residues that
are not recognized are ignored. Alternatively, the non-standard residue types
can be loaded on a per-job basis in the jobs section.
A Resource is a fully constructed object whose lifetime and availability
is managed by the ResourcManager.
The "1xu1FH_D_startstruct" resource is a Pose object that is Rosetta's
central representation of a structure and stores the conformation and
energy information. In this case, the Pose is constructed from the pdb file
provided by the "startstruct_locator" using "1xu1FH_D.pdb" as the relative path.
It uses the "pdb_options" as configuration options for how the pose should
be constructed from the pdb file.
The "1xu1FH_D_symmetry_definition" resource is a SymmData object that
is used to convert an asymmetric unit into a symmetric conformation.
The symmetry definition file is created using the perl script in
main/source/src/apps/public/symmetry/make_symmdef_file.pl.
A job is a unit of work that is processed by the JD2 Job distributor. In this block,
resources defined in the Resources block are mapped to resource descriptions
that can be referenced from within the protocol. All jobs must provide the same
```
--------------------------------
### HDX Energy Full Example
Source: https://github.com/rosettacommons/documentation/blob/master/HDXEnergy.md
A complete command-line example demonstrating how to run the HDX Energy application with specified input and output files, and the -ResPF option.
```bash
./HDXEnergy.linuxgccrelease -in:file:s 1a2p_A.pdb -in::file::HDX 1a2p_pf.txt -out::file::o 1a2p_test.out -ResPF
```
--------------------------------
### RestrictToAlignedSegments TaskOperation Example
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/TaskOperations/taskoperations_pages/RestrictToAlignedSegmentsOperation.md
This example demonstrates how to use the RestrictToAlignedSegments TaskOperation to define aligned segments for design. It specifies the source PDB file, start and stop residues for alignment, and a repack shell.
```xml
.
.
.
```
--------------------------------
### Run MPDockSetup Application
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/membrane_proteins/RosettaMP-App-MPDockSetup.md
Example command to run the MPDockSetup application. Ensure the order of spanfiles matches the PDB files.
```bash
Rosetta/main/source/bin/mp_dock_setup.macosclangrelease \
-database Rosetta/main/database \
-in:file:s 1AFO_A.pdb 1AFO_B.pdb \
-mp:setup:spanfiles 1AFO_A.span 1AFO_B.span \
```
--------------------------------
### Scripting trRosettaConstraintGenerator Example
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/Movers/constraint_generators/trRosettaConstraintGenerator.md
This example demonstrates how to script the trRosettaConstraintGenerator within RosettaScripts. It shows the setup of score functions, constraint generators, and movers to generate and apply trRosetta-derived constraints for structure prediction. Note that this is a simplified example and not necessary for standard trRosetta structure prediction workflows.
```xml
```
--------------------------------
### Navigate and Initialize Benchmark Data
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/FeaturesReporter/features_reporters/RotamerRecoveryScientificBenchmark.md
Follow the README.txt files to initialize input data and configure the sample source for the benchmark.
```bash
cd Rosetta/main/tests/features/sample_sources/top8000_rotamer_recovery_score12prime_MinPack
# follow directions in README.txt and input/README.txt to initialize input
# check the sample source configuration.
cd ..
# add 'top8000_rotamer_recovery_score12prime_MinPack' to benchmark.list
cd ..
#submit jobs to cluster
./features.py [OPTIONS] submit
```
--------------------------------
### Grishin Alignment with Different Start Positions
Source: https://github.com/rosettacommons/documentation/blob/master/rosetta_basics/file_types/Grishan-format-alignment.md
Example demonstrating how to handle alignments that start at different positions in the template sequence. Numbers at the left of the sequence lines can be adjusted, or '-' can be used for unaligned residues.
```plaintext
## 1xxx 1yyy
# hhsearch
scores_from_program: 1.0 0.0
7 AAAAAAA
0 AAAAAAA
--
```
--------------------------------
### Command Line Options Example
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/code_structure/namespaces/namespace-utility-options.md
Illustrates how options can be specified on the command line, including flags and values.
```bash
application @flags_file -option1 -option2=value2
```
--------------------------------
### BuildPeptide Basic Run Example
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/utilities/build-peptide.md
Demonstrates a basic execution of the BuildPeptide utility. Ensure the '-database' flag points to your Rosetta database.
```bash
BuildPeptide.{ext} -database ${mini_db} -in:file:fasta input.fasta -out:file:o peptide.pdb
```
--------------------------------
### Validate PHENIX RNA Setup
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/rna/erraser.md
Run this command to check if PHENIX is correctly installed and configured for RNA validation.
```bash
phenix.rna_validate
```
--------------------------------
### Setup and Query FullModelInfo
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/stepwise/stepwise_monte_carlo/stepwise-fullmodelinfo.md
Demonstrates how to set up FullModelInfo for a pose using PDBInfo and query its properties like full sequence, residue list, and conventional numbering. Ensure FullModelInfo is set up before performing operations like adding or deleting residues.
```cpp
// imagine pose has four residues with PDBInfo numbering a22,a23,u27,u28
pose::full_model_info::make_sure_full_model_info_is_setup( pose ); // will infer as much as possible from PDBInfo
std::cout << const_full_model_info( pose ).full_sequence() << std::endl; // aannnuu (note fill-in with n's)
std::cout << const_full_model_info( pose ).res_list() << std::endl; // [1, 2, 5, 6]
std::cout << const_full_model_info( pose ).conventional_numbering() << std::endl; // [22, 23, 27, 28]
std::cout << const_full_model_info( pose ).other_pose_list() << std::endl; // [] (empty)
```
--------------------------------
### Thorough Relax Application Example
Source: https://context7.com/rosettacommons/documentation/llms.txt
Executes a more extensive structural relaxation with more cycles and backbone/sidechain movement. Can be guided by constraints.
```bash
# Thorough relax (15 cycles) - better sampling
relax.linuxgccrelease \
-database /path/to/database \
-in:file:s input.pdb \
-relax:thorough \
-relax:bb_move true \
-relax:chi_move true \
-constraints:cst_fa_file constraints.cst \
-constraints:cst_fa_weight 1.0 \
-nstruct 50
```
--------------------------------
### Initialize and Run StepWiseSampleAndScreen
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/stepwise/stepwise_monte_carlo/stepwise-sample-and-screen.md
Demonstrates the setup and execution of StepWiseSampleAndScreen. Requires prior initialization of StepWiseSampler and StepWiseScreener objects. The `run()` method initiates the sampling process.
```C++
StepWiseSamplerBaseOP sampler = new StepWiseSampler;
// initialize -- see link to documentation for StepWiseSampler...
sampler->set_random( true );
utility::vector1< screener::StepWiseScreenerOP > screeners_;
// initialize -- see link to documentation for StepWiseScreener...
clusterer_ = new align::StepWiseClusterer( options_ );
screeners_.push_back( new PoseSelectionScreener( pose, scorefxn_, clusterer_ ) );
StepWiseSampleAndScreen sample_and_screen( sampler, screeners );
sample_and_screen.set_verbose( true );
sample_and_screen.set_max_ntries( 100 ); // if sampler is in random mode
sample_and_screen.set_num_random_samples( 5 ); // find 5 poses
sample_and_screen.run();
pose_list_ = clusterer_->pose_list(); // list of up to 5 poses in the last screener.
```
--------------------------------
### Constraint File Format Example
Source: https://github.com/rosettacommons/documentation/blob/master/Terpene-docking.md
Example constraint file format for defining geometric constraints between protein and ligand atoms. Supports distance, angle, and torsion constraints. Uncomment lines starting with '#' to enable specific constraints.
```cst
CST::BEGIN
TEMPLATE:: ATOM_MAP: 1 atom_name: MG3 O5 P1
TEMPLATE:: ATOM_MAP: 1 residue3: X00
TEMPLATE:: ATOM_MAP: 2 atom_name: OD2 CG CB
TEMPLATE:: ATOM_MAP: 2 residue1: D
CONSTRAINT:: distanceAB: 2.5 0.3 500 0 3
# CONSTRAINT:: angle_A: 65.8 6.5 50 360. 2
CONSTRAINT:: angle_B: 145.3 20.0 50 360. 2
# CONSTRAINT:: torsion_A: 83.6 10.0 50 360. 2
CONSTRAINT:: torsion_AB: 128.7 20.0 50 360. 2
# CONSTRAINT:: torsion_B: 141.0 15.0 50 360. 2
```
--------------------------------
### Method Docstring Example
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/Python-coding-conventions-for-Rosetta.md
Method docstrings should start with an imperative sentence summarizing the method's action, followed by a blank line and further details.
```python
class MyClass():
__doc__ = "This is my class.\nIt is great.\n\n"
```
--------------------------------
### Getting Real XML Option with Default Example
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/RosettaScripts-Developer-Guide.md
Retrieves a Real type option named 'temp', defaulting to 1.0 if not found in the XML.
```c++
tag->getOption( "temp", 1.0 )
```
--------------------------------
### Example Command Line
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/design/rosettaremodel.md
An example command line for running RosettaRemodel with specified input files, database, and run parameters. Ensure the database path and input PDB are correctly set.
```bash
rosetta/main/source/bin/remodel.macosgccrelease -database rosetta/main/database/ -s 2ci2.renumbered.pdb -remodel:blueprint blueprint.2ci2.remodel -run:chain A -remodel:num_trajectory 2 -remodel:quick_and_dirty -overwrite
```
--------------------------------
### TutorialQueen Implementation (C++)
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/jd3_derived_jq/skeletons.md
Provides the implementation for the TutorialQueen constructor and destructor. It includes basic tracer setup and namespace usage.
```c++
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
// (c) addressed to University of Washington CoMotion, email: license@uw.edu.
/// @file protocols/tutorial/TutorialQueen.cc
/// @author Jack Maguire, jackmaguire1444@gmail.com
#include
#include
static basic::Tracer TR( "protocols.tutorial.TutorialQueen" );
using namespace protocols::jd3;
namespace protocols {
namespace tutorial {
//Constructor
TutorialQueen::TutorialQueen() :
StandardJobQueen()
{}
//Destructor
TutorialQueen::~TutorialQueen()
{}
} //tutorial
} //protocols
```
--------------------------------
### Getting Integer XML Option Example
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/RosettaScripts-Developer-Guide.md
Demonstrates retrieving an integer option named 'cycles' from an XML tag. If 'cycles' is not present, it defaults to 0.
```c++
tag->getOption( "cycles" )
```
--------------------------------
### TutorialQueen Implementation
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/jd3_derived_jq/node_managers.md
Provides the implementation for the TutorialQueen class, including job DAG creation and node manager initialization.
```c++
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
// (c) addressed to University of Washington CoMotion, email: license@uw.edu.
/// @file protocols/tutorial/TutorialQueen.cc
/// @author Jack Maguire, jackmaguire1444@gmail.com
#include
#include
#include
#include
#include
#include
#include
static basic::Tracer TR( "protocols.tutorial.TutorialQueen" );
using namespace protocols::jd3;
namespace protocols {
namespace tutorial {
//Constructor
TutorialQueen::TutorialQueen() :
StandardJobQueen()
{}
//Destructor
TutorialQueen::~TutorialQueen()
{}
JobDigraphOP
TutorialQueen::initial_job_dag() {
//you need to call this for the standard job queen to initialize
determine_preliminary_job_list();
init_node_managers();
JobDigraphOP dag = utility::pointer::make_shared< JobDigraph >( 3 );
dag->add_edge( 1, 3 );
dag->add_edge( 2, 3 );
return dag;
}
void
TutorialQueen::parse_job_definition_tags(
utility::tag::TagCOP common_block_tags,
utility::vector1< standard::PreliminaryLarvalJob > const & prelim_larval_jobs
){
num_input_structs_ = prelim_larval_jobs.size();
}
void
TutorialQueen::init_node_managers(){
using namespace jd3::dag_node_managers;
core::Size num_jobs_for_node1( 0 ), num_jobs_for_node2( 0 );
count_num_jobs_for_nodes_1_and_2( num_jobs_for_node1, num_jobs_for_node2 );
core::Size const num_results_to_keep_for_node1 = num_jobs_for_node1 / 2; //Let's keep half of the results
SimpleNodeManagerOP node1 = utility::pointer::make_shared< SimpleNodeManager >(
0, //Job offset
num_jobs_for_node1,
num_results_to_keep_for_node1
);
core::Size const num_results_to_keep_for_node2 = num_jobs_for_node2 / 3; //Let's keep half of the results
SimpleNodeManagerOP node2 = utility::pointer::make_shared< SimpleNodeManager >(
num_jobs_for_node1, //Job offset
num_jobs_for_node2,
num_results_to_keep_for_node2
);
core::Size const num_jobs_for_node3 = num_results_to_keep_for_node1 + num_results_to_keep_for_node2;
core::Size const num_results_to_keep_for_node3 = num_jobs_for_node3; //Let's keep/dump all of the results
SimpleNodeManagerOP node3 = utility::pointer::make_shared< SimpleNodeManager >(
num_jobs_for_node1 + num_jobs_for_node2, //Job offset
num_jobs_for_node3,
num_results_to_keep_for_node3
);
node_managers_.reserve( 3 );
node_managers_.push_back( node1 );
node_managers_.push_back( node2 );
node_managers_.push_back( node3 );
}
void
TutorialQueen::count_num_jobs_for_nodes_1_and_2(
core::Size & num_jobs_for_node_1,
core::Size & num_jobs_for_node_2
) {
num_jobs_for_node_1 = 0;
num_jobs_for_node_2 = 0;
//vector has 1 element for each tag
utility::vector1< standard::PreliminaryLarvalJob > const & all_preliminary_larval_jobs = preliminary_larval_jobs();
for( standard::PreliminaryLarvalJob const & pl_job : all_preliminary_larval_jobs ){
```
--------------------------------
### TutorialQueen.hh Header File
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/jd3_derived_jq/discarding_job_results.md
This header file includes necessary components for the TutorialQueen class, including JD3 standard job queen, job digraph, node managers, and job genealogist. It defines the structure for managing jobs and their results.
```c++
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
// (c) addressed to University of Washington CoMotion, email: license@uw.edu.
/// @file protocols/tutorial/TutorialQueen.hh
/// @author Jack Maguire, jackmaguire1444@gmail.com
#ifndef INCLUDED_protocols_tutorial_TutorialQueen_HH
#define INCLUDED_protocols_tutorial_TutorialQueen_HH
#include
#include
#include
#include
#include
#include
#include
#include
namespace protocols {
namespace tutorial {
class TutorialQueen: public jd3::standard::StandardJobQueen {
public:
//constructor
TutorialQueen();
//destructor
~TutorialQueen() override;
jd3::JobDigraphOP
initial_job_dag()
override;
void
parse_job_definition_tags(
utility::tag::TagCOP common_block_tags,
utility::vector1< jd3::standard::PreliminaryLarvalJob > const &
) override;
std::list< jd3::LarvalJobOP > determine_job_list(
Size job_dag_node_index,
Size max_njobs
) override;
void note_job_completed(
core::Size,
jd3::JobStatus,
core::Size
) override {
runtime_assert( false );
}
```
--------------------------------
### Command Line Usage for Resource Definition Files
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/ResourceManager-Details.md
Example of how to specify resource definition files on the command line for a given protocol.
```bash
loopmodel.macosclangrelease @flags -resource_definition_files test.xml
```
--------------------------------
### GraftSwitchMover: Threading within a Residue Range
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/Movers/movers_pages/GraftSwitchMover.md
Example of using GraftSwitchMover to thread a sequence within a specified range of residues. Both 'start' and 'end' parameters must be defined.
```XML
```
--------------------------------
### Tips for Using make_exemplar
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/utilities/make-exemplar.md
These tips provide guidance on optimizing the use of make_exemplar. They highlight the importance of using -pocket_static_grid and -pocket_filter_by_exemplar, and suggest adjustments for shallow pockets and older exemplar detection methods.
```bash
Large grids create large exemplars, which are useless for anything related to small molecule inhibition of protein-protein interactions, so -pocket_static_grid should be defined.
Likewiae, -pocket_filter_by_exemplar should aways be used.
Sometimes a pocket may be too shallow to get a good exemplar with the default values. In those cases reducing -pocket_surface_dist will identify more shallow pockets.
Exemplar detection has changed since publishing the Johnson and Karanicolas 2015 and 2016 papers. To restore the functionality to that used in those papers, the following flags need to be used: -pocket_limit_exemplar_color false -pocket_limit_small_exemplars false
```
--------------------------------
### Getting String XML Option Example
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/RosettaScripts-Developer-Guide.md
Demonstrates retrieving an option named 'cycles' as a string from an XML tag. If 'cycles' is not present, it defaults to "0".
```c++
tag->getOption( "cycles" )
```
--------------------------------
### TutorialJob.cc Implementation Details
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/jd3_derived_jq/tutorial_job.md
Provides the implementation for the TutorialJob class, including its constructor, destructor, and the core run() method logic.
```c++
// -*- mode:c++;tab-width:2;indent-tabs-mode:t;show-trailing-whitespace:t;rm-trailing-spaces:t -*-
// vi: set ts=2 noet:
//
// (c) Copyright Rosetta Commons Member Institutions.
// (c) This file is part of the Rosetta software suite and is made available under license.
// (c) The Rosetta software is developed by the contributing members of the Rosetta Commons.
// (c) For more information, see http://www.rosettacommons.org. Questions about this can be
// (c) addressed to University of Washington CoMotion, email: license@uw.edu.
/// @file protocols/tutorial/TutorialJob.cc
/// @brief
/// @detailed
/// @author Jack Maguire, jackmaguire1444@gmail.com
#include
#include
#include
#include
#include
#include
#include
#include
#include
static basic::Tracer TR( "protocols.tutorial.TutorialJob" );
namespace protocols {
namespace tutorial {
//Constructor
TutorialJob::TutorialJob()
{}
//Destructor
TutorialJob::~TutorialJob()
{}
jd3::CompletedJobOutput TutorialJob::run() {
runtime_assert( pose_ );
runtime_assert( sfxn_ );
```
--------------------------------
### XML Protocol for Clustering
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/multistage/MRSClustering.md
Example XML structure for a multistage protocol that includes a clustering step. This setup keeps 100 diverse results after a stage that adds and sorts poses.
```xml
```
--------------------------------
### Setup RNP-DDG Calculation
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/rna/rnp-ddg.md
Use this script to create directories and files necessary for ΔΔG calculations. Specify options like resolution, tag, starting structure, and sequence file.
```python
python PATH_TO_ROSETTA/main/source/src/apps/public/rnp_ddg/general_RNP_setup_script.py --low_res --tag demo_run --start_struct relax_start_structure//1/min_again_start_structure_wildtype_bound.pdb --seq_file mutant_list.txt --rosetta_prefix PATH_TO_ROSETTA/main/source/bin/
```
--------------------------------
### Sample make_exemplar Command
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/utilities/make-exemplar.md
This sample command demonstrates how to run the make_exemplar application with common options. It specifies the input PDB file, target residues for pocket identification, and pocket grid parameters.
```bash
make_exemplar.linuxgccrelease -database ~/Rosetta/main/database -in:file:s input.pdb -central_relax_pdb_num 97:A,143:A -pocket_grid_size 12 -pocket_static_grid -pocket_filter_by_exemplar
```
--------------------------------
### Loop Definition File Format
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/structure_prediction/loop_modeling/loopmodel-kinematic.md
Example format for a line in the loop definition file. Specifies loop identifier, start residue, end residue, cut point, and skip rate.
```plaintext
column1 "LOOP": The loop file identify tag
column2 "integer": Loop start residue number
column3 "integer": Loop end residue number
column4 "integer": Cut point residue number, >=startRes, <=endRes. default - let the loop modeling code choose cutpoint.
Note: Setting the cut point outside the loop can lead to a segmentation fault.
column5 "float": Skip rate. default - never skip
```
--------------------------------
### Input PDB List Example
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/Structure-Set-Fragment-Picker.md
Example of a list file containing paths to PDB files to be used as fragment sources.
```text
input/struct_files/1e5t.pdb
input/struct_files/3tg7.pdb
input/struct_files/2guv.pdb
...
```
--------------------------------
### ICOOR_INTERNAL Example with Virtual Atom
Source: https://github.com/rosettacommons/documentation/blob/master/rosetta_basics/file_types/Residue-Params-file.md
Illustrates defining internal coordinates, including a connection (CONN3) and a virtual atom (V1) representing that connection. This setup is used when an atom connects to another residue.
```plaintext
ICOOR_INTERNAL SG 0.000000 65.900000 1.808803 CB CA N
ICOOR_INTERNAL CONN3 180.000000 75.000000 1.793000 SG CB CA
ICOOR_INTERNAL V1 0.000000 75.000000 1.793000 SG CB CONN3 # Same as CONN3
```
--------------------------------
### Create Tutorial Job
Source: https://github.com/rosettacommons/documentation/blob/master/development_documentation/tutorials/jd3_derived_jq/outputting_results.md
Creates a TutorialJobOP based on the job's global ID, assigning movers and poses from different nodes.
```C++
TutorialJobOP TutorialQueen::create_tutorial_job( jd3::LarvalJobCOP job ) {
utility::pointer::static_pointer_cast< const standard::StandardInnerLarvalJob >( job->inner_job() );
core::Size const global_job_id = job->job_index();
moves::MoverOP mover = 0;
core::scoring::ScoreFunctionOP sfxn = core::scoring::ScoreFunctionFactory::create_score_function( "ref2015.wts" );
core::pose::PoseOP pose = 0;
if( global_job_id <= node_managers_[ 1 ]->num_jobs() ){
//This job belongs to node 1
//local_job_id = global_job_id;
mover = utility::pointer::make_shared< relax::FastRelax >();
pose = pose_for_inner_job( standard_inner_larval_job );
} else if( global_job_id <= node_managers_[ 1 ]->num_jobs() + node_managers_[ 2 ]->num_jobs() ) {
//alternatively you could have used:
//else if( global_job_id <= node_managers_[ 3 ]->job_offset() )
//This job belongs to node 2
//local_job_id = global_job_id - node_managers_[ 2 ]->job_offset();
mover = utility::pointer::make_shared< minimization_packing::MinPackMover >();
pose = pose_for_inner_job( standard_inner_larval_job );
} else {
//This job belongs to node 3
//local_job_id = global_job_id - node_managers_[ 3 ]->job_offset();
mover = utility::pointer::make_shared< minimization_packing::MinMover >();
//We created this larval job and pose result so we know that there should be exactly 1 result and that result is a standard::PoseJobResult
runtime_assert( input_job_results.size() == 1 );
standard::PoseJobResult const & result1 = static_cast< standard::PoseJobResult const & >( * input_job_results[ 1 ] );
pose = result1.pose()->clone();
runtime_assert( pose );
}
TutorialJobOP tjob = utility::pointer::make_shared< TutorialJob >();
tjob->set_pose( pose );
tjob->set_sfxn( sfxn );
tjob->set_mover( mover );
return tjob;
}
```
--------------------------------
### Constraint Definition File Example
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/design/Remodel.md
Defines a distance constraint between two backbone atoms (Nitrogen and Oxygen) to be within hydrogen bonding distance (2.8 Å). This setup is used in the centroid stage.
```cst
CST::BEGIN
TEMPLATE:: ATOM_MAP: 1 atom_type: Nbb
TEMPLATE:: ATOM_MAP: 1 is_backbone
TEMPLATE:: ATOM_MAP: 1 residue3: ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR
TEMPLATE:: ATOM_MAP: 2 atom_type: OCbb
TEMPLATE:: ATOM_MAP: 2 is_backbone
TEMPLATE:: ATOM_MAP: 2 residue3: ALA CYS ASP GLU PHE GLY HIS ILE LYS LEU MET ASN PRO GLN ARG SER THR VAL TRP TYR
CONSTRAINT:: distanceAB: 2.80 0.20 100.00 0
CST::END
```
--------------------------------
### SetupForDensityScoring
Source: https://github.com/rosettacommons/documentation/blob/master/scripting_documentation/RosettaScripts/xsd/mover_SetupForDensityScoring_type.md
This mover allows for posing and optionally docking into a density map.
```APIDOC
## SetupForDensityScoring
### Description
Roots pose in VRT. Option to trigger docking into the density.
### XML Schema
```xml
```
### Parameters
#### Attributes
- **name** (string) - Required - The name of the mover.
- **realign** (string) - Optional - Specifies whether to dock the pose into the density map. Accepted values are 'yes' or 'no'.
```
--------------------------------
### Set AA Composition in RosettaScripts ScoreFunction
Source: https://github.com/rosettacommons/documentation/blob/master/rosetta_basics/scoring/AACompositionEnergy.md
Configure the amino acid composition scoring term within a RosettaScripts score function. This example shows how to reweight the 'aa_composition' scoretype and specify a .comp file for setup.
```xml
```
--------------------------------
### De Novo Antibody Design with Random Start
Source: https://github.com/rosettacommons/documentation/blob/master/application_documentation/antibody/RosettaAntibodyDesign.md
Performs a de novo design run, creating an interface at the light chain with random CDRs grafted. This example also specifies epitope constraints and reduces docking cycles.
```bash
antibody_designer.macosclangrelease -s my_ab.pdb -primary_cdrs L1 L2 L3 \
-graft_design_cdrs L1 L2 L3 -seq_design_cdrs L1 L2 L3 -light_chain lambda -do_dock \
-use_epitope_constraints -paratope L1 L2 L3 -epitope 63A 63A:A 64 -random_start -dock_first_cycles 1 -dock_second_cycles 2
```