-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathnextflow.config
More file actions
214 lines (181 loc) · 11.7 KB
/
Copy pathnextflow.config
File metadata and controls
214 lines (181 loc) · 11.7 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
/*
========================================================================================
nf-proteindesign Nextflow config file
========================================================================================
Default config options for all compute environments
----------------------------------------------------------------------------------------
*/
// Nextflow plugins
plugins {
id 'nf-schema@2.1.1'
}
// Global default params, used in configs
params {
// Input options
input = null
// Test mode: run ONLY the design tool (no downstream ProteinMPNN / Boltz-2 / etc.)
test_design_only = false
// ========================================================================
// Protein design tool selection
// ========================================================================
// Choose which generative model drives the design stage.
// 'boltzgen' — BoltzGen (original, default)
// 'complexa' — Proteina-Complexa (flow-matching approach)
// 'rfdiffusion_v3' — RFdiffusion3 (all-atom diffusion, RosettaCommons)
//
// Each tool uses its own samplesheet columns and parameters (see below).
// Everything downstream (ProteinMPNN, Boltz-2, IPSAE, etc.) is shared.
// ========================================================================
protein_design_tool = 'boltzgen' // 'boltzgen', 'complexa', or 'rfdiffusion_v3'
// ========================================================================
// BoltzGen design parameters (used when protein_design_tool = 'boltzgen')
// ========================================================================
// Samplesheet columns: sample_id, design_yaml, target_sequence,
// structure_files (optional), protocol, num_designs, budget,
// reuse (optional), target_msa (optional), target_template (optional)
// ========================================================================
cache_dir = null // Cache directory for BoltzGen model weights (~6GB), defaults to ~/.cache
boltzgen_config = null // Optional: Path to custom BoltzGen config YAML to override defaults
steps = null // Optional: Comma-separated list of steps to run (e.g., 'filtering')
// ========================================================================
// Proteina-Complexa design parameters (used when protein_design_tool = 'complexa')
// ========================================================================
// Samplesheet columns: sample_id, target_pdb, pipeline_config,
// target_sequence, target_msa (optional), target_template (optional)
// ========================================================================
complexa_ckpt_dir = null // Path to Complexa checkpoint directory (required for GPU inference)
complexa_container = '307946633589.dkr.ecr.eu-west-2.amazonaws.com/rashmi/proteina-complexa:latest'
complexa_search_algorithm = 'best-of-n' // Search algorithm: best-of-n, single-pass, beam-search, fk-steering, mcts
complexa_nsteps = 400 // Number of diffusion sampling steps (generation.args.nsteps)
complexa_replicas = 2 // Number of replicas for best-of-n search (generation.search.best_of_n.replicas)
complexa_batch_size = 16 // Dataloader batch size for generation (generation.dataloader.batch_size)
complexa_extra_args = '' // Additional Hydra overrides (e.g., '++seed=42 ++generation.args.guidance_w=2.0')
// ========================================================================
// RFdiffusion v3 design parameters (used when protein_design_tool = 'rfdiffusion_v3')
// ========================================================================
// Samplesheet columns: sample_id, design_yaml, structure_files,
// num_designs, budget, target_msa (optional), target_sequence (optional),
// target_template (optional)
// ========================================================================
rfdiffusion_v3_ckpt_dir = null // Path to RFdiffusion3 checkpoint dir (auto-downloaded if null)
rfdiffusion_v3_container = 'rosettacommons/foundry:latest' // Container with rfd3 CLI
// ProteinMPNN sequence optimization options
run_proteinmpnn = true // Enable ProteinMPNN sequence optimization of designed structures (set to false to disable)
mpnn_sampling_temp = 0.1 // Sampling temperature (0.1-0.3 recommended, lower = more conservative)
mpnn_num_seq_per_target = 8 // Number of sequence variants to generate per structure
mpnn_batch_size = 1 // Batch size for ProteinMPNN inference
mpnn_seed = 37 // Random seed for reproducibility
mpnn_backbone_noise = 0.02 // Backbone noise level (0.02-0.20, lower = more faithful to input)
mpnn_save_score = true // Save per-residue scores
mpnn_save_probs = false // Save per-residue probabilities (large files, use for detailed analysis)
mpnn_fixed_chains = null // Chains to keep fixed (e.g., 'A,B' - typically the target chains)
mpnn_designed_chains = null // Chains to design (e.g., 'C' - typically the binder chain)
// Boltz-2 structure prediction options (for refolding ProteinMPNN sequences)
run_boltz2_refold = true // Enable Boltz-2 structure prediction for ProteinMPNN sequences (set to false to disable)
boltz2_cache = null // Cache directory for Boltz-2 model weights (~6GB), defaults to ~/.boltz
boltz2_num_recycling = 3 // Number of recycling steps (3-5 recommended)
boltz2_num_diffusion = 200 // Number of diffusion samples (higher = slower but more accurate)
boltz2_use_msa = false // Use MSA server for template search (slower but more accurate)
boltz2_predict_affinity = true // Predict binding affinity (log IC50 values)
boltz2_torch_precision = 'medium' // Torch float32 matmul precision: 'medium', 'high', or 'highest' (for Tensor Cores)
// IPSAE scoring options
run_ipsae = true // Enable IPSAE scoring of Boltz-2 structures (set to false to disable)
ipsae_pae_cutoff = 10 // PAE cutoff for IPSAE calculation (Angstroms, default: 10)
ipsae_dist_cutoff = 10 // Distance cutoff for CA-CA contacts (Angstroms, default: 10)
// PRODIGY binding affinity prediction options
run_prodigy = true // Enable PRODIGY binding affinity prediction on final designs (set to false to disable)
prodigy_selection = null // Chain selection for PRODIGY (e.g., 'A,B'). If null, auto-detects from structure
// Foldseek structural search options
run_foldseek = true // Enable Foldseek structural similarity search (requires foldseek_database, set to false to disable)
foldseek_database = null // Path to Foldseek database directory (e.g., AlphaFold/Swiss-Model, required if run_foldseek is true)
foldseek_database_name = 'afdb' // Database name within the directory (e.g., 'afdb', 'swissprot', 'pdb')
foldseek_evalue = 0.001 // E-value threshold for reporting matches (lower = more stringent)
foldseek_max_seqs = 100 // Maximum number of target sequences to report
foldseek_sensitivity = 9.5 // Search sensitivity (1.0-9.5, higher = more sensitive but slower)
foldseek_coverage = 0.0 // Minimum fraction of aligned residues (0.0-1.0, higher = more global alignment)
foldseek_alignment_type = 2 // Alignment type: 0=3Di only, 1=TMalign (global), 2=3Di+AA (local, default)
// Metrics consolidation and reporting options
run_consolidation = true // Enable consolidated metrics report generation (set to false to disable)
report_top_n = 10 // Number of top designs to highlight in report
// Output options
outdir = './results'
publish_dir_mode = 'copy'
// Max resource options
// Defaults only, expecting to be overwritten
max_memory = '128.GB'
max_cpus = 16
max_time = '240.h'
max_gpus = 1 // Maximum GPUs per process (increase for multi-GPU systems)
// GPU acceleration options
// NOTE: The following processes support GPU acceleration:
// - PROTEINA_COMPLEXA_DESIGN: Requires GPU for flow-matching inference
// - PROTEINMPNN_OPTIMIZE: Optional GPU support, accelerates sequence optimization
// - BOLTZ2_REFOLD: Requires GPU for structure prediction / refolding
// - FOLDSEEK_SEARCH: Optional GPU support, provides 4-27x speedup for structure searches
// Ensure your compute environment has NVIDIA GPUs and Docker/Singularity GPU support enabled
// Boilerplate options
tracedir = "${params.outdir}/pipeline_info"
help = false
version = false
validate_params = true
show_hidden_params = false
}
// Load base.config by default for all pipelines
includeConfig 'conf/base.config'
// Container options
docker.enabled = false
podman.enabled = false
// Set default container registry
apptainer.registry = ''
docker.registry = 'docker.io'
// Capture exit codes from upstream processes when piping
process.shell = ['/bin/bash', '-euo', 'pipefail']
manifest {
name = 'seqeralabs/nf-proteindesign'
author = 'Florian Wuennemann'
homePage = 'https://github.com/seqeralabs/nf-proteindesign'
description = 'Nextflow pipeline for protein design with BoltzGen, Proteina-Complexa, or RFdiffusion v3 and parallel sample processing'
mainScript = 'main.nf'
nextflowVersion = '!>=23.04.0'
version = '1.0.0'
}
// Load config profiles
profiles {
debug {
dumpHashes = true
process.beforeScript = 'echo $HOSTNAME'
cleanup = false
}
docker {
docker.enabled = true
podman.enabled = false
docker.runOptions = '--gpus all'
}
singularity {
singularity.enabled = true
singularity.autoMounts = true
// Enable GPU support for Singularity/Apptainer
singularity.runOptions = '--nv'
}
apptainer {
apptainer.enabled = true
apptainer.autoMounts = true
// Enable GPU support for Apptainer
apptainer.runOptions = '--nv'
}
test_design_nanobody {
includeConfig 'conf/test_design_nanobody.config'
}
test_design_peptide {
includeConfig 'conf/test_design_peptide.config'
}
test_design_protein {
includeConfig 'conf/test_design_protein.config'
}
test_design_rfdiffusion_v3 {
includeConfig 'conf/test_design_rfdiffusion_v3.config'
}
test_design_proteina_complexa {
includeConfig 'conf/test_design_proteina_complexa.config'
}
}