CCP-EM Jobs: Model Building and Refinement
CCP-EM jobs for docking, model building, refinement, ligands and restraints
This page documents the CCP-EM model-building and refinement job types registered in ccpem-pipeliner. These jobs cover the full downstream modelling pipeline: docking atomic models into density maps, automated and manual model building, atomic structure refinement, restraint generation for ligands and metals, and model utility operations such as format conversion and domain splitting. No CCP-EM job supports continuation — if you need to re-run one, schedule it as a new job with updated parameters.
All jobs described here are registered under the ccpem_pipeliner.jobs entry-point group and are discovered automatically when pipeliner starts. You interact with them through the Python API (PipelinerProject) or the CLI (pipeliner --run_job).
Important constraints that apply to every CCP-EM job on this page:
can_continueisFalsefor all CCP-EM jobs. CallingPipelinerProject.get_continuation_job()on any of these jobs raisesNotImplementedError. To extend a run, schedule a new job.- Job option values are set via the
.valueproperty on eachJobOptionobject (e.g.,job.joboptions["resolution"].value = 3.2). - Parameters dicts passed to
run_job()orschedule_job()use option keys (e.g.,"input_model"), not option labels (e.g.,"Input model"). run_job()withrun_in_foreground=False(the default) returns immediately; usewait_for_job_to_finish()to block until completion before scheduling dependent downstream jobs.
Typical scripting pattern:
import os
os.chdir("/path/to/my/project")
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import job_default_parameters_dict, write_default_jobstar, edit_jobstar
proj = PipelinerProject()
From there you can either pass a parameters dict directly to run_job(), or generate a job.star template with write_default_jobstar(), edit it with edit_jobstar(), and pass the resulting file path to run_job().
Checking availability:
If a required external program is missing, the job loads normally but job.jobinfo.is_available is False and job.jobinfo.unavailable_message explains which executable was not found. You can still schedule such a job via the API; it will fail at execution time when the command runs.
Run pipeliner.check_setup to see which programs are found on your system.
Docking jobs
em_placement.atomic_model_fit — EMPlacement
Docks an atomic model into a cryo-EM map using a likelihood target (Phaser EM Placement). Requires CCP4 ≥ 9.0.009 (also works with 9.0.003 and 9.0.004; versions 9.0.005–9.0.008 are broken).
| Key option | Type | Required | Description |
|---|---|---|---|
model | InputNode | yes | Model to dock (.cif, .pdb, .ent) |
input_map1 | InputNode | yes | First half map (.mrc, .map) |
input_map2 | InputNode | yes | Second half map (.mrc, .map) |
best_resolution | Float | yes | Best resolution of the full map (Å) |
use_reference_structure | Boolean | no | Estimate composition from a reference model rather than a FASTA file |
sequence | InputNode | conditional | FASTA sequence (required when use_reference_structure=False) |
reference_structure | InputNode | conditional | Composition model (required when use_reference_structure=True) |
fixed_model | InputNode | no | Model fixed in the map; its region is masked from the search |
symmetry | String | no | Point group symmetry (e.g., C4, D2, O) |
estimated_rmsd | Float | yes | Expected RMSD; 1.0 for identical, 1.2 for AlphaFold (default 1.2) |
Output nodes are created after the job runs (create_post_run_output_nodes): top_model*.pdb and *.map files.
External program: em_placement (resolved via ccp4-python installation path).
emplace_local.atomic_model_fit — EMPlace Local
Docks a model into a user-defined local region of a cryo-EM map. Requires the same CCP4 version constraints as em_placement.atomic_model_fit.
| Key option | Type | Required | Description |
|---|---|---|---|
model | InputNode | yes | Model to dock (.cif, .pdb, .ent) |
input_map1 | InputNode | yes | First map or full map |
use_halfmaps | Boolean | no | Use half maps for docking (default True) |
input_map2 | InputNode | conditional | Second half map (required when use_halfmaps=True) |
resolution | Float | yes | Resolution of full map (Å) |
centre_x, centre_y, centre_z | Float | yes | Centre of the local search sphere (Å) |
starting_model_vrms | Float | yes | Expected VRMS; 1.0 for identical, 1.2 for AlphaFold (default 1.2) |
Output nodes are created post-run: top_model*.pdb and *.map files.
External program: emplace_local (resolved via ccp4-python).
molrep.atomic_model_fit — Molrep
Fits one or more atomic models into a cryo-EM map using molecular replacement (SAPTF or RTF method). Requires CCP4.
| Key option | Type | Required | Description |
|---|---|---|---|
input_map | InputNode | yes | CryoEM map (.mrc, .map) |
input_model | InputNode | yes | Search model (.cif, .pdb, .ent) |
mode | MultipleChoice | no | SAPTF (default RTF) |
copies | Int | yes | Number of copies to find (default 1) |
subunits | Int | yes | Monomers in search model (default 1) |
fixed_model | InputNode | no | Model fixed during search |
rotation_peaks | Int | yes | Rotation function peaks to use (default 1) |
translation_peaks | Int | yes | Translation function peaks to use (default 1) |
Validation: rotation_peaks must be ≥ copies. A warning is raised if the input map has a non-zero origin record (Molrep ignores it; use the Model Shift job to correct afterward).
Outputs: molrep.pdb and molrep.cif (both NODE_ATOMCOORDS).
External program: molrep.
Model-building jobs
modelcraft.atomic_model_build — ModelCraft
Automated atomic model building using Buccaneer (protein) and Nautilus (nucleic acids). Requires ModelCraft version 5+ and CCP4.
| Key option | Type | Required | Description |
|---|---|---|---|
input_map1 | InputNode | yes | Half map 1 or full map |
input_half_map2 | InputNode | no | Half map 2 (recommended) |
input_build_map | InputNode | no | Optimally sharpened map for building (ModelCraft 5+) |
resolution | Float | yes | High-resolution limit (Å) |
input_seq | InputNode | yes | FASTA or PIR sequence file |
input_mask | InputNode | conditional | Map mask; required if half maps are not provided and emda is absent |
input_model | InputNode | no | Starting model (predicted or partial) |
ncycle | Int | no | Maximum build-refine cycles (default 25) |
auto_stop_cycles | Int | no | Cycles without FSC improvement before stopping (default 4) |
lib_in | InputNode | no | Ligand restraint dictionary (.cif) for non-standard ligands |
If no mask is provided and emda is on PATH, a mask is generated automatically. If emda is absent and no mask is given, an error is raised at scheduling time.
Thread parallelism is supported via nr_threads (added by get_runtab_options(threads=True)).
Output: modelcraft.cif (NODE_ATOMCOORDS).
External program: modelcraft (configurable via PIPELINER_MODELCRAFT_EXECUTABLE; default modelcraft).
process_predicted_model.atomic_model_utilities — Process Predicted Model
Processes AlphaFold2 (or similar) predicted models using mmtbx.process_predicted_model. Replaces pLDDT values in the B-factor column with estimated B-values, removes low-confidence residues, and optionally splits the model into compact domains.
| Key option | Type | Required | Description |
|---|---|---|---|
model | InputNode | yes | Predicted model in .pdb format |
remove_low_confidence_residues | Boolean | no | Remove residues with low pLDDT (default True) |
split_model_by_compact_regions | Boolean | no | Split into compact subdomains (default True) |
max_domains | Int | no | Maximum domains to obtain (default 3) |
domain_size | Float | no | Approximate domain size in Å (default 70; max 70) |
Output nodes are created post-run: all *_processed*.pdb and *_processed*.cif files in the output directory.
External program: mmtbx.process_predicted_model.
Refinement jobs
servalcat.atomic_model_refine — Servalcat Refine
Atomic model refinement against cryo-EM maps using Servalcat in refine_spa_norefmac mode. Requires Servalcat ≥ 0.4.88 (from CCP4 ≥ 9.0.005 or installed separately).
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | InputNode | yes | Model to refine (.cif, .mmcif, .pdb) |
input_ligand | MultiInputNode | no | CIF restraint files for non-standard ligands |
resolution | Float | yes | Resolution in Å |
half_map_refinement | Boolean | no | Use half maps (default True; strongly recommended) |
input_map1 | InputNode | yes | Half map 1 or full map |
input_half_map2 | InputNode | conditional | Half map 2 (required when half_map_refinement=True) |
input_mask | InputNode | no | Mask for Fo-Fc map normalisation |
n_cycle | Int | yes | Refinement cycles (default 20) |
how_use_hydrogens | MultipleChoice | no | Hydrogen handling: Generate hydrogen atoms (default), Use only hydrogen atoms present in model, Remove if present |
write_hydrogens | Boolean | no | Write hydrogen atoms in output (default False) |
point_group | String | yes | Point group symmetry (default C1); must match Cn/Dn/I/O/T pattern |
helical_symmetry | Boolean | no | Apply helical symmetry (default False) |
helical_twist | Float | conditional | Helical twist in ° (required when helical_symmetry=True) |
helical_rise | Float | conditional | Helical rise in Å (required when helical_symmetry=True) |
auto_symmetry | Boolean | no | Local NCS restraints (default True) |
auto_weight | Boolean | no | Auto-determine data/restraints weight (default True) |
weight | Float | conditional | Manual weight (active when auto_weight=False; default 1.0) |
unrestrained | Boolean | no | Unrestrained refinement |
masked_refinement | Boolean | no | Trim map to model before refinement (default True) |
Outputs: refined.mmcif and refined.pdb (NODE_ATOMCOORDS), plus version-dependent map and structure factor files.
External program: servalcat.
refmac_servalcat.atomic_model_refine — Refmac Servalcat (deprecated)
Older REFMAC5-based refinement wrapped by Servalcat. Superseded by servalcat.atomic_model_refine. Retained for backward compatibility but will be removed in a future version.
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | InputNode | yes | Model to refine (.cif, .pdb) |
input_ligand | MultiInputNode | no | Ligand restraint files |
resolution | Float | yes | Resolution in Å |
input_map1 | InputNode | yes | Half map 1 or full map |
half_map_refinement | Boolean | no | Use half maps (default True) |
input_half_map2 | InputNode | conditional | Half map 2 |
input_mask | InputNode | no | Mask for map normalisation |
n_cycle | Int | yes | Refinement cycles (default 20) |
point_group | String | yes | Point group symmetry (default C1) |
nucleotide_restraints | Boolean | no | LIBG nucleic acid restraints (default False) |
jelly_body | Boolean | no | Jelly-body restraints (default True) |
b_factor | Float | yes | Reset B-factors to this value (default 40.0) |
use_hydrogens | MultipleChoice | no | All (default), Yes, No |
auto_weight | Boolean | no | Auto weight (default True) |
masked_refinement | Boolean | no | Masked refinement (default True) |
External programs: servalcat, refmac5, gemmi.
flex_em.atomic_model_refine — Flex-EM
Fitting and flexible refinement of atomic structures guided by cryo-EM density using Flex-EM and Modeller. Waters and ligands are automatically removed from the input model. Requires CCP-EM v1 (ccpem-python on PATH).
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | InputNode | yes | Model to refine (.cif, .pdb) |
resolution | Float | yes | Resolution in Å |
input_map | InputNode | yes | CryoEM map (.mrc, .map) |
iterations | Int | yes | Flex-EM iterations (default 3) |
auto_ribfind | Boolean | no | Auto-create rigid bodies with Ribfind (default True) |
ribfind_rigid_body_file | InputNode | conditional | Ribfind rigid body file (required when auto_ribfind=False) |
phi_psi_restraints | Boolean | no | Use phi/psi restraints (default True) |
density_weight | Float | yes | Density weight 0–1 (default 1.0) |
Outputs: 1_MD/final1_mdcg.pdb and 1_MD/final1_mdcg.cif (both NODE_ATOMCOORDS).
External programs: mkdssp, ccpem-ribfind, ccpem-flex-em, gemmi.
Ligand and restraint jobs
acedrg.create_ligand — AceDRG
Generates stereochemical restraint dictionaries for ligands. Accepts one of: SMILES string, SMILES file, SDF/MOL file, MOL2 file, or monomer CIF file. Only one input type may be provided per job.
| Key option | Type | Required | Description |
|---|---|---|---|
smiles_string | String | conditional | SMILES string |
smiles_file | InputNode | conditional | SMILES file (.smi) |
mol_file | InputNode | conditional | SDF or MDL mol file |
mol2_file | InputNode | conditional | Mol2 file |
mmcif_file | InputNode | conditional | Monomer CIF file |
monomer_code | String | no | Monomer code (default LIG) |
has_metal | Boolean | no | Monomer contains a metal atom (default False) |
metal_structure | InputNode | conditional | Metal complex structure (recommended when has_metal=True) |
do_prot_changes | Boolean | no | Allow protonation changes (default True) |
use_coords | Boolean | no | Use input conformation (default False; inactive for SMILES inputs) |
Outputs: <monomer_code>_acedrg.cif (NODE_LIGANDDESCRIPTION) and <monomer_code>_acedrg.mmcif (NODE_ATOMCOORDS).
External program: acedrg.
metalcoord.create_restraints — MetalCoord
Generates restraints for metal coordination sites using MetalCoord.
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | InputNode | yes | Atomic model containing a metal site (.cif, .mmcif, .pdb) |
all_monomers | Boolean | no | Apply to all metal-containing monomers (default True) |
ligand | String | conditional | Monomer code for a single metal-containing monomer (required when all_monomers=False; 1–5 characters) |
links | MultipleChoice | no | How to update link records (default: Keep existing link records and add new ones) |
distance | Float | no | Distance threshold for atom selection (default 0.5) |
coordination | Int | no | Maximum coordination number (default 42) |
threshold | Float | no | Procrustes distance threshold (default 0.3) |
min_size | Int | no | Minimum sample size (default 30) |
use_pdb | Boolean | no | Use COD structures based on model (default False) |
ideal_angles_only | Boolean | no | Only bond angles in output (default False) |
simple_filtering | Boolean | no | Simple distance-based filtering (default False) |
Outputs: metalcoord_output.txt (NODE_RESTRAINTS). When links is not Do not alter existing link records, also outputs metalcoord_output.mmcif and metalcoord_output.pdb (NODE_ATOMCOORDS).
External program: metalCoord.
prosmart.create_restraints — ProSMART
Generates external structural restraints for protein or nucleic acid chains using ProSMART, for use in downstream refinement with Servalcat.
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | InputNode | yes | Target model (.cif, .mmcif, .pdb) |
all_chains | Boolean | no | Generate restraints for all chains (default True) |
chains | String | conditional | Space-separated chain IDs (required when all_chains=False) |
action | MultipleChoice | no | Restraint type: based on reference model(s) (default), for backbone hydrogen-bonds (protein only), self-restraints |
reference_models | MultiInputNode | conditional | Reference homologous models (active when action is reference-based) |
macromol_type | MultipleChoice | conditional | Protein (default) or Nucleic acid |
seqid_min | Float | no | Minimum sequence identity % (default 75) |
only_similar | Boolean | no | Use only most similar chain (default False) |
side_chain | Boolean | no | Include side-chain restraints (default True) |
Output: prosmart/<input_model_stem>.txt (NODE_RESTRAINTS).
External program: prosmart.
Model utility jobs
servalcat.map_utilities.trim — Servalcat Trim
Trims maps to a smaller box using a mask or atomic model as a guide, and shifts atomic models to align with the trimmed box. Saves trim/shift parameters for later use.
| Key option | Type | Required | Description |
|---|---|---|---|
input_maps | MultiInputNode | no | Maps to trim (.mrc) |
mask | InputNode | conditional | Mask to define trimming extent (required if no models and no shifts_json) |
input_models | MultiInputNode | conditional | Models to shift (required if no mask and no shifts_json) |
padding | Float | yes | Padding around mask/model in Å (default 10.0) |
mask_threshold | Float | yes | Mask boundary threshold (default 0.5) |
noncubic | Boolean | no | Allow non-cubic trimmed box (default True) |
noncentered | Boolean | no | Allow non-centred trimming (default True) |
do_shift | Boolean | no | Shift maps and models (default True) |
shifts_json | InputNode | no | Pre-calculated shift parameters from a prior Trim job |
Outputs: trimmed maps (*_trimmed.mrc, NODE_DENSITYMAP), trimmed mask (*_trimmed.mrc, NODE_MASK3D), trimmed models (NODE_ATOMCOORDS), and trim_shifts.json (NODE_PROCESSDATA) when no shifts_json input is provided.
External program: servalcat.
slicendice.atomic_model_split — Slice
Slices atomic models into sub-domains with configurable clustering methods and B-factor–based trimming options.
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | MultiInputNode | yes | Input model(s) (.cif, .pdb) |
bfactor_column | MultipleChoice | no | B-factor column format: pLDDT (default), RMS, Fractional pLDDT, Predicted B-factor, B-factor, None |
clustering_method | MultipleChoice | no | Clustering method: Birch (default), Agglomerative, dbscan, kMeans, MeanShift, Optics, PAE Clustering |
minimum_splits | Int | yes | Minimum splits (default 3) |
maximum_splits | Int | yes | Maximum splits (default 3) |
xyz_split_list | MultiString | conditional | Comma-separated split counts per model (required for multiple input models) |
plddt_threshold | Int | no | pLDDT threshold for trimming (default 70; active when bfactor_column=pLDDT) |
pae_file | InputNode | conditional | PAE JSON or pkl file (required when clustering_method=PAE Clustering) |
pae_method | MultipleChoice | conditional | networkx (default) or igraph |
pae_cutoff | Int | no | PAE cutoff for edge creation (default 5) |
Output: slicendice_0/slicendice.log (NODE_LOGFILE). Additional model output nodes are created post-run.
External program: slicendice.
gemmi.atomic_model_utilities.process_model — Gemmi Process Model
Processes and inter-converts atomic models between mmCIF and PDB formats using Gemmi. Supports atom selection, chain renaming, B-factor resetting, removal of hydrogens/waters/ligands, and sequence assignment.
| Key option | Type | Required | Description |
|---|---|---|---|
model | InputNode | yes | Input model (.cif, .mmcif, .pdb, .ent) |
convert_only | Boolean | no | Just convert format, no processing (default False) |
output_format | MultipleChoice | no | mmCIF (default) or PDB |
shorten_chain | Boolean | no | Shorten chain names (default True) |
out_filename | String | no | Custom output filename |
model_selection | String | no | Atom selection string (format: /models/chains/residues/atoms) |
reset_b | Boolean | no | Reset isotropic B-factors (default False) |
reset_b_val | Float | conditional | New B-factor value (required when reset_b=True) |
rename_chain | String | no | Rename chain: OLD:NEW format |
assign_sequence | InputNode | no | Sequence file for assignment (FASTA/PIR) |
remove_selection | String | no | Atom selection to remove |
remove_h | Boolean | no | Remove hydrogens (default False) |
remove_ligands_waters | Boolean | no | Remove ligands and waters (default False) |
remove_waters | Boolean | no | Remove waters only (default False) |
remove_anisou | Boolean | no | Remove ANISOU records (default False) |
trim_to_ala | Boolean | no | Trim side chains to alanine (default False) |
Output nodes are created post-run based on the selected format and filename.
External program: gemmi.
ccpem_utils.atomic_model_utilities.shift_origin_nstart — Model Shift
Translates atomic models based on a reference map's origin or nstart header record, or by an explicit (x, y, z) vector in Å. Useful when a tool ignores or misapplies map origin records.
| Key option | Type | Required | Description |
|---|---|---|---|
input_models | MultiInputNode | yes | Models to shift (.cif, .pdb, .ent) |
reference_map | InputNode | no | Reference map to extract origin/nstart from |
origin_or_nstart | MultipleChoice | conditional | origin (default) or nstart (active when reference_map is set) |
shift_nonzero | Boolean | conditional | Shift forward by origin/nstart (default True) |
shift_zero | Boolean | conditional | Shift back by origin/nstart (default False) |
trans_x, trans_y, trans_z | Float | conditional | Translation vector in Å (active when no reference_map) |
Exactly one of shift_nonzero or shift_zero must be True. Either a reference_map or a non-zero translation vector must be provided.
Outputs: <model_stem>_shifted<ext> files (NODE_ATOMCOORDS).
Validation jobs
pipeliner.atomic_model_validation — Atomic Model Validation
Validates protein atomic model quality and map agreement using multiple methods: Molprobity (geometry), Servalcat FSC (model-map FSC), TEMPy SMOC (per-residue local fit), FDR backbone (local backbone trace), and CheckMySequence (sequence agreement).
| Key option | Type | Required | Description |
|---|---|---|---|
input_model | InputNode | yes | Model to validate (.cif, .pdb, .ent) |
quick_eval | Boolean | no | Quick evaluation using only Molprobity clashes and TEMPy SMOC (default False) |
run_molprobity | Boolean | no | Run Molprobity geometry evaluation |
run_fsc | Boolean | no | Run Servalcat model-map FSC |
run_glob | Boolean | no | Run TEMPy global real-space fit |
run_smoc | Boolean | no | Run TEMPy SMOC per-residue fit |
run_fdr | Boolean | no | Run FDR backbone trace evaluation |
run_checkmysequence | Boolean | no | Run CheckMySequence |
input_map | InputNode | conditional | Input map (required for TEMPy and FDR metrics) |
resolution | Float | conditional | Map resolution in Å (required for TEMPy global and SMOC) |
input_halfmap1, input_halfmap2 | InputNode | conditional | Half maps for FSC calculations |
input_mask | InputNode | conditional | Map mask for FSC and TEMPy global |
input_fdrmap | InputNode | conditional | FDR confidence map |
input_sequence | InputNode | conditional | Sequence file for CheckMySequence |
input_contour | Boolean | no | Input contour threshold? (default False) |
contourlevel | Float | no | Contour level (default -100.0) |
External program: gemmi. Additional programs (molprobity.molprobity, servalcat, TEMPy.scores, TEMPy.smoc) are required for the respective metrics.
For the MolProbity geometry-only validation job, see molprobity.atomic_model_validation.geometry. For TEMPy map-fit scoring, see tempy.atomic_model_validation.map_fit. Both are separate registered job types.
Example 1: Run Servalcat refinement from a parameters dict
import os
os.chdir("/data/my_spa_project")
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import job_default_parameters_dict
proj = PipelinerProject()
params = job_default_parameters_dict("servalcat.atomic_model_refine")
params["input_model"] = "ModelCraft/job005/modelcraft.cif"
params["input_map1"] = "PostProcess/job004/postprocess_half1.mrc"
params["input_half_map2"] = "PostProcess/job004/postprocess_half2.mrc"
params["resolution"] = "3.2"
params["half_map_refinement"] = "Yes"
params["n_cycle"] = "25"
params["point_group"] = "C1"
job = proj.run_job(params, run_in_foreground=True)
print(job.output_dir) # e.g. ServalcatRefine/job006/
Example 2: Generate a job.star file, edit it, then run ModelCraft
import os
os.chdir("/data/my_spa_project")
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import write_default_jobstar, edit_jobstar
proj = PipelinerProject()
# Write a default job.star template for ModelCraft
template = write_default_jobstar("modelcraft.atomic_model_build")
# template == 'modelcraft_atomic_model_build_job.star'
# Edit the template to set required inputs.
# No input_mask is set here, so emda must be on PATH to make the mask
# automatically; otherwise add "input_mask" (e.g. "MaskCreate/job002/mask.mrc")
# or run_job raises ValueError ("... Input mask not provided and 'emda' is not
# available in the system PATH ...")
edited = edit_jobstar(
template,
{
"input_map1": "PostProcess/job004/postprocess_half1.mrc",
"input_half_map2": "PostProcess/job004/postprocess_half2.mrc",
"input_seq": "FetchFasta/job001/sequence.fasta",
"resolution": "3.5",
},
"modelcraft_edited.job.star",
)
job = proj.run_job(edited, run_in_foreground=True)
Example 3: Dock a model with EMPlacement, then wait for completion
import os
os.chdir("/data/my_spa_project")
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import job_default_parameters_dict
proj = PipelinerProject()
params = job_default_parameters_dict("em_placement.atomic_model_fit")
params["model"] = "FetchAlphaFold/job001/AF-P12345-F1-model_v4.pdb"
params["input_map1"] = "Refine3D/job003/run_half1_class001_unfil.mrc"
params["input_map2"] = "Refine3D/job003/run_half2_class001_unfil.mrc"
params["best_resolution"] = "3.1"
params["sequence"] = "FetchFasta/job002/sequence.fasta"
params["estimated_rmsd"] = "1.2"
job = proj.run_job(params) # launches in background
final_status = proj.wait_for_job_to_finish(job, error_on_fail=True)
# Proceed to refinement only after docking succeeds
Example 4: Generate AceDRG ligand restraints from a SMILES string
import os
os.chdir("/data/my_spa_project")
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import job_default_parameters_dict
proj = PipelinerProject()
params = job_default_parameters_dict("acedrg.create_ligand")
params["smiles_string"] = "CC(=O)Oc1ccccc1C(=O)O" # aspirin
params["monomer_code"] = "ASP"
params["do_prot_changes"] = "Yes"
job = proj.run_job(params, run_in_foreground=True)
# Outputs: AceDRG/job007/ASP_acedrg.cif and AceDRG/job007/ASP_acedrg.mmcif
Example 5: Check job availability before scheduling
from pipeliner.job_factory import new_job_of_type
job = new_job_of_type("molrep.atomic_model_fit")
if not job.jobinfo.is_available:
print(job.jobinfo.unavailable_message)
else:
print("Molrep is available")
Example 6: Trim maps and models after refinement
import os
os.chdir("/data/my_spa_project")
from pipeliner.api.manage_project import PipelinerProject
from pipeliner.api.api_utils import job_default_parameters_dict
proj = PipelinerProject()
params = job_default_parameters_dict("servalcat.map_utilities.trim")
params["input_maps"] = (
"PostProcess/job004/postprocess_half1.mrc"
":::PostProcess/job004/postprocess_half2.mrc"
)
params["input_models"] = "ServalcatRefine/job006/refined.mmcif"
params["mask"] = "MaskCreate/job002/mask.mrc"
params["padding"] = "10.0"
params["noncubic"] = "Yes"
job = proj.run_job(params, run_in_foreground=True)
Note: When providing multiple values for a
MultiInputNodeoption in a parameters dict, join them with:::(triple colon), which is the separator used by pipeliner for multi-value options in star and run.job files.