Repository navigation
Expand file tree
/
Copy pathnextflow.config
More file actions
2426 lines (2153 loc) · 103 KB
/
Copy pathnextflow.config
File metadata and controls
2426 lines (2153 loc) · 103 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
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// ═══════════════════════════════════════════════════════════════════════════════
// GPU SCHEDULING NOTE
// ═══════════════════════════════════════════════════════════════════════════════
// GPU selection is now handled by the external Python GPU Orchestrator.
// The orchestrator passes --gpu_id X to Nextflow, which is used in containerOptions.
// See: platform/api/services/gpu_orchestrator.py
// ═══════════════════════════════════════════════════════════════════════════════
def ensureDir(path) {
def f = new File(path)
if (!f.exists()) {
f.mkdirs()
}
return f.toString()
}
def cacheRoot = ensureDir(
System.getenv('XDG_CACHE_HOME')
?: (System.getenv('BMS_DATA') ? "${System.getenv('BMS_DATA')}/cache" : "${System.getenv('HOME') ?: '/tmp'}/.cache")
)
def dglCacheDir = ensureDir("${cacheRoot}/dgl")
def dataRootFallback = System.getenv('BMS_DATA') ?: "${System.getenv('HOME') ?: '/tmp'}/.biomodstack"
def bmsContainerRootFallback = System.getenv('BMS_CONTAINER_DIR') ?: "${dataRootFallback}/apptainer"
def cmConfornetsContainer = System.getenv('BMS_CM_CONFORNETS_CONTAINER_PATH')
def toolsRoot = System.getenv('BMS_TOOLS') ?: "${dataRootFallback}/tools"
def findCodeRoot(start) {
def candidate = new File(start.toString()).absoluteFile
for (def depth = 0; depth < 3 && candidate != null; depth++) {
if (new File(candidate, 'scripts').isDirectory()) {
return candidate.toString()
}
candidate = candidate.parentFile
}
return new File(start.toString()).absolutePath
}
def codeRootFallback = System.getenv('BMS_HOME')
?: findCodeRoot(projectDir)
def mdFeatureFlag = System.getenv('BMS_FEATURE_MOLECULAR_DYNAMICS') ?: '0'
def resolveRfdModels(weightsRoot) {
def explicit = System.getenv('BMS_RFD_MODELS')
if (explicit) {
return explicit
}
def classic = "${weightsRoot}/rfd"
def rfantibody = "${weightsRoot}/rfantibody/rfantibody_repo/weights"
return new File(rfantibody).exists() ? rfantibody : classic
}
// Selected installed weights are read-only on every placement. Protect the
// original host pathname too when a native guest alias is used: broader data
// mounts must not expose a second writable name for the selected payload.
// The userspace backend consumes the same explicit modes via its private view.
def weightBind(source, target = null) {
def guest = target ?: source
def concrete = new File(source.toString()).toPath()
try {
concrete = concrete.toRealPath()
} catch (java.io.IOException ignored) {
// Absent assets keep their existing acquisition/native error behavior.
}
def bindings = ["${concrete}:${guest}:ro"]
if (guest.toString() != source.toString()) {
bindings.add("${concrete}:${source}:ro")
}
if (concrete.toString() != source.toString() && concrete.toString() != guest.toString()) {
bindings.add("${concrete}:${concrete}:ro")
}
// A selected pinned layout contains relative aliases to existing acquisition
// objects. Different-depth guest mounts need those exact referents too.
// This only projects already-selected paths; registry/reader identity checks
// remain with their owners. Do not mount/walk the whole acquisition store.
def layout = concrete
while (layout != null && !(layout.parent?.parent?.fileName?.toString() == 'layouts'
&& layout.fileName.toString() ==~ /[0-9a-f]{64}/)) {
layout = layout.parent
}
if (layout != null && java.nio.file.Files.isDirectory(concrete)) {
def objects = layout.parent.parent.parent.resolve('objects/sha256')
try {
def members = java.nio.file.Files.walk(concrete)
try {
members.filter { java.nio.file.Files.isSymbolicLink(it) }.iterator().toList()
.sort { a, b -> a.toString() <=> b.toString() }.each { member ->
def referent = member.toRealPath()
if (referent.parent?.parent == objects
&& referent.parent.fileName.toString() ==~ /[0-9a-f]{64}/
&& referent.fileName.toString() == 'runtime.sif') {
def projected = new File(guest.toString()).toPath()
.resolve(concrete.relativize(referent)).normalize()
bindings.add("${referent}:${projected}:ro")
bindings.add("${referent}:${referent}:ro")
}
}
} finally {
members.close()
}
} catch (java.io.IOException ignored) {
// Missing/partial layouts are still handled by normal preparation.
}
}
return bindings.unique().join(',')
}
def gpuPrefix(gpuId) { "--nv --env CUDA_DEVICE_ORDER=PCI_BUS_ID --env CUDA_VISIBLE_DEVICES=${gpuId}" }
def firstConfiguredGpuIds(explicitGpuIds, fallbackGpuId) {
def explicit = explicitGpuIds == null ? '' : explicitGpuIds.toString().trim()
return explicit ? explicit : (fallbackGpuId == null ? '' : fallbackGpuId.toString().trim())
}
params {
//////////////////////////
// ESSENTIAL PARAMETERS //
//////////////////////////
// Pipeline mode. Choose from 'monomer_denovo', 'monomer_foldcond', 'monomer_motifscaff', 'monomer_partialdiff',
// 'binder_denovo', 'binder_foldcond', 'binder_motifscaff', or 'binder_partialdiff'
rfd_mode = null
// Number of designs to generate using RFdiffusion
rfd_num_designs = 8
// Number of sequences to generate per RFdiffusion design
seqs_per_design = 8
// Number of parallel jobs for sequence-based prediction
num_parallel_jobs = 1
// GPU ID passed by external orchestrator. For standalone runs, fallback to NXF_DEFAULT_GPU or 0.
gpu_id = System.getenv('NXF_DEFAULT_GPU') ? System.getenv('NXF_DEFAULT_GPU').toInteger() : 0
// Runtime placement, not a scientific preset. CPU remains the existing default.
protonpottsmpnn_device = System.getenv('BMS_PROTONPOTTSMPNN_DEVICE') ?: 'cpu'
protonpottsmpnn_container_path = System.getenv('BMS_PROTONPOTTSMPNN_CONTAINER_PATH') ?: null
// API base URL for spawn/wait/collect workflows
api_url = System.getenv('API_BASE_URL') ?: "http://localhost:8000"
// Path configuration (optional overrides for portability)
code_root = codeRootFallback
data_root = System.getenv('BMS_DATA')
cm_api_runtime_dir = System.getenv('BMS_CM_API_RUNTIME_DIR') ?: "${dataRootFallback}/runtime/cm-api-python"
api_python = System.getenv('BMS_API_PYTHON') ?: "${params.cm_api_runtime_dir}/current/venv/bin/python"
weights_root = System.getenv('BMS_WEIGHTS') ?: "${dataRootFallback}/weights"
msa_local_db = System.getenv('BMS_COLABFOLD_DB') ?: "${dataRootFallback}/colabfold_db"
msa_cache_dir = System.getenv('BMS_MSA_CACHE') ?: "${dataRootFallback}/msa_cache"
cache_root = cacheRoot
// Output directory for results. Existing results in this directory will be overwritten.
// To generate a unique directory name with date/time use a Groovy function e.g "bms_results/${new Date().format('yyyyMMdd_HHmmss')}"
out_dir = params.data_root ? "${params.data_root}/bms_results" : "bms_results"
// Complex/Ligand definition JSON path (for complex prediction)
complex_json_path = null
//////////////////////////////
// MODE SPECIFIC PARAMETERS //
//////////////////////////////
// Contigs specification. See examples in documentation. e.g. '[A17-145/0 50-100]'
// Required for 'binder_denovo', 'binder_motifscaff', 'binder_partialdiff', 'monomer_denovo', 'monomer_motifscaff', 'monomer_partialdiff' modes
rfd_contigs = null
// Path to input pdb e.g. target protein for binder design 'target.pdb'
// Required for 'binder_denovo', 'binder_foldcond', 'binder_motifscaff', 'binder_partialdiff', 'monomer_motifscaff', 'monomer_partialdiff' modes
rfd_input_pdb = null
// Hotspot residues on target chain(s) for binder design. e.g. '[A56,A115,A123]'
// Optional for 'binder_denovo' and 'binder_foldcond' modes
rfd_hotspots = null
// Path to directory containing fold conditioning secondary structure (*_ss.pt) and block adjacency files (*_adj.pt) files e.g. 'binderscaffolds/scaffolds_assorted'
// Required for 'binder_foldcond' and 'monomer_foldcond' modes.
rfd_scaffold_dir = null
// Paths to fold conditioning secondary structure and block adjacency files for the target protein. e.g. 'target_ss.pt', 'target_adj.pt'
// Required for 'binder_foldcond' mode.
rfd_target_ss = null
rfd_target_adj = null
// Whether to ignore loop regions when applying secondary structure constraints from scaffolds (default=true)
// Optional for 'binder_foldcond' and 'monomer_foldcond' modes.
// Recommended to set to false for binder design as the scaffold sets have enough diversity
rfd_mask_loops = true
// Residues that will have their sequence masked when diffusing (default=null). e.g. '[A17-19/A143-145]'
// Optional for 'monomer_motifscaff' and 'monomer_foldcond' modes
rfd_inpaint_seq = null
// Total length of diffused chain when performing motif scaffolding (default = null). e.g. '100-100', '100-120'
// Optional for 'binder_motifscaff' and 'monomer_motifscaff' modes
rfd_length = null
// Number of timesteps for partial diffusion. e.g. 20
// Required by 'binder_partialdiff' and 'monomer_partialdiff' modes
rfd_partial_diffusion_timesteps = null
//////////////////////////////////
// WORKFLOW ADVANCED PARAMETERS //
//////////////////////////////////
// Diffusion method: 'rfd3' (RFdiffusion3/Foundry, recommended) or 'boltzgen' (all-atom generator).
// Legacy 'rfd' is no longer supported in tracked repo state.
diffusion_method = 'rfd3'
// Allow Nextflow to retry failed processes on OOM (137) or SIGSEGV (139).
// Default: false (fail immediately for easier debugging)
// Set to true for production runs where transient failures should be retried
allow_retries = false
// Sequence design method: 'fampnn' (Full-Atom MPNN, recommended) or 'mpnn' (ProteinMPNN, legacy)
seq_method = 'fampnn'
// Structure prediction method. Choose from 'af2' (AlphaFold2), 'boltz' (Boltz-2), or 'rf3' (RosettaFold3/Foundry).
pred_method = 'af2'
// Whether to compress output final designs in a tar.gz archive. If false, results will be output as uncompressed PDB files.
zip_pdbs = true
// Whether to run RFdiffusion only and skip downstream stages (i.e. sequence design, prediction, and analysis)
run_rfd_only = false
// Whether to skip stages (RFdiffusion, sequence design, and/or prediction).
// Skip RFdiffusion and run Sequence Design, Structure Prediction, and Analysis only. Must provide 'skip_input_dir' directory below containing PDB and JSON files with metadata. Binder design PDBs must have binder as chain A and target as chain B.
skip_rfd = false
// Skip RFdiffusion and Sequence Design, and run Structure Prediction and Analysis only. Must provide 'skip_input_dir' directory below containing PDB files. Binder design PDBs must have binder as chain A and target as chain B.
skip_rfd_seq = false
// Skip RFdiffusion, Sequence Design, and Structure Prediction, and run Analysis only. Must provide 'skip_input_dir' directory below containing PDB files. Binder design PDBs must have binder as chain A and target as chain B.
skip_rfd_seq_pred = false
// Skip only Structure Prediction stage (useful for standalone docking)
skip_pred = false
// Path to input files when skipping stages, e.g. a collected output directory from a previous run.
skip_input_dir = null
/////////////////////////////
// ANTIBODY DESIGN PARAMETERS //
/////////////////////////////
// Heavy chain sequence for structure prediction.
heavy_sequence = null
// Light chain sequence for structure prediction.
light_sequence = null
// Target PDB alias (used in main.nf but maps to rfd_input_pdb usually, or explicit target_pdb)
target_pdb = null
// Antigen chain IDs for De Novo design (e.g. 'A')
antigen_chains = null
// Optional framework family hint for antibody-shaped generators
framework_type = null
// General sequence name
sequence_name = null
// Optional job batch label for orchestrated and experimental workflows
batch_name = null
// Optional batch manifest for copy/paste structure screens
sequence_batch_json_path = null
// Optional staged directory of per-variant complex JSON payloads
complex_batch_dir = null
// Optional explicit Boltz asset overrides used by some experimental workflows
boltz_model_path = null
boltz_ccd_path = null
// Boltz-CP experimental workflow parameters
bcp_input_path = null
bcp_repo_path = null
bcp_container_path = null
bcp_gpu_ids = null
bcp_size_cp = 4
bcp_cp_topology = '2d'
bcp_input_format = 'config_files'
bcp_output_format = 'mmcif'
bcp_write_full_pae = false
bcp_recycling_steps = 3
bcp_sampling_steps = 200
bcp_diffusion_samples = 1
bcp_seed = null
// ConforNets experimental monomer conformer workflow parameters
cn_task = 'diversity'
cn_sequence = null
cn_chain_id = 'A'
cn_benchmark_name = 'bms_confornets'
cn_test_case_name = 'monomer_case'
cn_reference_pdb_1 = ''
cn_reference_name_1 = 'ref_a'
cn_reference_pdb_2 = ''
cn_reference_name_2 = 'ref_b'
cn_checkpoint_path = "${params.weights_root}/openfold3/of3-p2-155k.pt"
cn_config_yaml = ''
cn_confornets_repo_path = System.getenv('BMS_CONFORNETS_REPO') ?: '/opt/confornets'
cn_skip_msa = false
cn_num_runs = 2
cn_k_confornets = 2
cn_num_samples = 5
cn_max_steps = 21
cn_save_steps = '5,10,15,20'
cn_num_recycles = 0
cn_num_diffusion_steps = 200
cn_lr = 0.001
cn_grad_clip = 10.0
cn_compute_confidence = true
cn_save_full_confidence = false
cn_compute_evaluation = true
cn_confornet_path = ''
cn_mse_dir = ''
cn_source_test_cases = ''
cn_container_path = null
cm_confornets_container_path = cmConfornetsContainer
// Shared target geometry controls for conditioned/frozen validation runs
target_geometry_mode = null
boltz_target_geometry_mode = null
protenix_target_geometry_mode = null
target_template_threshold_angstrom = 2.0
strict_target_rmsd = null
// Antibody Design Mode: Controls which residues are designable during sequence design
// Options:
// 'cdr_only' (default) - Only CDR loops are designable, all framework regions fixed
// 'cdr_selective' - Only selected CDR loops designable (use antibody_design_loops)
// 'framework_allowed' - CDRs + framework designable, VHH tetrad protected
// 'full_design' - Everything designable (expert mode, may break antibody structure)
antibody_design_mode = 'cdr_only'
// CDR loops to design (comma-separated). Only used when antibody_design_mode = 'cdr_selective'
// Options: H1, H2, H3, L1, L2, L3 (VHH only has H loops)
antibody_design_loops = 'H1,H2,H3,L1,L2,L3'
// Protect VHH tetrad (FR2 positions 37,44,45,47) from modification
// Critical for VHH solubility - should almost always be true
protect_vhh_tetrad = true
// Antibody chain IDs in HLT-formatted PDBs (default: H for heavy, L for light)
antibody_chains = 'H,L'
// Keep non-antibody chains sequence-locked during FAMPNN/PPIFlow redesign.
lock_target_chains = true
// In CDR-focused modes, keep framework residues fixed unless explicitly relaxed.
lock_antibody_framework = true
// Optional PPIFlow tuning surfaces
ppiflow_rotamer_shell_cutoff = null
ppiflow_backbone_region_mode = null
ppiflow_backbone_loop_scope = null
// Skip RFantibody backbone generation and use pre-existing PDBs
skip_rfantibody = false
rfantibody_input_pdbs = null
// Job naming and batching
name = null
// FAMPNN orchestration settings
fampnn_collected_pdbs = null
pdbs_per_job = 5
// FAMPNN filtering (post sequence design)
enable_fampnn_filter = true
fampnn_max_residue_psce = 3.0 // Max per-residue PSCE for filtering
analysis_chain_id = 'all_chains' // Chain(s) for PSCE analysis
// RFantibody settings
rfantibody_num_designs = 10
rfantibody_design_loops = ''
rfantibody_diffusion_steps = 50 // 20-50 typical, allow up to 200 for extended denoising sweeps
rfantibody_noise_scale_ca = 1.0 // 0.5-2.0 (higher = more exploratory backbone sampling)
rfantibody_noise_scale_frame = 1.0 // 0.5-2.0 (higher = more exploratory orientation sampling)
rfantibody_guide_scale = 10 // 1-50 (higher = stronger hotspot guidance)
// Optional explicit checkpoint path override for RFantibody.
// If null, module auto-resolves RFdiffusion_Ab.pt from rfd_models bind + legacy paths.
rfantibody_ckpt_override = null
// Debug-only switch: mount host RFantibody repo over /opt/RFantibody.
// Default false keeps container code immutable and binds only host weights.
rfantibody_debug_repo_overlay = false
// Epitope residues for target binding (e.g., "A45,A46,A52")
epitope_residues = null
/////////////////////////////////////
// ANTIBODY STAGE TOGGLES & SETTINGS //
/////////////////////////////////////
// ThermoMPNN Stability Filter (OFF by default)
// Filters unstable sequences before Boltz-2 validation
run_thermompnn = false
thermompnn_max_ddg = 2.0 // Max ddG threshold (kcal/mol) for filtering
// FrustraMPNN frustration analysis (OFF by default)
// Optional post-pipeline analysis on final candidates
run_frustrampnn = false
// Enabled canonical execution is initially fail-closed; degraded/optional is not exposed.
frustrampnn_requiredness = 'required'
// ANARCII CDR annotation (OFF by default)
// Post-pipeline polishing for CDR metadata
run_anarcii_post = false
anarcii_execution_mode = 'auto'
anarcii_gpu_id = null
anarcii_batch_size = 500
anarcii_cpu_threads = 24
anarcii_include_children = true
anarcii_chain_timeout = 120
// AF2 Backprop CDR Refinement (OFF by default)
// Uses ColabDesign AfDesign to optimize CDR sequences for binding confidence
run_af2_backprop = false
af2_backprop_soft_iters = 100 // Soft optimization iterations
af2_backprop_temp_iters = 100 // Temperature annealing iterations
af2_backprop_hard_iters = 10 // Hard discrete iterations
af2_backprop_num_recycles = 3 // AF2 recycling iterations
af2_backprop_learning_rate = 0.1 // Gradient descent step size
af2_backprop_use_multimer = true // Use AlphaFold-Multimer
af2_backprop_num_models = 1 // Number of AF2 models to ensemble (1-5)
af2_backprop_loss_plddt = 0.1 // Weight for pLDDT loss
af2_backprop_loss_pae = 0.1 // Weight for PAE loss
af2_backprop_loss_contact = 0.5 // Weight for interface contact loss
af2_backprop_binder_chain = 'H' // Chain to redesign (auto-set for VHH)
// PPIFlow Maturation (OFF by default)
run_maturation = false
maturation_designs_per_job = 4
maturation_anchor_threshold = -5.0
maturation_anchor_distance_cutoff = 12.0
maturation_min_improvement = -1.0
maturation_filter_percentile = 0
maturation_design_mode = 'inherit'
maturation_redesign_temp = null
maturation_redesign_steps = null
maturation_redesign_enabled = true
maturation_redesign_top_n = 0
// PPIFlow configuration
ppiflow_start_t = 0.5
ppiflow_samples_per_target = 3
ppiflow_retry_limit = 10
ppiflow_config = "/app/ppiflow/configs/test_antibody.yaml"
ppiflow_checkpoint = "nanobody"
ppiflow_checkpoint_path = null
ppiflow_weights_dir = "${params.weights_root}/ppiflow"
ppiflow_heavy_chain = null
ppiflow_light_chain = null
ppiflow_antigen_chain = null
// Path to AlphaFold2 parameters (for AF2 backprop)
alphafold_params = "${params.weights_root}/alphafold/params"
/////////////////////////////
// RFD ADVANCED PARAMETERS //
/////////////////////////////
// Override the diffusion model checkpoint used by RFdiffusion.
// Choose from: 'active_site', 'base', 'base_epoch8', 'complex_base', 'complex_beta', 'complex_fold_base', 'inpaint_seq', 'inpaint_seq_fold'
// RFdiffusion will automatically select a checkpoint. Not recommended to override except for 'binder_denovo' mode i.e. 'complex_beta'
rfd_ckpt_override = null
// Scale of noise for RFD translations (ca) and rotations (frame)
// 1 (default) is recommended for monomer modes to increase diversity
// 0 is recommended for binder modes to increase success rates
rfd_noise_scale = null
// Additional configuration parameters to pass to RFdiffusion that are not externalised in Nextflow. e.g. 'contigmap.inpaint_str=[B165-178]'
rfd_extra_config = null
//////////////////////////////
// MPNN ADVANCED PARAMETERS //
//////////////////////////////
// Parameters for ProteinMPNN-FastRelax. Binder design modes only.
// Residue types to avoid during sequence design (one letter case-insensitive) (default: 'CX').
mpnn_omitAAs = 'CX'
// Temperature for sequence sampling. Higher values increase sequence diversity. Default=0.1
// For binder design, it is recommended to decrease this significantly e.g. 0.0001
mpnn_temperature = 0.1
// Checkpoint type to use for ProteinMPNN. Choose from 'vanilla' or 'soluble' (default = soluble).
mpnn_checkpoint_type = 'soluble'
// Checkpoint model to use for ProteinMPNN. Indicates noise level used during training for backbone atoms.
// Choose from 'v_48_002','v_48_010,'v_48_020','v_48_030'. (default = 'v_48_020', noised with 0.20Å Gaussian noise)
mpnn_checkpoint_model = 'v_48_020'
// Standard deviation of Gaussian noise to add to backbone atoms.
// 0 = no change to backbone, 0.1-0.3 = allows mild pertubation of backbone
mpnn_backbone_noise = 0
// Maximum number of fast relax cycles to run on each sequence. Set to zero to disable.
mpnn_relax_max_cycles = 0
// Number of sequences to generate between relaxation steps. The sequence with the best score will be kept.
mpnn_relax_seqs_per_cycle = 1
// Whether to run a relaxation cycle before saving output.
mpnn_relax_output = false
// Convergence criteria 1 of 2.
// Design is considered converged if the C-alpha RMSD (Å) between cycles is <= this threshold (default: 0.2)
mpnn_relax_convergence_rmsd = 0.2
// Convergence criteria 2 of 2.
// Design is considered converged if the improvement in score between cycles is <= this threshold (default: 0.1)
mpnn_relax_convergence_score = 0.1
// Design is considered converged if it meets both convergence criteria for n consecutive cycles (default: 1)
mpnn_relax_convergence_max_cycles = 1
// Additional configuration parameters to pass to ProteinMPNN-FastRelax that are not externalised in Nextflow. e.g. '-protein_features='full''
mpnn_extra_config = null
////////////////////////////////
// FAMPNN ADVANCED PARAMETERS //
////////////////////////////////
// Parameters for Full-Atom MPNN
// Fix target side-chain positions when performing binder sequence design (default: false)
fampnn_fix_target_sidechains = false
// FAMPNN constraint mode: 'generic' (no fixed residues) or 'antibody' (CDR-aware constraints)
fampnn_constraint_mode = 'generic'
// Default checkpoint preset for Full-Atom MPNN sequence design.
fampnn_checkpoint = "fampnn_0_0.pt"
fampnn_checkpoint_path = null
// Only keep sidechains below this PSCE threshold during design; null to keep all (default: 0.3)
fampnn_psce_threshold = 0.3
// Temperature for sequence sampling. Higher values increase sequence diversity (default: 0.1)
// For binder design, it is recommended to decrease this significantly e.g. 0.0001
fampnn_temperature = 0.1
// Exclude cysteine residues from sequence design (default: true)
fampnn_exclude_cys = true
// Sequence-only mode: skip sidechain diffusion for faster inference (default: false)
fampnn_seq_only = false
// Number of denoising timesteps: higher = better quality but slower (default: 100)
fampnn_num_steps = 100
// FA-MPNN seq_probs-derived single-substitution mutation triage reporting.
// Keeps model-favored alternatives where log(P_alt)-log(P_sampled) meets the threshold.
fampnn_mutation_top_n = 25
fampnn_mutation_min_log_odds_delta = 0.0
// Batch size for inference: reduce if encountering OOM errors (default: 4)
fampnn_batch_size = 4
// Repack sidechains after final denoising step (default: true)
fampnn_repack_last = true
// Additional configuration parameters to pass to Full-Atom MPNN for debugging
// e.g. 'seed=42 scn_diffusion.num_steps=50 scn_diffusion.step_scale=1.0'
fampnn_extra_config = null
//////////////////////////////
// PRED ADVANCED PARAMETERS //
//////////////////////////////
// Parameters for structure prediction using AlphaFold2 Initial-Guess and Boltz-2.
// Path to uncropped target PDB file to use in structure prediction e.g. './benchmarkdata/5o45_pd-l1_uncropped.pdb'.
uncropped_target_pdb = null
// Use an initial-guess of the target chain(s) when performing binder structure prediction. When false, AF2 will not use an initial guess. Default = true
af2_initial_guess = true
// Additional configuration parameters to pass to AlphaFold2 Initial-Guess that are not externalised in Nextflow. e.g. '-recycle 3'
af2_extra_config = '-debug'
// Boltz settings
boltz_sampling_steps = 200
boltz_recycling_steps = 3
boltz_num_samples = 1
boltz_use_msa = false
boltz_anchor_target = false
boltz_anchor_strict = false
boltz_anchor_target_max_rmsd = 1.5
// Default to false (fast, single sequence)
rf3_use_msa = true
// Default to true (RF3 needs MSA for quality)
boltz_method = ''
// Default to none (no conditioning)
boltz_extra_config = ''
// Antibody Workflow Mode
// true = Exploration (parallel child jobs across GPUs - fast screening)
// false = Refinement (sequential on one GPU - thorough analysis)
// Default: null (must be set via command line --exploration_mode)
exploration_mode = null
// Local MSA Database Settings (uses local MMseqs2 - no API calls!)
// Set via params.msa_local_db / params.msa_cache_dir (env: BMS_COLABFOLD_DB/BMS_MSA_CACHE)
// Persistent MSA cache - never recompute for same sequence
msa_path = null
// Optional precomputed A3M path for workflows that can consume it directly
msa_threads = 32
// Total CPU-thread budget requested for local MMseqs2 search; high-quality EnvDB sharding subdivides this budget rather than raising it
msa_target_shard_mode = 'auto'
// EnvDB target DB sharding policy for balanced/maximum local MSA: auto|required|off
msa_target_shards = 4
// Default number of EnvDB target shards; workers use roughly msa_threads / msa_target_shards threads each
msa_target_shard_min_size_gb = 1.0
// Minimum target DB size in GiB before auto sharding is enabled
msa_use_gpu = true
// Use GPU-accelerated mmseqs2 when available (hybrid: auto-fallback to CPU)
msa_preset = 'fast'
// Default MSA profile for folding workflows: quick UniRef-only search
msa_gpu_mode = 'opportunistic'
// MSA GPU policy: opportunistic = use GPU only when relatively idle, else CPU
msa_gpu_threshold = 60
// Util/memory threshold (%) for opportunistic MSA GPU selection
msa_preferred_gpus = null
// Optional comma-separated GPU allowlist for MSA (e.g., '1,2')
msa_excluded_gpus = null
// Optional comma-separated GPU denylist for MSA (e.g., '0' to reserve 5090 for folding)
msa_gpu_server_mode = 'persistent'
// MMseqs2 gpuserver mode: persistent|auto|required|off (streaming search when GPU MSA is enabled)
msa_gpu_server_wait_timeout = 120
// Seconds to wait for gpuserver handshake (0=no wait, -1=infinite)
msa_gpu_server_db_load_mode = 2
// db-load-mode for gpuserver streaming (2 = mmap, aligned with shared local-MSA runtime defaults)
msa_gpu_server_startup_wait = 5.0
// Seconds to wait after gpuserver start before first search
msa_reference_sequence = null
// For mutagenesis: use this as cache key so all variants share one MSA
msa_force_refresh = false
// Force MSA regeneration (bypass cache) for each run
msa_cache_only = false
// Use only existing cached MSA for the sequence; fail if cache is missing
msa_max_seqs = null
// Optional max hit cap for MMseqs2 candidate set (lower values are faster; ColabFold often uses ~300)
msa_taxon_list = null
msa_evalue = null
msa_min_seq_id = null
msa_min_coverage = null
msa_use_expand = null
msa_use_env = null
msa_num_iterations = null
msa_chain_timeout_seconds = null
msa_allow_empty_fallback = false
msa_provider = 'colabfold_api'
// MSA backend provider: local|colabfold_api (remote server is the structure-prediction default)
colabfold_api_host = 'https://api.colabfold.com'
// Remote ColabFold API host (used when msa_provider=colabfold_api)
colabfold_api_min_interval = 6.0
// Minimum seconds between remote API submissions (global pacing)
colabfold_api_poll_interval = 6.0
// Polling interval in seconds for remote API ticket status
// The number of diffusion samples to use for prediction with Boltz-2. (default: 1)
boltz_diffusion_samples = null
// Let boltz_num_samples from CLI take precedence
boltz_max_parallel_samples = 1
// Use physics-based potentials during inference to improve physical plausibility of predictions (also known as Boltz-2x). Increases prediction time.
boltz_use_potentials = false
// Step scale for diffusion sampling (default: 1.638). Lower values = more diverse, higher = more conserved.
boltz_step_scale = null
// Additional configuration parameters to pass to Boltz-2 that are not externalised in Nextflow. e.g. '--msa_pairing_strategy complete'
boltz_extra_config = null
// ═══════════════════════════════════════════════════════════════════════════
// BOLTZ-2 BINDING AFFINITY PREDICTION (Quality Feature)
// ═══════════════════════════════════════════════════════════════════════════
// Enable Boltz-2's binding affinity prediction head (outputs log10 IC50 & probability)
// WARNING: Adds ~2-5 min per design - keep off for initial screening
boltz_predict_affinity = false
// Sampling steps for affinity prediction (default: 200)
boltz_sampling_steps_affinity = 200
// Diffusion samples for affinity head (default: 5, more = better estimate)
boltz_diffusion_samples_affinity = 5
// Apply Molecular Weight correction to affinity value (for small molecules)
boltz_affinity_mw_correction = false
//////////////////////////////
// RFD3 ADVANCED PARAMETERS //
//////////////////////////////
// Parameters for RFdiffusion3 (Foundry)
// Number of structure batches per design (default: 1, produces 8 models per batch)
rfd3_batches_per_design = 1
// Additional RFD3 config overrides (Hydra format)
rfd3_extra_config = null
/////////////////////////////////
// PROTEIN LOCAL REDESIGN PARAMS //
/////////////////////////////////
plr_input_pdb = null
plr_model_number = null
plr_design_chains = null
plr_context_chains = ''
plr_region_mode = 'manual_ranges'
plr_redesign_ranges = null
plr_interface_cutoff = 6.0
plr_region_padding = 2
plr_num_designs = 8
plr_seq_method = 'fampnn'
plr_fix_fixed_sidechains = true
plr_structure_validators = 'protenix_v2'
plr_backbone_input_pdbs = null
plr_sequence_input_pdbs = null
plr_validation_input_pdbs = null
plr_region_manifest = null
plr_final_candidate_dir = null
/////////////////////////////
// RF3 ADVANCED PARAMETERS //
/////////////////////////////
// Parameters for RosettaFold3 (Foundry)
// Additional RF3 config overrides
rf3_extra_config = null
// RF3 Filtering Parameters
// Minimum pLDDT score for RF3 predictions
rf3_min_plddt = null
// Minimum pTM score for RF3 predictions
rf3_min_ptm = null
// Maximum PAE for RF3 predictions
rf3_max_pae = null
// Maximum overall RMSD for RF3 predictions
rf3_max_rmsd_overall = null
// Maximum binder RMSD for RF3 predictions (binder modes)
rf3_max_rmsd_binder = null
// Optional bind root and analysis image used by MD process labels even when MD profiles are inactive.
md_input_root = null
md_analysis_container = System.getenv('BMS_MD_ANALYSIS_CONTAINER')
md_analysis_sif_sha256 = System.getenv('BMS_MD_ANALYSIS_SIF_SHA256')
md_analysis_implementation_sha256 = System.getenv('BMS_MD_ANALYSIS_IMPLEMENTATION_SHA256')
md_preparation_container = System.getenv('BMS_MD_PREPARATION_SIF') ?: "${bmsContainerRootFallback}/md-preparation-v1.sif"
md_preparation_runtime_lock = System.getenv('BMS_MD_PREPARATION_RUNTIME_LOCK') ?: "${params.data_root ?: dataRootFallback}/md-preparation/env-v1-explicit.txt"
md_gromacs_container = System.getenv('BMS_MD_GROMACS_SIF') ?: "${bmsContainerRootFallback}/gromacs-md-2025.3.sif"
md_openmm_container = System.getenv('BMS_MD_OPENMM_SIF') ?: "${bmsContainerRootFallback}/openmm-md-8.5.2.sif"
/////////////////////////
// BOLTZGEN PARAMETERS //
/////////////////////////
// Parameters for BoltzGen (All-atom binder generation)
// Number of designs to generate
boltzgen_num_designs = 10
// Scaffold length range (e.g. '80-120' or '100')
boltzgen_scaffold_length = '80-120'
// Ligand SMILES string (if not using NTP template)
boltzgen_ligand_smiles = null
// NTP template type (e.g. 'dATP', 'GTP') - overrides ligand_smiles if provided
boltzgen_ntp_type = null
// Binding pocket specification (e.g., 'A:45-52,A:78-85' for residue ranges)
boltzgen_binding_site_residues = null
// Include catalytic site features (Mg2+ coordination) for enzyme design
boltzgen_catalytic_site = false
// Existing protein backbone for NTP docking mode
boltzgen_input_pdb = null
// Ligand structure with 3D coordinates for scaffold_around_ligand mode
boltzgen_ligand_pdb = null
// Additional configuration overrides
boltzgen_extra_config = null
// New parameters for DNA complex and batching
boltzgen_protein_sequence = null
boltzgen_dna_template_seq = null
boltzgen_dna_primer_seq = null
boltzgen_dna_structure = null
boltzgen_batch_size = 1
/////////////////////////
// DIFFDOCK PARAMETERS //
/////////////////////////
// Parameters for DiffDock (Protein-Ligand Docking)
// Whether to run the docking stage (Stage 4)
run_docking = false
// Number of docking poses to generate per complex
diffdock_num_poses = 10
// Minimum confidence threshold for filtering poses (0.0 - 1.0)
diffdock_confidence_threshold = 0.0
// Ligand SMILES for docking (if not provided, will look for 'ligand_description' column in inputs or use NTP type)
diffdock_ligand_smiles = null
// NTP template type to use as ligand
diffdock_ntp_type = null
// Additional configuration overrides
diffdock_extra_config = null
// Number of inference steps (higher = more accurate but slower)
diffdock_inference_steps = 20
/////////////////////////
// UNI-DOCK PARAMETERS //
/////////////////////////
// Parameters for Uni-Dock (GPU-accelerated AutoDock Vina)
// Number of docking poses to generate per ligand
unidock_num_poses = 9
// Scoring function: 'vina', 'vinardo', or 'ad4'
unidock_scoring = 'vina'
// Search exhaustiveness (32=standard, 128+=blind docking)
unidock_exhaustiveness = 32
// Docking box edge length in Angstroms
unidock_box_size = 25
// Box center coordinates as "x,y,z" (empty = auto-detect)
unidock_box_center = ''
// Flexible receptor sidechains as "A:42,A:89" (empty = rigid)
unidock_flexible_residues = ''
// Affinity threshold for filtering poses (kcal/mol)
unidock_affinity_threshold = -7.0
// Ligand SMILES for docking
unidock_ligand_smiles = null
// NTP template type for docking
unidock_ntp_type = null
// Search mode preset: 'fast', 'balance', 'detail'
unidock_search_mode = ''
// Minimum RMSD between output poses (Angstroms)
unidock_min_rmsd = 1.0
// Maximum energy difference to show from best pose (kcal/mol)
unidock_energy_range = 3.0
// Random seed for reproducibility (0 = random)
unidock_seed = 0
// Optional Uni-Dock GPU override for hosts with adapter-specific runtime issues.
// Leave unset to use the orchestrator-assigned gpu_id / NXF_DEFAULT_GPU path.
unidock_gpu_id = System.getenv('BMS_UNIDOCK_GPU_ID') ?: null
//////////////////////////
// FILTERING PARAMETERS //
//////////////////////////
// RFdiffusion Filtering Parameters. Applies to binder chain only in binder design modes, otherwise all chains.
// Max/min number of alpha-helices in design
rfd_min_helices = null
rfd_max_helices = null
// Max/min number of beta-strands in design
rfd_min_strands = null
rfd_max_strands = null
// Max/min number of secondary structure elements (α-helices + β-strands)
rfd_min_ss = null
rfd_max_ss = null
// Max/min radius of gyration (Å) of design
rfd_min_rog = null
rfd_max_rog = null
// ProteinMPNN Filtering Parameters
// Maximum ProteinMPNN score (negative log likelihood).
// A lower score means ProteinMPNN is more confident in the sequence.
mpnn_max_score = null
// Full-Atom MPNN Filtering Parameters
// Max average predicted side-chain error (PSCE) for designed side-chains.
// Applies to binder chain only in binder design modes, otherwise averages all chains.
// A lower score means FAMPNN is more confident in the sequence.
fampnn_max_psce = null
// AlphaFold2 Initial-Guess Filtering Parameters.
// Max predicted aligned error for interactions between binder and target
af2_max_pae_interaction = null
// Max predicted aligned error for all chains
af2_max_pae_overall = null
// Max predicted aligned error for binder
af2_max_pae_binder = null
// Max predicted aligned error for target
af2_max_pae_target = null
// Min average pLDDT score for target and binder chains
af2_min_plddt_overall = null
// Min pLDDT score required for binder
af2_min_plddt_binder = null
// Min pLDDT score required for target
af2_min_plddt_target = null
// Max C-alpha RMSD between AF2 prediction and input design when all chains are aligned
af2_max_rmsd_overall = null
// Max binder C-alpha RMSD between AF2 prediction and input design when binder chains are aligned
af2_max_rmsd_binder_bndaln = null
// Max binder C-alpha RMSD between AF2 prediction and input design when target chains are aligned
af2_max_rmsd_binder_tgtaln = null
// Max target C-alpha RMSD between AF2 prediction and input design when target chains are aligned
af2_max_rmsd_target = null
// Boltz-2 Filtering Parameters.
// Max C-alpha RMSD between all chains of Boltz-2 prediction and input design.
boltz_max_overall_rmsd = null
// Max C-alpha RMSD between binder chains of Boltz-2 prediction and input design. Binder modes only.
boltz_max_binder_rmsd = null
// Max C-alpha RMSD between target chains of Boltz-2 prediction and input design. Binder modes only.
boltz_max_target_rmsd = null
// Minimum confidence score
boltz_min_conf_score = null
// Minimum predicted TM-score
boltz_min_ptm = null
// Minimum predicted TM-score of interface
boltz_min_ptm_interface = null
// Minimum pLDDT score of the complex
boltz_min_plddt = null
// Minimum pLDDT score of the complex interface
boltz_min_plddt_interface = null
// Maximum predicted distance error for the complex
boltz_max_pde = null
// Maximum predicted distance error for the complex interface
boltz_max_pde_interface = null
// ═══════════════════════════════════════════════════════════════════════════
// OPENMM PHYSICS REFINEMENT PARAMETERS
// ═══════════════════════════════════════════════════════════════════════════
// Post-generation relaxation and MM-GBSA binding affinity scoring
// Master toggle for physics refinement
openmm_enabled = false
// Compute tier: 'fast' (minimize), 'standard' (min+equil), 'full' (+MM-GBSA)
openmm_compute_tier = 'fast'
// Force field priority (comma-separated fallback chain)
openmm_force_field = 'amber14sb'
openmm_force_field_priority = 'amber14sb,mace-off,ani2x'
// Antibody/Nanobody-specific settings
openmm_cdr_only = true // Only minimize CDR regions (default for antibodies)
openmm_restraint_mode = 'framework' // 'none', 'framework', or 'backbone'
openmm_restraint_strength = 5.0 // kcal/mol/Ų
openmm_antibody_chain = 'H' // Heavy chain ID
// Minimization settings
openmm_max_iterations = 500 // Maximum L-BFGS iterations
openmm_energy_tolerance = 10.0 // Convergence tolerance (kJ/mol)
// MM-GBSA scoring settings
openmm_mmgbsa_mode = 'off' // 'off', 'interface', 'stability', 'both'
openmm_binder_chains = 'H' // Binder chain IDs (comma-separated)
openmm_target_chains = 'A' // Target chain IDs (comma-separated)
// Top-N gating: Only run expensive MM-GBSA on top designs by iPTM
openmm_top_n_gating = true
openmm_top_n_percentage = 10 // Top 10% of designs by iPTM
// Neural Network Force Fields (experimental)
openmm_nnff_enabled = false
openmm_nnff_potential = 'mace-off' // 'mace-off' or 'ani2x'
// ═══════════════════════════════════════════════════════════════════════════
// RFDPOLY MULTI-POLYMER DESIGN PARAMETERS (OLIGO DESIGNER)
// ═══════════════════════════════════════════════════════════════════════════
// De novo design of DNA, RNA, proteins, and mixed assemblies
// GitHub: https://github.com/RosettaCommons/RFDpoly
// Master toggle for RFDpoly workflow