RosettaScripts API
The RosettaScripts API runs RosettaScripts XML scripts. This API allows you to run almost any Rosetta protocol through the Engine API framework.
This is an advanced feature of the engine API framework and the documentation below assumes familiarity with the Rosetta molecular modeling suite in general and RosettaScripts in particular. If you want to run Rosetta XML scripts through this API and need help, contact support@levitate.bio.
Command Line Interface
Examples
The RosettaScripts API interface requires a Rosetta XML script, a Rosetta flags file, and at least one additional input file (typically a PDB file).
For example, given the following XML script which runs a simple Relax protocol on an input pdb:
<ROSETTASCRIPTS>
<MOVERS>
<Idealize name="idealize"/>
<FastRelax name="relax"/>
</MOVERS>
<PROTOCOLS>
<Add mover_name="idealize"/>
<Add mover_name="relax"/>
</PROTOCOLS>
</ROSETTASCRIPTS>
Submit a RosettaScripts protocol
lev engine submit rosetta-scripts 1ubq.pdb \
--xml-file script.xml \
--flags-file flags.txt \
--repeats 100 \
--memory 10
Rosetta Relax on a protein-ligand complex
1. Generate a ligand param file using the process-ligand API.
lev engine submit process-ligand --smiles "CC(=O)OC1=CC=CC=C1C(=O)O"
2. Create the relax.xml
file in a text editor by pasting the following:
<ROSETTASCRIPTS>
<SCOREFXNS>
<ScoreFunction name="fullatom" weights="ref2015_cart"
symmetric="0">
</SCOREFXNS>
<MOVERS>
<FastRelax name="fastrelax" />
</MOVERS>
<PROTOCOLS>
<Add mover="fastrelax"/>
</PROTOCOLS>
</ROSETTASCRIPTS>
3. Create the flags.txt
file in a text editor by pasting and editing the following:
-s full_structure.pdb
-extra_res_fa LIG.params
-missing_density_to_jump
-ignore_zero_occupancy false
You will change “full_structure.pdb” and “LIG.params” to be whatever your files are names.
4. Run the RosettaScripts API
lev engine submit rosetta-scripts \
--xml-file relax.xml \
--flags-file flags.txt \
full_structure.pdb \
LIG.params \
LIG_conformers.pdb
There are a few rarely used Rosetta Movers which have special Rosetta compilation requirements or make internal use of MPI. Protocols using these Movers cannot currently be executed using the RosettaScripts API. If you want to use one of these movers please contact support@levtiate.bio
Inputs
Atleast one input file is required as the first positional argument to be ran in conjunction with the --xml-file
and --flags-file
flags.
--xml-file
(str) (Required)- An input RosettaScripts XML file
--flags-file
(str) (Required)- An input Rosetta flags file containing all flags necessary to run the XML file. DO NOT include
-nstruct
in this file
- An input Rosetta flags file containing all flags necessary to run the XML file. DO NOT include
--repeats
(int) (Default:1
)- The number of models to generate, this is equivalent to the
-nstruct
flag and should be used in its place. Each model will be generated in parallel.
- The number of models to generate, this is equivalent to the
--memory
(int) (Default:1
)- The maximum amount of memory available per CPU, in whole number GB. The default is 1 GB per CPU. If jobs are failing to complete due to memory issues, this value can be increased.
Python Interface
Examples
from engine import EngineClient
client = EngineClient()
client.authorize()
job_id = client.submit_rosetta_scripts(
xml_path="protocol.xml",
flags_path="flags.txt",
repeats=100,
memory=2,
comment="Design optimization run",
"input.pdb"
)
Flags
At least one input file is required at the end of the command as an argument to be ran in conjunction with the --xml-file
and --flags-file
flags. See example above.
xml_path
(str) (Required)- An input RosettaScripts XML file
flags_path
(str) (Required)- An input Rosetta flags file containing all flags necessary to run the XML file. DO NOT include
-nstruct
in this file
- An input Rosetta flags file containing all flags necessary to run the XML file. DO NOT include
repeats
(int) (Default:1
)- The number of models to generate, this is equivalent to the
-nstruct
flag and should be used in its place. Each model will be generated in parallel.
- The number of models to generate, this is equivalent to the
memory
(int) (Default:1
)- The maximum amount of memory available per CPU, in whole number GB. The default is 1 GB per CPU. If jobs are failing to complete due to memory issues, this value can be increased.
Outputs
results/
- All inputs and outputs from each individual model generation, split into individual directories by CPU
pdbs/
- All PDBs generated by all CPUs