diff --git a/.gitattributes b/.gitattributes index f7f9a841aeba8a63368ebd41a01e2c3b39d03bcf..1af11f7c687039937136d8c87b12455d0f2da004 100644 --- a/.gitattributes +++ b/.gitattributes @@ -65,3 +65,6 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text .venv_haddock/lib/python3.12/site-packages/Bio/Cluster/_cluster.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text .venv_haddock/lib/python3.12/site-packages/freesasa.cpython-312-darwin.so filter=lfs diff=lfs merge=lfs -text .venv_haddock/lib/python3.12/site-packages/haddock/bin/haddock-restraints filter=lfs diff=lfs merge=lfs -text +.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_aarch64-linux filter=lfs diff=lfs merge=lfs -text +.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_arm64-darwin filter=lfs diff=lfs merge=lfs -text +.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_x86_64-linux filter=lfs diff=lfs merge=lfs -text diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._dna-rna_restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._dna-rna_restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._dna-rna_restraints.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flex_segment_back.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flex_segment_back.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flex_segment_back.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flex_segment_side.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flex_segment_side.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flex_segment_side.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flexauto-neighbors.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flexauto-neighbors.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._flexauto-neighbors.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._generate_dmso.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._generate_dmso.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._generate_dmso.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._generate_water.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._generate_water.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._generate_water.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._mdref.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._mdref.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._mdref.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._print_coorheader.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-all.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-all.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-all.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-alpha-beta.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-alpha-beta.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-alpha-beta.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-alpha.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-alpha.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._protein-ss-restraints-alpha.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_data.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_data.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_data.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_noes.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_noes.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_noes.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._read_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._restrain-ions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._restrain-ions.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._restrain-ions.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_inter.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_inter.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_inter.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_inter_final.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._scale_intra_only.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._setflags.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._setflags.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._setflags.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._symmultimer.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._symmultimer.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/._symmultimer.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/calc_free-ene.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/calc_free-ene.cns new file mode 100644 index 0000000000000000000000000000000000000000..0466f939be3a1b65c698e77621e36fbcd68e0174 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/calc_free-ene.cns @@ -0,0 +1,24 @@ +! calc_free-ene.cns +! Calculate the total energy of the separated components +! +! Script uses the store1 and store2 atom object, and COMP, REF and RMSD object +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +@MODULE:scale_intra_only.cns + +evaluate ($eintfree = 0.0) +@MODULE:flex_segment_back.cns +fix sele=(((attr store5 = 0) or resn ANI or resn DAN or resn XAN or resn SHA) and not name H* and not (resn WAT or resn HOH or resn TIP*)) end + +minimize powell nstep=100 drop=10.0 nprint=25 end +fix sele=(not all) end +energy end +evaluate ($eintfree = $bond + $angl + $impr + $dihe + $vdw + $elec) + +display FREE MOLECULES INTERNAL ENERGY = $eintfree diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..d23c8e64804060c61ff6aeea38925dc8e61dc8d6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/check_coordinates.cns @@ -0,0 +1,100 @@ +! check_coordinates.cns +! Check max/min coordinates for compatibility with PDB format +! +! *********************************************************************** +! * Copyright 2025 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($failure = false) + +!check for coordinates >9999.999 (max writable in PDB format) + +show max (x) (all) +evaluate ($maxcoor = $result) +show max (y) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +show max (z) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +if ($maxcoor gt 9999.999) then + evaluate ($failure = true) +end if + +!check for coordinates <-999.999 (min writable in PDB format) + +show min (x) (all) +evaluate ($mincoor = $result) +show min (y) (all) +if ($result lt $mincoor) then + evaluate ($maxcoor = $result) +end if +show min (z) (all) +if ($result lt $mincoor) then + evaluate ($mincoor = $result) +end if +if ($mincoor lt -999.999) then + evaluate ($failure = true) +end if + +!if problem detected try correcting it by centering the system around 4500,4500,4500 +!but only if no EM restraints are used + +if ($failure eq true) then + if ($data.flags.em eq false) then + + evaluate ($xc = 0.0) + evaluate ($yc = 0.0) + evaluate ($zc = 0.0) + show ave (x) (all) + evaluate ($xc = 4500 - $result) + show ave (y) (all) + evaluate ($yc = 4500 - $result) + show ave (z) (all) + evaluate ($zc = 4500 -$result) + + do (x = x + $xc) (all) + do (y = y + $yc) (all) + do (z = z + $zc) (all) + + evaluate ($failure = false) + evaluate ($maxcoor = -999) + evaluate ($mincoor = 9999) + !check again for coordinates >9999.999 (max writable in PDB format) + show max (x) (all) + evaluate ($maxcoor = $result) + show max (y) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + show max (z) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + if ($maxcoor gt 9999.999) then + evaluate ($failure = true) + end if + + !check for coordinates <-999.999 (min writable in PDB format) + show min (x) (all) + evaluate ($mincoor = $result) + show min (y) (all) + if ($result lt $mincoor) then + evaluate ($maxcoor = $result) + end if + show min (z) (all) + if ($result lt $mincoor) then + evaluate ($mincoor = $result) + end if + if ($mincoor lt -999.999) then + evaluate ($failure = true) + end if + end if +end if + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/cm-restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/cm-restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..7d10870287525ba4db37de66ab8ca7115ac9148f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/cm-restraints.cns @@ -0,0 +1,144 @@ +! cm-restraints.cns +! Define center-of-mass restraints between molecules +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +!define center of mass restraints between all molecules +!using distance restraints between CA, BB or N1 atoms with center averaging + +evaluate ($ncount = 0) + +! store original coordinates +do (refx = x) (all) +do (refy = y) (all) +do (refz = z) (all) + +while ($ncount < $data.ncomponents) loop nloop1 + evaluate ($ncount = $ncount +1) + evaluate ($dim_$ncount = 0.0) + + !orient molecule + coor orient sele=(segid $prot_segid_$ncount) end + + ! find dimensions + show max (x) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($xdim = $result) + show max (y) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($ydim = $result) + show max (z) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($zdim = $result) + show min (x) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($xdim = $xdim - $result) + show min (y) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($ydim = $ydim - $result) + show min (z) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($zdim = $zdim - $result) + + evaluate ($corr = max($xdim,$ydim)) + evaluate ($corr = max($corr,$zdim)) + + if ($data.cmtight eq false) then + ! use average of all three dimensions + evaluate ($dim_$ncount = ($xdim + $ydim + $zdim)/6.0) + else + ! use only the average of the smallest two dimensions + evaluate ($dim_$ncount = ($xdim + $ydim + $zdim - $corr)/4.0) + end if + + ! check if the molecule is a DNA + do (store6 = 0) (all) + do (store6 = 1) (segid $prot_segid_$ncount and tag) + show sum (store6) (all) + evaluate ($nresmol = $result) + do (store6 = 0) (all) + do (store6 = 1) (segid $prot_segid_$ncount and (resn DA or resn DC or resn DG or resn DT) and tag) + show sum (store6) (all) + if ($result eq $nresmol) then + ! we are dealing with DNA set dimension to 0 + evaluate ($dim_$ncount = 0.0) + end if + + ! check if the molecule is a small ligand + do (store6 = 0) (all) + do (store6 = 1) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + show sum (store6) (all) + if ($result eq 0) then + ! we are dealing with a ligand set dimension to 0 + evaluate ($dim_$ncount = 0.0) + end if + +end loop nloop1 + +! restore original coordinates +do (x = refx) (all) +do (y = refy) (all) +do (z = refz) (all) + +eval($nchain = 0) +do (store9 = 0) (all) +do (store9 = 1) (name CA or name BB or name N1) +while ($nchain < $data.ncomponents) loop nloop0 + eval($nchain = $nchain + 1) + show sum (store9) (segid $prot_segid_$nchain) + if ($result < 3) then + evaluate ($selat$nchain = 0 ) + else + evaluate ($selat$nchain = 1 ) + end if +end loop nloop0 + +eval($nchain1 = 0) +noe + class contact + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + if ($mol_shape_$nchain1 eq false) then + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + if ($mol_shape_$nchain2 eq false) then + if ($data.cmtight eq false) then + eval($cm_dist = $dim_$nchain1 + $dim_$nchain2) + else + eval($cm_dist = ($dim_$nchain1 + $dim_$nchain2)/2 ) + end if + if ($selat$nchain1 = 1) then + if ($selat$nchain2 = 1) then + assign (segid $prot_segid_$nchain1 and ( name CA or name BB or name N1 )) + (segid $prot_segid_$nchain2 and ( name CA or name BB or name N1 )) $cm_dist $cm_dist 1.0 + else + assign (segid $prot_segid_$nchain1 and ( name CA or name BB or name N1 )) + (segid $prot_segid_$nchain2) $cm_dist $cm_dist 1.0 + end if + else + if ($selat$nchain2 = 1) then + assign (segid $prot_segid_$nchain1) + (segid $prot_segid_$nchain2 and ( name CA or name BB or name N1 )) $cm_dist $cm_dist 1.0 + else + assign (segid $prot_segid_$nchain1) + (segid $prot_segid_$nchain2) $cm_dist $cm_dist 1.0 + end if + end if + end if + end loop nloop2 + end if + end loop nloop1 + + averaging contact center + scale contact $Data.kcm + sqconstant contact 1.0 + sqexponent contact 2 + soexponent contact 1 + rswitch contact 1.0 + sqoffset contact 0.0 + asymptote contact 2.0 + msoexponent contact 1 + masymptote contact -0.1 + mrswitch contact 1.0 +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/contactairs.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/contactairs.cns new file mode 100644 index 0000000000000000000000000000000000000000..aa8028ab7d3b40e56df692afec9eda66b1a45c68 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/contactairs.cns @@ -0,0 +1,27 @@ +! contactairs.cns +! Define ambiguous distance restraints between residues at interfaces +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +eval($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + for $id in id (tag and segid $prot_segid_$nchain1 + and (not (segid $prot_segid_$nchain1 or resn ANI or resn DAN or resn XAN + or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM) around 5.0)) loop defnoe1 + show (resid) (id $id) + evaluate ($inres = $result) + noe + assign (resid $inres and segid $prot_segid_$nchain1) + (byres (not (segid $prot_segid_$nchain1 or resn ANI or resn DAN or resn XAN + or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM) + and (segid $prot_segid_$nchain1) around 5.0)) 2.0 2.0 0.0 + end + end loop defnoe1 +end loop nloop1 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..5a9e07a042e08d15d5b98d859fa199151e7b4a43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/def_solv_param.cns @@ -0,0 +1,105 @@ +! def_solv_param.cns +! Define atomic solvation parameters +! Original valus taken from Fernandez-Recio et al. JMB 335:843 (2004) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($arofac = 6.26) +evaluate ($alifac = 1.27) +evaluate ($polfac = 2.30) + + +do (store1 = 0.0000) (all) +do (store1 = 0.0151 * $alifac) (name C*) +do (store1 = 0.0176 * $arofac) ((name CG* or name CD* or name CE* or name CH* or name CZ*) and (resn PHE or resn TYR or resn HIS or resn TRP)) +do (store1 = -0.0170 * $polfac) (name N*) +do (store1 = -0.0548 * $polfac) (name NT* or (name NZ* and resn LYS)) +do (store1 = -0.0273 * $polfac) (name NH* and resn ARG) +do (store1 = -0.0136 * $polfac) (name O*) +do (store1 = -0.0185 * $polfac) (name OG* or name OH) +do (store1 = -0.0299 * $polfac) ((name OD* and resn ASP) or (name OE* and resn GLU)) +do (store1 = 0.0112 * $polfac) (name S*) +do (store1 = 0.0022 * $polfac) ((name S* and attr charge = -0.3) or (name SD and resn MET)) +do (store1 = 0.0000) (name SHA) + +! +! CG parameters matched from the original terms +! +! Edesolv_aa +! ASP_cg = _________________________ +! ASA_cg +! +! ASA_cg and Edesol_aa calculated on a GGXGG peptide +! accuracy=0.0025, rh2o=1.4, delete H, sele=(resn X) +! +! e.g. BB bead alanine +! +! BB = CA + C + N + O +! ASA_cg = 176.4940 +! Edesolv_aa = -1.8889 +! +! ASP_cg = -0.0107 +! +! Charleen Don (2012), JR (2014), Jorge Roel (2017) +! +! + +do (store1 = 0.0000) (name BB or name SC*) +! Backbone beads +do (store1 = -0.0107) (name BB and resn ALA) +do (store1 = -0.0089) (name BB and resn GLY) +do (store1 = -0.0153) (name BB and resn ILE) +do (store1 = -0.0158) (name BB and resn VAL) +do (store1 = -0.0046) (name BB and resn PRO) +do (store1 = -0.0137) (name BB and resn ASN) +do (store1 = -0.0147) (name BB and resn GLN) +do (store1 = -0.0165) (name BB and resn THR) +do (store1 = -0.0154) (name BB and resn SER) +do (store1 = -0.0130) (name BB and resn MET) +do (store1 = -0.0167) (name BB and resn CYS) +do (store1 = -0.0126) (name BB and resn PHE) +do (store1 = -0.0134) (name BB and resn TYR) +do (store1 = -0.0134) (name BB and resn TRP) +do (store1 = -0.0169) (name BB and resn ASP) +do (store1 = -0.0150) (name BB and resn GLU) +do (store1 = -0.0155) (name BB and resn HIS) +do (store1 = -0.0163) (name BB and resn LYS) +do (store1 = -0.0162) (name BB and resn ARG) + +! Side-chain beads +!do (store1 = 0.0000) (name SC* and resn ALA) +!do (store1 = 0.0000) (name SC* and resn GLY) +do (store1 = 0.0255) (name SC* and resn ILE) +do (store1 = 0.0222) (name SC* and resn VAL) +do (store1 = 0.0230) (name SC* and resn PRO) +do (store1 = -0.0192) (name SC* and resn ASN) +do (store1 = -0.0135) (name SC* and resn GLN) +do (store1 = -0.0009) (name SC* and resn THR) +do (store1 = -0.0056) (name SC* and resn SER) +do (store1 = 0.0202) (name SC* and resn MET) +do (store1 = 0.0201) (name SC* and resn CYS) +do (store1 = 0.1005) (name SC* and resn PHE) +do (store1 = 0.0669) (name SC* and resn TYR) +do (store1 = 0.0872) (name SC* and resn TRP) +do (store1 = -0.0360) (name SC* and resn ASP) +do (store1 = -0.0301) (name SC* and resn GLU) +do (store1 = 0.0501) (name SC* and resn HIS) +do (store1 = -0.0210) (name SC* and resn LYS) +do (store1 = -0.0229) (name SC* and resn ARG) + +! Fake beads +do (store1 = 0.0) (name SCD* and resn ASN) +do (store1 = 0.0) (name SCD* and resn GLN) +do (store1 = 0.0) (name SCD* and resn SER) +do (store1 = 0.0) (name SCD* and resn THR) +do (store1 = 0.0) (name SCD* and resn ARG) +do (store1 = 0.0) (name SCD* and resn LYS) +do (store1 = 0.0) (name SCD* and resn GLU) +do (store1 = 0.0) (name SCD* and resn ASP) + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/dna-rna_restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/dna-rna_restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..feb27b3999cec077b4e20abd921dac061b7ded1f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/dna-rna_restraints.cns @@ -0,0 +1,424 @@ +! dna-rna_restraints.def +! Define backbone dihedral angles, hbonds and planarity restraints +! for nucleic acids +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: dna-rna_restraints.def +} +{+ description: Creates restraints to maintain conformation of DNA/RNA +} +{+ Additions and changes were made to allow for flexibility during docking +} +{+ comment:This file is to be read by refinement files that modify atom coordinates +} +{+ authors: Axel T. Brunger, and Paul D. Adams +} +{+ modified by Alexandre Bonvin and Marc van Dijk for HADDOCK use +} + +{============================================== base planarity =============================================} + +{* Restrain base planarity. This selection must only include nucleotide residues *} +evaluate ($dna_bases_planar=true) + +{=================================== sugar-pucker dihedral angle restraints ================================} + +{* Pick the dihedral angles of the sugar pucker from the input structure + and restrain them within the given error range *} +evaluate ($dna_pick_pucdih=true) + +{* dihedral C1'-C2'-C3'-C4' error range *} +evaluate ($error_nu2=0.0) +{* dihedral C5'-C4'-C3'-C2' error range *} +evaluate ($error_nu3=0.0) +{* dihedral C1'-O4'-C4'-C5' error range *} +evaluate ($error_nu4=0.0) + +{================================ phosphate backbone dihedral angle restraints =============================} + +{* Pick the dihedral angles of the phosphate backbone from the input structure and + restrain them within the given error range *} +evaluate ($dna_pick_bacdih=true) + +{* Error range for phosphate backbone dihedrals *} +{* alpha dihedral O3'-P-O5'-C5' error range *} +evaluate ($error_alpha=10.0) +{* beta dihedral P-O5'-C5'-C4' error range *} +evaluate ($error_beta=40.0) +{* gamma dihedral O5'-C5'-C4'-C3' error range *} +evaluate ($error_gamma=20.0) +{* delta dihedral C5'-C4'-C3'-O3' error range *} +evaluate ($error_delta=50.0) +{* epsilon dihedral C4'-C3'-O3'-P error range *} +evaluate ($error_eps=10.0) +{* zeta dihedral C3'-O3'-P-O5' error range *} +evaluate ($error_zeta=50.0) + + +{=========================================== Watson-Crick base pairs =======================================} + +{* automatically pick Watson-Crick restraint values from structure *} +evaluate ($dna_pick_wc=true) + +{* error range used for dna_pick_wc defined Watson-Crick restraints *} +evaluate ($wc_low=0.05) +evaluate ($wc_up=0.05) + + +{=========================================== Coarse-Grained ===========================================================} +{* Is the DNA/RNA molecule CG? *} +evaluate ($dna_cg=false) + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + + +{- find max and min residue numbers -} +evaluate ($min_resid = 99999) +evaluate ($max_resid = -99999) +show sum(1) ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) +if ( $result > 0 ) then + for $id in id ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) loop resid + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($min_resid = max($min_resid,$resid)) + evaluate ($max_resid = max($max_resid,$resid)) + end loop resid +end if + +{- the planarity restraints single bases -} +if ($dna_bases_planar=true) then + for $id in id ( tag and (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) ) loop plan + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) (id $id) + evaluate ($resid=decode($result)) + evaluate ($plweight = 20) + + restraints plane + group + selection=( segid $segid and resid $resid and + (resn T or resn C or resn G or resn A or resn U or + resn DT or resn DC or resn DG or resn DA) and + not (name c#' or name h#' or name h#'' or name o#p or + name h7# or name o#' or name p or name h#t or name o#t)) + weight=$plweight + end + end + end loop plan +end if + +{- Dihedral restraints for the sugar pucker -} + +if ($dna_pick_pucdih=true) then + show sum(1) ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) + if ( $result > 0 ) then + for $id in id ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + pick dihedral + ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name c2' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c4' ) + geometry + evaluatate ($dihedral_nu2=$result) + pick dihedral + ( segid $segid and resid $resid and name c5' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c2' ) + geometry + evaluatate ($dihedral_nu3=$result) + pick dihedral + ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name o4' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c5' ) + geometry + evaluatate ($dihedral_nu4=$result) + restraints dihedral + assign ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name c2' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c4' ) + 20.0 $dihedral_nu2 $error_nu2 2 + assign ( segid $segid and resid $resid and name c5' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c2' ) + 20.0 $dihedral_nu3 $error_nu3 2 + assign ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name o4' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c5' ) + 20.0 $dihedral_nu4 $error_nu4 2 + scale=20.0 + end + end loop resid + flags include cdih end + end if +end if + +{- Dihedral restraints for the phosphate backbone -} + +if ($dna_pick_bacdih=true) then + show sum(1) ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) + if ( $result > 0 ) then + evaluate ($resid=$min_resid) + evaluate ($nres=$max_resid - $min_resid + 1) + evaluate ($error_alpha=$error_alpha) + evaluate ($error_beta=$error_beta) + evaluate ($error_gamma=$error_gamma) + evaluate ($error_zeta=$error_zeta) + evaluate ($error_epsilon=$error_eps) + evaluate ($error_delta=$error_delta) + for $id in id ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + if ($resid > $min_resid) then + evaluate ($rprec = $resid - 1) + ! check if previous residue exists + show sum(1) ( resid $rprec and tag ) + if ( $result > 0 ) then + pick dihedral + ( segid $segid and resid $rprec and name O3' ) + ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + geometry + evaluatate ($dihedral_alpha=$result) + pick dihedral + ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + geometry + evaluatate ($dihedral_beta=$result) + restraint dihedral + ! alpha + assign ( segid $segid and resid $rprec and name O3' ) + ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + 1.0 $dihedral_alpha $error_alpha 2 + ! beta + assign ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + 1.0 $dihedral_beta $error_beta 2 + scale 200.0 + end + end if + end if + + pick dihedral + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + geometry + evaluatate ($dihedral_gamma=$result) + pick dihedral + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + geometry + evaluatate ($dihedral_delta=$result) + + restraints dihedral + ! gamma + assign ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + 1.0 $dihedral_gamma $error_gamma 2 + ! delta + assign ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + 1.0 $dihedral_delta $error_delta 2 + scale=200.0 + end + + if ($resid < $max_resid) then + evaluate ($rfoll = $resid + 1) + ! check if next residue exists + show sum(1) ( resid $rfoll and segid $segid and tag ) + if ( $result > 0 ) then + pick dihedral + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + geometry + evaluatate ($dihedral_epsilon=$result) + pick dihedral + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + ( segid $segid and resid $rfoll and name O5' ) + geometry + evaluatate ($dihedral_zeta=$result) + restraint dihedral + ! epsilon + assign ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + 1.0 $dihedral_epsilon $error_epsilon 2 + ! zeta + assign ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + ( segid $segid and resid $rfoll and name O5' ) + 1.0 $dihedral_zeta $error_zeta 2 + scale 200.0 + end + end if + end if + end loop resid + flags include cdih end + end if +end if + +{- Watson-Crick base pairing -} + +if ($dna_pick_wc = true) then + evaluate ($hbcut = 3.5) + ! We only to check for ADE and CYT + show sum(1) ( (resn DA or resn A or resn DC or resn C) and tag ) + if ( $result > 0 ) then + noe + class hres + averaging hres cent + potential hres square + sqconstant hres 1. + sqexponent hres 2 + scale hres 70. + end + for $id in id ( (resn DA or resn A or resn DC or resn C) and tag ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($presid=$resid-1) + evaluate ($fresid=$resid+1) + evaluate ($ares_name = none) + show ( resn ) (id $id) + evaluate ($ares=$result) + + if ( $ares = DA ) then + eval ($ares_name = ADE) + elseif ( $ares = A ) then + eval ($ares_name = ADE) + end if + + if ( $ares = DC ) then + eval ($ares_name = CYT) + elseif ( $ares = C ) then + eval ($ares_name = CYT) + end if + + if ($ares_name = ADE) then + show sum(1) ( ((resn DT or resn T or resn U) and not (resid $presid or resid $fresid) and name N3) + and (resid $resid and name N1) around $hbcut) + if ($result = 1) then + show (resid) ( ((resn DT or resn T or resn U) and not (resid $presid or resid $fresid) and name N3) + and (resid $resid and name N1) around $hbcut) + evaluate ($rpair = $result) + pick bond + (resid $resid and name N6) + (resid $rpair and name O4) + geometry + evaluate ($n6o4=$result) + pick bond + (resid $resid and name N1) + (resid $rpair and name N3) + geometry + evaluate ($n1n3=$result) + pick bond + (resid $resid and name N1) + (resid $rpair and name O4) + geometry + evaluate ($n1o4=$result) + pick bond + (resid $resid and name N1) + (resid $rpair and name O2) + geometry + evaluate ($n1o2=$result) + noe + assign (resid $resid and name N6) + (resid $rpair and name O4) + $n6o4 $wc_low $wc_up + assign (resid $resid and name N1) + (resid $rpair and name N3) + $n1n3 $wc_low $wc_up + assign (resid $resid and name N1) + (resid $rpair and name O4) + $n1o4 $wc_low $wc_up + assign (resid $resid and name N1) + (resid $rpair and name O2) + $n1o2 $wc_low $wc_up + end + end if + end if + + !find possible pairing for DC/C with DG/G + if ($ares_name = CYT) then + show sum(1) ( ((resn DG or resn G) and not (resid $presid or resid $fresid) and name N1) + and (resid $resid and name N3) around $hbcut) + if ($result = 1) then + show (resid) ( ((resn DG or resn G) and not (resid $presid or resid $fresid) and name N1) + and (resid $resid and name N3) around $hbcut) + evaluate ($rpair = $result) + pick bond + (resid $resid and name N3) + (resid $rpair and name N1) + geometry + evaluate ($n3n1=$result) + pick bond + (resid $resid and name N4) + (resid $rpair and name O6) + geometry + evaluate ($n4o6=$result) + pick bond + (resid $resid and name O2) + (resid $rpair and name N2) + geometry + evaluate ($o2n2=$result) + pick bond + (resid $resid and name N3) + (resid $rpair and name O6) + geometry + evaluate ($n3o6=$result) + pick bond + (resid $resid and name N3) + (resid $rpair and name N2) + geometry + evaluate ($n3n2=$result) + noe + assign (resid $resid and name N3) + (resid $rpair and name N1) $n3n1 $wc_low $wc_up + assign (resid $resid and name N4) + (resid $rpair and name O6) $n4o6 $wc_low $wc_up + assign (resid $resid and name O2) + (resid $rpair and name N2) $o2n2 $wc_low $wc_up + assign (resid $resid and name N3) + (resid $rpair and name O6) $n3o6 $wc_low $wc_up + assign (resid $resid and name N3) + (resid $rpair and name N2) $n3n2 $wc_low $wc_up + end + end if + end if + end loop resid + end if +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flex_segment_back.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flex_segment_back.cns new file mode 100644 index 0000000000000000000000000000000000000000..31bbdd34d3d1c84ce03a999d66f036b3903ae3aa --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flex_segment_back.cns @@ -0,0 +1,56 @@ +! flex_segment_back.cns +! Define the semi-flexible segments (both side-chains and backbone) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +do (store5 = 0) (all) +do (store6 = 0) (all) + +!first flexible segments for docking +evaluate($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate($nchain1 = $nchain1 + 1) + evaluate($nf=0) + + if ($nseg$nchain1 = 0) then + display NO FLEXIBLE SEGMENTS for molecule $nchain1 + else + if ($nseg$nchain1 < 0) then + display AUTOMATIC DEFINITION OF FLEXIBLE SEGMENTS BASED ON INTERMOLECULAR PROXIMITY FOR MOLECULE $nchain1 + inline @MODULE:flexauto-neighbors.cns + else + display FLEXIBLE SIDE-CHAINS SEGMENTS for molecule $nchain1 + while ($nf < $nseg$nchain1) loop Xflex + evaluate($nf=$nf + 1) + do (store5 = $nchain1) ( resid $seg_sta_$nchain1_$nf : $seg_end_$nchain1_$nf + and segid $prot_segid_$nchain1) + display FLEXIBLE SEGMENT NR $nf FROM $seg_sta_$nchain1_$nf TO $seg_end_$nchain1_$nf + end loop Xflex + end if + end if +end loop nloop1 + +!then fully flexible segments for all stages +display NO FLEXIBLE SEGMENTS for all molecule at this stage +if ($nfle = 0) then + display NO FULLY FLEXIBLE SEGMENTS +else + evaluate($nf=0) + while ($nf < $nfle) loop Xfflex + evaluate($nf=$nf + 1) + do (store5 = 1) ( resid $fle_sta_$nf : $fle_end_$nf and segid $fle_seg_$nf ) + display FULLY FLEXIBLE SEGMENT NR $nf FROM $fle_sta_$nf TO $fle_end_$nf FOR CHAIN $fle_seg_$nf + end loop Xfflex +end if + +do (store5 = 21) (resn WAT or resn HOH or resn TIP*) + +do (store1 = 0) (all) +do (store1 = 1) ((resn WAT or resn HOH or resn TIP*) and name OH2) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flex_segment_side.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flex_segment_side.cns new file mode 100644 index 0000000000000000000000000000000000000000..b4985e3523a183a197a5e0f225bbb4b0e1393d58 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flex_segment_side.cns @@ -0,0 +1,47 @@ + +!first flexible segments for docking +evaluate($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate($nchain1 = $nchain1 + 1) + evaluate($nf=0) + if ($nseg$nchain1 = 0) then + display NO FLEXIBLE SIDE-CHAINS SEGMENTS for molecule $nchain1 + else + if ($nseg$nchain1 < 0) then + display AUTOMATIC DEFINITION OF FLEXIBLE SEGMENTS BASED ON INTERMOLECULAR PROXIMITY FOR MOLECULE $nchain1 + inline @MODULE:flexauto-neighbors.cns + do (store5 = 0) (name CA or name BB or name C or name N or name O) + else + display FLEXIBLE SIDE-CHAINS SEGMENTS for molecule $nchain1 + while ($nf < $nseg$nchain1) loop Xflex + evaluate($nf=$nf + 1) + do (store5 = $nchain1) ( resid $seg_sta_$nchain1_$nf : $seg_end_$nchain1_$nf + and segid $prot_segid_$nchain1 + and not(name CA or name BB or name C or name N or name O) ) + display FLEXIBLE SIDE-CHAINS SEGMENT NR $nf FROM $seg_sta_$nchain1_$nf TO $seg_end_$nchain1_$nf + end loop Xflex + end if + end if +end loop nloop1 + +!then fully flexible segments for all stages + +!then fully flexible segments for all stages +display NO FLEXIBLE SEGMENTS for all molecule at this stage +if ($nfle = 0) then + display NO FULLY FLEXIBLE SEGMENTS +else + evaluate($nf=0) + while ($nf < $nfle) loop Xfflex + evaluate($nf=$nf + 1) + do (store5 = 1) ( resid $fle_sta_$nf : $fle_end_$nf and segid $fle_seg_$nf ) + display FULLY FLEXIBLE SEGMENT NR $nf FROM $fle_sta_$nf TO $fle_end_$nf FOR CHAIN $fle_seg_$nf + end loop Xfflex +end if + +do (store5 = 21) (resn WAT or resn HOH or resn TIP*) + +do (store1 = 0) (all) +do (store1 = 1) ((resn WAT or resn HOH or resn TIP*) and name OH2) +show sum (store1) ((resn WAT or resn HOH or resn TIP*)) + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flexauto-neighbors.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flexauto-neighbors.cns new file mode 100644 index 0000000000000000000000000000000000000000..f3fe74b83b0aa2a99d80a117239d87e052648b11 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/flexauto-neighbors.cns @@ -0,0 +1,42 @@ +! flexauto-neighbors.cns +! Automatic definition of flexible segments for docking for contacting residues +! including neighboring residues of residues making contacts +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +evaluate ($flcut = 5.0) + +do (store5 = $nchain1) (byres (segid $prot_segid_$nchain1 + and (not (segid $prot_segid_$nchain1 or resn SHA)) around $flcut)) + +do (store6 = 0) (segid $prot_segid_$nchain1) +for $id in id (tag and attr store5 >0 and not ((resn WAT or resn HOH or resn TIP*) or resn DMSO) and segid $prot_segid_$nchain1) loop flexres1 + show (resid) (id $id) + evaluate ($inres = decode($result)) + evaluate ($preres = $inres) + evaluate ($nexres = $inres) + evaluate ($preres = $preres - 1) + do (store6 = $nchain1) (resid $preres and segid $prot_segid_$nchain1) + do (store6 = $nchain1) (resid $nexres and segid $prot_segid_$nchain1) +end loop flexres1 + +do (store5 = store6) (segid $prot_segid_$nchain1) + +display THE FOLLOWING RESIDUES HAVE BEEN DEFINED AS FLEXIBLE for molecule $nchain1 +for $id in id (tag and attr store5 >0 and not ((resn WAT or resn HOH or resn TIP*) or resn DMSO) and segid $prot_segid_$nchain1) loop flexres2 + show (resid) (id $id) + evaluate ($inres = $result) + show (resn) (id $id) + evaluate ($nares = $result) + show (segid) (id $id) + evaluate ($seres = $result) + display AUTOMATICALLY SELECTED SEGMENT: $nares,$inres,$seres +end loop flexres2 + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/generate_dmso.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/generate_dmso.cns new file mode 100644 index 0000000000000000000000000000000000000000..2acdf950614511fcaac33db9ab7fa54cd478b947 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/generate_dmso.cns @@ -0,0 +1,121 @@ +! generate_dmso.cns +! Generate a DMSO solvent layer around the molecule +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +eval ($boxlength = 29.1) ! length of the dmso box +eval ($thickness = 12.5) ! maxi. initial dmso-protein distance (heavy atoms) +eval ($pw_dist = 2.4) ! mini. initial dmso-protein distance (heavy atoms) +eval ($dmso_diam = 4.1) ! diameter of dmso molecule +eval ($dyncount = 1) ! iteration number (usually 1) + +eval ($dmso = "DMS" + encode($dyncount)) + +!-------------------------------------------------- +! read in the same box of dmso several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + +show max (x) ((not resn dms) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($xmax = $result) +show min (x) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($xmin = $result) + +show max (y) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($ymax = $result) +show min (y) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($ymin = $result) + +show max (z) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($zmax = $result) +show min (z) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($zmin = $result) + + +! loop over several iterations of dmso filling and dynamics + + +!-------------------------------------------------- +! read in the same box of dmso several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + + +! determine how many boxes are necessary in each dimension +eval ($xbox = int( ($xmax - $xmin + 2 * ($thickness + $dmso_diam)) / $boxlength + 0.5)) +eval ($ybox = int( ($ymax - $ymin + 2 * ($thickness + $dmso_diam)) / $boxlength + 0.5)) +eval ($zbox = int( ($zmax - $zmin + 2 * ($thickness + $dmso_diam)) / $boxlength + 0.5)) + +eval ($xmtran = $xmax + $thickness - $boxlength/2 + $dmso_diam) +eval ($ymtran = $ymax + $thickness - $boxlength/2 + $dmso_diam) +eval ($zmtran = $zmax + $thickness - $boxlength/2 + $dmso_diam) + +eval ($xcount=0) +eval ($xtrans = $xmin - $thickness - $dmso_diam - $boxlength ) +while ($xtrans < $xmtran) loop dms1 + eval ($xcount=$xcount+1) + eval ($xtrans = $xtrans + $boxlength) + + eval ($ycount=0) + eval ($ytrans = $ymin - $thickness - $dmso_diam - $boxlength ) + while ($ytrans < $ymtran) loop dms2 + eval ($ycount=$ycount+1) + eval ($ytrans = $ytrans + $boxlength) + + eval ($zcount=0) + eval ($ztrans = $zmin - $thickness - $dmso_diam - $boxlength ) + while ($ztrans < $zmtran) loop dms3 + eval ($zcount=$zcount+1) + eval ($ztrans = $ztrans + $boxlength) + + segment + name=" " + chain + coordinates @@TOPPAR:dmso.pdb + end + end + coor @@TOPPAR/dmso.pdb + do (segid=DMSO) (segid " ") + coor sele=(segid DMSO) translate vector = ($xtrans $ytrans $ztrans) end + + ! all new dmso oxygens + ident (store1) (segid DMSO and name sd) + ! all new dmso oxygens close to a protein heavy atom + ident (store2) (store1 and (not (resn DMS or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $pw_dist) + ! all new dmso oxygens close to old dmso oxygens + ident (store3) (store1 and (segid DMS# and not hydro) around $dmso_diam) + ! all new dmso oxygens further than thickness away from a protein heavy atom + ident (store4) (store1 and not (not (resn DMS or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness) + delete sele= (byres (store2 or store3 or store4)) end + + + ! give dmso unique segid name + eval ($segid= "W" + encode($xcount) + encode($ycount) + encode($zcount)) + do (segid = $segid) (segid DMSO) + + end loop dms3 + end loop dms2 +end loop dms1 + +! now, give dmso a unique resid so that we get the segid to play around with +ident (store1) (all) +show min (store1) (segid w*) +do (store1 = store1 - $result + 1) (segid w*) +do (resid = encode(int(store1/3 -0.1) +1)) (segid w* and not segid DMS#) +do (segid = $dmso) (segid w* and not segid DMS#) + +! shave off any dmso that left +delete sele= (byres (name sd and not (not (resn DMS or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness)) end + +{* write out initial coordinates just for testing *} +!evaluate ($filename=$output_pdb_filename - ".pdb" + "wini.pdb") +!write coordinates sele= (all) output =$filename end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/generate_water.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/generate_water.cns new file mode 100644 index 0000000000000000000000000000000000000000..3590ca25a9294d764d8b146cb1727408179b3b93 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/generate_water.cns @@ -0,0 +1,122 @@ +! generate_water.cns +! Generate a water solvent layer around the molecule +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +eval ($boxlength = 18.856) ! length of Brooks' water box +eval ($thickness = 8) ! maxi. initial water-protein distance (heavy atoms) +eval ($pw_dist = 2.4) ! mini. initial water-protein distance (heavy atoms) +eval ($water_diam = 2.4) ! diameter of water molecule +eval ($dyncount = 21) ! for water segid (max number of molecules + 1) + +eval ($water = "WA" + encode($dyncount)) + +!-------------------------------------------------- +! read in the same box of water several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + +show max (x) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($xmax = $result) +show min (x) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($xmin = $result) + +show max (y) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($ymax = $result) +show min (y) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($ymin = $result) + +show max (z) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($zmax = $result) +show min (z) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($zmin = $result) + + +! loop over several iterations of water filling and dynamics + +!-------------------------------------------------- +! read in the same box of water several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + + +! determine how many boxes are necessary in each dimension +eval ($xbox = int( ($xmax - $xmin + 2 * ($thickness + $water_diam)) / $boxlength + 0.5)) +eval ($ybox = int( ($ymax - $ymin + 2 * ($thickness + $water_diam)) / $boxlength + 0.5)) +eval ($zbox = int( ($zmax - $zmin + 2 * ($thickness + $water_diam)) / $boxlength + 0.5)) + +eval ($xmtran = $xmax + $thickness - $boxlength/2 + $water_diam) +eval ($ymtran = $ymax + $thickness - $boxlength/2 + $water_diam) +eval ($zmtran = $zmax + $thickness - $boxlength/2 + $water_diam) + +eval ($xcount=0) +eval ($xtrans = $xmin - $thickness - $water_diam - $boxlength/2 ) +while ($xtrans < $xmtran) loop wat1 + eval ($xcount=$xcount+1) + eval ($xtrans = $xtrans + $boxlength) + + eval ($ycount=0) + eval ($ytrans = $ymin - $thickness - $water_diam - $boxlength/2 ) + while ($ytrans < $ymtran) loop wat2 + eval ($ycount=$ycount+1) + eval ($ytrans = $ytrans + $boxlength) + + eval ($zcount=0) + eval ($ztrans = $zmin - $thickness - $water_diam - $boxlength/2 ) + while ($ztrans < $zmtran) loop wat3 + eval ($zcount=$zcount+1) + eval ($ztrans = $ztrans + $boxlength) + segment + name=" " + chain + coordinates @@TOPPAR:boxtyp20.pdb + end + end + coor @@TOPPAR:boxtyp20.pdb + do (segid=W000) (segid " ") + coor sele=(segid W000) translate vector = ($xtrans $ytrans $ztrans) end + + ! all new water oxygens + ident (store1) (segid W000 and name OH2) + ! all new water oxygens close to a protein heavy atom + ident (store2) (store1 and (not (resn WAT or resn HOH or resn TIP* + or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $pw_dist) + ! all new water oxygens close to old water oxygens + ident (store3) (store1 and (segid wat# and not hydro) around $water_diam) + ! all new water oxygens further than thickness away from a protein heavy atom + ident (store4) (store1 and not (not (resn WAT or resn HOH or resn TIP* + or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness) + delete sele= (byres (store2 or store3 or store4)) end + + ! give waters unique segid name + eval ($segid= "W" + encode($xcount) + encode($ycount) + encode($zcount)) + do (segid = $segid) (segid W000) + + end loop wat3 + end loop wat2 +end loop wat1 + +! now, give waters a unique resid so that we get the segid to play around with +ident (store1) (all) +show min (store1) (segid w*) +do (store1 = store1 - $result + 1) (segid w*) +do (resid = encode(int(store1/3 -0.1) +1)) (segid w* and not segid wat#) +do (segid = $water) (segid w* and not segid wat#) + +! shave off any waters that left +delete sele= (byres (name oh2 and segid W* and + not (not (resn WAT or resn HOH or resn TIP* + or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness)) end + +{* write out initial coordinates just for testing *} +!evaluate ($filename=$output_pdb_filename - ".pdb" + "wini.pdb") +!write coordinates sele= (all) output =$filename end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/mdref.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/mdref.cns new file mode 100644 index 0000000000000000000000000000000000000000..0c6a365a5d670322dc905723e02100df3df102fd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/mdref.cns @@ -0,0 +1,616 @@ +! mdref.cns +! Perform an explitic solvent (water or dmso) refinement +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + +!==================================================================! +! Initialisation of variables +!==================================================================! + +evaluate ($saprotocol.timestep=$timestep) +evaluate ($saprotocol.fbeta=100) +evaluate ($saprotocol.mass=100) + +evaluate ($ini_count =1) + +evaluate ($data.ncomponents=$ncomponents) + + +! non-bonded parameter set to use +evaluate ($toppar.par_nonbonded = "OPLSX") + + +! dihedrals, DNA and distance restraints +evaluate ($Data.dnarest =$dnarest_on) +evaluate ($Data.flags.cdih =$dihedrals_on) +evaluate ($Data.cdih.on =$dihedrals_on) +evaluate ($Data.ssdihed =$ssdihed) +evaluate ($Data.error_dih =$error_dih) +evaluate ($data.dihedrals.on=$dihedrals_on) +evaluate ($data.dihedrals_scale=$dihedrals_scale) + +! planarity restraints +evaluate ($Data.flags.plan = false) + +! distance restraints +evaluate ($Data.flags.noe = true) +evaluate ($data.randremoval=$randremoval) +evaluate ($data.npart=$npart) + +evaluate ($data.ambig_scale=$ambig_scale) +evaluate ($data.unambig_scale=$unambig_scale) +evaluate ($data.hbond_scale=$hbond_scale) + +evaluate ($data.cmrest=$cmrest) +evaluate ($data.cmtight=$cmtight) +evaluate ($data.kcm=$kcm) +evaluate ($data.contactairs=$contactairs) +evaluate ($data.kcont=$kcont) +if ($data.contactairs eq true) then + evaluate ($data.randremoval = false) +end if + +! NCS restraints +evaluate ($data.kncs = $kncs) +evaluate ($Data.flags.ncs = $ncs_on) +evaluate ($data.nncs = $nncs) + +! Symmetry restraints +evaluate ($data.ksym = $ksym) +evaluate ($Data.flags.sym = $sym_on) +evaluate ($data.nc2sym = $nc2sym) +evaluate ($data.nc3sym = $nc3sym) +evaluate ($data.ns3sym = $ns3sym) +evaluate ($data.nc4sym = $nc4sym) +evaluate ($data.nc5sym = $nc5sym) +evaluate ($data.nc6sym = $nc6sym) + +!Electrostatics: +evaluate ($Data.flags.dihed =$dihedflag) +evaluate ($Data.flags.elec =$elecflag) +evaluate ($Data.epsilon =$epsilon) +evaluate ($Data.dielec =$dielec) + +!Interaction matrix: +evaluate ($nmol1=1) +while ($nmol1 <=$data.ncomponents) loop mol1 + evaluate ($nmol2=$nmol1 + 1) + evaluate ($scale.int_$nmol1_$nmol1 =$int_$nmol1_$nmol1) + while ($nmol2 <=$data.ncomponents) loop mol2 + evaluate ($scale.int_$nmol1_$nmol2 =$int_$nmol1_$nmol2) + evaluate ($scale.int_$nmol2_$nmol1 =$int_$nmol1_$nmol2) + evaluate ($nmol2=$nmol2 + 1) + end loop mol2 + evaluate ($nmol1 = $nmol1 + 1) +end loop mol1 + + +! Unsupported restraints +evaluate ($Data.flags.em = false) +evaluate ($Data.flags.rg = false) +evaluate ($Data.flags.zres = false) +evaluate ($Data.flags.sani = false) +evaluate ($Data.flags.xrdc = false) +evaluate ($Data.flags.xpcs = false) +evaluate ($Data.flags.dani = false) +evaluate ($Data.flags.vean = false) + +! Other parameters +evaluate ($refine.keepwater = false) +evaluate ($refine.keepwater=$keepwater) +evaluate ($refine.solvent=$solvent) +evaluate ($refine.heatsteps=$waterheatsteps) +evaluate ($refine.steps=$watersteps) +evaluate ($refine.coolsteps=$watercoolsteps) + +!==================================================================! + +{* Read paramters and set various force field related variables *} + +@MODULE:read_param.cns + +parameter + bond (resn WAT ) (resn WAT ) 1000 TOKEN + angle (resn WAT ) (resn WAT ) (resn WAT ) 500 TOKEN + bond (resn HOH ) (resn HOH ) 1000 TOKEN + angle (resn HOH ) (resn HOH ) (resn HOH ) 500 TOKEN + bond (resn TIP*) (resn TIP*) 1000 TOKEN + angle (resn TIP*) (resn TIP*) (resn TIP*) 500 TOKEN +end + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1 end + interaction (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) + (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) weight * 1 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0 end +end + +flag include bond angle impr vdw end + +if ($Data.flags.dihed eq true) then + flag include dihed end +end if + +if ($Data.flags.elec eq true) then + flag include elec end + if ($Data.dielec eq "rdie") then + parameter nbonds eps=$Data.epsilon rdie shift switch end end + ! shift statement needed first to activate switch (CNS bug?) + else + parameter nbonds eps=$Data.epsilon cdie end end + end if + parameter nbonds ? end end +else + evaluate ($elec=0.0) + flag exclude elec end +end if + +coor copy end + +topology @@TOPPAR:solvent-allhdg5-4.top end + +if ($refine.solvent = "water") then + do (segid = "PROT") (segid " ") + @MODULE:generate_water.cns + do (segid = " ") (segid "PROT") +elseif ($refine.solvent = "dmso") then + do (segid = "PROT") (segid " ") + @MODULE:generate_dmso.cns + do (segid = " ") (segid "PROT") +end if + + +{* Read the distance restraints ================================ *} +set seed $seed end +set message=normal echo=on end +inline @MODULE:read_data.cns + +! random removal of restaints +if ($Data.randremoval eq true) then + noe cv $npart ? end +end if + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + + +evaluate ($numnoe = 0) + +!Make sure that at least as many distance restraints are successfully +!read as the number of partitions for cross-validation +evaluate ($numnoe = 999) +noe ? end +if ($NUMNOE = 0) then + evaluate ($Data.npart = 1) + evaluate ($Data.randremoval = FALSE) +end if + +if ($NUMNOE lt $Data.npart) then + noe part=1 end + evaluate ($Data.npart = 1) + evaluate ($Data.randremoval = FALSE) +end if + +noe + averaging * sum + potential * soft + scale * 1.0 + scale ambi $ambig_scale + scale dist $unambig_scale + scale hbon $hbond_scale + sqconstant * 1.0 + sqexponent * 2 + soexponent * 1 + rswitch * 0.5 + sqoffset * 0.0 + asymptote * 0.1 + msoexponent * 1 + masymptote * -0.1 + mrswitch * 0.5 +end + +{* set the energy flags ======================================================== *} + +inline @MODULE:setflags.cns + + +{* Check for other restraints ================================================== *} + +@MODULE:symmultimer.cns + +if ($Data.cmrest eq true ) then + @MODULE:cm-restraints.cns +end if + +if ($Data.contactairs eq true ) then + @MODULE:contactairs.cns +end if + +if ($Data.dnarest eq true ) then + @MODULE:dna-rna_restraints.cns +end if + +if ($Data.ssdihed eq "all" ) then + inline @MODULE:protein-ss-restraints-all.cns +end if +if ($Data.ssdihed eq "alpha" ) then + inline @MODULE:protein-ss-restraints-alpha.cns +end if +if ($Data.ssdihed eq "alphabeta" ) then + inline @MODULE:protein-ss-restraints-alpha-beta.cns +end if + + +{* Check for the presence of ions and add distance restraints / covalent bond == *} + +@MODULE:restrain-ions.cns + + +{* Energy minimisation of solvent first ============================================= *} + +! fix everything except the solvent for initial minimization +fix sele = (not (resn WAT or resn HOH or resn TIP* or resn DMS)) end + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=100 end +end if + + +{* Energy minimisation with harmonic restraints on the molecules ==================== *} + +fix sele = (not all) end + +! fix the shape +fix sele = (resn SHA) end + +! fix rigid molecules +evaluate($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate($nchain1 = $nchain1 + 1) + evaluate($fcounter=0) + if ($nseg$nchain1 = 0) then + display NO FLEXIBLE SIDE-CHAINS SEGMENTS for molecule $nchain1 + display FIXING IT + fix sele = (segid $prot_segid_$nchain1 and not name H*) end + end if +end loop nloop1 + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +! Define harmonic restraints on heavy atoms of molecules +restraints harmonic + exponent = 2 +end +do (harm = 0) (all) +do (harm = 5) (not name h* and not (resn WAT or resn HOH or resn TIP* or resn DMS)) + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn SHA)) (not (resn ANI or resn DAN or resn XAN or resn SHA)) weight * 1 end + interaction (resn ANI or resn DAN or resn XAN) + (resn ANI or resn DAN or resn XAN) weight * 1 vdw 0.0 elec 0.0 end +end + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=10 end +end if + + +{* MD refinement with harmonic restraints on the molecules ==================== *} + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +! Define harmonic restraints on heavy atoms of molecules +do (harm = 0) (all) +do (harm = 5) (not name h* and not resn ANI and not resn DAN and not resn XAN and not (resn WAT or resn HOH or resn TIP3)) +do (harm = 20) (resn ANI and name OO) +do (harm = 20) (resn DAN and name OO) + +! Remove harmonic restraints on interface side-chains +@MODULE:flex_segment_side.cns +eval ($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval ($nchain1=$nchain1+1) + do (harm = 0) (attribute store5 = $nchain1 and + not ( name CA or name BB or name C or name N or name P or name C# or name C## )) +end loop nloop1 + + +! Start MD refinement + +do (mass =$Saprotocol.mass) (all) +do (mass=1000) (resn ANI or resn DAN or resn XAN) +do (fbeta = 0) (all) +do (fbeta = $Saprotocol.fbeta {1/ps} ) ( all ) + +! heat to 300 K +for $bath in (100 200 300) loop heat + + do (vx=maxwell($bath)) (all) + do (vy=maxwell($bath)) (all) + do (vz=maxwell($bath)) (all) + + dynamics cartesian + nstep=$refine.heatsteps timest=0.002{ps} + temperature=$bath tcoupling = true + nprint=50 + end + +end loop heat + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +!define weaker harmonic restraints on heavy atoms of molecules +do (harm = 0) (all) +do (harm = 1) (not name h* and not resn ANI and not resn DAN and not resn XAN and not (resn WAT or resn HOH or resn TIP3)) + +!define flexible segments and remove harmonic restraints on backbone + side-chains of interface +@MODULE:flex_segment_back.cns +eval ($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval ($nchain1=$nchain1+1) + do (harm = 0) (attribute store5 = $nchain1) +end loop nloop1 +do (harm = 20) (resn ANI and name OO) +do (harm = 20) (resn DAN and name OO) + +! MD refinement +dynamics cartesian + nstep=$refine.steps timest=0.002{ps} + temperature=$bath tcoupling = true + nprint=50 +end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +! Define weak harmonic restraints on backbone only of molecules +do (harm = 0) (all) +do (harm = 1) (name CA or name BB or name C or name N or name P or name C# or name C##) +! Remove harmonic restraints on interface side-chains +@MODULE:flex_segment_side.cns +eval ($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval ($nchain1=$nchain1+1) + do (harm = 0) (attribute store5 = $nchain1) +end loop nloop1 +do (harm = 20) (resn ANI and name OO) +do (harm = 20) (resn DAN and name OO) + + +! cooling phase +for $bath in (300 200 100) loop cool + + dynamics cartesian + nstep=$refine.coolsteps timest=0.002{ps} + temperature=$bath tcoupling = true + nprint=50 + end + +end loop cool + + +! final minimization without harmonic restraints + +flag excl harm end + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=10 end +end if + + +{* ======================= calculate free molecules internal energy *} + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM)) + (not (resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM)) weight * 1 end +end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +fix sele=(resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DMS) end + +flag excl noe dani sani vean xrdc xpcs coll cdih zhar end +flag include bond angle dihe impr vdw end + +evaluate ($elec = 0.0) +evaluate ($eintfree = 0.0) +if ($Data.flags.elec eq true) then + flag include elec end +end if + +if ($Data.dielec eq "rdie") then + parameter nbonds eps=$Data.epsilon rdie shift switch end end + ! shift statement needed first to activate switch (CNS bug?) +else + parameter nbonds eps=$Data.epsilon cdie end end +end if +parameter nbonds ? end end +inline @MODULE:calc_free-ene.cns + +fix sele=(not all) end + +do (x = refx) (all) +do (y = refy) (all) +do (z = refz) (all) + + +{* ===================== calculate complex internal energy *} + +evaluate ($kinter = 1.0) +flag include bond angle dihe impr vdw end +energy end + +@MODULE:scale_intra_only.cns + +evaluate ($elec = 0.0) +evaluate ($eintcplx = 0.0) +if ($Data.flags.elec eq true) then + flag include elec end +end if + +energy end + +evaluate ($eintcplx = $bond + $angl + $impr + $dihe + $vdw + $elec) +evaluate ($ebond = $bond) +evaluate ($eangl= $angl) +evaluate ($eimpr= $impr) +evaluate ($edihe= $dihe) + +evaluate ($result=0) +print thres=0.05 bonds +evaluate ($rms_bonds=$result) +evaluate ($result=0) +print thres=5. angles +evaluate ($rms_angles=$result) +evaluate ($result=0) +print thres=5. impropers +evaluate ($rms_impropers=$result) +evaluate ($result=0) +print thres=30. dihedrals +evaluate ($rms_dihedrals=$result) + + +{* ===================== calculate final energies and write structure *} +evaluate ($cdih=0.0) +flag incl noe cdih end +if ($Data.ncomponents > 1) then + evaluate ($kinter = 1.0) + @MODULE:scale_inter_final.cns +else + @MODULE:scale_intra_only.cns +end if + +noe + scale dist $Data.unambig_scale + scale ambi $Data.ambig_scale + scale hbon $Data.hbond_scale + scale symm 0.0 + scale cont 0.0 +end +energy end +evaluate ($eair= $noe) + +evaluate ($esym = 0.0) +evaluate ($ncs = 0.0) +evaluate ($zhar = 0.0) +evaluate ($rms_test_noe = 0.0) +evaluate ($violations_test_noe = 0) +if ($Data.flags.sym eq true) then + ! calculatee first the symmetry energy + noe reset nres= 1200000 end + @MODULE:symmultimer.cns + noe + scale symm $Data.ksym + end + energy end + evaluate ($esym = $noe) + noe reset end + set seed=$seed end + !read back all the distance restraints: + @@MODULE:read_noes.cns + !random removal of restaints + if ($Data.randremoval eq true) then + noe cv $npart ? end + end if + noe + scale dist $Data.unambig_scale + scale ambi $Data.ambig_scale + scale hbon $Data.hbond_scale + end + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) + if ($Data.randremoval eq true) then + evaluate ($rms_test_noe=$test_rms) + evaluate ($violations_test_noe=$test_violations) + end if +else + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) + if ($Data.randremoval eq true) then + evaluate ($rms_test_noe=$test_rms) + evaluate ($violations_test_noe=$test_violations) + end if +end if + +if ($Data.dnarest eq true ) then + @MODULE:dna-rna_restraints.cns +end if + +energy end +evaluate ($etot = $ener - $noe) +evaluate ($noe = $eair) +evaluate ($etot = $etot + $noe) + +inline @MODULE:print_coorheader.cns + + +{* determine whether the final models should be reoriented along their principal *} +{* axes before writing to file ================================================= *} +eval($reorient = true) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop orientmol + evaluate ($ncount = $ncount + 1) + eval($watersegname_$ncount="WA" + encode($ncount)) + if ($mol_fix_origin_$ncount eq true) then + eval($reorient = false) + end if +end loop orientmol + +if ($reorient = true) then + coor sele= (not name H* and not resn ANI and not resn XAN and not resn DAN) orient end +end if + +inline @MODULE:check_coordinates.cns + +if ($failure eq true) then + evaluate ($failfile = $output_pdb_filename - ".pdb" + ".fail") + set display=$failfile end + display "MAX/MIN possible coordinates exceeded - stopping" + close $failfile end + stop +else + write coordinates sele=(not (resn WA* or resn HOH or resn TIP* or resn DMS)) format=pdbo output=$output_pdb_filename end +end if + +if ($refine.keepwater eq true) then + evaluate ($filename= $output_pdb_filename - ".pdb" + "_solvent.pdb") + write coordinates sele=(all) format=pdbo output=$filename end +end if + +set message=normal echo=on end + +display OUTPUT: $output_pdb_filename + +stop + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..1a06f68f63b409e44be920b6dada5a05ff1e762f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/print_coorheader.cns @@ -0,0 +1,308 @@ +! print_coorheader.cns +! Generate the coordinate header (REMARKS) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +if ($Data.flags.dihed eq false) then evaluate ($dihe = 0) end if +if ($Data.flags.sani eq false) then evaluate ($sani = 0) end if +if ($Data.flags.xrdc eq false) then evaluate ($xrdc = 0) end if +if ($Data.flags.xpcs eq false) then evaluate ($xpcs = 0) end if +if ($Data.flags.dani eq false) then evaluate ($dani = 0) end if +if ($Data.flags.vean eq false) then evaluate ($vean = 0) end if +if ($Data.flags.cdih eq false) then evaluate ($cdih = 0) end if +if ($Data.flags.noe eq false) then evaluate ($noe = 0) end if +if ($Data.flags.rg eq false) then evaluate ($coll = 0) end if +if ($Data.flags.zres eq false) then evaluate ($zhar = 0) end if +if ($Data.flags.em eq false) then evaluate ($lcc = 0) end if + +evaluate($enerall=$etot) +evaluate($bondall=$ebond) +evaluate($anglall=$eangl) +evaluate($imprall=$eimpr) +evaluate($diheall=$edihe) +evaluate($vdwall=$vdw) +evaluate($elecall=$elec) +evaluate($noeall=$noe) +evaluate($rgall=$coll) +evaluate($zresall=$zhar) +evaluate($cdihall=$cdih) +evaluate($coupall=0) +evaluate($saniall=$sani+$xrdc) +evaluate($veanall=$vean) +evaluate($xpcsall=$xpcs) +evaluate($daniall=$dani) + +if ($Data.flags.sym eq true) then + evaluate ($result=0) + evaluate ($violations=0) + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) +end if + +if ($Data.randremoval eq false) then + evaluate ($violations_test_noe= 0) + evaluate ($rms_test_noe = 0) + evaluate ($npart = 0) +end if + +evaluate ($result=0) +evaluate ($violations=0) +print threshold=5. cdih +evaluate ($rms_cdih=$result) +evaluate ($violations_cdih=$violations) +evaluate ($result=0) +evaluate ($violations=0) +evaluate ($rms_coup = 0) +evaluate ($violations_coup = 0) + +evaluate( $rms_sani = 0) +evaluate( $violations_sani = 0) +if ($Data.flags.sani eq TRUE) then + sani print threshold = 0.20 class rd* end + evaluate( $rms_sani = $result) + evaluate( $violations_sani = $violations) +end if + +evaluate( $rms_xrdc = 0) +evaluate( $violations_xrdc = 0) +if ($Data.flags.xrdc eq TRUE) then + xrdc print threshold = 0.2 class xr* end + evaluate( $rms_xrdc = $result) + evaluate( $violations_xrdc = $violations) +end if + +evaluate( $violations_sani = $violations_sani + $violations_xrdc) +evaluate( $rms_sani = $rms_sani + $rms_xrdc) + +evaluate( $rms_xpcs = 0) +evaluate( $violations_xpcs = 0) +if ($Data.flags.xpcs eq TRUE) then + xpcs print threshold = 0.2 class pc* end + evaluate( $rms_xpcs = $result) + evaluate( $violations_xpcs = $violations) +end if + +evaluate( $rms_vean = 0) +evaluate( $violations_vean = 0) +if ($Data.flags.vean eq TRUE) then + vean print threshold = 5.00 class ve* end + evaluate( $rms_vean = $result) + evaluate( $violations_vean = $violations) +end if + +evaluate( $rms_dani = 0) +evaluate( $violations_dani = 0) +if ($Data.flags.dani eq TRUE) then + dani print threshold = 0.20 class da* end + evaluate( $rms_dani = $result) + evaluate( $violations_dani = $violations) +end if + +{====>} {* define ASA-based solvation parameters *} +inline @MODULE:def_solv_param.cns + +{====>} {* buried surface area and desolvation*} +evaluate ($nchain1 = 0) +evaluate ($saafree = 0) +evaluate ($esolfree = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate ($nchain1 = $nchain1 + 1) + {====>} {* buried surface area and desolvation*} + do (rmsd = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 sele=(segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end + show sum (rmsd) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($saafree = $saafree + $result) + do (store2 = rmsd * store1) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + show sum (store2) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($esolfree = $esolfree + $result) +end loop nloop1 + +do (rmsd = 0) (all) +do (store2 = 0) (all) +surface mode=access accu=0.075 rh2o=1.4 sele=(not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end +show sum (rmsd) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +evaluate ($satot = $result) +do (store2 = rmsd * store1) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +show sum (store2) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +evaluate ($esolcplx = $result) +evaluate ($saburied = $saafree - $satot) +if ($saburied < 0) then + evaluate ($saburied = -999999) +end if + +evaluate ($edesolv = $esolcplx - $esolfree) + +evaluate ($dhbinding = $edesolv + $eintcplx - $eintfree + $elecall + $vdwall) + +evaluate ($nshape = 0) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop shape + evaluate ($ncount = $ncount + 1) + if ($mol_shape_$ncount eq true) then + evaluate ($nshape = $nshape + 1) + end if +end loop shape + +evaluate ($nonshape = $Data.ncomponents - $nshape) + +if ($nonshape = 1) then + evaluate ($saburied = 0) + evaluate ($edesolv = 0) + evaluate ($dhbinding = 0) + evaluate ($eintfree = $eintcplx) +end if + +if ($Data.flags.sym eq true) then + evaluate ($enerall = $enerall + $esym) +end if +if ($Data.flags.ncs eq true) then + evaluate ($enerall = $enerall + $ncs) +end if + +evaluate ($procwat = false) +if ($refine.keepwater eq true) then + evaluate ($procwat = true) +end if + +if ($procwat eq true) then + ident (store3) (not all) + flag exclude * include vdw elec end + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + igroup + interaction (segid $prot_segid_$nchain1) ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (not segid $prot_segid_$nchain1) (resn WAT or resn HOH or resn TIP* or resn DMS) weight * 0.0 end + interaction (segid $prot_segid_$nchain1) (not ((resn WAT or resn HOH or resn TIP* or resn DMS) and store3)) weight * 0.0 end + end + energy end + evaluate ($ener_water_$nchain1 = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_$nchain1 = $vdw) + evaluate ($elec_water_$nchain1 = $elec) + + end loop nloop1 + if ($data.ncomponents > 1) then + eval($nchain1 = $data.ncomponents) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + end if + + eval($nchain1 = 0) + + igroup + while ($nchain1 < $data.ncomponents) loop nloop2 + eval($nchain1 = $nchain1 + 1) + interaction (segid $prot_segid_$nchain1) (all) weight * 0.0 end + end loop nloop2 + interaction ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) + ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (store3) (store3) weight * 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + interaction (resn SHA) (resn SHA) weight * 0.0 end + end + energy end + evaluate ($ener_water_water = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_water = $vdw) + evaluate ($elec_water_water = $elec) +else + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents ) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + evaluate ($ener_water_water = 0.0) + evaluate ($vdw_water_water = 0.0) + evaluate ($elec_water_water = 0.0) +end if + +! calculate the HADDOCK score +evaluate ($hscore = $w_vdw * $vdwall) +evaluate ($hscore = $hscore + $w_elec * $elecall) +evaluate ($hscore = $hscore + $w_air * $noeall) +evaluate ($hscore = $hscore + $w_rg * $rgall) +evaluate ($hscore = $hscore + $w_cdih * $cdihall) +evaluate ($hscore = $hscore + $w_sani * $saniall) +evaluate ($hscore = $hscore + $w_xpcs * $xpcsall) +evaluate ($hscore = $hscore + $w_dani * $daniall) +evaluate ($hscore = $hscore + $w_vean * $veanall) +evaluate ($hscore = $hscore + $w_sym * $esym) +evaluate ($hscore = $hscore + $w_bsa * $saburied) +evaluate ($hscore = $hscore + $w_desolv * $edesolv) +evaluate ($hscore = $hscore + $w_lcc * $lcc) + +set message=on echo=on end +set remarks=reset end +set remarks=accumulate end +remarks =============================================================== +remarks HADDOCK stats for $output_pdb_filename +remarks =============================================================== +remarks HADDOCK score: $hscore +remarks =============================================================== + +!list input molecules +evaluate ($nmol=1) +while ($nmol <=$data.ncomponents) loop mol + if ( $exist_input_pdb_filename_$nmol = true) then + remarks initial structure $nmol - $input_pdb_filename_$nmol + end if + evaluate ($nmol = $nmol + 1) +end loop mol + +remarks =============================================================== +remarks total,bonds,angles,improper,dihe,vdw,elec,air,cdih,coup,rdcs,vean,dani,xpcs,rg +remarks energies: $enerall, $bondall, $anglall, $imprall, $diheall, $vdwall, $elecall, $noeall, $cdihall, $coupall, $saniall, $veanall, $daniall, $xpcsall, $rgall +remarks =============================================================== +remarks bonds,angles,impropers,dihe,air,cdih,coup,rdcs,vean,dani,xpcs +remarks rms-dev.: $rms_bonds,$rms_angles,$rms_impropers,$rms_dihedrals,$rms_noe,$rms_cdih,$rms_coup, $rms_sani, $rms_vean, $rms_dani, $rms_xpcs +remarks =============================================================== +remarks air,cdih,coup,rdcs,vean,dani,xpcs +remarks >0.3,>5,>1,>0,>5,>0.2,>0.2 +remarks violations.: $violations_noe, $violations_cdih, $violations_coup, $violations_sani, $violations_vean, $violations_dani, $violations_xpcs +remarks =============================================================== +remarks CVpartition#,violations,rms +remarks AIRs cross-validation: $npart, $violations_test_noe, $rms_test_noe +remarks =============================================================== +remarks NCS energy: $ncs +remarks =============================================================== +remarks Symmetry energy: $esym +remarks =============================================================== +remarks Membrane restraining energy: $zresall +remarks =============================================================== +remarks Local cross-correlation: $lcc[f7.4] +remarks =============================================================== +remarks Desolvation energy: $edesolv +remarks Internal energy free molecules: $eintfree +remarks Internal energy complex: $eintcplx +remarks Binding energy: $dhbinding +remarks =============================================================== +remarks buried surface area: $saburied +remarks =============================================================== +set remark accumulate end +evaluate($ncount = 0) +while ($ncount < $data.ncomponents) loop waterremark + evaluate ($ncount = $ncount +1) + remarks water - chain_$ncount: $ener_water_$ncount $vdw_water_$ncount $elec_water_$ncount +end loop waterremark +remarks =============================================================== +remarks water - water: $ener_water_water $vdw_water_water $elec_water_water +remarks =============================================================== diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-all.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-all.cns new file mode 100644 index 0000000000000000000000000000000000000000..ce6537b77378451041f63bb9fb07cb9fce35b4d7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-all.cns @@ -0,0 +1,88 @@ +! protein-ss-restraints-all.def +! Define automatically secondary stucture dihedral angle restraints for all residues +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: protein-ss-restraints.def +} +{+ description: Creates dihedral angle restraints to maintain conformation of the protein backbone +} +{+ authors: Axel T. Brunger, and Paul D. Adams, +} +{+ modified by Alexandre Bonvin for HADDOCK use +} + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + +{- Dihedral restraints for the protein backbone -} +restraint dihedral + nass = 50000 +end +do (store1 = 1) (all) +evaluate ($group=1) +evaluate ($done=false) +while ( $done = false ) loop bdihe + if ( $exist_prot_segid_$group = true ) then + show sum(1) ( segid $prot_segid_$group ) + if ( $result > 0 ) then + evaluate ($error_phi=$Data.error_dih) + evaluate ($error_psi=$Data.error_dih) + for $id in id ( segid $prot_segid_$group and tag and not resn TIP3 ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($rprec = $resid - 1) + show sum (store1) (resid $rprec and name C) + if ($result ne 0) then + evaluate ($rprec = $resid - 1) + pick dihedral + ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + geometry + evaluatate ($dihedral_phi=$result) + restraint dihedral + ! phi + assign ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + 1.0 $dihedral_phi $error_phi 2 + scale 200.0 + end + end if + evaluate ($rnext = $resid + 1) + show sum (store1) (resid $rnext and name N) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + geometry + evaluatate ($dihedral_psi=$result) + restraint dihedral + ! psi + assign ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + 1.0 $dihedral_psi $error_psi 2 + scale 200.0 + end + end if + end loop resid + end if + else + evaluate ($done=true) + end if + evaluate ($group=$group+1) +end loop bdihe + +flags include cdih end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha-beta.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha-beta.cns new file mode 100644 index 0000000000000000000000000000000000000000..0d6d8e4aa9b00b11bd201f8f9917a4628821978b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha-beta.cns @@ -0,0 +1,128 @@ +! protein-ss-restraints-alpha-beta.cns +! Define automatically secondary structure dihedral angle restraints +! for helical and beta-sheet segments +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: protein-ss-restraints.def +} +{+ description: Creates dihedral angle restraints to maintain conformation of the protein backbone +} +{+ comment:This file is to be read by refinement files that modify atom coordinates +} +{+ authors: Axel T. Brunger, and Paul D. Adams +} +{+ modified by Alexandre Bonvin for HADDOCK use +} + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + +{- Dihedral restraints for the protein backbone in alpha-beta regions -} + +do (store1 = 1) (all) +restraint dihedral + nass = 50000 +end +evaluate ($group=1) +evaluate ($done=false) +while ( $done = false ) loop bdihe + if ( $exist_prot_segid_$group = true ) then + show sum(1) ( segid $prot_segid_$group ) + if ( $result > 0 ) then + evaluate ($error_phi=$Data.error_dih) + evaluate ($error_psi=$Data.error_dih) + for $id in id ( segid $prot_segid_$group and tag and not resn TIP* ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($alphaphi = 0) + evaluate ($alphapsi = 0) + evaluate ($alpha_check = 0) + evaluate ($betaphi = 0) + evaluate ($betapsi = 0) + evaluate ($beta_check = 0) + evaluate ($rprec = $resid - 1) + show sum (store1) (resid $rprec and name C) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + geometry + evaluate ($dihedral_phi=$result) + evaluate ($alphaphi=max($dihedral_phi,-77)) + evaluate ($alphaphi=max($dihedral_phi,-37)) + if ($alphaphi eq -37) then + evaluate ($alpha_check = 1) + else + evaluate ($alpha_check = 0) + end if + evaluate ($betaphi=max($dihedral_phi,-145)) + evaluate ($betaphi=max($dihedral_phi,-105)) + if ($betaphi eq -105) then + evaluate ($beta_check = 1) + else + evaluate ($beta_check = 0) + end if + end if + evaluate ($rnext = $resid + 1) + show sum (store1) (resid $rnext and name N) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + geometry + evaluate ($dihedral_psi=$result) + evaluate ($alphapsi=max($dihedral_psi,-67)) + evaluate ($alphapsi=max($dihedral_psi,-27)) + if ($alphapsi eq -27) then + evaluate ($alpha_check = $alpha_check + 1) + end if + evaluate ($betapsi=max($dihedral_psi,105)) + evaluate ($betapsi=max($dihedral_psi,145)) + if ($betapsi eq 145) then + evaluate ($beta_check = $beta_check + 1) + end if + end if + evaluate ($defrest = 0) + if ($alpha_check eq 2) then + evaluate ($defrest = 1) + end if + if ($beta_check eq 2) then + evaluate ($defrest = 1) + end if + if ($defrest = 1) then + restraint dihedral + ! phi + assign ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + 1.0 $dihedral_phi $error_phi 2 + ! psi + assign ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + 1.0 $dihedral_psi $error_psi 2 + scale 200.0 + end + end if + end loop resid + end if + else + evaluate ($done=true) + end if + evaluate ($group=$group+1) +end loop bdihe + +flags include cdih end + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha.cns new file mode 100644 index 0000000000000000000000000000000000000000..38416657fc086d88a8288b50371b1f3e697103a8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha.cns @@ -0,0 +1,109 @@ +! protein-ss-restraints-alpha.cns +! Define automatically secondary structure dihedral angle restraints +! for helical segments +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: protein-ss-restraints.def +} +{+ description: Creates dihedral angle restraints to maintain conformation of the protein backbone +} +{+ comment:This file is to be read by refinement files that modify atom coordinates +} +{+ authors: Axel T. Brunger, and Paul D. Adams +} +{+ modified by Alexandre Bonvin for HADDOCK use +} + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + +{- Dihedral restraints for the protein backbone in alpha-helical regions -} +restraint dihedral + nass = 50000 +end +do (store1 = 1) (all) +evaluate ($group=1) +evaluate ($done=false) +while ( $done = false ) loop bdihe + if ( $exist_prot_segid_$group = true ) then + show sum(1) ( segid $prot_segid_$group ) + if ( $result > 0 ) then + evaluate ($error_phi=$Data.error_dih) + evaluate ($error_psi=$Data.error_dih) + for $id in id (segid $prot_segid_$group and tag and not resn TIP3 ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($alphaphi = 0) + evaluate ($alphapsi = 0) + evaluate ($alpha_check = 0) + evaluate ($rprec = $resid - 1) + show sum (store1) (resid $rprec and name C) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + geometry + evaluate ($dihedral_phi=$result) + evaluate ($alphaphi=max($dihedral_phi,-77)) + evaluate ($alphaphi=max($dihedral_phi,-37)) + if ($alphaphi eq -37) then + evaluate ($alpha_check = 1) + else + evaluate ($alpha_check = 0) + end if + end if + evaluate ($rnext = $resid + 1) + show sum (store1) (resid $rnext and name N) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + geometry + evaluate ($dihedral_psi=$result) + evaluate ($alphapsi=max($dihedral_psi,-67)) + evaluate ($alphapsi=max($dihedral_psi,-27)) + if ($alphapsi eq -27) then + evaluate ($alpha_check = $alpha_check + 1) + end if + end if + evaluate ($defrest = 0) + if ($alpha_check eq 2) then + evaluate ($defrest = 1) + end if + if ($defrest = 1) then + restraint dihedral + ! phi + assign ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + 1.0 $dihedral_phi $error_phi 2 + ! psi + assign ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + 1.0 $dihedral_psi $error_psi 2 + scale 200.0 + end + end if + end loop resid + end if + else + evaluate ($done=true) + end if + evaluate ($group=$group+1) +end loop bdihe + +flags include cdih end + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_data.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_data.cns new file mode 100644 index 0000000000000000000000000000000000000000..0499183803224fbed8de2940b8499c9eb8f29d50 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_data.cns @@ -0,0 +1,81 @@ +! read_data.cns +! Read the various restraints data +! (distances and dihedral angles only in this version) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +! Ambiguous and unambiguous distance restraints, hbonds +noe + reset + nrestraints = 12000000 ! allocate space for NOEs + ceiling 1000 +end + +evaluate ($filenam0 = $ambig_fname + "_" + encode($count)) +fileexist $filenam0 end +if ($result eq false) then + evaluate ($filenam0 = $ambig_fname) +end if + +if ($filenam0 # "") then + fileexist $filenam0 end + if ($result eq true) then + noe class ambi @@$filenam0 end + end if +end if + +if ($Data.randremoval eq true) then + noe part $Data.npart end +end if + +if ($unambig_fname # "") then + fileexist $unambig_fname end + if ($result eq true) then + noe class dist @@$unambig_fname end + end if +end if + +if ($hbond_fname # "") then + fileexist $hbond_fname end + if ($result eq true) then + noe class hbon @@$hbond_fname end + end if +end if + +noe + averaging * sum + potential * soft + scale * 1.0 + sqconstant * 1.0 + sqexponent * 2 + soexponent * 1 + rswitch * 1.0 + sqoffset * 0.0 + asymptote * 2.0 + msoexponent * 1 + masymptote * -0.1 + mrswitch * 1.0 +end + + +!dihedral restraints: +restraints dihedral + reset + nassign 50000 +end +if ($dihe_fname # "") then + fileexist $dihe_fname end + if ($result eq true) then + restraints dihedral + @@$dihe_fname + end + end if +end if + +restraints dihedral ? end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_noes.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_noes.cns new file mode 100644 index 0000000000000000000000000000000000000000..be5c0b8c55dbbd984e82a3fceb10553d0ee60281 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_noes.cns @@ -0,0 +1,65 @@ +! read_noes.cns +! Read the various restraints data +! In this version only distance-based restraints +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +! Ambiguous and unambiguous distance restraints, hbonds +noe + reset + nrestraints = 12000000 ! allocate space for NOEs + ceiling 1000 +end + +evaluate ($filenam0 = $ambig_fname + "_" + encode($count)) +fileexist $filenam0 end +if ($result eq false) then + evaluate ($filenam0 = $ambig_fname) +end if + +if ($filenam0 # "") then + fileexist $filenam0 end + if ($result eq true) then + noe class ambi @@$filenam0 end + end if +end if + +if ($Data.randremoval eq true) then + noe part $Data.npart end +end if + +if ($unambig_fname # "") then + fileexist $unambig_fname end + if ($result eq true) then + noe class dist @@$unambig_fname end + end if +end if + +if ($hbond_fname # "") then + fileexist $hbond_fname end + if ($result eq true) then + noe class hbon @@$hbond_fname end + end if +end if + +noe + averaging * sum + potential * soft + scale * 1.0 + sqconstant * 1.0 + sqexponent * 2 + soexponent * 1 + rswitch * 1.0 + sqoffset * 0.0 + asymptote * 2.0 + msoexponent * 1 + masymptote * -0.1 + mrswitch * 1.0 +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..6f549a453e49c118de295658c1294a8a429b9365 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/read_param.cns @@ -0,0 +1,64 @@ +! read_param.cns +! Reads parameter files. +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +!! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** + +{* protein parameter file *} +eval ($prot_parameter_infile="TOPPAR:protein-allhdg5-4.param") + +{* nucleic acid parameter file *} +eval ($nucl_parameter_infile="TOPPAR:dna-rna-allatom-hj-opls-1.3.param") + +{* carbohydrate parameter file *} +eval ($carbo_parameter_infile="TOPPAR:carbohydrate.param") + +{* solvent parameter file *} +eval ($solv_parameter_infile="TOPPAR:solvent-allhdg5-4.param") + +{* fragment probes parameter file *} +eval ($ligands_parameter_infile="TOPPAR:fragment_probes.param") + +{* ion parameter file *} +eval ($ion_parameter_infile="TOPPAR:ion.param") + +{* heme parameter file *} +eval ($heme_parameter_infile="TOPPAR:hemes-allhdg.param") + +{* shape parameter file *} +eval ($shape_parameter_infile="TOPPAR:shape.param") + +{* cofactors parameter file *} +eval ($cofactors_parameter_infile="TOPPAR:cofactors.param") + +parameter + @@$prot_parameter_infile + @@$ion_parameter_infile + @@$nucl_parameter_infile + @@$carbo_parameter_infile + @@$solv_parameter_infile + @@$ligands_parameter_infile + @@$heme_parameter_infile + @@$shape_parameter_infile + @@$cofactors_parameter_infile + if ($ligand_param_fname # "") then + fileexist $ligand_param_fname end + if ($result eq true) then + @@$ligand_param_fname + end if + end if +end + +parameter + nbonds + nbxmod=5 atom cdie shift + cutnb=9.5 ctofnb=8.5 ctonnb=6.5 eps=1.0 e14fac=0.4 inhibit 0.25 + wmin=0.5 tolerance 0.5 + end +end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/restrain-ions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/restrain-ions.cns new file mode 100644 index 0000000000000000000000000000000000000000..7ee0c904e818e09c8f233f7f44702444fbfc6cc4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/restrain-ions.cns @@ -0,0 +1,109 @@ +! restrain-ions.cns +! distance restraints between an ion and any coordinating atom within 5A +! to maintain the coordination topologu +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +noe class dist end + +! first deal with monoatomic ions +evaluate ($pcount = 0) +for $id1 in id ( name "LI+1" or name "F-1" or name "NA+1" or name "MG+2" or name "AL+3" + or name "CL-1" or name "K+1" or name "CA+2" or name "V+2" or name "V+3" + or name "CR+2" or name "CR+3" or name "MN+2" or name "MN+3" or name "FE+2" + or name "FE+3" or name "NI+2" or name "CO+2" or name "CO+3" or name "CU+1" + or name "CU+2" or name "ZN+2" or name "BR-1" or name "SR+2" or name "MO+3" + or name "AG+1" or name "CD+2" or name "I-1" or name "CS+2" or name "HO+3" + or name "YB+2" or name "YB+3" or name "OS+4" or name "IR+3" or name "PT+2" + or name "AU+1" or name "AU+2" or name "HG+1" or name "HG+2" or name "PB+2" + or name "U+3" or name "U+4" or name "ZN+1" or name "ZN" ) loop sions + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + for $id2 in id ( (name O* or name S* or name N*) and (id $id1) around $mindis and + (resn ACE or resn ALA or resn ALY or resn ARG or resn ASN or resn ASH or resn ASP or + resn CSP or resn CTN or resn CYC or resn CYF or resn CYM or resn CYS or resn DDZ or + resn GLN or resn GLH or resn GLU or resn GLY or resn HIS or resn HY3 or resn HYP or + resn ILE or resn LEU or resn LYS or resn M3L or resn MLY or resn MLZ or resn MET or + resn MSE or resn NEP or resn NME or resn PHE or resn PNS or resn PRO or resn PTR or + resn QSR or resn SEP or resn SER or resn THR or resn TOP or resn TRP or resn TYP or + resn TYR or resn TYS or resn VAL or resn A or resn C or resn G or resn T or + resn DA or resn DC or resn DG or resn DT or resn DJ )) loop search + + pick bond (id $id1) (id $id2) geometry + evaluate ($upper = $result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (name) (id $id2) + evaluate ($name2=$result) + + if ($segid1 eq $segid2) then + noe + assign (resid $resid1 and segid $segid1 and name $name1) + (resid $resid2 and segid $segid2 and name $name2) $upper 0.1 0.1 + end + end if + + end loop search + +end loop sions + +! then deal with multiatomic mions +evaluate ($pcount = 0) +for $id1 in id ( (resn SO4 or resn PO4 or resn WO4) and name O* ) loop mions + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + for $id2 in id ( (name O* or name S* or name N*) and (id $id1) around $mindis and + (resn ACE or resn ALA or resn ALY or resn ARG or resn ASN or resn ASH or resn ASP or + resn CSP or resn CTN or resn CYC or resn CYF or resn CYM or resn CYS or resn DDZ or + resn GLN or resn GLH or resn GLU or resn GLY or resn HIS or resn HY3 or resn HYP or + resn ILE or resn LEU or resn LYS or resn M3L or resn MLY or resn MLZ or resn MET or + resn MSE or resn NEP or resn NME or resn PHE or resn PNS or resn PRO or resn PTR or + resn QSR or resn SEP or resn SER or resn THR or resn TOP or resn TRP or resn TYP or + resn TYR or resn TYS or resn VAL or resn A or resn C or resn G or resn T or + resn DA or resn DC or resn DG or resn DT or resn DJ )) loop search + + pick bond (id $id1) (id $id2) geometry + evaluate ($upper = $result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (name) (id $id2) + evaluate ($name2=$result) + + if ($segid1 eq $segid2) then + noe + assign (resid $resid1 and segid $segid1 and name $name1) + (resid $resid2 and segid $segid2 and name $name2) $upper 0.1 0.1 + end + end if + + end loop search + +end loop mions diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_inter.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_inter.cns new file mode 100644 index 0000000000000000000000000000000000000000..7088087a65b71bcdb213cce29d86ab6c043225e8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_inter.cns @@ -0,0 +1,45 @@ +! scale_inter.cns +! Scaling of intermolecular interactions +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * $scale.int_$nchain1_$nchain1 end + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + ((resn WAT or resn HOH or resn TIP* or resn DMS)) weight * 1.0 vdw $kinter elec $kinter end + + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = $kinter * $scale.int_$nchain1_$nchain2) + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain2 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + + interaction ((resn WAT or resn HOH or resn TIP* or resn DMS)) ((resn WAT or resn HOH or resn TIP* or resn DMS)) weight * 1.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..efae5ce10a1fdafe1ef2f1d47a0ff9ebe57a1c8f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_inter_final.cns @@ -0,0 +1,39 @@ +! scale_inter_final.cns +! Scaling of intermolecular interactions +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = $kinter * $scale.int_$nchain1_$nchain2) + interaction (segid $prot_segid_$nchain1 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) + (segid $prot_segid_$nchain2 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..15b0adfbb562862214f161c494c14a17dbf6beb7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/scale_intra_only.cns @@ -0,0 +1,36 @@ +! scale_intra_only.cns +! Scaling of intramolecular energies (no intermolecular energies) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 end + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end + + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/setflags.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/setflags.cns new file mode 100644 index 0000000000000000000000000000000000000000..fd3e181f3cc822ca390f8d3f0ec6368c7305498b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/setflags.cns @@ -0,0 +1,21 @@ +! setflags.cns +! Defines energy flags +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ($Data.flags.noe = TRUE) then + flags include noe end +end if +if ($Data.flags.cdih = TRUE) then + flags include cdih end +end if +if ($Data.flags.ncs = TRUE) then + flags include ncs end +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/symmultimer.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/symmultimer.cns new file mode 100644 index 0000000000000000000000000000000000000000..3b4f731e948bf1d58eab0f71f457da6e52afc3e9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/cns/symmultimer.cns @@ -0,0 +1,677 @@ +! symmultimer.cns +! Define symmetry restraints +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ($Data.flags.sym eq true) then + + noe class symm end + + ! Define C2 symmetry restraints for symmetrical multimers + ! + eval ($ncount = 0) + while ($ncount < $data.nc2sym) loop c2symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c2sym_sta1_$ncount) + evaluate ($i1end = $c2sym_end1_$ncount) + evaluate ($chain1 = $c2sym_seg1_$ncount) + evaluate ($i2start = $c2sym_sta2_$ncount) + evaluate ($i2end = $c2sym_end2_$ncount) + evaluate ($chain2 = $c2sym_seg2_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + if ($diff1 ne $diff2) then + display CHAIN LENGTH FOR SYMMETRY RESTRAINTS DOES NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc2sym + + evaluate ($resid1 = $i1start) + evaluate ($resid2 = $i2end - $icount) + evaluate ($resid3 = $i2start) + evaluate ($resid4 = $i1end - $icount) + + noe + assign (resid $resid1 and (name CA or name P or name BB) and segid $chain1) + (resid $resid2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resid3 and (name CA or name P or name BB) and segid $chain2) + (resid $resid4 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + end + + evaluate ($icount = $icount + 1) + evaluate ($i1start = $i1start + 1) + evaluate ($i2start = $i2start + 1) + + end loop genc2sym + + end loop c2symloop + + + ! Define C3 symmetry restraints for symmetrical multimers + ! + eval ($ncount = 0) + while ($ncount < $data.nc3sym) loop c3symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c3sym_sta1_$ncount) + evaluate ($i1end = $c3sym_end1_$ncount) + evaluate ($chain1 = $c3sym_seg1_$ncount) + evaluate ($i2start = $c3sym_sta2_$ncount) + evaluate ($i2end = $c3sym_end2_$ncount) + evaluate ($chain2 = $c3sym_seg2_$ncount) + evaluate ($i3start = $c3sym_sta3_$ncount) + evaluate ($i3end = $c3sym_end3_$ncount) + evaluate ($chain3 = $c3sym_seg3_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc3sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + + noe + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + end + + evaluate ($icount = $icount + 2) + evaluate ($i1start = $i1start + 2) + evaluate ($i2start = $i2start + 2) + evaluate ($i3start = $i3start + 2) + + end loop genc3sym + + end loop c3symloop + + ! Define S3 symmetry restraints for symmetrical multimers + ! + eval ($ncount = 0) + while ($ncount < $data.ns3sym) loop s3symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $s3sym_sta1_$ncount) + evaluate ($i1end = $s3sym_end1_$ncount) + evaluate ($chain1 = $s3sym_seg1_$ncount) + evaluate ($i2start = $s3sym_sta2_$ncount) + evaluate ($i2end = $s3sym_end2_$ncount) + evaluate ($chain2 = $s3sym_seg2_$ncount) + evaluate ($i3start = $s3sym_sta3_$ncount) + evaluate ($i3end = $s3sym_end3_$ncount) + evaluate ($chain3 = $s3sym_seg3_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + eval ($istep = 4) + eval ($istop = $i1end - $istep) + while ($i1start < $istop) loop gens3sym + + evaluate ($resst11 = $i1start) + evaluate ($resst21 = $i1start+1) + evaluate ($resst12 = $i2start) + evaluate ($resst22 = $i2start+1) + evaluate ($resst13 = $i3start) + evaluate ($resst23 = $i3start+1) + + + noe + + assign (resid $resst11 and (name CA or name P or name BB) and segid $chain1) + (resid $resst12 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst12 and (name CA or name P or name BB) and segid $chain2) + (resid $resst13 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst21 and (name CA or name P or name BB) and segid $chain1) + (resid $resst22 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst22 and (name CA or name P or name BB) and segid $chain2) + (resid $resst23 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + + end loop gens3sym + + end loop s3symloop + + ! Define C4 symmetry restraints for symmetrical multimers + ! + eval ($istep = 10) + eval ($ncount = 0) + while ($ncount < $data.nc4sym) loop c4symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c4sym_sta1_$ncount) + evaluate ($i1end = $c4sym_end1_$ncount) + evaluate ($chain1 = $c4sym_seg1_$ncount) + evaluate ($i2start = $c4sym_sta2_$ncount) + evaluate ($i2end = $c4sym_end2_$ncount) + evaluate ($chain2 = $c4sym_seg2_$ncount) + evaluate ($i3start = $c4sym_sta3_$ncount) + evaluate ($i3end = $c4sym_end3_$ncount) + evaluate ($chain3 = $c4sym_seg3_$ncount) + evaluate ($i4start = $c4sym_sta4_$ncount) + evaluate ($i4end = $c4sym_end4_$ncount) + evaluate ($chain4 = $c4sym_seg4_$ncount) + + !first check that the chain lengths are equal for the four defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + evaluate ($diff4 = $i4end - $i4start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff3 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc4sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resst4 = $i4start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + evaluate ($resen4 = $i4end - $icount) + + noe + + ! N to N sequential restraints to prevent anti-parallel arrangements + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + ! N to C sequential restraints to assure planarity + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + assign (resid $resen1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resen2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resen2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resen3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resen3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resen4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resen4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resen1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + evaluate ($i4start = $i4start + $istep) + + end loop genc4sym + + end loop c4symloop + + + ! Define C5 symmetry restraints for symmetrical multimers + ! + eval ($istep = 4) + eval ($ncount = 0) + while ($ncount < $data.nc5sym) loop c5symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c5sym_sta1_$ncount) + evaluate ($i1end = $c5sym_end1_$ncount) + evaluate ($chain1 = $c5sym_seg1_$ncount) + evaluate ($i2start = $c5sym_sta2_$ncount) + evaluate ($i2end = $c5sym_end2_$ncount) + evaluate ($chain2 = $c5sym_seg2_$ncount) + evaluate ($i3start = $c5sym_sta3_$ncount) + evaluate ($i3end = $c5sym_end3_$ncount) + evaluate ($chain3 = $c5sym_seg3_$ncount) + evaluate ($i4start = $c5sym_sta4_$ncount) + evaluate ($i4end = $c5sym_end4_$ncount) + evaluate ($chain4 = $c5sym_seg4_$ncount) + evaluate ($i5start = $c5sym_sta5_$ncount) + evaluate ($i5end = $c5sym_end5_$ncount) + evaluate ($chain5 = $c5sym_seg5_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + evaluate ($diff4 = $i4end - $i4start) + evaluate ($diff5 = $i5end - $i5start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff3 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff4 ne $diff5) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc5sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resst4 = $i4start) + evaluate ($resst5 = $i5start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + evaluate ($resen4 = $i4end - $icount) + evaluate ($resen5 = $i5end - $icount) + + noe + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + evaluate ($i4start = $i4start + $istep) + evaluate ($i5start = $i5start + $istep) + + end loop genc5sym + + end loop c5symloop + + ! Define C6 symmetry restraints for symmetrical multimers + ! + eval ($istep = 10) + eval ($ncount = 0) + while ($ncount < $data.nc6sym) loop c6symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c6sym_sta1_$ncount) + evaluate ($i1end = $c6sym_end1_$ncount) + evaluate ($chain1 = $c6sym_seg1_$ncount) + evaluate ($i2start = $c6sym_sta2_$ncount) + evaluate ($i2end = $c6sym_end2_$ncount) + evaluate ($chain2 = $c6sym_seg2_$ncount) + evaluate ($i3start = $c6sym_sta3_$ncount) + evaluate ($i3end = $c6sym_end3_$ncount) + evaluate ($chain3 = $c6sym_seg3_$ncount) + evaluate ($i4start = $c6sym_sta4_$ncount) + evaluate ($i4end = $c6sym_end4_$ncount) + evaluate ($chain4 = $c6sym_seg4_$ncount) + evaluate ($i5start = $c6sym_sta5_$ncount) + evaluate ($i5end = $c6sym_end5_$ncount) + evaluate ($chain5 = $c6sym_seg5_$ncount) + evaluate ($i6start = $c6sym_sta6_$ncount) + evaluate ($i6end = $c6sym_end6_$ncount) + evaluate ($chain6 = $c6sym_seg6_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + evaluate ($diff4 = $i4end - $i4start) + evaluate ($diff5 = $i5end - $i5start) + evaluate ($diff6 = $i6end - $i6start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff3 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff4 ne $diff5) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff5 ne $diff6) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc6sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resst4 = $i4start) + evaluate ($resst5 = $i5start) + evaluate ($resst6 = $i6start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + evaluate ($resen4 = $i4end - $icount) + evaluate ($resen5 = $i5end - $icount) + evaluate ($resen6 = $i6end - $icount) + + noe + + ! Around the C6 ring + ! N to N sequential restraints to prevent anti-parallel arrangements + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + ! N to C sequential restraints to assure planarity + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + ! Triples + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + evaluate ($i4start = $i4start + $istep) + evaluate ($i5start = $i5start + $istep) + evaluate ($i6start = $i6start + $istep) + + end loop genc6sym + + end loop c6symloop + + + noe + potential symm symmetry + scale symm $Data.ksym + sqconstant symm 1.0 + sqexponent symm 2 + soexponent symm 1 + rswitch symm 0.5 + sqoffset symm 0.0 + asymptote symm 1.0 + end + +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..270043c46a1f0ec6dd82cf3b874160e5dd9776e5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/mdref/defaults.yaml @@ -0,0 +1,4751 @@ +# +# Group molecule +# +mol_fix_origin_1: + default: false + type: boolean + title: Fix molecule + short: Fixes the molecule in its original position. + long: Fixes the molecule in its original position. + group: 'molecule' + explevel: expert +mol_shape_1: + default: false + type: boolean + title: Is the molecule a shape? + short: Defines a molecule as a shape. + long: Defines a molecule as a shape, which is a collection of beads. + group: 'molecule' + explevel: easy +# +# Group distance restraints +# +ambig_fname: + default: '' + type: file + title: Ambiguous distance restraints filename + short: Filename of the ambiguous distance restraints file + long: Filename of the ambiguous distance restraints file. By default 50% of those restraints will be randomly discared. + This can be changed/turned off and is controlled by the randremoval and npart parameters. + Note that this file can contain both ambiguous and unambiguous restraints. + group: 'distance restraints' + explevel: easy +previous_ambig: + default: false + type: boolean + title: Boolean condition on the previous ambiguous distance restraints file + short: Boolean condition on the previous ambiguous distance restraints file. + If true, use the the restraint information coming from the previous CNS module. If false, don't use previous information. + long: Boolean condition on the ambiguous distance restraints file. + If true, use the restraint information coming from the previous CNS module, as long as an ambig_fname is not defined for the current module. + If false, don't use previous information. + group: 'distance restraints' + explevel: expert +unambig_fname: + default: '' + type: file + title: Unambiguous restraints filename + short: Filename of the unambiguous distance restraints file + long: Filename of the unambiguous distance restraints file. All restraints in that file will be used. + Note that this file can contain both ambiguous and unambiguous restraints. + group: 'distance restraints' + explevel: easy +hbond_fname: + default: '' + type: file + title: H-bond restraints filename + short: Filename of the hydrogen bond distance restraints file + long: Filename of the hydrogen bond distance restraints file. Note that this file can contain any type of distance restraints. + group: 'distance restraints' + explevel: easy +ambig_scale: + default: 50 + type: integer + min: 0 + max: 1000 + title: Force constant for ambiguous distance restraints + short: Force constant applied to the distance restraints defined in ambig_fname. + long: Force constant applied to the distance restraints defined in ambig_fname. + group: 'distance restraints' + explevel: expert +unambig_scale: + default: 50 + type: integer + min: 0 + max: 1000 + title: Force constant for unambiguous distance restraints + short: Force constant applied to the distance restraints defined in unambig_fname. + long: Force constant applied to the distance restraints defined in unambig_fname. + group: 'distance restraints' + explevel: expert +hbond_scale: + default: 50 + type: integer + min: 0 + max: 1000 + title: Force constant for hbonds distance restraints + short: Force constant applied to the distance restraints defined in hbond_fname. + long: Force constant applied to the distance restraints defined in hbond_fname. + group: 'distance restraints' + explevel: expert +randremoval: + default: true + type: boolean + title: Random removal of ambiguous restraints + short: If set to true (default) this will cause the random removal of ambiguous restraints for each model generated. + long: If set to true (default) this will cause the random removal of ambiguous restraints for each model generated. + The fraction of restraints randomly removed depends on the npart parameter which defines in how many sets the restraints should be randomly split. + The first set will be removed. The fraction of randomly removed ambiguous restraints is thus 1/npart. + group: 'distance restraints' + explevel: expert +npart: + default: 2 + type: integer + min: 1 + max: 20 + title: Number partitions for ambiguous restraints + short: Number of sets into which to randomly partition the ambiguous restraints. + long: Number of sets into which to randomly partition the ambiguous restraints. + The fraction of restraints randomly removed depends on the npart parameter which defines in how many sets the restraints should be randomly split. + The first set will be removed. The fraction of randomly removed ambiguous restraints is thus 1/npart. + group: 'distance restraints' + explevel: expert +contactairs: + default: false + type: boolean + title: Contact restraints + short: Contact restraints between molecules + long: Contact restraints between molecules. These are defined as ambiguous distance restraint + between each residue of a molecule and all residues of the other molecules with 5A from that residue. + This can be used to restraint the contacts between the interfaces. Note that this can generate a large number of ambiguous restraints + and slow down the computations + group: 'distance restraints' + explevel: expert +kcont: + default: 1.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Contact restraints force constant + short: Force constant applied to the contact restraints. + long: Force constant applied to the contact restraints. + group: 'distance restraints' + explevel: expert +cmrest: + default: false + type: boolean + title: Center of mass restraints + short: Automatically defines distance restraints between the geometric center of the various molecules. + long: When turned on, this option will automatically define center of mass restraints between the various molecules. + This allows HADDOCK to operate in ab-initio mode in the absence of any other restraints. But those restraints can also + be combined with other restraints to ensure more compact solutions. The distance restraints are defined between the + geometrical centers of the various molecules (calculated on CA atoms for proteins (BB in case of Martini coarse-grained + molecules) and N1 atoms for nucleic acids. For small ligands, all atoms will be used to define the geometric center. + The upper limit distance is automatically calculated based on the dimension of the molecules (see cmtight description). + group: 'distance restraints' + explevel: expert +cmtight: + default: true + type: boolean + title: Center of mass restraint tightness + short: Defines the upper distance limit based on the sum of the average dimension of the two molecule, + if cmtight=false all three dimensions are used, if set to true the shortest two only are used, + resulting in tighter distance restraints. + long: This parameter controls how the upper limit distance is defined for the center of mass restraints between molecules. + Each molecule is oriented along its principle components and the x,y and z dimensions are calculated. + If cmtight=true, the molecule distance (size) is set to the average of its smallest two half dimensions. + If cmtight=false, the molecule distance (size) is set to the average of its three half dimensions.. + In case of DNA or small ligands the molecule distance (size) is set to 0. + The effective upper distance limit for the center or mass distance restraint is the sum of the two molecule distances. + group: 'distance restraints' + explevel: expert +kcm: + default: 1.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Center of mass restraints force constant + short: Force constant applied to the center of mass restraints + long: Force constant applied to the center of mass restraints + group: 'distance restraints' + explevel: expert +# +# Group dihedral restraints +# +dihe_fname: + default: '' + type: file + title: Dihedral angle restraints filename + short: Filename of the Dihedral angle restraints file + long: Filename of the Dihedral angle restraints file. + group: 'dihedral restraints' + explevel: easy +dihedrals_on: + default: false + type: boolean + title: Use dihedral angle restraints + short: Turns on dihedral angle restraints. + long: Turns on dihedral angle restraints. Those should be defined in the dihe_fname file. + group: 'dihedral restraints' + explevel: easy +dihedrals_scale: + default: 200 + type: integer + min: 0 + max: 9999 + title: Force constant for dihedral angle restraints + short: Force constant applied to the dihedral angle restraints read from dihe_fname. + long: Force constant applied to the dihedral angle restraints read from dihe_fname. + group: 'dihedral restraints' + explevel: easy +ssdihed: + default: none + type: string + minchars: 0 + maxchars: 100 + choices: + - none + - all + - alpha + - alphabeta + title: Define automatically backbone dihedral angle restraints + short: If turned on, this option will automatically defined backbone dihedral angle restraints for the selected regions. + long: This option allows to utomatically defined backbone dihedral angle restraints for the selected regions. + The restraints will be defined for the phi and psi backbone dihedral angles of amino acids, with the target value taken from + the measured angle in the input structure, and the error bound defined by the error_dih parameter. + Those restraints can be applied to the entire structure (all), the alpha/beta secondary structure elements (alphabeta) or + only to the alpha helical regions (alpha). Those are automatically detected based on the measured dihedral angle combinations. + group: 'dihedral restraints' + explevel: easy +error_dih: + default: 10 + type: integer + min: 0 + max: 180 + title: Force constant for backbone dihedral angle restraints + short: Force constant for backbone dihedral angle restraints (ssdihed option) + long: Force constant for backbone dihedral angle restraints (ssdihed option) + group: 'dihedral restraints' + explevel: easy +# +# Group other restraints +# +dnarest_on: + default: false + type: boolean + title: Restrain the DNA conformation + short: Automatically creates restraints to maintain the conformation of DNA/RNA + long: "This option allows to restraint the conformation of nucleic acids based on the values from the input structures. + The following restraints will be automatically defined: + - single base planarity + - sugar pucker + - phosphate backbone diherdral angle restraints + - Watson-Crick base pairing" + group: 'other restraints' + explevel: easy +# +# Group symmetry +# +sym_on: + default: false + type: boolean + title: Symmetry restraints + short: Enables symmetry restraints + long: Enables symmetry restraints. The symmetry type (C2,C3,C4,C5,C6,S3 supported) + and the segments to which those apply must be defined. In addition a custom symmetry restraint file can be supplied (symrest_fname). + group: 'symmetry' + explevel: expert +ksym: + default: 10.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Force constant for symmetry restraints + short: Force constant for symmetry restraints + long: Force constant for symmetry restraints + group: 'symmetry' + explevel: expert +symtbl_fname: + default: '' + type: file + title: Custom symmetry restraints filename + short: Filename of the custom symmetry restraints file + long: Filename of the custom symmetry restraints file. + group: 'symmetry' + explevel: expert +nc2sym: + default: 0 + type: integer + min: 0 + max: 40 + title: Number of C2 symmetry restraints + short: Defines the number of C2 symmetry restraints. + long: Defines the number of C2 symmetry restraints. + For each, a pair of segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: hidden +c2sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C2 symmetry segment + long: Residue number of first residue in the first C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C2 symmetry segment + long: Residue number of last residue in the first C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C2 segment + short: Segment ID of first C2 segment + long: Segment ID of first C2 segment + group: 'symmetry' + explevel: expert +c2sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C2 symmetry segment + long: Residue number of first residue in the second C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C2 symmetry segment + long: Residue number of last residue in the second C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C2 segment + short: Segment ID of second C2 segment + long: Segment ID of second C2 segment + group: 'symmetry' + explevel: expert +nc3sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C3 symmetry restraints + short: Defines the number of C3 symmetry restraints. + long: Defines the number of C3 symmetry restraints. + For each, three segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: hidden +c3sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C3 symmetry segment + long: Residue number of first residue in the first C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C3 symmetry segment + long: Residue number of last residue in the first C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C3 segment + short: Segment ID of first C3 segment + long: Segment ID of first C3 segment + group: 'symmetry' + explevel: expert +c3sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C3 symmetry segment + long: Residue number of first residue in the second C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C3 symmetry segment + long: Residue number of last residue in the second C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C3 segment + short: Segment ID of second C3 segment + long: Segment ID of second C3 segment + group: 'symmetry' + explevel: expert +c3sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C3 symmetry segment + long: Residue number of first residue in the third C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C3 symmetry segment + long: Residue number of last residue in the third C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C3 segment + short: Segment ID of third C3 segment + long: Segment ID of third C3 segment + group: 'symmetry' + explevel: expert +nc4sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C4 symmetry restraints + short: Defines the number of C4 symmetry restraints. + long: Defines the number of C4 symmetry restraints. + For each, four segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: hidden +c4sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C4 symmetry segment + long: Residue number of first residue in the first C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C4 symmetry segment + long: Residue number of last residue in the first C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C4 segment + short: Segment ID of first C4 segment + long: Segment ID of first C4 segment + group: 'symmetry' + explevel: expert +c4sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C4 symmetry segment + long: Residue number of first residue in the second C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C4 symmetry segment + long: Residue number of last residue in the second C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C4 segment + short: Segment ID of second C4 segment + long: Segment ID of second C4 segment + group: 'symmetry' + explevel: expert +c4sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C4 symmetry segment + long: Residue number of first residue in the third C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C4 symmetry segment + long: Residue number of last residue in the third C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C4 segment + short: Segment ID of third C4 segment + long: Segment ID of third C4 segment + group: 'symmetry' + explevel: expert +c4sym_sta4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fourth C4 symmetry segment + long: Residue number of first residue in the fourth C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fourth C4 symmetry segment + long: Residue number of last residue in the fourth C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg4_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fourth C4 segment + short: Segment ID of fourth C4 segment + long: Segment ID of fourth C4 segment + group: 'symmetry' + explevel: expert +nc5sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C5 symmetry restraints + short: Defines the number of C5 symmetry restraints. + long: Defines the number of C5 symmetry restraints. + For each, five segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: hidden +c5sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C5 symmetry segment + long: Residue number of first residue in the first C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C5 symmetry segment + long: Residue number of last residue in the first C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C5 segment + short: Segment ID of first C5 segment + long: Segment ID of first C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C5 symmetry segment + long: Residue number of first residue in the second C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C5 symmetry segment + long: Residue number of last residue in the second C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C5 segment + short: Segment ID of second C5 segment + long: Segment ID of second C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C5 symmetry segment + long: Residue number of first residue in the third C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C5 symmetry segment + long: Residue number of last residue in the third C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C5 segment + short: Segment ID of third C5 segment + long: Segment ID of third C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fourth C5 symmetry segment + long: Residue number of first residue in the fourth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fourth C5 symmetry segment + long: Residue number of last residue in the fourth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg4_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fourth C5 segment + short: Segment ID of fourth C5 segment + long: Segment ID of fourth C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fifth C5 symmetry segment + long: Residue number of first residue in the fifth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fifth C5 symmetry segment + long: Residue number of last residue in the fifth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg5_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fifth C5 segment + short: Segment ID of fifth C5 segment + long: Segment ID of fifth C5 segment + group: 'symmetry' + explevel: expert +nc6sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C6 symmetry restraints + short: Defines the number of C6 symmetry restraints. + long: Defines the number of C6 symmetry restraints. + For each, six segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: hidden +c6sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C6 symmetry segment + long: Residue number of first residue in the first C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C6 symmetry segment + long: Residue number of last residue in the first C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C6 segment + short: Segment ID of first C6 segment + long: Segment ID of first C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C6 symmetry segment + long: Residue number of first residue in the second C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C6 symmetry segment + long: Residue number of last residue in the second C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C6 segment + short: Segment ID of second C6 segment + long: Segment ID of second C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C6 symmetry segment + long: Residue number of first residue in the third C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C6 symmetry segment + long: Residue number of last residue in the third C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C6 segment + short: Segment ID of third C6 segment + long: Segment ID of third C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fourth C6 symmetry segment + long: Residue number of first residue in the fourth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fourth C6 symmetry segment + long: Residue number of last residue in the fourth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg4_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fourth C6 segment + short: Segment ID of fourth C6 segment + long: Segment ID of fourth C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fifth C6 symmetry segment + long: Residue number of first residue in the fifth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fifth C6 symmetry segment + long: Residue number of last residue in the fifth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg5_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fifth C6 segment + short: Segment ID of fifth C6 segment + long: Segment ID of fifth C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the sixth C6 symmetry segment + long: Residue number of first residue in the sixth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the sixth C6 symmetry segment + long: Residue number of last residue in the sixth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg6_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of sixth C6 segment + short: Segment ID of sixth C6 segment + long: Segment ID of sixth C6 segment + group: 'symmetry' + explevel: expert +ns3sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of S3 symmetry restraints + short: Defines the number of S3 symmetry restraints. + long: Defines the number of S3 symmetry restraints. + For each, three segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: hidden +s3sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first S3 symmetry segment + long: Residue number of first residue in the first S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first S3 symmetry segment + long: Residue number of last residue in the first S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first S3 segment + short: Segment ID of first S3 segment + long: Segment ID of first S3 segment + group: 'symmetry' + explevel: expert +s3sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second S3 symmetry segment + long: Residue number of first residue in the second S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second S3 symmetry segment + long: Residue number of last residue in the second S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second S3 segment + short: Segment ID of second S3 segment + long: Segment ID of second S3 segment + group: 'symmetry' + explevel: expert +s3sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third S3 symmetry segment + long: Residue number of first residue in the third S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third S3 symmetry segment + long: Residue number of last residue in the third S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third S3 segment + short: Segment ID of third S3 segment + long: Segment ID of third S3 segment + group: 'symmetry' + explevel: expert +ncs_on: + default: false + type: boolean + title: Non-crystallographic symmetry restraints + short: Non-crystallographic symmetry restraints to ensure two molecules will have the same conformation. + long: Non-crystallographic symmetry restraints to ensure two molecules will have the same conformation. + This does not apply any symmetry between the two molecules but rather defines restraints such as the RMSD between those is 0. + group: 'symmetry' + explevel: expert +kncs: + default: 1.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Force constant for non-crystallographic restraints + short: Force constant for non-crystallographic restraints + long: Force constant for non-crystallographic restraints + group: 'symmetry' + explevel: expert +nncs: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of non-crystallographic symmetry restraints + short: Number of non-crystallographic symmetry restraints (NCS). + long: Number of non-crystallographic symmetry restraints. For each pairs of segments will have to be defined. + Note that those must contain exactly the same residues/atom combinations. + group: 'symmetry' + explevel: hidden +ncs_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first NCS segment + long: Residue number of first residue in the first NCS segment + group: 'symmetry' + explevel: expert +ncs_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first NCS segment + long: Residue number of last residue in the first NCS segment + group: 'symmetry' + explevel: expert +ncs_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 100 + title: Segment ID of first NCS segment + short: Segment ID of first NCS segment + long: Segment ID of first NCS segment + group: 'symmetry' + explevel: expert +ncs_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second NCS segment + long: Residue number of first residue in the second NCS segment + group: 'symmetry' + explevel: expert +ncs_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second NCS segment + long: Residue number of last residue in the second NCS segment + group: 'symmetry' + explevel: expert +ncs_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 100 + title: Segment ID of second NCS segment + short: Segment ID of second NCS segment + long: Segment ID of second NCS segment + group: 'symmetry' + explevel: expert +# +# Group scoring +# +w_air: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the distance restraint energy + short: Weight of the distance restraints energy in the scoring function + long: Weight of the distance restraints energy in the scoring function. + Note that this is different from the force constants used during the calculations. + group: 'scoring' + explevel: expert +w_bsa: + default: 0.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the buried surface area term + short: Weight of the buried surface area term in the scoring function + long: Weight of the buried surface area (BSA) term in the scoring function. + Note that the BSA is only used for scoring. + group: 'scoring' + explevel: expert +w_cdih: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the dihedral angle restraint energy + short: Weight of the dihedral angle restraints energy in the scoring function + long: Weight of the dihedral angle restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: expert +w_dani: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the relaxation anisotropy (DANI) restraint energy + short: Weight of the relaxation anisotropy (DANI) restraint energy + long: Weight of the relaxation anisotropy (DANI) restraint energy + group: 'scoring' + explevel: hidden +w_deint: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the interaction energy term + short: Weight of the interaction energy term + long: Weight of the interaction energy term calculated as the difference in total energy of the complex and of the separate components + group: 'scoring' + explevel: hidden +w_desolv: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the desolvation energy term + short: Weight of the desolvation energy term in the scoring function + long: Weight of the desolvation energy term in the scoring function. + Note that the desolvation energy is only used for scoring. + group: 'scoring' + explevel: expert +w_elec: + default: 0.2 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular electrostatic energy + short: Weight of the intermolecular electrostatic energy in the scoring function + long: Weight of the intermolecular electrostatic energy in the scoring function. + Note that this does not affect the electostatic energy during the MD refinement. + group: 'scoring' + explevel: expert +w_lcc: + default: -10000.0 + type: float + min: -10000.0 + max: 0 + precision: 3 + title: Weight of the EM local correlation coefficient + short: Weight of the EM local correlation coefficient + long: Weight of the EM local correlation coefficient + group: 'scoring' + explevel: hidden +w_rg: + default: 1.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the radius of gyration restraint energy + short: Weight of the radius of gyration restraint energy + long: Weight of the radius of gyration restraint energy + group: 'scoring' + explevel: hidden +w_sani: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (SANI) restraint energy + short: Weight of the residual dipolar coupling (SANI) restraint energy + long: Weight of the residual dipolar coupling (SANI) restraint energy + group: 'scoring' + explevel: hidden +w_sym: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the symmetry restraint energy + short: Weight of the symmetry restraints energy in the scoring function + long: Weight of the symmetry restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: expert +w_vdw: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular van der Waals energy + short: Weight of the intermolecular van der Waals energy in the scoring function + long: Weight of the intermolecular van der Waals energy in the scoring function. + Note that this does not affect the van der Waals energy during the MD refinement. + group: 'scoring' + explevel: expert +w_vean: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (VEAN) restraint energy + short: Weight of the residual dipolar coupling (VEAN) restraint energy + long: Weight of the residual dipolar coupling (VEAN) restraint energy + group: 'scoring' + explevel: hidden +w_xpcs: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the pseudo contact shifts (XPCS) restraint energy + short: Weight of the pseudo contact shifts (XPCS) restraint energy + long: Weight of the pseudo contact shifts (XPCS) restraint energy + group: 'scoring' + explevel: hidden +w_xrdc: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (XRDC) restraint energy + short: Weight of the residual dipolar coupling (XRDC) restraint energy + long: Weight of the residual dipolar coupling (XRDC) restraint energy + group: 'scoring' + explevel: hidden +w_zres: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the Z-restraining potential energy + short: Weight of the Z-restraining potential energy + long: Weight of the Z-restraining potential energy + group: 'scoring' + explevel: hidden +# +# Group force field +# +ligand_param_fname: + default: '' + type: file + title: Custom ligand parameter file + short: Ligand parameter file in CNS format + long: Ligand parameter file in CNS format containing all force field parameters + (bond, angles, dihedrals, impropers, van der waals) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy +ligand_top_fname: + default: '' + type: file + title: Custom ligand topology file + short: Ligand topology file in CNS format + long: Ligand topology file in CNS format containing the ligand topologies + (atoms, masses, charges, bond definitions...) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy +elecflag: + default: true + type: boolean + title: Include electrostatics energy + short: Include electrostatics energy during the calculations. + long: Include electrostatics energy during the calculations. If set to false electrostatics will not be considered. + group: 'force field' + explevel: easy +dielec: + default: cdie + type: string + minchars: 0 + maxchars: 4 + choices: + - cdie + - rdie + title: Constant (cdie) or distance-dependent dielectric (rdie) constant. + short: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + long: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + A distance dependent dielectric constant will effectively scale down the electrostatic energy + by having a 1/r**2 dependency instead of 1/r + group: 'force field' + explevel: expert +epsilon: + default: 1.0 + type: float + min: 1 + max: 78 + precision: 1 + title: Dielectric constant + short: Dielectric constant for the electrostatic Coulomb energy term. + long: Dielectric constant for the electrostatic Coulomb energy term. + group: 'force field' + explevel: expert +dihedflag: + default: true + type: boolean + title: Use torsion angle dihedral energy term + short: Turns on the torsion angle dihedral energy terms of the force field. + long: Turns on the torsion angle dihedral energy terms of the force field. + group: 'force field' + explevel: expert +# +# Group sampling +# +sampling_factor: + default: 1 + type: integer + min: 1 + max: 500 + title: Sampling factor for each starting model + short: This parameter control how many times a model will be refined. + long: This parameter control how many times a model will be refined. + group: 'sampling' + explevel: expert +max_nmodels: + default: 50000 + type: integer + min: 1 + max: 100000 + title: Maximum number of models to refine + short: This parameter controls the maximum number of models to refine. + long: This parameter controls the maximum number of models to refine. + group: 'sampling' + explevel: expert +solvent: + default: water + type: string + minchars: 0 + maxchars: 100 + choices: + - water + - dmso + title: Solvent + short: Solvent to use during the short MD refinement + long: Solvent to use during the short MD refinement. Water and DMSO are supported. + A solvent shelll is generated by shifting pre-equilibrated boxes around the complex. + For water an 8A water shell is generated and for DMSO a 12.5A shell. + For DMSO, + group: '' + explevel: easy +nemsteps: + default: 200 + type: integer + min: 0 + max: 10000 + title: Number of EM steps + short: Number of energy minimisation steps to perform. + long: Number of energy minimisation steps to perform in the various EM stages of this refinement protocol. + Note that the effective number might be smaller if the minimisation converges earlier. + group: 'sampling' + explevel: expert +timestep: + default: 0.002 + type: float + min: 0.0005 + max: 0.004 + precision: 4 + title: MD integrating time step + short: Integration time step for the molecular dynamics. + long: Integration time step for the molecular dynamics. + group: 'sampling' + explevel: guru +waterheatsteps: + default: 100 + type: integer + min: 0 + max: 10000 + title: Number of MD steps for the heating + short: Number of MD steps for the heating phase. + long: Number of MD steps for the heating phase. The heating consists of three successive + short molecular dynamics simluations at 100, 200 and 300 Kelvin. + group: 'sampling' + explevel: expert +watersteps: + default: 1250 + type: integer + min: 0 + max: 100000 + title: Number of MD steps at 300K. + short: Number of MD steps for 300K simulation. + long: Number of MD steps for 300K simulation. This is the sampling state of the refinement. + group: 'sampling' + explevel: expert +watercoolsteps: + default: 500 + type: integer + min: 0 + max: 10000 + title: Number of MD steps for the cooling + short: Number of MD steps for the cooling phase. + long: Number of MD steps for the cooling phase. The cooling consists of three successive + short molecular dynamics simluations at 300, 200 and 100 Kelvin. + group: 'sampling' + explevel: expert +iniseed: + default: 917 + type: integer + min: 0 + max: 9999999999999999 + title: Random seed + short: Random seed used in CNS to initialize the random seed function + long: Random seed used in CNS to initialize the random seed function + group: 'sampling' + explevel: guru +keepwater: + default: false + type: boolean + title: Write water molecules to output file + short: Write water molecules if present to the output file. + long: Write water molecules if present to the output file. + group: 'sampling' + explevel: guru +tolerance: + default: 5 + type: integer + min: 0 + max: 99 + precision: 3 + title: Failure tolerance percentage + short: Percentage of allowed failures for a module to successfully complete + long: Percentage of allowed failures for a module to successfully complete + group: 'module' + explevel: expert +log_level: + default: quiet + type: string + minchars: 0 + maxchars: 100 + choices: + - verbose + - normal + - quiet + title: Log level verbosity for CNS + short: Set the log level verbosity for CNS + long: CNS, the computational engine used by HADDOCK can generate a lot of output + messages. This parameter controls the verbosity of CNS (verbose, normal or quiet). + group: module + explevel: guru +# +# Group flexibility +# +# +# Semi-flexible segments +# +nseg1: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg2: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg3: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg4: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg5: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg6: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg7: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_7_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_7_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg8: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_8_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_8_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg9: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_9_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_9_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg10: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_10_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_10_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg11: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_11_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_11_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg12: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_12_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_12_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg13: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_13_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_13_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg14: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_14_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_14_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg15: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_15_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_15_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg16: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_16_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_16_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg17: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_17_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_17_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg18: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_18_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_18_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg19: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_19_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_19_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +nseg20: + default: -1 + type: integer + min: -1 + max: 1000 + title: Number of semi-flexible segments + short: This defines the number of semi-flexible segments (-1 automatic, 0 ridig, >1 manual definition). + long: This parameter defines the number of semi-flexible segments for the specified molecule. + If set to -1 then those are automatically defined based on contacts. Those can also be manually defined by defining the number of segment (nseg>=1). + In that case the starting and ending residues of each segment must be defined. The position of atoms in regions outside the semi-flexible regions + will have weak harmonic positional restraints during the energy minimisation. If nseg is set to 0, then the molecule will be kept ridig. + group: 'flexibility' + explevel: expert +seg_sta_20_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the semi-flexible segment. + long: Residue number defining the start of the semi-flexible segment. + group: 'flexibility' + explevel: expert +seg_end_20_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Residue number defining the end of the semi-flexible segment. + long: Residue number defining the end of the semi-flexible segment. + group: 'flexibility' + explevel: expert +# +# Fully flexible segments +# +nfle: + default: 0 + type: integer + min: 0 + max: 1000 + title: Number of fully flexible segments + short: This defines the number of fully flexible segments. + long: This parameter defines the number of fully flexible segments for all molecules. + If >=1 then those must be defined manually with segment ID (segid) in the fle_seg_* variable, + followed by the starting and ending residue numbers in the fle_sta_* and fle_end_* variables. + group: 'flexibility' + explevel: hidden +fle_sta_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Residue number defining the start of the fully flexible segment. + long: Residue number defining the start of this (1st) fully flexible segment. + group: 'flexibility' + explevel: expert +fle_end_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: End residue number + short: Residue number defining the end of the fully flexible segment. + long: Residue number defining the end of this (1st) fully flexible segment. + group: 'flexibility' + explevel: expert +fle_seg_1: + default: none + type: string + minchars: 1 + maxchars: 4 + title: Segment ID (segid) + short: Segment ID of the molecule for which this flexible segment is defined. + long: Segment ID of the molecule for which this (1st) flexible segment is defined. + group: 'flexibility' + explevel: expert +# +# Group interaction matrix +# +int_1_1: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_2: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_3: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_2: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_3: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_3: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_18_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_18_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_18_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_19_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_19_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_20_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/._openmm.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/._openmm.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/._openmm.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..2a2f85af1dc9c08c4c841a14689fb58c3a64ad9c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/__init__.py @@ -0,0 +1,181 @@ +"""OpenMM Molecular Dynamics refinement module for HADDOCK3. + +The potential of OpenMM can be exploited to perform potentially different +tasks, such as: + +* Run MD simulation for each model from previous step; +* Refine the models in the middle of a docking run. For example, it can be used + to refine the models coming from a `[rigidbody]` module before `[flexref]` is + executed, or to replace the `[mdref]` step. +* Generate conformers prior to their use in a thorough docking run. + +To get a list of all possible parameters, run: + +>>> haddock3-cfg -m openmm + +Module workflow: + +* Generate openmm topology and fix atoms +* Build solvation box +* Equilibration solvation box restraining the protein +* Run MD simulation: increase temperature, run MD, reduce temperature. +* Either generate an ensemble of multiple frames or return the last frame. + +This module will refine all models coming from the previous workflow step and +send them to the next step in the workflow. If you want to use other modules +such as `flexref` or `emref` after the OpenMM module, you need to recreate the +topologies by simply adding a `[topoaa]` step in the workflow. +See examples in `examples/thirdparty/openmm` folder. +""" +import os +import shutil + +from contextlib import suppress +from pathlib import Path +from subprocess import run as subprocrun + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.exceptions import ThirdPartyIntallationError +from haddock.libs.libontology import PDBFile +from haddock.modules import BaseHaddockModule, get_engine + +# allow general testing when OpenMM is not installed +with suppress(ImportError): + from haddock.modules.refinement.openmm.openmm import OPENMM + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(BaseHaddockModule): + """HADDOCK3 OpenMM module.""" + + name = RECIPE_PATH.name + + def __init__(self, order, path, initial_params=DEFAULT_CONFIG): + super().__init__(order, path, initial_params) + + def create_directories(self) -> dict[str, str]: + """Create the necessary directories and provides the paths.""" + directory_list = ( + "pdbfixer", + "solvation_boxes", + "intermediates", + "md_raw_output", + "openmm_output", + "simulation_stats", + ) + + directory_dict: dict[str, str] = {} + for dir in directory_list: + self.log(f"Creating directory {dir}") + os.mkdir(dir) + directory_dict[dir] = dir + + return directory_dict + + def remove_directories(self) -> None: + """Remove unnecessary directories full of heavy files.""" + directory_list = ( + "pdbfixer", + "md_raw_output", + "solvation_boxes", + ) + for dir in directory_list: + self.log(f"Removing temporary directory {dir}") + shutil.rmtree(dir) + return None + + @classmethod + def confirm_installation(cls) -> None: + """Confirm installation of openmm and pdfixer. + + Raises + ------ + ThirdPartyIntallationError + When OpenMM is not installed + ThirdPartyIntallationError + When OpenMM pdbfixer is not installed + """ + try: + import openmm + except ModuleNotFoundError: + raise ThirdPartyIntallationError( + "OpenMM is not installed." + ) + try: + import pdbfixer + except ModuleNotFoundError: + raise ThirdPartyIntallationError( + "OpenMM pdbfixer is not installed." + ) + return None + + @staticmethod + def set_max_cpu(nbcpu: int) -> None: + from openmm import Platform + cpu_platform = Platform.getPlatformByName('CPU') + cpu_platform.setPropertyDefaultValue('Threads', str(nbcpu)) + + def _run(self) -> None: + """Execute module.""" + # Retrieve previous models + previous_models = self.previous_io.retrieve_models( + individualize=True, + ) + + # create directories + directory_dict = self.create_directories() + + # Limit cpu usage + self.set_max_cpu(self.params["ncores"]) + + # Build list of OPENMM jobs + openmm_jobs: list[OPENMM] = [] + for i, model_to_be_simulated in enumerate(previous_models, start=1): + # Create a openmm job + openmm_job_i = OPENMM( + i, + model_to_be_simulated, + Path("."), + directory_dict, + self.params, + ) + # Hold it + openmm_jobs.append(openmm_job_i) + + # running jobs + scheduling_engine = get_engine(self.params["mode"], self.params) + scheduler = scheduling_engine(openmm_jobs) + scheduler.run() + + # Retrieve generated models + output_pdbs = list(Path(directory_dict["openmm_output"]).glob("*.pdb")) + + # Check if at least one output file has been generated + if len(output_pdbs) == 0: + self.finish_with_error( + "No output models generated. " + "Check Openmm Execution and logfile." + ) + + # deleting unnecessary directories + self.log("Removing unnecessary directories...") + # self.remove_directories() + + # Add small message to the user + self.log("Completed OpenMM module run.") + self.log( + "If you want to continue the haddock3 workflow after " + "the OpenMM module, the next module should be `[topoaa]`, " + "to rebuild the CNS molecular topologies." + ) + + # Setting the output variable + self.output_models = [ + PDBFile(openmmout) + for openmmout in sorted(output_pdbs) + ] + # Generating standardized haddock3 outputs + self.export_io_models() diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..058b5bbf3a702d0b6b319776b6e71cb353a4be24 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/defaults.yaml @@ -0,0 +1,302 @@ +forcefield: + default: 'amber14-all.xml' + type: string + minchars: 10 + maxchars: 100 + choices: + - 'amber14-all.xml' + - 'amber14/protein.ff14SB.xml' + - 'amber14/protein.ff15ipq.xml' + - 'amber14/DNA.OL15.xml' + - 'amber14/DNA.bsc1.xml' + - 'amber14/RNA.OL3.xml' + - 'amber14/lipid17.xml' + - 'amber14/GLYCAM_06j-1.xml' + - 'charmm36.xml' + title: Forcefield used by OpenMM. + short: Forcefields that can be used by OpenMM. + long: Forcefields that can be used by OpenMM. + group: 'force field' + explevel: easy + +explicit_solvent_model: + default: 'amber14/tip3p.xml' + type: string + minchars: 0 + maxchars: 100 + choices: + - 'amber14/tip3p.xml' + - 'amber14/spce.xml' + - 'charmm36/spce.xml' + - 'amber14/tip4pew.xml' + - 'charmm36/tip4pew.xml' + - 'charmm36/tip5p.xml' + title: Explicit solvent models. + short: Solvent models supported by the OpenMM modeller to build the water solvation box. + long: Solvent models supported by the OpenMM modeller to build the water solvation box. + group: 'force field' + explevel: easy + +ph: + default: 7.4 + type: float + precision: 1 + min: -3.0 + max: 12 + title: pH of the buffer. + short: pH of the buffer. + long: pH of the buffer. This has an infulence on the protonation states of the resiudes. + group: simulation + explevel: expert + +keep_solvent: + default: false + type: boolean + title: Whether-or-not solvent be removed from provided structures. + short: Whether-or-not solvent be removed from provided structures. + long: Whether-or-not solvent be removed from provided structures. + If 'false', all HETATM atoms will be removed. + group: 'post processing' + explevel: easy + +implicit_solvent: + default: false + type: boolean + title: Indicate use of implicit solvent. + short: Indicate use of implicit solvent, avoids building a water solvation box around pdbs. + long: Indicate use of implicit solvent, avoids building a water solvation box around pdbs. + group: 'force field' + explevel: easy + +implicit_solvent_model: + default: 'implicit/hct.xml' + type: string + minchars: 0 + maxchars: 100 + choices: + - 'implicit/hct.xml' + - 'implicit/obc1.xml' + - 'implicit/obc2.xml' + - 'implicit/gbn.xml' + - 'implicit/gbn2.xml' + title: Implicit solvent models. + short: Implicit solvent models supported by OpenMM. + long: Implicit solvent models supported by OpenMM. + group: 'force field' + explevel: easy + +add_extra_particles_for_forcefield: + default: false + type: boolean + title: Add extra particles for forcefield. + short: Add extra particles for forcefield if needed such as e.g. Drude particles. + long: Add extra particles for forcefield if needed such as e.g. Drude particles. + group: 'force field' + explevel: easy + +timestep_ps: + default: 0.002 + type: float + precision: 3 + min: 0.001 + max: 0.004 + title: Timestep definition. + short: Definition of timestep used by the integrator to progress the simulation. + long: Definition of timestep used by the integrator to progress the simulation. + group: 'sampling' + explevel: expert + +constraints: + default: 'HBonds' + type: string + minchars: 1 + maxchars: 20 + choices: + - 'None' + - 'HBonds' + - 'AllBonds' + - 'HAngles' + title: Integration constraints. + short: Integration constraints used to allow for larger integration time step. + long: Integration constraints used to allow for larger integration time step. + For extra info see http://docs.openmm.org/latest/userguide/application/02_running_sims.html#constraints + group: 'restraints' + explevel: easy + +equilibration_timesteps: + default: 2000 + type: integer + min: 0 + max: 100000 + title: Equilibration timesteps. + short: Equilibration timesteps performed without saving the simulation state. + long: Equilibration timesteps performed without saving the simulation state. + group: 'sampling' + explevel: expert + +simulation_timesteps: + default: 2000 + type: integer + min: 0 + max: 1000000 + title: Simulation timesteps. + short: Simulation timesteps performed during the simulation. + long: Simulation timesteps performed during the simulation. + group: 'sampling' + explevel: expert + +sampling_factor: + default: 1 + type: integer + min: 1 + max: 20 + title: Number of simulation replicas. + short: Number of simulation replicas. + long: Number of simulation replicas. + group: 'sampling' + explevel: easy + +temperature_kelvin: + default: 298.15 + type: float + precision: 2 + min: 1.00 + max: 1000.00 + title: Average temperature. + short: Average temperature used by e.g. the integrator or by for temperature coupling. + long: Average temperature used by e.g. the integrator or by for temperature coupling. + group: 'sampling' + explevel: easy + +remove_center_of_mass_motion: + default: true + type: boolean + title: Remove center of mass motion. + short: Remove center of mass motion when overall molecular drift is detected. + long: Remove center of mass motion when overall molecular drift is detected. + group: 'sampling' + explevel: easy + +generate_ensemble: + default: true + type: boolean + title: Generate ensemble of configurations. + short: Generate ensemble of configurations. + long: If 'true', generates 1 single ensemble .pdb file holding various configurations; composed of the equilibrated one, all intermediates and the final one. If 'false', only return the last configuration obtained after 'simulation_timesteps' steps. + group: 'post processing' + explevel: easy + +save_intermediate: + default: 1 + type: integer + min: 0 + max: 100 + title: Number of intermediate configurations to save. + short: Number of intermediate configurations to save during the simulation. + long: Number of intermediate configurations to save during the simulation. The code divides the length of the simulation (simulation_timesteps) by this parameter to get how often configurations should be saved. + group: 'sampling' + explevel: expert + +padding: + default: 1.0 + type: float + precision: 3 + min: 0.3 + max: 10 + title: Padding value in nanometers. + short: Padding value in nanometers. + long: Padding value in nanometers. This is used to create the solvation box by adding water molecules around the molecule up to this padding distance. + When performing a long refinement of a complex, increase this parameter as the molecules will likely move away from each other. + group: 'sampling' + explevel: expert + +rigid_water: + default: true + type: boolean + title: Use rigid water. + short: Use of rigid water in the simulation. + long: Use of rigid water in the simulation. Flexible water molecules usually require a slower taken timestep by the used integrator. + group: 'restraints' + explevel: easy + +iniseed: + default: 917 + type: integer + min: 0 + max: 1000000 + title: Simulation seed. + short: Set a pseudo-random seed for the simulation. + long: Set a pseudo-random seed for the simulation. This defines how the + initial velocities are created, but has no effect on the randomicity + of the solvation box. + group: 'sampling' + explevel: easy + +ion_concentration: + default: 0.15 + precision: 3 + min: 0 + max: 5 + type: float + title: Ion concentration. + short: Ion concentration in Molar. + long: Ion concentration in Molar. + group: 'sampling' + explevel: easy + +solv_equilibration: + default: true + type: boolean + title: Process the solvent equilibration phase. + short: Process the solvent equilibration phase. + long: Process the solvent equilibration phase. + If 'true', the solvent will be equilibrated while constraining proteins positions to intial ones. + group: 'sampling' + explevel: easy + +solv_eq_max_temperature_kelvin: + default: 310.0 + precision: 1 + min: 1 + max: 400 + type: float + title: Upper boundary of temperature to reach during solvent eauilibration phase. + short: Upper boundary of temperature to reach during solvent eauilibration phase. + long: Upper boundary of temperature to reach during solvent eauilibration phase. + group: 'sampling' + explevel: expert + +solv_eq_stepsize_fs: + default: 2.0 + precision: 1 + min: 0.5 + max: 4 + type: float + title: Step size for the solvent equilibration phase. + short: Step size (in femptoseconds) for the solvent equilibration phase. + long: Step size (in femptoseconds) for the solvent equilibration phase. + group: 'sampling' + explevel: expert + +solv_eq_timesteps: + default: 500 + min: 10 + max: 50000 + type: integer + title: Number of timesteps to be performed during solvent equilibration phase. + short: Number of timesteps to be performed during solvent equilibration phase. + long: Number of timesteps to be performed during solvent equilibration phase. + group: 'sampling' + explevel: guru + +solv_eq_spring_constant: + default: 20.0 + precision: 1 + min: 0 + max: 10000 + type: float + title: Spring constant (k) used to restrain protein coordinates during solvent equilibration phase. + short: Spring constant (k) used to restrain protein coordintes during solvent equilibration phase. + long: Spring constant (k) used to restrain protein coordinates during solvent equilibration phase. + group: 'sampling' + explevel: guru diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/openmm.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/openmm.py new file mode 100644 index 0000000000000000000000000000000000000000..56ba04ae24b84fd266c4593cc353e10a08e3ad7a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/refinement/openmm/openmm.py @@ -0,0 +1,1005 @@ +""" +OpenMM Molecular Dynamics refinement module for HADDOCK3. +""" + +# Standard libarires importation +import os + +from contextlib import suppress +from pathlib import Path + +# Import OpenMM and pdbfixer third-party libraries +# >conda activate haddock3 +# >conda install -c conda-forge libstdcxx-ng openmm pdbfixer + +# allow general testing when OpenMM is not installed +#with suppress(ImportError): +from openmm import ( + CustomCentroidBondForce, + CustomExternalForce, + LangevinMiddleIntegrator, + MonteCarloBarostat, + System, + ) +from openmm.app import ( + PME, + NoCutoff, + AllBonds, + ForceField, + HAngles, + HBonds, + Modeller, + PDBxFile, + Simulation, + statedatareporter, + ) +from openmm.app.pdbfile import PDBFile as openmmpdbfile +from openmm.unit import ( + MOLAR_GAS_CONSTANT_R, + angstroms, + atmosphere, + femtoseconds, + kelvin, + kilocalorie_per_mole, + molar, + nanometer, + nanometers, + picosecond, + picoseconds, + ) +from pdbfixer import PDBFixer + +# Haddock libraries +from pdbtools import pdb_delhetatm, pdb_mkensemble +from haddock import log +from haddock.core.exceptions import ModuleError +from haddock.core.typing import Optional, Union, ParamDict +from haddock.libs.libontology import PDBFile +from haddock.libs.libpdb import add_TER_on_chain_breaks + + +class OPENMM: + """OPENMM class.""" + + def __init__( + self, + identificator: int, + model: PDBFile, + path: Path, + directory_dict: dict[str, str], + params: ParamDict, + ): + """ + Initialize the class. + + Parameters + ---------- + identificator : str + The identificator of the object. + model : PosixPath or :py:class:`haddock.libs.libontology.PDBFile` + The model to be evaluated. + path : Path + Reference that defines where output should be saved. + directory_dict : dict[str, str] + Dictionary of the directories handled by the openmm module. + {d: d + for d in [ + "pdbfixer", + "solvation_boxes", + "intermediates", + "md_raw_output", + "openmm_output", + "simulation_stats" + ] + } + params : ParamDict + The openmm modules parameters. + """ + self.identificator = identificator + self.model = model + self.path = path + self.directory_dict = directory_dict + self.params = params + self.log = log + + # other parameters + self.output = Path("output_openmm.log") + self.constraints = self.import_constraints() + self.output_filename = self.model.file_name.replace(".pdb", "_omm.pdb") + + def import_constraints(self): # type: ignore + """Cast parameter string to proper openmm constraints.""" + if self.params["constraints"] == "HBonds": + return HBonds + elif self.params["constraints"] == "AllBonds": + return AllBonds + elif self.params["constraints"] == "HAngles": + return HAngles + return None + + def get_pdb_filepath(self, folder: Union[bool, str] = None) -> str: + """Get correct path to pdb file. + + Parameters + ---------- + folder : str + Path to folder + """ + if folder: + pdb_filepath = os.path.join( + self.directory_dict["pdbfixer"], + self.model.file_name, + ) + else: + if isinstance(self.model, PDBFile): + pdb_filepath = f"{self.model.rel_path}" + else: + pdb_filepath = str(Path(self.model.path, self.model.file_name)) + self.log.debug(f"pdb_filepath is {pdb_filepath}") + return pdb_filepath + + def handle_chainbreaks(self, pdb_fpath: str) -> str: + output_filepath = os.path.join( + self.directory_dict["pdbfixer"], + f"withTER_{self.model.file_name}", + ) + add_TER_on_chain_breaks(pdb_fpath, output_filepath) + return output_filepath + + def openmm_pdbfixer(self): + """Call Pdbfixer on the model pdb.""" + input_pdb_filepath = self.get_pdb_filepath() + pdb_filepath = self.handle_chainbreaks(input_pdb_filepath) + self.log.info( + f"Fixing pdb: {self.model.file_name} (path {pdb_filepath})" + ) + # creating PDBFixer + fixer = PDBFixer(filename=pdb_filepath) + fixer.findMissingResidues() + fixer.findNonstandardResidues() + fixer.replaceNonstandardResidues() + fixer.findMissingAtoms() + fixer.addMissingAtoms() + fixer.addMissingHydrogens(self.params["ph"]) + # calling PDBFixer + output_filepath = os.path.join( + self.directory_dict["pdbfixer"], + self.model.file_name, + ) + openmmpdbfile.writeFile( + fixer.topology, + fixer.positions, + open(output_filepath, 'w'), + keepIds=True, + ) + + def create_solvation_box(self, solvent_model: str) -> Optional[str]: + """Create solvation box for an explicit solvent simulation. + + Parameters + ---------- + solvent_model : str + One of the OpenMM's solvent models. + + Returns + ------- + box_path : Optional[str] + Path to the solvated system + + Raise + ---------- + Exception + Not able to generate the solvation box. + """ + self.log.info(f"Building solvation box for: {self.model.file_name}") + pdb_filepath = self.get_pdb_filepath(self.directory_dict["pdbfixer"]) + forcefield = self.params["forcefield"] + try: + if ('.cif' in pdb_filepath): + openmmpdb = PDBxFile(pdb_filepath) + else: + openmmpdb = openmmpdbfile(pdb_filepath) + # Obtain initial input chains + self.input_chains = [ + chain.id + for chain in openmmpdb.topology.chains() + ] + # creating Modeller + modeller = Modeller(openmmpdb.topology, openmmpdb.positions) + usedForcefield = ForceField(forcefield, solvent_model) + modeller.deleteWater() + modeller.addHydrogens(usedForcefield, pH=self.params["ph"]) + # check the existence of xray cell data + padding = self.params["padding"] * nanometers + ions_conc = self.params["ion_concentration"] * molar + # with neutralize=False it doesn't neutralize + log.info( + f"Solvating and adding ions to the system:" + f"padding {padding}, ions conc. : {ions_conc}" + ) + modeller.addSolvent( + usedForcefield, + padding=padding, + neutralize=True, + ionicStrength=ions_conc, + ) + # Add required extra particles for forcefield, + # e.g. Drude particles. + if self.params["add_extra_particles_for_forcefield"]: + log.info("adding extra particles") + modeller.addExtraParticles(forcefield) + # write solvation box + box_path = os.path.join( + self.directory_dict["solvation_boxes"], + self.model.file_name + ) + openmmpdbfile.writeFile( + modeller.topology, + modeller.positions, + open(box_path, "w"), + keepIds=True, + ) + + except Exception as e: + error_msg = ( + f"An error occured when building solvation box: {e}" + ) + self.log.error(error_msg) + raise ModuleError(f"[openMM] module error: {error_msg}") + else: + return box_path + + def equilibrate_solvation_box( + self, + pdb_filepath: str, + solvent_model: str, + ) -> Optional[str]: + """Machinery for the equilibration of water in presence of the protein. + + Here, the idea is to: + 0. Check if something has to be done + 1. Initiate the system + 2. Construct restrain forces on protein atom positions + 3. Run simulation under restrain + 4. Save new coordinates file + + Parameters + ---------- + pdb_filepath : str + Path to a water boxed system + solvent_model : str + One of the OpenMM's solvent models. + + Returns + ------- + eq_pdb_filepath: str + Path to an equilibrated water boxed system, readdy of MD + + Raises + ------ + Exception + Unable to preform the equilibration. + """ + # Check if spring constant > 0 + if not self.params["solv_equilibration"]: + return pdb_filepath + + self.log.info(f"Equilibrating solvation box from {pdb_filepath}...") + try: + # 1. Initiate the system and simulation objects + # Load structure coordinates + system_coordinates = openmmpdbfile(pdb_filepath) + # Initiate forcefiled object + forcefield = ForceField(self.params["forcefield"], solvent_model) + # system setup + # should give an ERROR when system_constraints = 'None'. + system = forcefield.createSystem( + system_coordinates.topology, + nonbondedMethod=PME, + nonbondedCutoff=1 * nanometer, + constraints=HAngles, + removeCMMotion=self.params["remove_center_of_mass_motion"], + rigidWater=self.params["rigid_water"], + ) + # Initiate intergrator + integrator = LangevinMiddleIntegrator( + self.params["solv_eq_max_temperature_kelvin"] * kelvin, + 1 / picosecond, + self.params["solv_eq_stepsize_fs"] * femtoseconds + ) + # Set pseudo-random seed + integrator.setRandomNumberSeed(self.params["iniseed"]) + + # 2. Add constraints to the protein atoms + self.log.info("Adding protein constraints") + # Add position restraint force + rest_force, spring_force_index = self._gen_restrain_force( + system_coordinates.topology.atoms(), + system_coordinates.positions, + spring_constant=self.params["solv_eq_spring_constant"], + ) + # Add the restrain force to the system + system.addForce(rest_force) + + # Initiate simulation object + simulation = Simulation( + system_coordinates.topology, + system, + integrator, + ) + + # Initiate state reporter object + reported_output_fname = ( + f'{self.directory_dict["simulation_stats"]}/' + f"solv_eq_observables_{self.identificator}.dat" + ) + statereporter = statedatareporter.StateDataReporter( + reported_output_fname, + 10, + step=True, + totalEnergy=True, + potentialEnergy=True, + temperature=True, + volume=True, + density=True, + ) + simulation.reporters.append(statereporter) + simulation.context.setPositions(system_coordinates.positions) + + # 3. Run simulation under constraints + # Process energy minimization prior to any dynamic simulation + self.log.info("Minimizing system energy") + simulation.minimizeEnergy() + # Set parameters + eq_steps = self.params["solv_eq_timesteps"] + nvt_sims = 7 + delta_steps = max(1, int(eq_steps / nvt_sims)) + max_temperature = self.params["solv_eq_max_temperature_kelvin"] + max_temperature = max_temperature + delta_temp = max_temperature / nvt_sims + # Progressively warmup the system + self.log.info("Warming system up...") + integrator.setFriction(100 / picosecond) + for n in range(1, nvt_sims + 1): + # Compute new values + qtemp = n * delta_temp + # Set values + integrator.setTemperature(qtemp * kelvin) + # Run some md steps + simulation.step(delta_steps) + # Set final temperature and temperature coupling + integrator.setTemperature(max_temperature * kelvin) + integrator.setFriction(1 / picosecond) + # Makes sure temperature of the system is reached + self._stabilize_temperature( + simulation, + max_temperature, + statereporter._dof, + tolerance=10.0, + steps=50 + ) + # Print log info + self.log.info( + "Running solvent equilibration phase " + "under protein coordinate position restraints:" + ) + self.log.info( + f"For {self.params['solv_eq_timesteps']} timesteps at " + f"{self.params['solv_eq_max_temperature_kelvin']} K " + f"(stepsize={self.params['solv_eq_stepsize_fs']} fs)..." + ) + # Do few simulation steps at max temperature + # progressively releasing the position restraints on the protein + slow_reduction_steps = 10 + red_delta_steps = int(eq_steps / slow_reduction_steps) + for n in range(slow_reduction_steps - 1, -1, -1): + const_stength = n / slow_reduction_steps + new_spring_const = self.params["solv_eq_spring_constant"] * const_stength + rest_force.setGlobalParameterDefaultValue( + spring_force_index, + new_spring_const, + ) + simulation.step(red_delta_steps) + # Progressively freeze the system + self.log.info("Cooling down the system...") + for n in range(nvt_sims - 1, 0, -1): + qtemp = n * delta_temp + integrator.setTemperature(qtemp * kelvin) + simulation.step(delta_steps) + + # 4. Save new coordinates file + # Write finale frame structure + eq_pdb_filepath = os.path.join( + self.directory_dict["solvation_boxes"], + f"solvent_eq_{self.model.file_name}", + ) + # Retrieve last coordinates + eq_state = simulation.context.getState(getPositions=True) + eq_positions = eq_state.getPositions() + openmmpdbfile.writeFile( + simulation.topology, + eq_positions, + open(eq_pdb_filepath, "w"), + keepIds=True, + ) + self.log.info(f"Equilibrated solvated system: {eq_pdb_filepath} !") + return eq_pdb_filepath + + except Exception: + import traceback + strerr = traceback.format_exc() + self.log.debug( + "Error durring solvent equilibration for file " + f"{pdb_filepath}:\n{strerr}.{os.linesep}" + "Continuing from unequilibrated solvent frame." + ) + return pdb_filepath + + def _stabilize_temperature( + self, + simulation: Simulation, + temperature: float, + dof: int, + tolerance: float = 5.0, + steps: int = 50, + ) -> int: + """ + Make sure the simulated system reached the desired temperature. + + Parameters + ---------- + simulation : py:class:`openmm.Simulation` + An openmm system + temperature : float + The temperature hoped to be reached + dof : int + The degree of freedom obtained from the statereporter._dof + tolerance : float + The tolerance allowed for the temperature + steps : int + The number of steps to do before checking again that + temperature was reached + """ + additional_steps: int = 0 + # Makes sure temperature of the system is reached + while not ((temperature - tolerance) + <= self._get_simulation_temperature(simulation, dof) + <= (temperature + tolerance)): + # Do several simulation steps + simulation.step(steps) + additional_steps += steps + return additional_steps + + @staticmethod + def _gen_restrain_force( + atoms: list, + positions: list, + subset: Union[bool, list] = None, + spring_constant: float = 20.0, + ) -> CustomExternalForce: + """ + Generate CustomExternalForce aiming at restraining protein coordinates. + + Parameters + ---------- + atoms : list + List of the particules present in the topology of the system + positions : list + Initial position of the particules in the system + subset : list + List of atom indexes on which to apply the restrain force + spring_constant : float + Initial value of the position restrain spring constant. + + Return + ---------- + rest_force: :py:class:`openmm.openmm.CustomExternalForce` + Set CustomExternalForce object restraining protein position + spring_force_index: int + Index of the spring force constant + """ + # Initiate Custom Force to restrain positions + rest_force = CustomExternalForce( + # could have been "k*((x-x0)^2+(y-y0)^2+(z-z0)^2)" + # but because we are in periodic boundary conditions, + # it is better to use "k*periodicdistance(x, y, z, x0, y0, z0)^2" + # c.f. OpenMM documentation + "k*periodicdistance(x, y, z, x0, y0, z0)^2" + ) + # Define spring constant value + spring_force_index = rest_force.addGlobalParameter( + "k", + spring_constant * kilocalorie_per_mole / angstroms ** 2 + ) + rest_force.addPerParticleParameter('x0') + rest_force.addPerParticleParameter('y0') + rest_force.addPerParticleParameter('z0') + # Set of atom indexes to work on + ind_subset = list(range(len(positions))) if not subset else subset + # Loop over topology atoms + for atom in atoms: + # Filter out non-protein particles and hydrogens + if atom.element.symbol == 'H': # Hydrogen atom + continue + if atom.residue.name == 'HOH': # Water molecule + continue + if len(atom.residue.name) != 3: # Skip ions + continue + if atom.index not in ind_subset: # Not in subset + continue + # Hold index of the restrained atom + rest_force.addParticle(atom.index, positions[atom.index]) + return rest_force, spring_force_index + + def _gen_centroid_forces(self, system: System) -> None: + """Add centroid forces between protein monomers to the system. + + FIXME: Not functionning due to issue of group definitions in + the self._chain_centroid_force() function + + Parameters + ---------- + system : py:class:`openmm.System` + An openmm system + """ + for i, chainid in enumerate(self.input_chains[:-1]): + for chain2 in self.input_chains[i + 1:]: + new_force = self._chain_centroid_force(system, chainid, chain2) + system.addForce(new_force) + + @staticmethod + def _get_chain_atoms(system: System, chainid: str) -> list[int]: + """Retrun list of atom ids belonging to a chain. + + Parameters + ---------- + system : py:class:`openmm.System` + An openmm system + chainid : str + Chain id on which atom ids must be retrieved from + """ + for chain in system.topology.chains(): + if chain.id == chainid: + return [atom.id for atom in chain.atoms()] + return [] + + def _chain_centroid_force( + self, + system: System, + chain1: str, + chain2: str, + ) -> CustomCentroidBondForce: + """Set up a centroid force betweem two chains. + + FIXME: Not functionning ... + + Parameters + ---------- + system : py:class:`openmm.System` + An openmm system + chain1 : str + One of system chain (hopfully a monomer) to apply the force on + chain2 : str + Second chain (hopfully a monomer) to apply the force on + """ + centroid_force = CustomCentroidBondForce(2, "0.1*k*distance(g1,g2)^2") + centroid_force.addPerBondParameter("k") + gc1 = centroid_force.addGroup(self._get_chain_atoms(system, chain1)) + gc2 = centroid_force.addGroup(self._get_chain_atoms(system, chain2)) + centroid_force.addBond([gc1, gc2], [1]) + return centroid_force + + @staticmethod + def _get_simulation_temperature(simulation: Simulation, dof: int) -> float: + """Computes/gather the current system temperature. + + NOTE: this function is similar to the lines of code found in + the :py:class:`openmm.app.statedatareporter.StateDataReporter()` + + NOTE2: Would be better if in the StateustomCentroidBondForce class... + + Parameters + ---------- + simulation : :py:class:`openmm.app.simulation.Simulation()` + The current simulation + dof : int + Value of the StateDataReporter._dof + + Return + ---------- + temperature_k : float + The current simulation temperature (in kelvin) + """ + integrator = simulation.context.getIntegrator() + if hasattr(integrator, "computeSystemTemperature"): + temperature = integrator.computeSystemTemperature() + else: + state = simulation.context.getState(getEnergy=True) + temperature = ( + 2 * state.getKineticEnergy() / (dof * MOLAR_GAS_CONSTANT_R) + ) + tempreature_k = temperature.value_in_unit(kelvin) + return tempreature_k + + @staticmethod + def remove_water_and_ions(input_filepath: str) -> str: + """Remove water from the output of an explicit solvent run. + + Uses the pdb-tools.pdb_delhetatm() module to do this + + NOTE: May produce an issue with TER atoms (Water + ions) + + NOTE2: May lead to issue with modified AA e.g: phsophoserine, etc... + + Parameters + ---------- + input_filepath : str + Path to the file to be modified + + Return + ---------- + output_filepath : str + Path to the modified file not containing anymore HETATM + """ + log.info(f"Removing water and ions from {input_filepath}") + output_filepath = input_filepath.replace('.pdb', '_nosolv.pdb') + with open(input_filepath, 'r') as fh: + pdbYieldedLines = pdb_delhetatm.run(fh) + with open(output_filepath, 'w') as writefh: + writefh.writelines(pdbYieldedLines) + return output_filepath + + def run_openmm( + self, + inputPDBfile: str, + output_directory: str, + solvent_model: str, + replica_index: int, + ) -> dict: + """ + Run openmm simulation of the model pdb. + + Parameters + ---------- + inputPDBfile : str + Path to the PDB file. + + output_folder : str + Path to the output directory. + + solvent_model : str + One of the OpenMM's solvent models. + + Return + ---------- + output_files : dict + Dict holding paths to configurations generated along the simulation + """ + # Initiate output dictionary + output_files: dict[str, Union[str, list[str]]] = {} + # Split output path + fn, ext = os.path.splitext(self.output_filename) + + # Make sure something has to be done... + if self.params["simulation_timesteps"] == 0: + output_filepath = os.path.join( + output_directory, + f"{fn}_{replica_index}{ext}" + ) + os.rename(inputPDBfile, output_filepath) + output_files["final"] = output_filepath + return output_files + + # Load pdb + pdb = openmmpdbfile(inputPDBfile) + forcefield = ForceField(self.params['forcefield'], solvent_model) + # system setup + nonbondedMethod = NoCutoff if self.params["implicit_solvent"] else PME + # should give an ERROR when system_constraints = 'None'. + system = forcefield.createSystem( + pdb.topology, + nonbondedMethod=nonbondedMethod, + nonbondedCutoff=1 * nanometer, + constraints=self.constraints, + removeCMMotion=self.params['remove_center_of_mass_motion'], + rigidWater=self.params['rigid_water'] + ) + # integrator definition. Few freedom here + integrator = LangevinMiddleIntegrator( + self.params['temperature_kelvin'] * kelvin, + 1 / picosecond, + self.params['timestep_ps'] * picoseconds + ) + + # Add the restrain force to the system + # self._gen_centroid_forces(pdb) + + # setting integrator seed + replica_seed = self.params["iniseed"] + replica_index + if replica_seed != 0: + log.info(f"setting non-random seed = {replica_seed}") + integrator.setRandomNumberSeed(replica_seed) + # retrieving integrator seed + get_seed = integrator.getRandomNumberSeed() + log.info(f"simulation seed {get_seed} for {self.model.file_name}") + + # simulation + simulation = Simulation(pdb.topology, system, integrator) + statereporter = statedatareporter.StateDataReporter( + f'{self.directory_dict["simulation_stats"]}/observables_{self.identificator}_{replica_index}.dat', # noqa : E501 + 50, + step=True, + totalEnergy=True, + potentialEnergy=True, + temperature=True, + volume=True, + density=True, + ) + simulation.reporters.append(statereporter) + + platform = simulation.context.getPlatform() + log.info(f"Running on platform {platform.getName()}") + log.info(f"Estimated platform speed: {platform.getSpeed()}") + simulation.context.setPositions(pdb.positions) + simulation.minimizeEnergy() + log.info(f"Running NVT equilibration for {self.model.file_name}") + + # warming up the system with a NVT equilibration (canonical ensemble) + eq_steps = self.params["equilibration_timesteps"] + log.info( + f"Warming up the system to {self.params['temperature_kelvin']}" + f" K in ~{eq_steps} steps" + ) + # In how many iterations are we inceasing the temperature ? + nvt_sims = 10 + # How much should be increase the temperature at each iteration + delta_temp = self.params["temperature_kelvin"] / nvt_sims + integrator.setFriction(100 / picosecond) + for n in range(1, nvt_sims + 1): + qtemp = n * delta_temp + integrator.setTemperature(qtemp * kelvin) + simulation.step(int(eq_steps / nvt_sims)) + # Set final temperature and temperature coupling parameters + integrator.setTemperature(self.params["temperature_kelvin"] * kelvin) + integrator.setFriction(1 / picosecond) + # Try to obtain the degree of freedom + try: + dof = statereporter._dof + except AttributeError: + # may not exists if in implicit solvent.. + dof = system.getNumParticles() * 3 + # Makes sure temperature of the system is reached + self._stabilize_temperature( + simulation, + self.params["temperature_kelvin"], + dof, + tolerance=5.0, + steps=50 + ) + log.info( + f"Temperature of {self.params['temperature_kelvin']} K " + f"reached in {simulation.context.getStepCount()} steps" + ) + + # Write + eq_pdb_filepath = os.path.join( + self.directory_dict["intermediates"], + f"{fn}_eq_{replica_index}{ext}" + ) + self._write_current_pdb(simulation, eq_pdb_filepath) + output_files["equilibrated"] = eq_pdb_filepath + + # NPT simulation (isothermal-isobaric ensemble) + _barostat = MonteCarloBarostat( # noqa : F841 + 1 * atmosphere, + self.params["temperature_kelvin"] * kelvin + ) + # FIXME : Once the MonteCarloBarostat will no more split chains + # appart in different periodic boxes, please uncomment next line + # simulation.system.addForce(_barostat) + + # Reinitialize the simulation + simulation.context.reinitialize(True) + + # Running real simulation + log.info( + f"Running simulation for {self.model.file_name} for " + f"{self.params['simulation_timesteps']} timesteps" + ) + + # Save intermediates + if self.params["save_intermediate"]: + # Initialize variables + done_steps = 0 + output_files["intermediates"] = [] + steps_intermediate = int( + self.params["simulation_timesteps"] + // self.params["save_intermediate"] + ) + starting_step_inter = int(steps_intermediate / 2) + + # Do few steps + simulation.step(starting_step_inter) + done_steps += starting_step_inter + # Define intermediates output file + int_filepath = os.path.join( + self.directory_dict["intermediates"], + f"{fn}_{replica_index}_{done_steps}steps{ext}" + ) + self._write_current_pdb(simulation, int_filepath) + output_files["intermediates"].append(int_filepath) + + # Loop over intermediate steps + for _i in range(self.params["save_intermediate"] - 1): + simulation.step(steps_intermediate) + done_steps += steps_intermediate + # Define intermediates output file + int_filepath = os.path.join( + self.directory_dict["intermediates"], + f"{fn}_{replica_index}_{done_steps}steps{ext}" + ) + self._write_current_pdb(simulation, int_filepath) + output_files["intermediates"].append(int_filepath) + + # Do the remaining simulation steps + simulation.step(self.params["simulation_timesteps"] - done_steps) + else: + simulation.step(self.params["simulation_timesteps"]) + + # Write final pdb file + output_filepath = os.path.join( + output_directory, + f"{fn}_{replica_index}{ext}" + ) + self._write_current_pdb(simulation, output_filepath) + output_files["final"] = output_filepath + # Log end of OpenMM simulation info + log.info(f"OpenMM simulation successful for: {output_filepath}") + # Return data + return output_files + + @staticmethod + def _write_current_pdb( + simulation: Simulation, + output_path: str, + reference_pdb: Optional[list] = None, + ) -> None: + """Write the current position of atoms in the simulation. + + Parameters + ---------- + simulation: :py:class:`openmm.app.simulation.Simulation` + An openmm simulation class + + output_path : str + Path of the file where to write the pdb file + """ + # Retrieve last state data + current_state = simulation.context.getState( + getPositions=True, + # enforcePeriodicBox=True + ) + # Write pdb file + openmmpdbfile.writeFile( + simulation.topology, + current_state.getPositions(), + open(output_path, "w"), + keepIds=True, + ) + + def generate_output_ensemble( + self, + replicas_outputs: list[dict[str, Union[str, list[str]]]], + ) -> str: + """Combine all replicas outputs into a single file. + + Parameters + ---------- + replicas_outputs: list[dict[str, Union[str, list[str]]]] + List of dictionnary mapping to all simulation replicas outputs. + + Returns + ------- + final_openmm_output: str + Path to the ensemble (composed of the equilibrated, intermediates, + and final structure), for all replicas, generated by the module. + """ + # Combines all outputs in a list + all_files: list[str] = [] + for sample in replicas_outputs: + for _outputtype, outputpath in sample.items(): + if isinstance(outputpath, str): + all_files.append(outputpath) + elif isinstance(outputpath, list): + all_files += outputpath + # Generate ensemble + ensemble_filepath = os.path.join( + self.directory_dict["openmm_output"], + self.output_filename, + ) + log.info( + f"Generating ensemble from {len(all_files)} samples: " + f"{ensemble_filepath}" + ) + ensemble = pdb_mkensemble.run(all_files) + with open(ensemble_filepath, "w") as wfile: + for line in ensemble: + wfile.write(line) + # Remove single structure files + for non_ensemble_fp in all_files: + os.remove(non_ensemble_fp) + return ensemble_filepath + + def run(self) -> None: + """Run openmm simulation.""" + # using pdbfixer + self.openmm_pdbfixer() + # explicit solvent simulation + if not self.params["implicit_solvent"]: + # define solvent model and create solvation box + solvent_model = self.params["explicit_solvent_model"] + # create solvation box + try: + pdbPath = self.create_solvation_box(solvent_model) + except ModuleError as _err: + return + # Eauilibrate this box around system + pdbPath = self.equilibrate_solvation_box(pdbPath, solvent_model) + # set variables + output_folder = self.directory_dict["md_raw_output"] + solvent = "explicit solvent" + # implicit solvent simulation + else: + pdbPath = os.path.join( + self.directory_dict["pdbfixer"], + self.model.file_name + ) + output_folder = self.directory_dict["openmm_output"] + solvent_model = self.params["implicit_solvent_model"] + solvent = "implicit solvent" + + log.info(f"starting {solvent} openMM simulation with file: {pdbPath}") + + # Loop over samplings/replicas + replicas_outputs: list[dict[str, Union[str, list[str]]]] = [] + for replica_ind in range(self.params["sampling_factor"]): + replica_struct = self.run_openmm( + pdbPath, + output_folder, + solvent_model, + replica_ind + 1, + ) + replicas_outputs.append(replica_struct) + + # Solvent removal procedure + if not self.params["implicit_solvent"] and \ + not self.params["keep_solvent"]: + # Loop over replicas + for replica_structs in replicas_outputs: + for outputtype in replica_structs.keys(): + # Remove solvent molecules from outputs + if isinstance(replica_structs[outputtype], list): + nosolv_out = [ + self.remove_water_and_ions(pdb) + for pdb in replica_structs[outputtype] + ] # type: ignore + else: + nosolv_out = self.remove_water_and_ions( + replica_structs[outputtype] + ) # type: ignore + # Modify paths in files mapper + replica_structs[outputtype] = nosolv_out + + # Post-process results and place them in appropriate directory + if self.params["generate_ensemble"]: + # Generate ensemble + self.generate_output_ensemble(replicas_outputs) + else: + # Generate list of final structures only + for replica_mapper in replicas_outputs: + raw_output = replica_mapper["final"] + final_output = raw_output.replace( + self.directory_dict["md_raw_output"], + self.directory_dict["openmm_output"] + ) + os.rename(raw_output, final_output) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/._lightdock b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/._lightdock new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/._lightdock differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/._rigidbody b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/._rigidbody new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/._rigidbody differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..3aabc2a87e5c1773085453f6420936be2921b0c8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/__init__.py @@ -0,0 +1 @@ +"""HADDOCK3 modules for sampling.""" diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..d8f58961c0f0e7dd3ab925bcea224fd7e147bbb8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/__init__.py @@ -0,0 +1,160 @@ +"""LightDock integration sampling module.""" +import shutil +import subprocess +from pathlib import Path + +from haddock import log +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import Any, FilePath +from haddock.libs import libpdb +from haddock.libs.libio import working_directory +from haddock.libs.libontology import Format, PDBFile +from haddock.libs.libutil import check_subprocess +from haddock.modules import BaseHaddockModule + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(BaseHaddockModule): + """HADDOCK3 Lightdock module.""" + + name = RECIPE_PATH.name + + def __init__( + self, + order: int, + path: Path, + *ignore: Any, + initial_params: FilePath = DEFAULT_CONFIG, + **everything: Any, + ) -> None: + super().__init__(order, path, initial_params) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm this module is installed.""" + check_subprocess('lightdock3.py -h') + + def _run(self) -> None: + """Execute module.""" + # Get the models generated in previous step + models: list[PDBFile] = [ + p + for p in self.previous_io.output + if p.file_type == Format.PDB + ] + + # Check if multiple models are provided + if len(models) > 1: + _msg = "Only one model allowed in LightDock sampling module" + self.finish_with_error(_msg) + + model = models[0] + # Check if chain IDs are present + _path = Path(model.path, model.file_name) + segids, chains = libpdb.identify_chainseg(_path) + if set(segids) != set(chains): + log.info("No chain IDs found, using segid information") + libpdb.swap_segid_chain( + Path(model.path, model.file_name), + Path(self.path, model.file_name), + ) + else: + # Copy original model to this working path + shutil.copyfile( + Path(model.path, model.file_name), + Path(self.path, model.file_name), + ) + + model_with_chains = self.path / model.file_name + # Split by chain + new_models = libpdb.split_by_chain(model_with_chains) + if model_with_chains in new_models: + self.finish_with_error(f"Input {model_with_chains} cannot be" + " split by chain") + + # Receptor and ligand PDB structures + rec_chain = self.params["receptor_chains"][0] + lig_chain = self.params["ligand_chains"][0] + receptor_pdb_file = (f"{Path(model.file_name).stem}_" + f"{rec_chain}.{Format.PDB}") + ligand_pdb_file = (f"{Path(model.file_name).stem}_" + f"{lig_chain}.{Format.PDB}") + + # Setup + log.info("Running LightDock setup") + with working_directory(self.path): + swarms = self.params["swarms"] + glowworms = self.params["glowworms"] + noxt = self.params["noxt"] + noh = self.params["noh"] + cmd = (f"lightdock3_setup.py {receptor_pdb_file}" + f" {ligand_pdb_file} -s {swarms} -g {glowworms}") + if noxt: + cmd += " --noxt" + if noh: + cmd += " --noh" + subprocess.call(cmd, shell=True) + + # Simulation + log.info("Running LightDock simulation") + with working_directory(self.path): + steps = self.params["steps"] + scoring = self.params["scoring"] + cores = self.params['ncores'] or 1 + cmd = f"lightdock3.py setup.json {steps} -c {cores} -s {scoring}" + subprocess.call(cmd, shell=True) + + # Clustering + + # Ranking + log.info("Generating ranking") + with working_directory(self.path): + steps = self.params["steps"] + swarms = self.params["swarms"] + cmd = f"lgd_rank.py {swarms} {steps}" + subprocess.call(cmd, shell=True) + + # Generate top, requires a hack to use original structures (H, OXT, + # etc.) + log.info("Generating top structures") + with working_directory(self.path): + # Save structures, needs error control + shutil.copyfile( + Path(self.path, receptor_pdb_file), + Path(self.path, f"tmp_{receptor_pdb_file}"), + ) + shutil.copyfile( + Path(self.path, ligand_pdb_file), + Path(self.path, f"tmp_{ligand_pdb_file}") + ) + shutil.copy( + Path(self.path, receptor_pdb_file), + Path(self.path, f"lightdock_{receptor_pdb_file}"), + ) + shutil.copy( + Path(self.path, ligand_pdb_file), + Path(self.path, f"lightdock_{ligand_pdb_file}"), + ) + # Create top + steps = self.params["steps"] + top = self.params["top"] + cmd = (f"lgd_top.py {receptor_pdb_file} {ligand_pdb_file}" + f" rank_by_scoring.list {top}") + subprocess.call(cmd, shell=True) + + # Tidy top files + expected: list[PDBFile] = [] + top = self.params["top"] + for i in range(top): + file_name = f"top_{i+1}.{Format.PDB}" + tidy_file_name = f"haddock_top_{i+1}.{Format.PDB}" + libpdb.tidy(self.path / file_name, self.path / tidy_file_name) + expected.append(PDBFile(tidy_file_name, + topology=model.topology, + path=self.path)) + + self.output_models = models + self.export_io_models() diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ba8600936825b3100b61e06d9f7beedce4209ee5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/lightdock/defaults.yaml @@ -0,0 +1,134 @@ +glowworms: + default: 200 + type: integer + min: -9999 + max: 9999 + title: No title yet + short: No short description yet + long: No long description yet + group: 'sampling' + explevel: easy +steps: + default: 100 + type: integer + min: -9999 + max: 9999 + title: No title yet + short: No short description yet + long: No long description yet + group: 'sampling' + explevel: easy +swarms: + default: 400 + type: integer + min: -9999 + max: 9999 + title: No title yet + short: No short description yet + long: No long description yet + group: 'sampling' + explevel: easy +scoring: + default: fastdfire + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'scoring' + explevel: easy +top: + default: 10 + type: integer + min: -9999 + max: 9999 + title: No title yet + short: No short description yet + long: No long description yet + group: 'analysis' + explevel: easy +receptor_chains: + default: A + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'restraints' + explevel: easy +receptor_active: + default: '' + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'restraints' + explevel: easy +receptor_passive: + default: '' + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'restraints' + explevel: easy +ligand_chains: + default: B + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'restraints' + explevel: easy +ligand_active: + default: '' + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'restraints' + explevel: easy +ligand_passive: + default: '' + type: string + minchars: 0 + maxchars: 100 + title: No title yet + short: No short description yet + long: No long description yet + group: 'restraints' + explevel: easy +noxt: + default: true + type: boolean + title: No title yet + short: No short description yet + long: No long description yet + group: 'topology' + explevel: easy +noh: + default: true + type: boolean + title: No title yet + short: No short description yet + long: No long description yet + group: 'topology' + explevel: easy +restraints: + default: false + type: boolean + title: No title yet + short: No short description yet + long: No long description yet + group: 'distance restraints' + explevel: easy diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/._cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/._cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/._cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..739b744dba5185beecbe54bad760e6b7133359fa --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/__init__.py @@ -0,0 +1,271 @@ +""" +Rigid-body docking sampling module +================================== + +This module does a **randomization of orientations and rigid-body +minimization.** It corresponds to the classical ``it0`` step in the HADDOCK2.x +series. + +In this module, the interacting partners are treated as rigid bodies, meaning +that all geometrical parameters such as bond lengths, bond angles, and dihedral +angles are frozen. The partners are first separated in space and randomly +rotated around their respective centres of mass. Afterwards, the molecules are +brought together by rigid-body energy minimisation with rotations and +translation as the only degrees of freedom. + +The driving force for this energy minimisation is the energy function, which +consists of the intermolecular van der Waals and electrostatic energy terms and +the restraints defined to guide the docking. The restraints are distance-based +and can consist of unambiguous or ambiguous interactions restraints (AIRS). In +*ab-initio* docking mode those restraints can be automatically defined in +various ways; e.g. between center of masses (CM restraints) or between randomly +selected patches on the surface (random AIRs). + +The definition of those restraints is particularly important as they effectively +guide the minimisation process. For example, with a stringent set of AIRs or +unambiguous distance restraints, the solutions of the minimisation will converge +much better and the sampling can be limited. In *ab-initio* mode, however, very +diverse solutions will be obtained and the sampling should be increased to make +sure to sample enough the possible interaction space. +""" + +from pathlib import Path + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import FilePath, Optional, Sequence, Union +from haddock.gear.haddockmodel import HaddockModel +from haddock.libs.libcns import prepare_cns_input +from haddock.libs.libontology import PDBFile +from haddock.libs.libparallel import GenericTask +from haddock.libs.libpdb import check_combination_chains +from haddock.libs.libsubprocess import CNSJob +from haddock.modules import get_engine +from haddock.modules.base_cns_module import BaseCNSModule + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(BaseCNSModule): + """HADDOCK3 module for rigid body sampling.""" + + name = RECIPE_PATH.name + + def __init__( + self, order: int, path: Path, initial_params: FilePath = DEFAULT_CONFIG + ) -> None: + cns_script = Path(RECIPE_PATH, "cns", "rigidbody.cns") + super().__init__(order, path, initial_params, cns_script=cns_script) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm module is installed.""" + return + + def make_cns_jobs( + self, + inp_list: Sequence[ + tuple[list[PDBFile], Union[Path, str], Union[str, None], int] + ], + ) -> list[CNSJob]: + jobs = [] + for idx, e in enumerate(inp_list, start=1): + combination, inp_input, ambig_fname, seed = e + + log_fname = f"rigidbody_{idx}.out" + err_fname = f"rigidbody_{idx}.cnserr" + output_pdb_fname = f"rigidbody_{idx}.pdb" + + # Create a model for the expected output + model = PDBFile(output_pdb_fname, path=".", restr_fname=ambig_fname) + model.topology = [e.topology for e in combination] + model.seed = seed # type: ignore + self.output_models.append(model) + + job = CNSJob(inp_input, log_fname, err_fname, envvars=self.envvars) + jobs.append(job) + return jobs + + def prepare_cns_input_sequential( + self, + models_to_dock: list[list[PDBFile]], + sampling_factor: int, + ambig_fnames: Union[list, None], + ) -> list[tuple[list[PDBFile], Union[Path, str], Union[str, None], int]]: + _l = [] + idx = 1 + for combination in models_to_dock: + for _ in range(sampling_factor): + # assign ambig_fname + if ambig_fnames: + ambig_fname = ambig_fnames[idx - 1] + else: + ambig_fname = self.params["ambig_fname"] + # prepare cns input + seed = self.params["iniseed"] + idx + rigidbody_input = prepare_cns_input( + idx, + combination, + self.path, + self.recipe_str, + self.params, + "rigidbody", + ambig_fname=ambig_fname, + default_params_path=self.toppar_path, + native_segid=True, + debug=self.params["debug"], + seed=seed, + ) + _l.append((combination, rigidbody_input, ambig_fname, seed)) + + idx += 1 + return _l + + def prepare_cns_input_parallel( + self, + models_to_dock: list[list[PDBFile]], + sampling_factor: int, + ambig_fnames: Union[list, None], + ) -> list[tuple[list[PDBFile], Union[Path, str], Union[str, None], int]]: + prepare_tasks = [] + _l = [] + idx = 1 + for combination in models_to_dock: + check_combination_chains(combination) + for _ in range(sampling_factor): + ambig_fname = ( + ambig_fnames[idx - 1] + if ambig_fnames + else self.params["ambig_fname"] + ) + seed = self.params["iniseed"] + idx + task = GenericTask( + function=prepare_cns_input, + model_number=idx, + input_element=combination, + step_path=self.path, + recipe_str=self.recipe_str, + defaults=self.params, + identifier="rigidbody", + ambig_fname=ambig_fname, + native_segid=True, + default_params_path=self.toppar_path, + debug=self.params["debug"], + seed=seed, + ) + + prepare_tasks.append(task) + _l.append((combination, task, ambig_fname, seed)) + idx += 1 + Engine = get_engine(self.params["mode"], self.params) + prepare_engine = Engine(prepare_tasks) + prepare_engine.run() + + # Replace the task with the result of the task + l = [] + for element, task_result in zip(_l, prepare_engine.results): + l.append((element[0], task_result, element[2], element[3])) + + return l + + def restraints_guardrail(self, ambig_fnames: Optional[list[str]]) -> None: + """Makes sure any restraints are available for the docking.""" + # List all types of restraints + all_restraints = ( + ambig_fnames, + self.params["ambig_fname"], + self.params["unambig_fname"], + self.params["hbond_fname"], + self.params["cmrest"], + self.params["ranair"], + self.params["surfrest"], + ) + # If not any restraints provided + if not any(all_restraints): + # Terminate docking + self.finish_with_error( + "No restraints found for [rigidbody] module. " + "For targeted docking, supply CNS-valid restraints file(s) " + "using 'ambig_fname' and/or 'unambig_fname' and/or " + "'hbond_fname' parameter(s). " + "For ab-initio docking, set 'cmrest' or 'ranair' " + "parameters to true." + ) + + def _run(self) -> None: + """Execute module.""" + # Pool of jobs to be executed by the CNS engine + jobs: list[CNSJob] = [] + + # Get the models generated in previous step + try: + if self.params["crossdock"]: + self.log("crossdock=true") + models_to_dock = self.previous_io.retrieve_models( + crossdock=self.params["crossdock"] + ) + except Exception as e: + self.finish_with_error(e) + + # How many times each combination should be sampled, + # cannot be smaller than 1 + sampling_factor = int(self.params["sampling"] / len(models_to_dock)) + if sampling_factor < 1: + self.finish_with_error( + "Sampling is smaller than the number" + " of model combinations " + f"#model_combinations={len(models_to_dock)}," + f' sampling={self.params["sampling"]}.' + ) + + # get all the different ambig files + prev_ambig_fnames = [None for model in range(self.params["sampling"])] + diff_ambig_fnames = self.get_ambig_fnames(prev_ambig_fnames) # type: ignore + # if no files are found, we will stick to self.params["ambig_fname"] + if diff_ambig_fnames: + n_diffs = len(diff_ambig_fnames) + ambig_fnames = [ + diff_ambig_fnames[n % n_diffs] for n in range(self.params["sampling"]) + ] # noqa: E501 + else: + ambig_fnames = None + + self.restraints_guardrail(ambig_fnames) + + self.output_models: list[PDBFile] = [] + self.log("Preparing jobs...") + if self.params["mode"] != "local": + # Note: `batch` and (pseudo)-`mpi` mode uses files to communicate and cannot extract the information from the task object. + cns_input = self.prepare_cns_input_sequential( + models_to_dock, sampling_factor, ambig_fnames # type: ignore + ) + + else: + cns_input = self.prepare_cns_input_parallel( + models_to_dock, sampling_factor, ambig_fnames # type: ignore + ) + + jobs = self.make_cns_jobs(cns_input) + + # Run CNS Jobs + self.log(f"Running CNS Jobs n={len(jobs)}") + Engine = get_engine(self.params["mode"], self.params) + engine = Engine(jobs) + engine.run() + self.log("CNS jobs have finished") + + # Get the weights according to CNS parameters + _weight_keys = ("w_vdw", "w_elec", "w_desolv", "w_air", "w_bsa") + weights = {e: self.params[e] for e in _weight_keys} + + for model in self.output_models: + if model.is_present(): + # Score the model + haddock_model = HaddockModel(model.file_name) + model.unw_energies = haddock_model.energies + + haddock_score = haddock_model.calc_haddock_score(**weights) + model.score = haddock_score + + self.export_io_models(faulty_tolerance=self.params["tolerance"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._bestener.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._bestener.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._bestener.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._bsa.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._bsa.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._bsa.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._charge-beads-interactions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._charge-beads-interactions.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._charge-beads-interactions.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._check-homomers.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._check-homomers.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._check-homomers.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._check_coordinates.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._cm-restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._cm-restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._cm-restraints.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._def_solv_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._get_random_rotation.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._get_random_rotation.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._get_random_rotation.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._print_coorheader.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._random_rotations.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._random_rotations.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._random_rotations.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._randomairs.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._randomairs.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._randomairs.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._read_noes.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._read_noes.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._read_noes.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._read_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._rigidbody.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._rigidbody.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._rigidbody.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._rotation180.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._rotation180.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._rotation180.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_final.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_mini.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_mini.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_mini.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_inter_only.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._scale_intra_only.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._separate.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._separate.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._separate.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._surf-restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._surf-restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._surf-restraints.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._symmultimer.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._symmultimer.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/._symmultimer.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/bestener.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/bestener.cns new file mode 100644 index 0000000000000000000000000000000000000000..533e5ad429389bc80c9545031176313f00107194 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/bestener.cns @@ -0,0 +1,108 @@ +! bestener.cns +! Store best score model from rigid-body dooking (it0) +! Version supporting only distance-based restraints +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +eval ($kinter = 1.0) +@MODULE:scale_inter_mini.cns + +evaluate ($unambig_scale = $Data.unambig_scale) +evaluate ($ambig_scale = $Data.ambig_scale) +evaluate ($hbond_scale = $Data.hbond_scale) + +noe + scale dist $unambig_scale + scale ambi $ambig_scale + scale hbon $hbond_scale + scale symm 0.0 +end + +evaluate ($ener = 0.0) +evaluate ($vdw = 0.0) +evaluate ($elec = 0.0) +evaluate ($noe = 0.0) +evaluate ($coll = 0.0) +evaluate ($eair = 0.0) +evaluate ($cdih = 0.0) +evaluate ($vean = 0.0) +evaluate ($sani = 0.0) +evaluate ($xrdc = 0.0) +evaluate ($xpcs = 0.0) +evaluate ($dani = 0.0) +evaluate ($esym = 0.0) +evaluate ($zhar = 0.0) +evaluate ($bsa = 0.0) +evaluate ($desolv = 0.0) +evaluate ($lcc = 0.0) + +energy end +evaluate ($eair = $noe) + +if ($Data.flags.sym eq true) then + noe + scale * 0.0 + scale symm $Data.ksym + end + energy end + evaluate ($esym = $noe) +end if + +if ($SaProtocol.rigidtrans eq true) then + inline @MODULE:bsa.cns +end if + +evaluate ($etot = $w_vdw * $vdw) +evaluate ($etot = $etot + $w_elec * $elec) +evaluate ($etot = $etot + $w_air * $eair) +evaluate ($etot = $etot + $w_rg * $coll) +evaluate ($etot = $etot + $w_cdih * $cdih) +evaluate ($etot = $etot + $w_sani * $sani) +evaluate ($etot = $etot + $w_xrdc * $xrdc) +evaluate ($etot = $etot + $w_xpcs * $xpcs) +evaluate ($etot = $etot + $w_dani * $dani) +evaluate ($etot = $etot + $w_vean * $vean) +evaluate ($etot = $etot + $w_sym * $esym) +evaluate ($etot = $etot + $w_zres * $zhar) +evaluate ($etot = $etot + $w_bsa * $bsa) +evaluate ($etot = $etot + $w_desolv * $desolv) +evaluate ($etot = $etot + $w_lcc * $lcc) + +if ($nfirst = 1) then + evaluate ($bestener = $etot) + evaluate ($bestair = $eair) + do (refx = x) (all) + do (refy = y) (all) + do (refz = z) (all) + evaluate ($nfirst = 0) + ident (store3) (not all) +else + if ($etot < $bestener) then + evaluate ($bestener = $etot) + evaluate ($bestair = $eair) + do (refx = x) (all) + do (refy = y) (all) + do (refz = z) (all) + end if +end if + +evaluate ($kinter = $SaProtocol.inter_rigid) +@MODULE:scale_inter_mini.cns + +evaluate ($unambig_scale = $unambig_scale_store) +evaluate ($ambig_scale = $ambig_scale_store) +evaluate ($hbond_scale = $hbond_scale_store) +evaluate ($symm_scale = $symm_scale_store) + +noe + scale dist $unambig_scale + scale ambi $ambig_scale + scale hbon $hbond_scale + scale symm $symm_scale +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/bsa.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/bsa.cns new file mode 100644 index 0000000000000000000000000000000000000000..79569bb0ae41f556a493b6f2ce44a5abe9ee71e7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/bsa.cns @@ -0,0 +1,52 @@ +! bsa.cns +! +! Calculate buried surface area and desolvation energy of the complex +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{====>} {* define ASA-based solvation parameters *} +inline @MODULE:def_solv_param.cns + +{====>} {* buried surface area and desolvation of single chains *} +evaluate ($nchain1 = 0) +evaluate ($saafree = 0) +evaluate ($esolfree = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate ($nchain1 = $nchain1 + 1) + {====>} {* buried surface area and desolvation*} + do (rmsd = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 sele=(segid $prot_segid_$nchain1 and not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) end + show sum (rmsd) (segid $prot_segid_$nchain1 and not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) + evaluate ($saafree = $saafree + $result) + do (store2 = rmsd * store1) (segid $prot_segid_$nchain1 and not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) + show sum (store2) (segid $prot_segid_$nchain1 and not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) + evaluate ($esolfree = $esolfree + $result) +end loop nloop1 + +{====>} {* buried surface area and desolvation of complex *} +do (rmsd = 0) (all) +do (store2 = 0) (all) +surface mode=access accu=0.075 rh2o=1.4 sele=(not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) end +show sum (rmsd) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +evaluate ($satot = $result) +do (store2 = rmsd * store1) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +show sum (store2) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +evaluate ($esolcplx = $result) +evaluate ($saburied = $saafree - $satot) +! minimum BSA value set to 15 (one H atom would have SASA of 12.56 A**2) +if ($saburied < 15) then + evaluate ($saburied = -999999) +end if + +evaluate ($edesolv = $esolcplx - $esolfree) + +if ($data.ncomponents eq 1) then + evaluate ($bsa = 0) + evaluate ($desolv = 0) +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/charge-beads-interactions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/charge-beads-interactions.cns new file mode 100644 index 0000000000000000000000000000000000000000..cc737f48b257038b92405bc3db93fbfc47440066 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/charge-beads-interactions.cns @@ -0,0 +1,43 @@ +! charge-beads-interactions.cns +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +for $id1 in id ( (resn SER or resn THR or resn ASN or resn GLN) and name BB ) loop c1beads + + show (segid) (id $id1) + evaluate ($cgsegid=$result) + show (resid) (id $id1) + evaluate ($cgresid=$result) + + igroup + ! turn off all vdw interactions between charged beads and all beads + interaction (segid $cgsegid and resid $cgresid and name SCD1) (all) weight vdw 0.0 end + interaction (segid $cgsegid and resid $cgresid and name SCD2) (all) weight vdw 0.0 end + + ! turn off all vdw and elec interactions between the charged beads within one residue + interaction (segid $cgsegid and resid $cgresid and name SCD1) + (segid $cgsegid and resid $cgresid and name SCD2) weight * 1.0 vdw 0.0 elec 0.0 end + end + +end loop c1beads + +for $id1 in id ( (resn LYS or resn ARG or resn ASP or resn GLU) and name BB ) loop c2beads + + show (segid) (id $id1) + evaluate ($cgsegid=$result) + show (resid) (id $id1) + evaluate ($cgresid=$result) + + igroup + ! turn off all vdw interactions between charged beads and all beads + interaction (segid $cgsegid and resid $cgresid and name SCD1) (all) weight vdw 0.0 end + end + +end loop c2beads + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/check-homomers.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/check-homomers.cns new file mode 100644 index 0000000000000000000000000000000000000000..7faf7a4c90f49812724e0a5e217f380cba1b712f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/check-homomers.cns @@ -0,0 +1,56 @@ +! check-homomers.cns +! check for homomeric complexes +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +evaluate ($homosymmetry = false) + +evaluate($n_moving_mol = 0) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop checkmol + evaluate ($ncount = $ncount + 1) + if ($mol_shape_$ncount eq false) then + evaluate($n_moving_mol = $n_moving_mol + 1) + end if +end loop checkmol + +if ($data.flags.sym eq true) then + if ($data.nc2sym > 0) then + if ($n_moving_mol = 2) then + evaluate ($homosymmetry = true) + end if + end if + if ($data.nc2sym = 6) then + if ($n_moving_mol = 4) then + evaluate ($homosymmetry = true) + end if + end if + if ($data.nc3sym > 0) then + if ($n_moving_mol = 3) then + evaluate ($homosymmetry = true) + end if + end if + if ($data.nc4sym > 0) then + if ($n_moving_mol = 4) then + evaluate ($homosymmetry = true) + end if + end if + if ($data.nc5sym > 0) then + if ($n_moving_mol = 5) then + evaluate ($homosymmetry = true) + end if + end if + if ($data.nc6sym > 0) then + if ($n_moving_mol = 6) then + evaluate ($homosymmetry = true) + end if + end if +end if + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..d23c8e64804060c61ff6aeea38925dc8e61dc8d6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/check_coordinates.cns @@ -0,0 +1,100 @@ +! check_coordinates.cns +! Check max/min coordinates for compatibility with PDB format +! +! *********************************************************************** +! * Copyright 2025 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($failure = false) + +!check for coordinates >9999.999 (max writable in PDB format) + +show max (x) (all) +evaluate ($maxcoor = $result) +show max (y) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +show max (z) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +if ($maxcoor gt 9999.999) then + evaluate ($failure = true) +end if + +!check for coordinates <-999.999 (min writable in PDB format) + +show min (x) (all) +evaluate ($mincoor = $result) +show min (y) (all) +if ($result lt $mincoor) then + evaluate ($maxcoor = $result) +end if +show min (z) (all) +if ($result lt $mincoor) then + evaluate ($mincoor = $result) +end if +if ($mincoor lt -999.999) then + evaluate ($failure = true) +end if + +!if problem detected try correcting it by centering the system around 4500,4500,4500 +!but only if no EM restraints are used + +if ($failure eq true) then + if ($data.flags.em eq false) then + + evaluate ($xc = 0.0) + evaluate ($yc = 0.0) + evaluate ($zc = 0.0) + show ave (x) (all) + evaluate ($xc = 4500 - $result) + show ave (y) (all) + evaluate ($yc = 4500 - $result) + show ave (z) (all) + evaluate ($zc = 4500 -$result) + + do (x = x + $xc) (all) + do (y = y + $yc) (all) + do (z = z + $zc) (all) + + evaluate ($failure = false) + evaluate ($maxcoor = -999) + evaluate ($mincoor = 9999) + !check again for coordinates >9999.999 (max writable in PDB format) + show max (x) (all) + evaluate ($maxcoor = $result) + show max (y) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + show max (z) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + if ($maxcoor gt 9999.999) then + evaluate ($failure = true) + end if + + !check for coordinates <-999.999 (min writable in PDB format) + show min (x) (all) + evaluate ($mincoor = $result) + show min (y) (all) + if ($result lt $mincoor) then + evaluate ($maxcoor = $result) + end if + show min (z) (all) + if ($result lt $mincoor) then + evaluate ($mincoor = $result) + end if + if ($mincoor lt -999.999) then + evaluate ($failure = true) + end if + end if +end if + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/cm-restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/cm-restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..51a4b9e4a4ed699653e4e65c1ddaa729202f3628 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/cm-restraints.cns @@ -0,0 +1,131 @@ +! cm-restraints.cns +! Define center-of-mass restraints between molecules +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +!define center of mass restraints between all molecules +!using distance restraints between CA, BB or N1 atoms with center averaging + +evaluate ($ncount = 0) + +! store original coordinates +do (refx = x) (all) +do (refy = y) (all) +do (refz = z) (all) + +while ($ncount < $data.ncomponents) loop nloop1 + evaluate ($ncount = $ncount +1) + evaluate ($dim_$ncount = 0.0) + + !orient molecule + coor orient sele=(segid $prot_segid_$ncount) end + + ! find dimensions + show max (x) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($xdim = $result) + show max (y) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($ydim = $result) + show max (z) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($zdim = $result) + show min (x) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($xdim = $xdim - $result) + show min (y) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($ydim = $ydim - $result) + show min (z) (segid $prot_segid_$ncount and (name CA or name BB or name N1)) + evaluate ($zdim = $zdim - $result) + + evaluate ($corr = max($xdim,$ydim)) + evaluate ($corr = max($corr,$zdim)) + + if ($data.cmtight eq false) then + ! use average of all three dimensions + evaluate ($dim_$ncount = ($xdim + $ydim + $zdim)/6.0) + else + ! use only the average of the smallest two dimensions + evaluate ($dim_$ncount = ($xdim + $ydim + $zdim - $corr)/4.0) + end if + + ! check for anything not protein + do (store6 = 0) (all) + do (store6 = 1) (segid $prot_segid_$ncount and (name CA or name BB)) + show sum (store6) (all) + if ($result eq 0) then + ! we are dealing with a ligand, nucleic acid or glycan -> set dimension to 0 + evaluate ($dim_$ncount = 0.0) + end if + +end loop nloop1 + +! restore original coordinates +do (x = refx) (all) +do (y = refy) (all) +do (z = refz) (all) + +eval($nchain = 0) +do (store9 = 0) (all) +do (store9 = 1) (name CA or name BB or name N1) +while ($nchain < $data.ncomponents) loop nloop0 + eval($nchain = $nchain + 1) + show sum (store9) (segid $prot_segid_$nchain) + if ($result < 3) then + evaluate ($selat$nchain = 0 ) + else + evaluate ($selat$nchain = 1 ) + end if +end loop nloop0 + +eval($nchain1 = 0) +noe + class contact + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + if ($mol_shape_$nchain1 eq false) then + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + if ($mol_shape_$nchain2 eq false) then + if ($data.cmtight eq false) then + eval($cm_dist = $dim_$nchain1 + $dim_$nchain2) + else + eval($cm_dist = ($dim_$nchain1 + $dim_$nchain2)/2 ) + end if + if ($selat$nchain1 = 1) then + if ($selat$nchain2 = 1) then + assign (segid $prot_segid_$nchain1 and ( name CA or name BB or name N1 )) + (segid $prot_segid_$nchain2 and ( name CA or name BB or name N1 )) $cm_dist $cm_dist 1.0 + else + assign (segid $prot_segid_$nchain1 and ( name CA or name BB or name N1 )) + (segid $prot_segid_$nchain2) $cm_dist $cm_dist 1.0 + end if + else + if ($selat$nchain2 = 1) then + assign (segid $prot_segid_$nchain1) + (segid $prot_segid_$nchain2 and ( name CA or name BB or name N1 )) $cm_dist $cm_dist 1.0 + else + assign (segid $prot_segid_$nchain1) + (segid $prot_segid_$nchain2) $cm_dist $cm_dist 1.0 + end if + end if + end if + end loop nloop2 + end if + end loop nloop1 + + averaging contact center + scale contact $data.kcm + sqconstant contact 1.0 + sqexponent contact 2 + soexponent contact 1 + rswitch contact 1.0 + sqoffset contact 0.0 + asymptote contact 2.0 + msoexponent contact 1 + masymptote contact -0.1 + mrswitch contact 1.0 +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..5a9e07a042e08d15d5b98d859fa199151e7b4a43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/def_solv_param.cns @@ -0,0 +1,105 @@ +! def_solv_param.cns +! Define atomic solvation parameters +! Original valus taken from Fernandez-Recio et al. JMB 335:843 (2004) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($arofac = 6.26) +evaluate ($alifac = 1.27) +evaluate ($polfac = 2.30) + + +do (store1 = 0.0000) (all) +do (store1 = 0.0151 * $alifac) (name C*) +do (store1 = 0.0176 * $arofac) ((name CG* or name CD* or name CE* or name CH* or name CZ*) and (resn PHE or resn TYR or resn HIS or resn TRP)) +do (store1 = -0.0170 * $polfac) (name N*) +do (store1 = -0.0548 * $polfac) (name NT* or (name NZ* and resn LYS)) +do (store1 = -0.0273 * $polfac) (name NH* and resn ARG) +do (store1 = -0.0136 * $polfac) (name O*) +do (store1 = -0.0185 * $polfac) (name OG* or name OH) +do (store1 = -0.0299 * $polfac) ((name OD* and resn ASP) or (name OE* and resn GLU)) +do (store1 = 0.0112 * $polfac) (name S*) +do (store1 = 0.0022 * $polfac) ((name S* and attr charge = -0.3) or (name SD and resn MET)) +do (store1 = 0.0000) (name SHA) + +! +! CG parameters matched from the original terms +! +! Edesolv_aa +! ASP_cg = _________________________ +! ASA_cg +! +! ASA_cg and Edesol_aa calculated on a GGXGG peptide +! accuracy=0.0025, rh2o=1.4, delete H, sele=(resn X) +! +! e.g. BB bead alanine +! +! BB = CA + C + N + O +! ASA_cg = 176.4940 +! Edesolv_aa = -1.8889 +! +! ASP_cg = -0.0107 +! +! Charleen Don (2012), JR (2014), Jorge Roel (2017) +! +! + +do (store1 = 0.0000) (name BB or name SC*) +! Backbone beads +do (store1 = -0.0107) (name BB and resn ALA) +do (store1 = -0.0089) (name BB and resn GLY) +do (store1 = -0.0153) (name BB and resn ILE) +do (store1 = -0.0158) (name BB and resn VAL) +do (store1 = -0.0046) (name BB and resn PRO) +do (store1 = -0.0137) (name BB and resn ASN) +do (store1 = -0.0147) (name BB and resn GLN) +do (store1 = -0.0165) (name BB and resn THR) +do (store1 = -0.0154) (name BB and resn SER) +do (store1 = -0.0130) (name BB and resn MET) +do (store1 = -0.0167) (name BB and resn CYS) +do (store1 = -0.0126) (name BB and resn PHE) +do (store1 = -0.0134) (name BB and resn TYR) +do (store1 = -0.0134) (name BB and resn TRP) +do (store1 = -0.0169) (name BB and resn ASP) +do (store1 = -0.0150) (name BB and resn GLU) +do (store1 = -0.0155) (name BB and resn HIS) +do (store1 = -0.0163) (name BB and resn LYS) +do (store1 = -0.0162) (name BB and resn ARG) + +! Side-chain beads +!do (store1 = 0.0000) (name SC* and resn ALA) +!do (store1 = 0.0000) (name SC* and resn GLY) +do (store1 = 0.0255) (name SC* and resn ILE) +do (store1 = 0.0222) (name SC* and resn VAL) +do (store1 = 0.0230) (name SC* and resn PRO) +do (store1 = -0.0192) (name SC* and resn ASN) +do (store1 = -0.0135) (name SC* and resn GLN) +do (store1 = -0.0009) (name SC* and resn THR) +do (store1 = -0.0056) (name SC* and resn SER) +do (store1 = 0.0202) (name SC* and resn MET) +do (store1 = 0.0201) (name SC* and resn CYS) +do (store1 = 0.1005) (name SC* and resn PHE) +do (store1 = 0.0669) (name SC* and resn TYR) +do (store1 = 0.0872) (name SC* and resn TRP) +do (store1 = -0.0360) (name SC* and resn ASP) +do (store1 = -0.0301) (name SC* and resn GLU) +do (store1 = 0.0501) (name SC* and resn HIS) +do (store1 = -0.0210) (name SC* and resn LYS) +do (store1 = -0.0229) (name SC* and resn ARG) + +! Fake beads +do (store1 = 0.0) (name SCD* and resn ASN) +do (store1 = 0.0) (name SCD* and resn GLN) +do (store1 = 0.0) (name SCD* and resn SER) +do (store1 = 0.0) (name SCD* and resn THR) +do (store1 = 0.0) (name SCD* and resn ARG) +do (store1 = 0.0) (name SCD* and resn LYS) +do (store1 = 0.0) (name SCD* and resn GLU) +do (store1 = 0.0) (name SCD* and resn ASP) + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/get_random_rotation.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/get_random_rotation.cns new file mode 100644 index 0000000000000000000000000000000000000000..892bf6f3a0706502aa8e8bfad7fee09c6bfa5405 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/get_random_rotation.cns @@ -0,0 +1,91 @@ +! get_random_rotation.cns +! Define a random rotation +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{* + The random rotation is calculated by taking a random unit quaternion, + so that all rotations are uniformely distributed. For more details, see + "Quaternions in molecular modeling" Charles F.F. Karney + Journal of Molecular Graphics and Modelling 25 (2007) 595-604 + + Original author: Christophe Schmidt + Modularized it: Gydo van Zundert + + Parameters + ---------- + Rotation : A struct which will hold the random rotation + + Type : Optional string, either 'Quaternion' or 'Matrix' + Determines whether the random rotation is expressed as a quaternion or a matrix + + Note + ---- + There is no need in general to specify the Type as a matrix when performing the rotation. + + Example: + >>>> ! $rand_rot does NOT have to exist currently + !>>>> @MODULE:get_random_rotation.cns(Rotation=$rand_rot;) + >>>> coor rotate + >>>> quaternion $rand_rot.q0 $rand_rot.q1 $rand_rot.q2 $rand_rot.q3 + >>>> selection=(all) + >>>> end + + Example using a rotation matrix: + !>>>> @MODULE:get_random_rotation.cns(Rotation=$rr; Type='Matrix';) + >>>> coor rotate + >>>> matrix $rr.a11 $rr.a12 $rr.a13 + >>>> $rr.a21 $rr.a22 $rr.a23 + >>>> $rr.a31 $rr.a32 $rr.a33 + >>>> selection=(all) + >>>> end +*} + +!1. Generate random e1 e2 e3 and e4 in [-1, 1] so that e1^2 + e2^2 < 1 and e3^2+e4^2 < 1 +evaluate ($RRM_e1 = random() * 2 - 1) +evaluate ($RRM_e2 = random() * 2 - 1) +evaluate ($RRM_s1 = ($RRM_e1)*($RRM_e1) + ($RRM_e2)*($RRM_e2)) +while ( $RRM_s1 >= 1) loop s1loop + evaluate ($RRM_e1 = random() * 2 - 1) + evaluate ($RRM_e2 = random() * 2 - 1) + evaluate ($RRM_s1 = ($RRM_e1)*($RRM_e1) + ($RRM_e2)*($RRM_e2)) +end loop s1loop + +evaluate ($RRM_e3 = random() * 2 - 1) +evaluate ($RRM_e4 = random() * 2 - 1) +evaluate ($RRM_s2 = ($RRM_e3)*($RRM_e3) + ($RRM_e4)*($RRM_e4)) +while ( $RRM_s2 >= 1) loop s2loop + evaluate ($RRM_e3 = random() * 2 - 1) + evaluate ($RRM_e4 = random() * 2 - 1) + evaluate ($RRM_s2 = ($RRM_e3)*($RRM_e3) + ($RRM_e4)*($RRM_e4)) +end loop s2loop + +!2. the quaternion q0 q1 q2 q3 +evaluate($RRM_q0 = $RRM_e1) +evaluate($RRM_q1 = $RRM_e2) +evaluate($RRM_q2 = $RRM_e3 * sqrt((1 - $RRM_s1)/$RRM_s2) ) +evaluate($RRM_q3 = $RRM_e4 * sqrt((1 - $RRM_s1)/$RRM_s2) ) + +! package it in a struct +if (&Type='Quaternion') then + evaluate(&Rotation.q0 = $RRM_q0) + evaluate(&Rotation.q1 = $RRM_q1) + evaluate(&Rotation.q2 = $RRM_q2) + evaluate(&Rotation.q3 = $RRM_q3) +elseif (&Type='Matrix') then + evaluate (&Rotation.a11 = $RRM_q0 * $RRM_q0 + $RRM_q1 * $RRM_q1 - $RRM_q2 * $RRM_q2 - $RRM_q3 * $RRM_q3) + evaluate (&Rotation.a12 = 2 * ($RRM_q1 * $RRM_q2 - $RRM_q0 * $RRM_q3) ) + evaluate (&Rotation.a13 = 2 * ($RRM_q1 * $RRM_q3 + $RRM_q0 * $RRM_q2) ) + evaluate (&Rotation.a21 = 2 * ($RRM_q1 * $RRM_q2 + $RRM_q0 * $RRM_q3) ) + evaluate (&Rotation.a22 = $RRM_q0 * $RRM_q0 - $RRM_q1 * $RRM_q1 + $RRM_q2 * $RRM_q2 - $RRM_q3 * $RRM_q3) + evaluate (&Rotation.a23 = 2 * ($RRM_q2 * $RRM_q3 - $RRM_q0 * $RRM_q1) ) + evaluate (&Rotation.a31 = 2 * ($RRM_q1 * $RRM_q3 - $RRM_q0 * $RRM_q2) ) + evaluate (&Rotation.a32 = 2 * ($RRM_q2 * $RRM_q3 + $RRM_q0 * $RRM_q1) ) + evaluate (&Rotation.a33 = $RRM_q0 * $RRM_q0 - $RRM_q1 * $RRM_q1 - $RRM_q2 * $RRM_q2 + $RRM_q3 * $RRM_q3) +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..1a06f68f63b409e44be920b6dada5a05ff1e762f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/print_coorheader.cns @@ -0,0 +1,308 @@ +! print_coorheader.cns +! Generate the coordinate header (REMARKS) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +if ($Data.flags.dihed eq false) then evaluate ($dihe = 0) end if +if ($Data.flags.sani eq false) then evaluate ($sani = 0) end if +if ($Data.flags.xrdc eq false) then evaluate ($xrdc = 0) end if +if ($Data.flags.xpcs eq false) then evaluate ($xpcs = 0) end if +if ($Data.flags.dani eq false) then evaluate ($dani = 0) end if +if ($Data.flags.vean eq false) then evaluate ($vean = 0) end if +if ($Data.flags.cdih eq false) then evaluate ($cdih = 0) end if +if ($Data.flags.noe eq false) then evaluate ($noe = 0) end if +if ($Data.flags.rg eq false) then evaluate ($coll = 0) end if +if ($Data.flags.zres eq false) then evaluate ($zhar = 0) end if +if ($Data.flags.em eq false) then evaluate ($lcc = 0) end if + +evaluate($enerall=$etot) +evaluate($bondall=$ebond) +evaluate($anglall=$eangl) +evaluate($imprall=$eimpr) +evaluate($diheall=$edihe) +evaluate($vdwall=$vdw) +evaluate($elecall=$elec) +evaluate($noeall=$noe) +evaluate($rgall=$coll) +evaluate($zresall=$zhar) +evaluate($cdihall=$cdih) +evaluate($coupall=0) +evaluate($saniall=$sani+$xrdc) +evaluate($veanall=$vean) +evaluate($xpcsall=$xpcs) +evaluate($daniall=$dani) + +if ($Data.flags.sym eq true) then + evaluate ($result=0) + evaluate ($violations=0) + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) +end if + +if ($Data.randremoval eq false) then + evaluate ($violations_test_noe= 0) + evaluate ($rms_test_noe = 0) + evaluate ($npart = 0) +end if + +evaluate ($result=0) +evaluate ($violations=0) +print threshold=5. cdih +evaluate ($rms_cdih=$result) +evaluate ($violations_cdih=$violations) +evaluate ($result=0) +evaluate ($violations=0) +evaluate ($rms_coup = 0) +evaluate ($violations_coup = 0) + +evaluate( $rms_sani = 0) +evaluate( $violations_sani = 0) +if ($Data.flags.sani eq TRUE) then + sani print threshold = 0.20 class rd* end + evaluate( $rms_sani = $result) + evaluate( $violations_sani = $violations) +end if + +evaluate( $rms_xrdc = 0) +evaluate( $violations_xrdc = 0) +if ($Data.flags.xrdc eq TRUE) then + xrdc print threshold = 0.2 class xr* end + evaluate( $rms_xrdc = $result) + evaluate( $violations_xrdc = $violations) +end if + +evaluate( $violations_sani = $violations_sani + $violations_xrdc) +evaluate( $rms_sani = $rms_sani + $rms_xrdc) + +evaluate( $rms_xpcs = 0) +evaluate( $violations_xpcs = 0) +if ($Data.flags.xpcs eq TRUE) then + xpcs print threshold = 0.2 class pc* end + evaluate( $rms_xpcs = $result) + evaluate( $violations_xpcs = $violations) +end if + +evaluate( $rms_vean = 0) +evaluate( $violations_vean = 0) +if ($Data.flags.vean eq TRUE) then + vean print threshold = 5.00 class ve* end + evaluate( $rms_vean = $result) + evaluate( $violations_vean = $violations) +end if + +evaluate( $rms_dani = 0) +evaluate( $violations_dani = 0) +if ($Data.flags.dani eq TRUE) then + dani print threshold = 0.20 class da* end + evaluate( $rms_dani = $result) + evaluate( $violations_dani = $violations) +end if + +{====>} {* define ASA-based solvation parameters *} +inline @MODULE:def_solv_param.cns + +{====>} {* buried surface area and desolvation*} +evaluate ($nchain1 = 0) +evaluate ($saafree = 0) +evaluate ($esolfree = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate ($nchain1 = $nchain1 + 1) + {====>} {* buried surface area and desolvation*} + do (rmsd = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 sele=(segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end + show sum (rmsd) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($saafree = $saafree + $result) + do (store2 = rmsd * store1) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + show sum (store2) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($esolfree = $esolfree + $result) +end loop nloop1 + +do (rmsd = 0) (all) +do (store2 = 0) (all) +surface mode=access accu=0.075 rh2o=1.4 sele=(not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end +show sum (rmsd) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +evaluate ($satot = $result) +do (store2 = rmsd * store1) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +show sum (store2) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +evaluate ($esolcplx = $result) +evaluate ($saburied = $saafree - $satot) +if ($saburied < 0) then + evaluate ($saburied = -999999) +end if + +evaluate ($edesolv = $esolcplx - $esolfree) + +evaluate ($dhbinding = $edesolv + $eintcplx - $eintfree + $elecall + $vdwall) + +evaluate ($nshape = 0) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop shape + evaluate ($ncount = $ncount + 1) + if ($mol_shape_$ncount eq true) then + evaluate ($nshape = $nshape + 1) + end if +end loop shape + +evaluate ($nonshape = $Data.ncomponents - $nshape) + +if ($nonshape = 1) then + evaluate ($saburied = 0) + evaluate ($edesolv = 0) + evaluate ($dhbinding = 0) + evaluate ($eintfree = $eintcplx) +end if + +if ($Data.flags.sym eq true) then + evaluate ($enerall = $enerall + $esym) +end if +if ($Data.flags.ncs eq true) then + evaluate ($enerall = $enerall + $ncs) +end if + +evaluate ($procwat = false) +if ($refine.keepwater eq true) then + evaluate ($procwat = true) +end if + +if ($procwat eq true) then + ident (store3) (not all) + flag exclude * include vdw elec end + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + igroup + interaction (segid $prot_segid_$nchain1) ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (not segid $prot_segid_$nchain1) (resn WAT or resn HOH or resn TIP* or resn DMS) weight * 0.0 end + interaction (segid $prot_segid_$nchain1) (not ((resn WAT or resn HOH or resn TIP* or resn DMS) and store3)) weight * 0.0 end + end + energy end + evaluate ($ener_water_$nchain1 = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_$nchain1 = $vdw) + evaluate ($elec_water_$nchain1 = $elec) + + end loop nloop1 + if ($data.ncomponents > 1) then + eval($nchain1 = $data.ncomponents) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + end if + + eval($nchain1 = 0) + + igroup + while ($nchain1 < $data.ncomponents) loop nloop2 + eval($nchain1 = $nchain1 + 1) + interaction (segid $prot_segid_$nchain1) (all) weight * 0.0 end + end loop nloop2 + interaction ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) + ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (store3) (store3) weight * 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + interaction (resn SHA) (resn SHA) weight * 0.0 end + end + energy end + evaluate ($ener_water_water = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_water = $vdw) + evaluate ($elec_water_water = $elec) +else + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents ) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + evaluate ($ener_water_water = 0.0) + evaluate ($vdw_water_water = 0.0) + evaluate ($elec_water_water = 0.0) +end if + +! calculate the HADDOCK score +evaluate ($hscore = $w_vdw * $vdwall) +evaluate ($hscore = $hscore + $w_elec * $elecall) +evaluate ($hscore = $hscore + $w_air * $noeall) +evaluate ($hscore = $hscore + $w_rg * $rgall) +evaluate ($hscore = $hscore + $w_cdih * $cdihall) +evaluate ($hscore = $hscore + $w_sani * $saniall) +evaluate ($hscore = $hscore + $w_xpcs * $xpcsall) +evaluate ($hscore = $hscore + $w_dani * $daniall) +evaluate ($hscore = $hscore + $w_vean * $veanall) +evaluate ($hscore = $hscore + $w_sym * $esym) +evaluate ($hscore = $hscore + $w_bsa * $saburied) +evaluate ($hscore = $hscore + $w_desolv * $edesolv) +evaluate ($hscore = $hscore + $w_lcc * $lcc) + +set message=on echo=on end +set remarks=reset end +set remarks=accumulate end +remarks =============================================================== +remarks HADDOCK stats for $output_pdb_filename +remarks =============================================================== +remarks HADDOCK score: $hscore +remarks =============================================================== + +!list input molecules +evaluate ($nmol=1) +while ($nmol <=$data.ncomponents) loop mol + if ( $exist_input_pdb_filename_$nmol = true) then + remarks initial structure $nmol - $input_pdb_filename_$nmol + end if + evaluate ($nmol = $nmol + 1) +end loop mol + +remarks =============================================================== +remarks total,bonds,angles,improper,dihe,vdw,elec,air,cdih,coup,rdcs,vean,dani,xpcs,rg +remarks energies: $enerall, $bondall, $anglall, $imprall, $diheall, $vdwall, $elecall, $noeall, $cdihall, $coupall, $saniall, $veanall, $daniall, $xpcsall, $rgall +remarks =============================================================== +remarks bonds,angles,impropers,dihe,air,cdih,coup,rdcs,vean,dani,xpcs +remarks rms-dev.: $rms_bonds,$rms_angles,$rms_impropers,$rms_dihedrals,$rms_noe,$rms_cdih,$rms_coup, $rms_sani, $rms_vean, $rms_dani, $rms_xpcs +remarks =============================================================== +remarks air,cdih,coup,rdcs,vean,dani,xpcs +remarks >0.3,>5,>1,>0,>5,>0.2,>0.2 +remarks violations.: $violations_noe, $violations_cdih, $violations_coup, $violations_sani, $violations_vean, $violations_dani, $violations_xpcs +remarks =============================================================== +remarks CVpartition#,violations,rms +remarks AIRs cross-validation: $npart, $violations_test_noe, $rms_test_noe +remarks =============================================================== +remarks NCS energy: $ncs +remarks =============================================================== +remarks Symmetry energy: $esym +remarks =============================================================== +remarks Membrane restraining energy: $zresall +remarks =============================================================== +remarks Local cross-correlation: $lcc[f7.4] +remarks =============================================================== +remarks Desolvation energy: $edesolv +remarks Internal energy free molecules: $eintfree +remarks Internal energy complex: $eintcplx +remarks Binding energy: $dhbinding +remarks =============================================================== +remarks buried surface area: $saburied +remarks =============================================================== +set remark accumulate end +evaluate($ncount = 0) +while ($ncount < $data.ncomponents) loop waterremark + evaluate ($ncount = $ncount +1) + remarks water - chain_$ncount: $ener_water_$ncount $vdw_water_$ncount $elec_water_$ncount +end loop waterremark +remarks =============================================================== +remarks water - water: $ener_water_water $vdw_water_water $elec_water_water +remarks =============================================================== diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/random_rotations.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/random_rotations.cns new file mode 100644 index 0000000000000000000000000000000000000000..a50e9f5624abb6405affc6a2d38b29187ea5c9bc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/random_rotations.cns @@ -0,0 +1,180 @@ +! random_rotations.cns +! Perform a random rotation +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +! check if homomer + +inline @MODULE:check-homomers.cns + +do (store4 = 0) (all) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop fixed + evaluate ($ncount = $ncount + 1) + eval($watersegname_$ncount="WA" + encode($ncount)) + if ($mol_fix_origin_$ncount eq true) then + do (store4 = 1) (segid $prot_segid_$ncount) + end if +end loop fixed + +if ($homosymmetry eq false) then + ! Random translation within a 10A cube + evaluate ($ncount = 0) + while ($ncount < $data.ncomponents) loop randtrans + evaluate ($ncount = $ncount +1) + if ($mol_fix_origin_$ncount eq false) then + evaluate ($xd = 10.0 * (0.5 - ran())) + evaluate ($yd = 10.0 * (0.5 - ran())) + evaluate ($zd = 10.0 * (0.5 - ran())) + coor trans sele=(segid $prot_segid_$ncount or segid $watersegname_$ncount) vector=($xd,$yd,$zd) end + end if + end loop randtrans +end if + +! Random rotation of molecules +evaluate ($ncount = 0) +evaluate ($nrotset = 0) +while ($ncount < $data.ncomponents) loop randrot + evaluate ($ncount = $ncount +1) + if ($mol_fix_origin_$ncount eq false) then + show ave (x) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($xc = $result) + show ave (y) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($yc = $result) + show ave (z) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($zc = $result) + + ! Random rotation for each molecule except for symmtrical homomers for which + ! the same rotation is applied to all molecules to keep the symmetry + if ($nrotset = 0) then + !1. Generate random e1 e2 e3 and e4 in [-1, 1] so that e1^2 + e2^2 < 1 and e3^2+e4^2 < 1 + evaluate ($RRM_e1 = ran () * 2 - 1) + evaluate ($RRM_e2 = ran () * 2 - 1) + evaluate ($RRM_s1 = ($RRM_e1)*($RRM_e1) + ($RRM_e2)*($RRM_e2)) + + while ( $RRM_s1 >= 1) loop s1loop + evaluate ($RRM_e1 = ran () * 2 - 1) + evaluate ($RRM_e2 = ran () * 2 - 1) + evaluate ($RRM_s1 = ($RRM_e1)*($RRM_e1) + ($RRM_e2)*($RRM_e2)) + end loop s1loop + + evaluate ($RRM_e3 = ran () * 2 - 1) + evaluate ($RRM_e4 = ran () * 2 - 1) + evaluate ($RRM_s2 = ($RRM_e3)*($RRM_e3) + ($RRM_e4)*($RRM_e4)) + while ( $RRM_s2 >= 1) loop s2loop + evaluate ($RRM_e3 = ran () * 2 - 1) + evaluate ($RRM_e4 = ran () * 2 - 1) + evaluate ($RRM_s2 = ($RRM_e3)*($RRM_e3) + ($RRM_e4)*($RRM_e4)) + end loop s2loop + + !2. the quaternion q0 q1 q2 q3 + evaluate($RRM_q0 = $RRM_e1) + evaluate($RRM_q1 = $RRM_e2) + evaluate($RRM_q2 = $RRM_e3 * sqrt((1 - $RRM_s1)/$RRM_s2) ) + evaluate($RRM_q3 = $RRM_e4 * sqrt((1 - $RRM_s1)/$RRM_s2) ) + + !3. The rotation matrix from the quaternion + evaluate ($x1 = $RRM_q0 * $RRM_q0 + $RRM_q1 * $RRM_q1 - $RRM_q2 * $RRM_q2 - $RRM_q3 * $RRM_q3) + evaluate ($x2 = 2 * ($RRM_q1 * $RRM_q2 - $RRM_q0 * $RRM_q3) ) + evaluate ($x3 = 2 * ($RRM_q1 * $RRM_q3 + $RRM_q0 * $RRM_q2) ) + evaluate ($y1 = 2 * ($RRM_q1 * $RRM_q2 + $RRM_q0 * $RRM_q3) ) + evaluate ($y2 = $RRM_q0 * $RRM_q0 - $RRM_q1 * $RRM_q1 + $RRM_q2 * $RRM_q2 - $RRM_q3 * $RRM_q3) + evaluate ($y3 = 2 * ($RRM_q2 * $RRM_q3 - $RRM_q0 * $RRM_q1) ) + evaluate ($z1 = 2 * ($RRM_q1 * $RRM_q3 - $RRM_q0 * $RRM_q2) ) + evaluate ($z2 = 2 * ($RRM_q2 * $RRM_q3 + $RRM_q0 * $RRM_q1) ) + evaluate ($z3 = $RRM_q0 * $RRM_q0 - $RRM_q1 * $RRM_q1 - $RRM_q2 * $RRM_q2 + $RRM_q3 * $RRM_q3) + + if ($homosymmetry eq true) then + evaluate ($nrotset = 1) + end if + end if + + !4. The rotation + coor + center=($xc $yc $zc) + rotate matrix=($x1 $x2 $x3) ($y1 $y2 $y3) ($z1 $z2 $z3) + sele=(segid $prot_segid_$ncount or segid $watersegname_$ncount) + end + end if +end loop randrot + + +! If there are fixed molecules, randomly rotate as one unit all non-fixed ones +! around the geometric center of the fixed ones + +show sum (store4) (all) + +if ($result > 0) then + + show ave (x) (attribute store4 = 1) + evaluate ($xc = $result) + show ave (y) (attribute store4 = 1) + evaluate ($yc = $result) + show ave (z) (attribute store4 = 1) + evaluate ($zc = $result) + + ! Random rotation for each molecule except for symmtrical homomers for which + ! the same rotation is applied to all molecules to keep the symmetry + if ($nrotset = 0) then + !1. Generate random e1 e2 e3 and e4 in [-1, 1] so that e1^2 + e2^2 < 1 and e3^2+e4^2 < 1 + evaluate ($RRM_e1 = ran () * 2 - 1) + evaluate ($RRM_e2 = ran () * 2 - 1) + evaluate ($RRM_s1 = ($RRM_e1)*($RRM_e1) + ($RRM_e2)*($RRM_e2)) + + while ( $RRM_s1 >= 1) loop s1loop + evaluate ($RRM_e1 = ran () * 2 - 1) + evaluate ($RRM_e2 = ran () * 2 - 1) + evaluate ($RRM_s1 = ($RRM_e1)*($RRM_e1) + ($RRM_e2)*($RRM_e2)) + end loop s1loop + + evaluate ($RRM_e3 = ran () * 2 - 1) + evaluate ($RRM_e4 = ran () * 2 - 1) + evaluate ($RRM_s2 = ($RRM_e3)*($RRM_e3) + ($RRM_e4)*($RRM_e4)) + while ( $RRM_s2 >= 1) loop s2loop + evaluate ($RRM_e3 = ran () * 2 - 1) + evaluate ($RRM_e4 = ran () * 2 - 1) + evaluate ($RRM_s2 = ($RRM_e3)*($RRM_e3) + ($RRM_e4)*($RRM_e4)) + end loop s2loop + + !2. the quaternion q0 q1 q2 q3 + evaluate($RRM_q0 = $RRM_e1) + evaluate($RRM_q1 = $RRM_e2) + evaluate($RRM_q2 = $RRM_e3 * sqrt((1 - $RRM_s1)/$RRM_s2) ) + evaluate($RRM_q3 = $RRM_e4 * sqrt((1 - $RRM_s1)/$RRM_s2) ) + + !3. The rotation matrix from the quaternion + evaluate ($x1 = $RRM_q0 * $RRM_q0 + $RRM_q1 * $RRM_q1 - $RRM_q2 * $RRM_q2 - $RRM_q3 * $RRM_q3) + evaluate ($x2 = 2 * ($RRM_q1 * $RRM_q2 - $RRM_q0 * $RRM_q3) ) + evaluate ($x3 = 2 * ($RRM_q1 * $RRM_q3 + $RRM_q0 * $RRM_q2) ) + evaluate ($y1 = 2 * ($RRM_q1 * $RRM_q2 + $RRM_q0 * $RRM_q3) ) + evaluate ($y2 = $RRM_q0 * $RRM_q0 - $RRM_q1 * $RRM_q1 + $RRM_q2 * $RRM_q2 - $RRM_q3 * $RRM_q3) + evaluate ($y3 = 2 * ($RRM_q2 * $RRM_q3 - $RRM_q0 * $RRM_q1) ) + evaluate ($z1 = 2 * ($RRM_q1 * $RRM_q3 - $RRM_q0 * $RRM_q2) ) + evaluate ($z2 = 2 * ($RRM_q2 * $RRM_q3 + $RRM_q0 * $RRM_q1) ) + evaluate ($z3 = $RRM_q0 * $RRM_q0 - $RRM_q1 * $RRM_q1 - $RRM_q2 * $RRM_q2 + $RRM_q3 * $RRM_q3) + + if ($homosymmetry eq true) then + evaluate ($nrotset = 1) + end if + end if + + !4. The rotation + coor + center=($xc $yc $zc) + rotate matrix=($x1 $x2 $x3) ($y1 $y2 $y3) ($z1 $z2 $z3) + sele=(attribute store4 = 0) + end +end if + +do (x = refx) (resn ANI or resn DAN or resn XAN or resn SHA) +do (y = refy) (resn ANI or resn DAN or resn XAN or resn SHA) +do (z = refz) (resn ANI or resn DAN or resn XAN or resn SHA) + +!evaluate ($outname = "MODULE:" + "begin/" + $Filenames.fileroot + "_init_" + encode($count) + ".pdb") +!write coor format=pdbo output=$outname end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/randomairs.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/randomairs.cns new file mode 100644 index 0000000000000000000000000000000000000000..f2b5cc6a7be9c26516a0b697e999d99ed9700878 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/randomairs.cns @@ -0,0 +1,246 @@ +! randomairs.cns +! Define random AIRs from solvent accessible residues +! +! *********************************************************************** +! * Copyright 2003-2018 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ($data.ncomponents > 2) then + evaluate ($errfile = "FAILED") + fileexist $errfile end + if ($result eq false) then + set display=$errfile end + display RANDOM DEFINITION OF AIRS FROM SOLVENT ACCESSIBLE RESIDUES ONLY + display SUPPORTED FOR TWO MOLECULES. USE CENTER-OF-MASS RESTRAINTS INSTEAD + close $errfile end + end if +end if +! +! first calculate accessible surface area +! +do (store3 = 0) (all) +surface mode=access rh2o=1.4 sele=(segid $prot_segid_1 and not (resn WAT or resn HOH or resn TIP*)) end +show sum (rmsd) (segid $prot_segid_1 and not (resn WAT or resn HOH or resn TIP*)) +do (store3 = rmsd) (segid $prot_segid_1 and not (resn WAT or resn HOH or resn TIP*)) +surface mode=access rh2o=1.4 sele=(segid $prot_segid_2 and not (resn WAT or resn HOH or resn TIP*)) end +do (store3 = rmsd) (segid $prot_segid_2 and not (resn WAT or resn HOH or resn TIP*)) +! +! normalize by standard residue accessibilities (taken from NACCESS) +! +do (store3 = store3 / 107.95) (resn ALA) +do (store3 = store3 / 134.28) (resn CY*) +do (store3 = store3 / 134.28) (resn CSP) +do (store3 = store3 / 140.39) (resn ASP) +do (store3 = store3 / 140.39) (resn ASH) +do (store3 = store3 / 172.25) (resn GLU) +do (store3 = store3 / 172.25) (resn GLH) +do (store3 = store3 / 199.48) (resn PHE) +do (store3 = store3 / 80.10) (resn GLY) +do (store3 = store3 / 182.88) (resn HIS) +do (store3 = store3 / 182.88) (resn NEP) +do (store3 = store3 / 175.12) (resn ILE) +do (store3 = store3 / 200.81) (resn LYS) +do (store3 = store3 / 200.81) (resn ALY) +do (store3 = store3 / 200.81) (resn MLZ) +do (store3 = store3 / 200.81) (resn MLY) +do (store3 = store3 / 200.81) (resn M3L) +do (store3 = store3 / 178.63) (resn LEU) +do (store3 = store3 / 194.15) (resn MET) +do (store3 = store3 / 194.15) (resn MSE) +do (store3 = store3 / 143.94) (resn ASN) +do (store3 = store3 / 136.13) (resn PRO) +do (store3 = store3 / 136.13) (resn HY3) +do (store3 = store3 / 136.13) (resn HYP) +do (store3 = store3 / 178.50) (resn GLN) +do (store3 = store3 / 238.76) (resn ARG) +do (store3 = store3 / 116.50) (resn SER) +do (store3 = store3 / 116.50) (resn SEC) +do (store3 = store3 / 116.50) (resn SEP) +do (store3 = store3 / 116.50) (resn PNS) +do (store3 = store3 / 139.27) (resn THR) +do (store3 = store3 / 139.27) (resn DDZ) +do (store3 = store3 / 139.27) (resn TOP) +do (store3 = store3 / 151.44) (resn VAL) +do (store3 = store3 / 249.36) (resn TRP) +do (store3 = store3 / 212.76) (resn TYR) +do (store3 = store3 / 212.76) (resn TYP) +do (store3 = store3 / 212.76) (resn PTR) +do (store3 = store3 / 212.76) (resn TYS) +do (store3 = store3 / 402.89) (resn QSR) +! DNA/RNA bases +do (store3 = store3 / 170.0) (resn A or resn DA) +do (store3 = store3 / 170.0) (resn C or resn DC) +do (store3 = store3 / 170.0) (resn G or resn DG) +do (store3 = store3 / 170.0) (resn T or resn DT) +do (store3 = store3 / 170.0) (resn U) +! +! Define random AIR restraints +! +evaluate ($icount = 1) +do (store4 = 0) (all) +do (store5 = 0) (all) + +! Check if segments defined from which to sample random AIRs +evaluate($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate($nchain1 = $nchain1 + 1) + evaluate($fcounter=0) + evaluate($samplesurf = false) + + if ($nrair_$nchain1 = 0) then + evaluate($samplesurf = true) + end if + + if ($samplesurf eq true) then + do (store5 = $nchain1) (segid $prot_segid_$nchain1) + display RANDOM AIRS SAMPLED FROM ENTIRE SURFACE FOR MOLECULE $nchain1 + else + evaluate ($numseg = $nrair_$nchain1) + display RANDOM AIRS SAMPLED FROM SEGMENTS FOR MOLECULE $nchain1 + while ($fcounter < $numseg) loop Xflex + evaluate($fcounter=$fcounter + 1) + do (store5 = $nchain1) ( resid $rair_sta_$nchain1_$fcounter : $rair_end_$nchain1_$fcounter + and segid $prot_segid_$nchain1) + display FLEXIBLE SEGMENT NR $fcounter FROM $rair_sta_$nchain1_$fcounter TO $rair_end_$nchain1_$fcounter + end loop Xflex + end if +end loop nloop1 + +! +! Filter out lipids +! +do (store3 = 0) ( resn DPP or resn PCW or resn PEE) +do (store5 = 0) ( resn DPP or resn PCW or resn PEE) + +for $atom_id in id ( tag and (attr store5 ne 0)) loop count + do (store4 = $icount) (byres (id $atom_id)) + show sum (store3) (byres (id $atom_id)) + do (store2 = $result) (byres (id $atom_id)) + evaluate ($icount = $icount + 1) +end loop count + +show min(store4) (segid $prot_segid_1 and (attr store5 ne 0)) +evaluate ($rmin = $result) + +show max(store4) (segid $prot_segid_1 and (attr store5 ne 0)) +evaluate ($rmax = $result) + +evaluate ($nres = $rmax - $rmin + 1) +display $nres RESIDUE IN MOLECULE A SELECTED FOR RANDOM AIR DEFINITION +if ($nres < 1) then + display NO RESIDUES IN DEFINED RANAIR SEGMENTS FOR MOLECULE A + display RANDOM RESTRAINTS DEFINITION FAILED + display STOPPING... + stop +end if + +if ($nres = 1) then + evaluate ($iselres1 = $rmax) +else + evaluate ($done = 0) + while ($done = 0) loop trial + evaluate ($iselres1 = 0) + evaluate ($iselres1 = int(ran() * $rmax) + 1) + evaluate ($iselres1 = min($iselres1, $rmax)) + show sum (store3) (attribute store4 = $iselres1) + if ($result > 0.2) then + evaluate ($done = 1) + end if + end loop trial +end if + +show min(store4) (segid $prot_segid_2 and (attr store5 ne 0)) +evaluate ($rmin = $result) + +show max(store4) (segid $prot_segid_2 and (attr store5 ne 0)) +evaluate ($rmax = $result) + +display $nres RESIDUE IN MOLECULE B SELECTED FOR RANDOM AIR DEFINITION +evaluate ($nres = $rmax - $rmin + 1) +if ($nres < 1) then + display NO RESIDUES IN DEFINED RANAIR SEGMENTS FOR MOLECULE B + display RANDOM RESTRAINTS DEFINITION FAILED + display STOPPING... + stop +end if + +if ($nres = 1) then + evaluate ($iselres2 = $rmax) +else + evaluate ($done = 0) + while ($done = 0) loop trial + evaluate ($iselres2 = 0) + evaluate ($iselres2 = int(ran() * ($rmax-$rmin+1)) + $rmin) + show sum (store3) (attribute store4 = $iselres2) + if ($result > 0.2) then + evaluate ($done = 1) + end if + end loop trial +end if + +show (resid) (attribute store4 = $iselres1 and tag) +evaluate ($selres1 = $result) +show (segid) (attribute store4 = $iselres1 and tag) +evaluate ($selseg1 = $result) +show (resn) (attribute store4 = $iselres1 and tag) +evaluate ($selnam1 = $result) + +show (resid) (attribute store4 = $iselres2 and tag) +evaluate ($selres2 = $result) +show (segid) (attribute store4 = $iselres2 and tag) +evaluate ($selseg2 = $result) +show (resn) (attribute store4 = $iselres2 and tag) +evaluate ($selnam2 = $result) + +evaluate ($dispname= $output_pdb_filename - ".pdb" + ".disp") +set display=$dispname end + +display $selnam1 $selres1 $selseg1 + +noe class ambig end + +noe + assign (resid $selres1 and segid $prot_segid_1) + (attr store2 > 0.2 and segid $prot_segid_2 and + attr store5 ne 0 and (resid $selres2 or (resid $selres2) around 7.5)) 2.0 2.0 0.0 + assign (resid $selres2 and segid $prot_segid_2) + (attr store2 > 0.2 and segid $prot_segid_1 and + attr store5 ne 0 and (resid $selres1 or (resid $selres1) around 7.5)) 2.0 2.0 0.0 +end + +for $id in id ((resid $selres1 and attr store2 > 0.2) around 5.0 and tag and segid $selseg1 and not resid $selres1) loop neighbors1 + show (resid) (id $id) + evaluate ($inres = $result) + show (segid) (id $id) + evaluate ($inseg = $result) + show (resn) (id $id) + evaluate ($inrsn = $result) + display $inrsn $inres $inseg + noe + assign (resid $inres and segid $prot_segid_1) + (attr store2 > 0.2 and segid $prot_segid_2 and + attr store5 ne 0 and (resid $selres2 or (resid $selres2) around 7.5)) 2.0 2.0 0.0 + end +end loop neighbors1 + +for $id in id ((resid $selres2 and attr store2 > 0.2) around 5.0 and tag and segid $selseg2 and not resid $selres2) loop neighbors2 + show (resid) (id $id) + evaluate ($inres = $result) + show (segid) (id $id) + evaluate ($inseg = $result) + show (resn) (id $id) + evaluate ($inrsn = $result) + display $inrsn $inres $inseg + noe + assign (resid $inres and segid $prot_segid_2) + (attr store2 > 0.2 and segid $prot_segid_1 and + attr store5 ne 0 and (resid $selres1 or (resid $selres1) around 7.5)) 2.0 2.0 0.0 + end +end loop neighbors2 + +close $dispname end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/read_noes.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/read_noes.cns new file mode 100644 index 0000000000000000000000000000000000000000..be5c0b8c55dbbd984e82a3fceb10553d0ee60281 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/read_noes.cns @@ -0,0 +1,65 @@ +! read_noes.cns +! Read the various restraints data +! In this version only distance-based restraints +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +! Ambiguous and unambiguous distance restraints, hbonds +noe + reset + nrestraints = 12000000 ! allocate space for NOEs + ceiling 1000 +end + +evaluate ($filenam0 = $ambig_fname + "_" + encode($count)) +fileexist $filenam0 end +if ($result eq false) then + evaluate ($filenam0 = $ambig_fname) +end if + +if ($filenam0 # "") then + fileexist $filenam0 end + if ($result eq true) then + noe class ambi @@$filenam0 end + end if +end if + +if ($Data.randremoval eq true) then + noe part $Data.npart end +end if + +if ($unambig_fname # "") then + fileexist $unambig_fname end + if ($result eq true) then + noe class dist @@$unambig_fname end + end if +end if + +if ($hbond_fname # "") then + fileexist $hbond_fname end + if ($result eq true) then + noe class hbon @@$hbond_fname end + end if +end if + +noe + averaging * sum + potential * soft + scale * 1.0 + sqconstant * 1.0 + sqexponent * 2 + soexponent * 1 + rswitch * 1.0 + sqoffset * 0.0 + asymptote * 2.0 + msoexponent * 1 + masymptote * -0.1 + mrswitch * 1.0 +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..6f549a453e49c118de295658c1294a8a429b9365 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/read_param.cns @@ -0,0 +1,64 @@ +! read_param.cns +! Reads parameter files. +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +!! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** + +{* protein parameter file *} +eval ($prot_parameter_infile="TOPPAR:protein-allhdg5-4.param") + +{* nucleic acid parameter file *} +eval ($nucl_parameter_infile="TOPPAR:dna-rna-allatom-hj-opls-1.3.param") + +{* carbohydrate parameter file *} +eval ($carbo_parameter_infile="TOPPAR:carbohydrate.param") + +{* solvent parameter file *} +eval ($solv_parameter_infile="TOPPAR:solvent-allhdg5-4.param") + +{* fragment probes parameter file *} +eval ($ligands_parameter_infile="TOPPAR:fragment_probes.param") + +{* ion parameter file *} +eval ($ion_parameter_infile="TOPPAR:ion.param") + +{* heme parameter file *} +eval ($heme_parameter_infile="TOPPAR:hemes-allhdg.param") + +{* shape parameter file *} +eval ($shape_parameter_infile="TOPPAR:shape.param") + +{* cofactors parameter file *} +eval ($cofactors_parameter_infile="TOPPAR:cofactors.param") + +parameter + @@$prot_parameter_infile + @@$ion_parameter_infile + @@$nucl_parameter_infile + @@$carbo_parameter_infile + @@$solv_parameter_infile + @@$ligands_parameter_infile + @@$heme_parameter_infile + @@$shape_parameter_infile + @@$cofactors_parameter_infile + if ($ligand_param_fname # "") then + fileexist $ligand_param_fname end + if ($result eq true) then + @@$ligand_param_fname + end if + end if +end + +parameter + nbonds + nbxmod=5 atom cdie shift + cutnb=9.5 ctofnb=8.5 ctonnb=6.5 eps=1.0 e14fac=0.4 inhibit 0.25 + wmin=0.5 tolerance 0.5 + end +end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/rigidbody.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/rigidbody.cns new file mode 100644 index 0000000000000000000000000000000000000000..14405603351d382f6d8438fb56a4c3216357ec43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/rigidbody.cns @@ -0,0 +1,617 @@ +! rigidbody.cns +! The basic rigid-body docking CNS script for HADDOCK3 with support only +! for distance-based restraints and symmetry restrainted +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + +!==================================================================! +! Initialisation of variables +!==================================================================! + +evaluate ($saprotocol.crossdock=$crossdock) +evaluate ($saprotocol.randorien=$randorien) +evaluate ($saprotocol.rigidtrans=$rigidtrans) +evaluate ($saprotocol.ntrials=$ntrials) +evaluate ($saprotocol.inter_rigid=$inter_rigid) +evaluate ($saprotocol.rotate180=$rotate180) + +evaluate ($ini_count =1) +evaluate ($structures =$sampling) +evaluate ($w_vdw =$w_vdw) +evaluate ($w_elec =$w_elec) +evaluate ($w_air =$w_air) +evaluate ($w_rg =$w_rg) +evaluate ($w_sani =$w_sani) +evaluate ($w_xrdc =$w_xrdc) +evaluate ($w_xpcs =$w_xpcs) +evaluate ($w_dani =$w_dani) +evaluate ($w_vean =$w_vean) +evaluate ($w_cdih =$w_cdih) +evaluate ($w_sym =$w_sym) +evaluate ($w_zres =$w_zres) +evaluate ($w_bsa =$w_bsa) +evaluate ($w_deint =$w_deint) +evaluate ($w_desolv =$w_desolv) +evaluate ($w_lcc =$w_lcc) + + +evaluate ($data.ncomponents=$ncomponents) + +! non-bonded parameter set to use +evaluate ($toppar.par_nonbonded = "OPLSX") + +! Symmetry restraints +evaluate ($data.ksym = $ksym) +evaluate ($Data.flags.sym = $sym_on) +evaluate ($data.nc2sym = $nc2sym) +evaluate ($data.nc3sym = $nc3sym) +evaluate ($data.ns3sym = $ns3sym) +evaluate ($data.nc4sym = $nc4sym) +evaluate ($data.nc5sym = $nc5sym) +evaluate ($data.nc6sym = $nc6sym) + +if ( $data.nc2sym eq 6) then + evaluate ($saprotocol.rotate180 = false) +end if +if ( $data.nc3sym ne 0) then + evaluate ($saprotocol.rotate180 = false) +end if +if ( $data.nc4sym ne 0) then + evaluate ($saprotocol.rotate180 = false) +end if +if ( $data.nc5sym ne 0) then + evaluate ($saprotocol.rotate180 = false) +end if +if ( $data.nc6sym ne 0) then + evaluate ($saprotocol.rotate180 = false) +end if + +! distance restraints +evaluate ($Data.flags.noe = true) +evaluate ($data.randremoval=$randremoval) +evaluate ($data.npart=$npart) + +evaluate ($data.ambig_scale=$ambig_scale) +evaluate ($data.unambig_scale=$unambig_scale) +evaluate ($data.hbond_scale=$hbond_scale) + + +evaluate ($data.ranair=$ranair) +if ($data.ranair eq true) then + evaluate ($data.randremoval = false) +end if +evaluate ($data.cmrest=$cmrest) +evaluate ($data.cmtight=$cmtight) +evaluate ($data.kcm=$kcm) +evaluate ($data.surfrest=$surfrest) +evaluate ($data.ksurf=$ksurf) + + +!Electrostatics: +evaluate ($Data.flags.elec =$elecflag) +evaluate ($Data.epsilon =$epsilon) +evaluate ($Data.dielec =$dielec) + + +!Interaction matrix: +evaluate ($nmol1=1) +while ($nmol1 <=$data.ncomponents) loop mol1 + evaluate ($nmol2=$nmol1 + 1) + evaluate ($scale.int_$nmol1_$nmol1 =int_$nmol1_$nmol1) + while ($nmol2 <=$data.ncomponents) loop mol2 + evaluate ($scale.int_$nmol1_$nmol2 =$int_$nmol1_$nmol2) + evaluate ($scale.int_$nmol2_$nmol1 =$int_$nmol1_$nmol2) + evaluate ($nmol2=$nmol2 + 1) + end loop mol2 + evaluate ($nmol1 = $nmol1 + 1) +end loop mol1 + +! Unsupported restraints +evaluate ($Data.flags.cdih = false) +evaluate ($Data.flags.em = false) +evaluate ($Data.flags.rg = false) +evaluate ($Data.flags.zres = false) +evaluate ($Data.flags.sani = false) +evaluate ($Data.flags.xrdc = false) +evaluate ($Data.flags.xpcs = false) +evaluate ($Data.flags.dani = false) +evaluate ($Data.flags.vean = false) +evaluate ($Data.flags.ncs = false) + +! Other parameters +evaluate ($refine.keepwater = false) + +!==================================================================! + +@MODULE:read_param.cns + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1 end + interaction (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) + (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) weight * 1 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0 end +end + +flag include bond angle impr vdw end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +{* Read the distance restraints ================================ *} +set seed $seed end +set message=normal echo=on end +inline @MODULE:read_noes.cns ! rigidbody version with only distance restraints support + +{* random removal of restaints ================================== *} +if ($Data.randremoval eq true) then + noe cv $npart ? end +end if + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + +{* set distance restraint energy flag =========================== *} +if ($Data.flags.noe = TRUE) then + flags include noe end +end if + +{* ============================================================== *} +! determine whether the final models should be reoriented along their principal +! axes before writing to file in it0 and it1 +eval($reorient = true) +eval($fixmol = false) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop orientmol + evaluate ($ncount = $ncount + 1) + eval($watersegname_$ncount="WA" + encode($ncount)) + if ($mol_fix_origin_$ncount eq true) then + eval($reorient = false) + eval($fixmol = true) + end if +end loop orientmol + + +{*======================= random orientations and rigid body minimisation *} +!Make sure that at least as many distance restraints are successfully +!read as the number of partitions for cross-validation +evaluate ($numnoe = 0) +noe ? end +if ($NUMNOE = 0) then + if ($Data.ncomponents > 1) then + if ($Data.surfrest eq FALSE) then + if ($Data.cmrest eq FALSE) then + if ($Data.ranair eq FALSE) then + evaluate ($errfile = "MODDIR:WARNING") + fileexist $errfile end + if ($result eq false) then + set display=$errfile end + display TOTAL NUMBER OF DISTANCE RESTRAINTS FOR RIGID BODY DOCKING IS ZERO! + display CONTROL YOUR PARAMETER SETTINGS AND RESTRAINT DEFINITIONS + display STRUCTURE NUMBER $count + close $errfile end + end if + end if + end if + end if + end if + evaluate ($Data.npart = 1) + evaluate ($Data.randremoval = FALSE) +end if + +if ($NUMNOE lt $Data.npart) then + noe part=1 end + evaluate ($Data.npart = 1) + evaluate ($Data.randremoval = FALSE) +end if + +flag excl bond angl dihe impr end + +if ($Data.flags.elec eq true) then + flag include elec end + if ($Data.dielec eq "rdie") then + parameter nbonds eps=$Data.epsilon rdie shift switch end end + ! shift statement needed first to activate switch (CNS bug?) + else + parameter nbonds eps=$Data.epsilon cdie shift end end + end if + parameter nbonds ? end end +else + evaluate ($elec=0.0) + flag exclude elec end +end if + +flag excl cdih end + +if ($Data.ranair eq true) then + if ($Data.ncomponents > 2) then + evaluate ($errfile = "MODDIR:FAILED") + fileexist $errfile end + if ($result eq false) then + set display=$errfile end + display ========= Unsupported option =========== + display Random definition of AIRs with more than + display two molecules currently unsupported + display ======================================== + close $errfile end + end if + stop + end if + evaluate ($Data.randremoval = false) + noe + reset + nrestraints = 100000 ! allocate space for NOEs + ceiling 1000 + class ambi + end + @MODULE:randomairs.cns + + noe + averaging * sum + potential * soft + scale * 1.0 + sqconstant * 1.0 + sqexponent * 2 + soexponent * 1 + rswitch * 1.0 + sqoffset * 0.0 + asymptote * 2.0 + msoexponent * 1 + masymptote * -0.1 + mrswitch * 1.0 + avexpo hbond 20 + end +end if + +@MODULE:symmultimer.cns + +if ($Data.cmrest eq true ) then + @MODULE:cm-restraints.cns +end if + +if ($Data.surfrest eq true ) then + @MODULE:surf-restraints.cns +end if + +flag excl ncs end +evaluate ($nrig = 0) +evaluate ($nfirst = 1) +evaluate ($bestair = 0) + +while ($nrig < $SaProtocol.ntrials) loop trials + + evaluate ($nrig = $nrig + 1) + + if ( $log_level = "verbose" ) then + set message=all echo=on end + elseif ( $log_level = "normal" ) then + set message=normal echo=off end + else + set message=off echo=off end + end if + + ! random placement of molecules + if ($SaProtocol.randorien eq true) then + @MODULE:separate.cns + @MODULE:random_rotations.cns + end if + + evaluate ($unambig_scale = 1.0) + evaluate ($ambig_scale = 1.0) + evaluate ($hbond_scale = 1.0) + evaluate ($symm_scale = 1.0) + evaluate ($cont_scale = 0.0) + evaluate ($surf_scale = 0.0) + + noe + scale dist $unambig_scale + scale ambi $ambig_scale + scale hbon $hbond_scale + scale symm $symm_scale + scale contact $cont_scale + scale surface $surf_scale + end + + evaluate ($kinter = $SaProtocol.inter_rigid) + @MODULE:scale_inter_mini.cns + + ! a few rounds of rotational rigid body minimization for each independent chain + evaluate ($imini = 0) + while ($imini le 4) loop rigmin + + evaluate ($imini = $imini + 1) + eval ($ministeps = 500 * nint ($data.ncomponents/6 + 1)) + if ($SaProtocol.randorien eq true) then + flag excl vdw elec end + end if + eval ($nchain1 = 0) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + if ($mol_fix_origin_$nchain1 eq false) then + fix sele=(not all) end + fix sele=( not (segid $prot_segid_$nchain1 or segid $watersegname_$nchain1) and not name OO) end + minimize rigid + group ((segid $prot_segid_$nchain1 or segid $watersegname_$nchain1) and not name MAP) + translation=false + nstep $ministeps + drop 10.0 + tole 0.1 + nprint 10 + end + end if + end loop nloop1 + fix sele=(not all) end + + flag include vdw end + if ($Data.flags.elec eq true) then + flag include elec end + end if + + evaluate ($unambig_scale = min(($unambig_scale * 2),$Data.unambig_scale)) + evaluate ($ambig_scale = min(($ambig_scale * 2),$Data.ambig_scale)) + evaluate ($hbond_scale = min(($hbond_scale * 2),$Data.hbond_scale)) + evaluate ($symm_scale = min(($symm_scale * 2),$Data.ksym)) + + noe + scale dist $unambig_scale + scale ambi $ambig_scale + scale hbon $hbond_scale + scale symm $symm_scale + end + + end loop rigmin + + evaluate ($unambig_scale_store = $unambig_scale) + evaluate ($ambig_scale_store = $ambig_scale) + evaluate ($hbond_scale_store = $hbond_scale) + evaluate ($symm_scale_store = $symm_scale) + + flag include vdw end + if ($Data.flags.elec eq true) then + flag include elec end + end if + + if ($SaProtocol.rigidtrans eq true) then + + evaluate ($cont_scale = $data.kcm) + evaluate ($surf_scale = $data.ksurf) + noe + scale contact $cont_scale + scale surface $surf_scale + end + fix sele=(name OO and not resn XAN) end + minimize rigid + eval ($nchain1 = 0) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + if ($mol_fix_origin_$nchain1 eq false) then + group ((segid $prot_segid_$nchain1 or segid $watersegname_$nchain1) and not name MAP) + end if + translation=false + end loop nloop1 + nstep 1000 + nprint 10 + end + + energy end + + fix sele=(name OO and not resn XAN) end + minimize rigid + eval ($nchain1 = 0) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + if ($mol_fix_origin_$nchain1 eq false) then + group ((segid $prot_segid_$nchain1 or segid $watersegname_$nchain1) and not name MAP) + end if + translation=true + end loop nloop1 + nstep $ministeps + nprint 10 + end + + energy end + + fix sele=(name OO and not resn XAN) end + minimize rigid + eval ($nchain1 = 0) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + if ($mol_fix_origin_$nchain1 eq false) then + group (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or name MAP)) + end if + translation=true + end loop nloop1 + for $id in id (segid WA* and (resn WAT or resn HOH or resn TIP*) and name OH2 and (attr store5 ne 1)) loop miniwater + group (byres(id $id)) + end loop miniwater + translation=true + nstep $ministeps + nprint 10 + end + energy end + + fix sele=(not all) end + + end if ! ($Saprotocol.rigidtrans eq true) + + inline @MODULE:bestener.cns + + if ($saprotocol.rotate180 eq true) then + eval($nchain1 = 0) + while ($nchain1 < $data.ncomponents) loop nloop4 + eval($nchain1 = $nchain1 + 1) + if ($mol_shape_$nchain1 eq false) then + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop3 + eval($nchain2 = $nchain2 + 1) + if ($mol_shape_$nchain2 eq false) then + @MODULE:rotation180.cns + inline @MODULE:bestener.cns + end if + end loop nloop3 + end if + end loop nloop4 + end if + +end loop trials + + +{* ===================== calculate complex internal energy *} +evaluate ($kinter = 1.0) +@MODULE:scale_intra_only.cns + +flag include bond angle dihe impr vdw end + +evaluate ($elec = 0.0) +evaluate ($eintfree = 0.0) +if ($Data.flags.elec eq true) then + flag include elec end +end if + +energy end + +evaluate ($eintcplx = $bond + $angl + $impr + $dihe + $vdw + $elec) +evaluate ($eintfree = $eintcplx) +{* at this stage the two are similar since rigid-body EM only *} + +evaluate ($ebond = $bond) +evaluate ($eangl= $angl) +evaluate ($eimpr= $impr) +evaluate ($edihe= $dihe) + +evaluate ($result=0) +print thres=0.05 bonds +evaluate ($rms_bonds=$result) +evaluate ($result=0) +print thres=5. angles +evaluate ($rms_angles=$result) +evaluate ($result=0) +print thres=5. impropers +evaluate ($rms_impropers=$result) +evaluate ($result=0) +print thres=30. dihedrals +evaluate ($rms_dihedrals=$result) + + +{* =========================== write out structure after rigid body refinement *} + +!bestener.cns: for waterdock, store3 contains store5 from lowest energy structure +do (x = refx) (not store3) +do (y = refy) (not store3) +do (z = refz) (not store3) + +evaluate ($esym = 0.0) +evaluate ($ncs = 0.0) +evaluate ($zhar = 0.0) +evaluate ($rms_test_noe = 0.0) +evaluate ($violations_test_noe = 0) +if ($Data.flags.sym eq true) then + noe reset nres= 2000000 end + @MODULE:symmultimer.cns + noe + scale symm $Data.ksym + end + energy end + evaluate ($esym = $noe) + if ($Data.randremoval eq true) then + display Print out of cross-validated violations and rms not + display possible in combination with symmetry restraints + display CV values set therefore to 0 + end if + noe reset end + set seed=$seed end + !read again the NOE data, needed to remove the symmetry restraints + inline @@MODULE:read_noes.cns + !random removal of restaints + if ($Data.randremoval eq true) then + noe cv $npart ? end + end if + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) + if ($Data.randremoval eq true) then + evaluate ($rms_test_noe=$test_rms) + evaluate ($violations_test_noe=$test_violations) + end if +else + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) + if ($Data.randremoval eq true) then + evaluate ($rms_test_noe=$test_rms) + evaluate ($violations_test_noe=$test_violations) + end if +end if + +evaluate ($unambig_scale = $Data.unambig_scale) +evaluate ($ambig_scale = $Data.ambig_scale) +evaluate ($hbond_scale = $Data.hbond_scale) + +noe + scale dist $unambig_scale + scale ambi $ambig_scale + scale hbon $hbond_scale + scale cont 0.0 +end + +{* ===================== calculate final energies and write structure *} +flag incl bond angl impr noe end + +if ($data.ncomponents > 1) then + evaluate ($kinter = 1.0) + @MODULE:scale_inter_final.cns +else + @MODULE:scale_intra_only.cns +end if + +energy end +evaluate ($cdih = 0.0) +evaluate ($etot = $ener - $noe) +evaluate ($noe = $bestair) +evaluate ($etot = $etot + $noe) + +evaluate ($Data.flags.dihed = false) +inline @MODULE:print_coorheader.cns + +if ($reorient eq true) then + coor sele=(segid $prot_segid_1) orient end +end if + +inline @MODULE:check_coordinates.cns + +if ($failure eq true) then + evaluate ($failfile = $output_pdb_filename - ".pdb" + ".fail") + set display=$failfile end + display "MAX/MIN possible coordinates exceeded - stopping" + close $failfile end + stop +else + write coordinates format=pdbo output=$output_pdb_filename end +end if + +set message=normal echo=on end +display OUTPUT: $output_pdb_filename + +! end of the recipe +stop diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/rotation180.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/rotation180.cns new file mode 100644 index 0000000000000000000000000000000000000000..cec7dd5d7d507ff1c37df7f0d9886b2a3fc30523 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/rotation180.cns @@ -0,0 +1,80 @@ +! rotation180.cns +! Perform a 180 degree rotation around a vector perpendicular to +! the interface of the complex +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +eval($distcu = 5.0) +eval($rotate180 = 180.0) +eval($xa = 0.0) +eval($ya = 0.0) +eval($za = 0.0) +eval($xb = 0.0) +eval($zb = 0.0) +eval($zb = 0.0) + +show aver (x) (segid $prot_segid_$nchain1 and ((segid $prot_segid_$nchain2) around $distcu)) +evaluate ($xa = $result) +show aver (y) (segid $prot_segid_$nchain1 and ((segid $prot_segid_$nchain2) around $distcu)) +evaluate ($ya = $result) +show aver (z) (segid $prot_segid_$nchain1 and ((segid $prot_segid_$nchain2) around $distcu)) +evaluate ($za = $result) +show aver (x) (segid $prot_segid_$nchain2 and ((segid $prot_segid_$nchain1) around $distcu)) +evaluate ($xb = $result) +show aver (y) (segid $prot_segid_$nchain2 and ((segid $prot_segid_$nchain1) around $distcu)) +evaluate ($yb = $result) +show aver (z) (segid $prot_segid_$nchain2 and ((segid $prot_segid_$nchain1) around $distcu)) +evaluate ($zb = $result) +eval($xdiff=$xa-$xb) +eval($ydiff=$ya-$yb) +eval($zdiff=$za-$zb) +eval($rnorm=$xdiff**2+$ydiff**2+$zdiff**2) + +if ($rnorm > 0.0) then + + coor + rotate sele= (segid $prot_segid_$nchain2 or segid $watersegname_$nchain2 and not name MAP) + center=($xa $ya $za) + axis ($xdiff $ydiff $zdiff) + $rotate180 + end + + fix sele=(name OO) end + + minimize rigid + eval ($nch1 = 0) + while ($nch1 < $data.ncomponents) loop nloop1 + eval($nch1 = $nch1 + 1) + if ($mol_fix_origin_$nch1 eq false) then + group (segid $prot_segid_$nch1 or segid $watersegname_$nch1 and not name MAP) + end if + translation=true + end loop nloop1 + translation=true + nstep 250 + nprint 10 + end + + minimize rigid + eval ($nch1 = 0) + while ($nch1 < $data.ncomponents) loop nloop1 + eval($nch1 = $nch1 + 1) + if ($mol_fix_origin_$nch1 eq false) then + group (segid $prot_segid_$nch1 or segid $watersegname_$nch1 and not name MAP) + end if + translation=true + end loop nloop1 + translation=true + nstep 250 + nprint 10 + end + + energy end + +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..efae5ce10a1fdafe1ef2f1d47a0ff9ebe57a1c8f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_final.cns @@ -0,0 +1,39 @@ +! scale_inter_final.cns +! Scaling of intermolecular interactions +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = $kinter * $scale.int_$nchain1_$nchain2) + interaction (segid $prot_segid_$nchain1 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) + (segid $prot_segid_$nchain2 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_mini.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_mini.cns new file mode 100644 index 0000000000000000000000000000000000000000..c8776f616b6a1743628001dbd59867294b2330b2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_mini.cns @@ -0,0 +1,37 @@ +! scale_inter_mini.cns +! Scaling of intermolecular interations +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = $kinter * $scale.int_$nchain1_$nchain2) + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain2 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..7abf15e4f42ad05aaeaf8c654c01ad1ea178d2c5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_inter_only.cns @@ -0,0 +1,41 @@ +! scale_inter_only.cns +! Scaling of intermolecular interaction (not internal energies) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = $kinter * $mol_int_$nchain1_$nchain2) + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain2 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + ((resn WAT or resn HOH or resn TIP* or resn DMS)) weight * 1.0 vdw $kinter elec $kinter end + + end loop nloop1 + + interaction ((resn WAT or resn HOH or resn TIP*)) ((resn WAT or resn HOH or resn TIP*)) weight * 1.0 end + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..15b0adfbb562862214f161c494c14a17dbf6beb7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/scale_intra_only.cns @@ -0,0 +1,36 @@ +! scale_intra_only.cns +! Scaling of intramolecular energies (no intermolecular energies) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 end + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end + + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/separate.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/separate.cns new file mode 100644 index 0000000000000000000000000000000000000000..b25ebaee28aca28e90322a5466a5700a2f100538 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/separate.cns @@ -0,0 +1,236 @@ +! separate.cns +! Distribute molecules in 3D space +! Orient each molecule according to its principal axes +! and restore them all at the end (after the while loop) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +! first flag all fixed molecules +do (store4 = 0) (all) +evaluate ($ncount = 0) +evaluate ($nfixed = 0) +while ($ncount < $data.ncomponents) loop orientmol + evaluate ($ncount = $ncount + 1) + if ($mol_fix_origin_$ncount eq true) then + evaluate ($nfixed = $nfixed + 1) + do (store4 = 1) (segid $prot_segid_$ncount) + end if +end loop orientmol + +if ($nfixed < $data.ncomponents) then + + evaluate ($xc = 0.0) + evaluate ($yc = 0.0) + evaluate ($zc = 0.0) + ! then define the geometrical center of the fixed molecules if present + show sum (store4) (all) + if ($result > 0) then + show ave (x) (attribute store4 = 1) + evaluate ($xc = $result) + show ave (y) (attribute store4 = 1) + evaluate ($yc = $result) + show ave (z) (attribute store4 = 1) + evaluatee ($zc = $result) + end if + + do (xcomp = x) (all) + do (ycomp = y) (all) + do (zcomp = z) (all) + + ! then orient each moving molecule separately at the origin + ! and translate it to the geometric center of the fixed molecules + evaluate ($ncount = 0) + while ($ncount < $data.ncomponents) loop orientmol + evaluate ($ncount = $ncount +1) + eval($watersegname_$ncount="WA" + encode($ncount)) + if ($mol_fix_origin_$ncount eq false) then + coor orient sele=(segid $prot_segid_$ncount or segid $watersegname_$ncount) end + coor sele=(segid $prot_segid_$ncount or segid $watersegname_$ncount) translate vector = ($xc $yc $zc) end + do (xcomp = x) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + do (ycomp = y) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + do (zcomp = z) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + end if + end loop orientmol + + do (x = xcomp) (not (resn ANI or resn XAN or resn DAN)) + do (y = ycomp) (not (resn ANI or resn XAN or resn DAN)) + do (z = zcomp) (not (resn ANI or resn XAN or resn DAN)) + + ! Find the largest axis of all molecules + evaluate ($minispacing = 25.0) + evaluate ($mxdim = 0) + evaluate ($ncount = 0) + + while ($ncount < $data.ncomponents) loop findmax + evaluate ($ncount = $ncount +1) + + show max (x) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($xdim = $result) + show min (x) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($xdim = $xdim - $result) + + show max (y) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($ydim = $result) + show min (y) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($ydim = $ydim - $result) + + show max (z) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($zdim = $result) + show min (z) (segid $prot_segid_$ncount or segid $watersegname_$ncount) + evaluate ($zdim = $zdim - $result) + + ! Check which dimension (x,y,z) is the largest = mxdim + evaluate ($mxdim = max($mxdim, $xdim, $ydim, $zdim)) + + end loop findmax + + evaluate ($spacing = $minispacing + $mxdim ) + display SPACING SET TO $spacing ANGSTROM + + ! This has to be manually coded because of the variable name + ! Should be fine since we support only a few types of symmetry + ! Maybe change the variable name later if these are expanded + ! to have the number at the end? + + inline @MODULE:check-homomers.cns + + if ($homosymmetry eq true) then + ! In case of homosymmetry, place molecules in a plane + do (store4 = 0) (all) + evaluate ($ncount = 0) + while ($ncount < $data.ncomponents) loop orientmol + evaluate ($ncount = $ncount + 1) + if ($mol_fix_origin_$ncount eq false) then + do (store4 = 1) (segid $prot_segid_$ncount) + end if + end loop orientmol + + {* translate and generate symmetric positions by rotation around z *} + coor trans sele=(attr store4=1) vector=($spacing,0,0) end + + ! if one molecule is fixed (e.g. plane), move all others along z-axis + !if ($data.ncomponents > $n_moving_mol) then + ! coor trans sele=(attr store4=1) vector=(0,0,$spacing) end + !end if + + evaluate ($ncount = 2) + evaluate ($increment = 360/$n_moving_mol) + while ($ncount le $data.ncomponents) loop orientsym + + if ($mol_fix_origin_$ncount eq false) then + {* rotate around z axis *} + evaluate ($xr = $increment) + evaluate ($x1 = cos($xr)) + evaluate ($x2 = -sin($xr)) + evaluate ($x3 = 0 ) + evaluate ($y1 = sin($xr)) + evaluate ($y2 = cos($xr)) + evaluate ($y3 = 0 ) + evaluate ($z1 = 0 ) + evaluate ($z2 = 0 ) + evaluate ($z3 = 1 ) + coor + center=($xc $yc $zc) + rotate matrix=($x1 $x2 $x3) ($y1 $y2 $y3) ($z1 $z2 $z3) + sele=(segid $prot_segid_$ncount or segid $watersegname_$ncount) + end + evaluate ($increment = $xr + 360/$n_moving_mol) + + end if + evaluate ($ncount = $ncount + 1) + + end loop orientsym + + else + ! Do we need fix any molecule? + evaluate($n_moving_mol = 0) + evaluate ($ncount = 0) + while ($ncount < $data.ncomponents) loop centermol + evaluate ($ncount = $ncount + 1) + if ($mol_fix_origin_$ncount eq false) then + evaluate($n_moving_mol = $n_moving_mol + 1) + end if + end loop centermol + + ! Translate molecules to positions calculated using an algorithm + ! based on minimization of electrostatic potential of N equally charged particles. + ! See Thomson problem: http://en.wikipedia.org/wiki/Thomson_problem + evaluate ($filename = "TOPPAR:initial_positions/trans_vector_" + encode($n_moving_mol) ) + inline @@$filename + + ! Logic: + ! Assign a random number larger than 0 to every molecule + ! Assign 0.0 to fixed molecules + ! For every i up to the number of molecules + ! pick the mol with the largest number and displace it + ! then zero its number. + ! This will place molecules in space sort of randomly + ! Stop when the sum of all numbers is zero + + ! Generate as many random numbers as the # of mols + evaluate ($ncount = 0) + while ($ncount < $data.ncomponents) loop genrandom + evaluate ($ncount = $ncount + 1) + if ($mol_fix_origin_$ncount eq true) then + evaluate ($random_$ncount = 0.0) + else + evaluate ($random_$ncount = random()) + end if + end loop genrandom + + ! Randomly pick a molecule and place it + ! on the pre-defined position - iterate + evaluate ($sum_random = 999) + evaluate ($molcounter = 1) + + while ($sum_random > 0) loop placemol + evaluate ($maximum = 0) + evaluate ($maxid = 0) + evaluate ($ncount = 0) + + ! Select molecule with largest random number + while ($ncount < $data.ncomponents) loop selectmol + evaluate ($ncount = $ncount + 1) + if ($random_$ncount > $maximum) then + evaluate ($maximum = $random_$ncount) + evaluate ($maxid = $ncount) + end if + end loop selectmol + + if ($mol_fix_origin_$maxid eq false) then + coor trans + sele=(segid $prot_segid_$maxid or segid $watersegname_$maxid) + vector=($x_$molcounter, $y_$molcounter, $z_$molcounter) + end + + ! Reset random_ncount to 0 to avoid re-selecting + evaluate ($random_$maxid = 0) + + ! Increment molcounter to update new + evaluate ($molcounter = $molcounter + 1) + + ! Update sum_random + evaluate ($ncount = 0) + evaluate ($sum_random = 0) + + while ($ncount < $data.ncomponents) loop resetsumrandom + evaluate ($ncount = $ncount + 1) + evaluate( $sum_random = $sum_random + $random_$ncount) + end loop resetsumrandom + + end if + end loop placemol + end if + + do (x = refx) (resn ANI or resn DAN or resn XAN) + do (y = refy) (resn ANI or resn DAN or resn XAN) + do (z = refz) (resn ANI or resn DAN or resn XAN) + +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/surf-restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/surf-restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..7ea400ff205e3f356854b16b6cff493e15ad1e9d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/surf-restraints.cns @@ -0,0 +1,69 @@ +! surf-restraints.cns +! Define surface contact restraints +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +!define surface contact restraints between all molecules +!using distance restraints between CA atoms with sum averaging + +eval($nchain = 0) +do (store9 = 0) (all) +do (store9 = 1) (name CA or name BB or name N1) +while ($nchain < $data.ncomponents) loop nloop0 + eval($nchain = $nchain + 1) + show sum (store9) (segid $prot_segid_$nchain) + if ($result < 3) then + evaluate ($selat$nchain = 0) + evaluate ($dist$nchain = 1.0) + else + evaluate ($selat$nchain = 1) + evaluate ($dist$nchain = 3.5) + end if +end loop nloop0 + +eval($nchain1 = 0) +noe class surface + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + evaluate ($updist = $dist$nchain1 + $dist$nchain2) + if ($selat$nchain1 = 1) then + if ($selat$nchain2 = 1) then + assign (segid $prot_segid_$nchain1 and ( name CA or name BB or name N1 )) + (segid $prot_segid_$nchain2 and ( name CA or name BB or name N1 )) $updist $updist 1.0 + else + assign (segid $prot_segid_$nchain1 and ( name CA or name BB or name N1 )) + (segid $prot_segid_$nchain2) $updist $updist 1.0 + end if + else + if ($selat$nchain2 = 1) then + assign (segid $prot_segid_$nchain1) + (segid $prot_segid_$nchain2 and ( name CA or name BB or name N1 )) $updist $updist 1.0 + else + assign (segid $prot_segid_$nchain1) + (segid $prot_segid_$nchain2) $updist $updist 1.0 + end if + end if + end loop nloop2 + end loop nloop1 + + averaging surface sum + scale surface $Data.ksurf + sqconstant surface 1.0 + sqexponent surface 2 + soexponent surface 1 + rswitch surface 1.0 + sqoffset surface 0.0 + asymptote surface 2.0 + msoexponent surface 1 + masymptote surface -0.1 + mrswitch surface 1.0 +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/symmultimer.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/symmultimer.cns new file mode 100644 index 0000000000000000000000000000000000000000..3b4f731e948bf1d58eab0f71f457da6e52afc3e9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/cns/symmultimer.cns @@ -0,0 +1,677 @@ +! symmultimer.cns +! Define symmetry restraints +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ($Data.flags.sym eq true) then + + noe class symm end + + ! Define C2 symmetry restraints for symmetrical multimers + ! + eval ($ncount = 0) + while ($ncount < $data.nc2sym) loop c2symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c2sym_sta1_$ncount) + evaluate ($i1end = $c2sym_end1_$ncount) + evaluate ($chain1 = $c2sym_seg1_$ncount) + evaluate ($i2start = $c2sym_sta2_$ncount) + evaluate ($i2end = $c2sym_end2_$ncount) + evaluate ($chain2 = $c2sym_seg2_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + if ($diff1 ne $diff2) then + display CHAIN LENGTH FOR SYMMETRY RESTRAINTS DOES NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc2sym + + evaluate ($resid1 = $i1start) + evaluate ($resid2 = $i2end - $icount) + evaluate ($resid3 = $i2start) + evaluate ($resid4 = $i1end - $icount) + + noe + assign (resid $resid1 and (name CA or name P or name BB) and segid $chain1) + (resid $resid2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resid3 and (name CA or name P or name BB) and segid $chain2) + (resid $resid4 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + end + + evaluate ($icount = $icount + 1) + evaluate ($i1start = $i1start + 1) + evaluate ($i2start = $i2start + 1) + + end loop genc2sym + + end loop c2symloop + + + ! Define C3 symmetry restraints for symmetrical multimers + ! + eval ($ncount = 0) + while ($ncount < $data.nc3sym) loop c3symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c3sym_sta1_$ncount) + evaluate ($i1end = $c3sym_end1_$ncount) + evaluate ($chain1 = $c3sym_seg1_$ncount) + evaluate ($i2start = $c3sym_sta2_$ncount) + evaluate ($i2end = $c3sym_end2_$ncount) + evaluate ($chain2 = $c3sym_seg2_$ncount) + evaluate ($i3start = $c3sym_sta3_$ncount) + evaluate ($i3end = $c3sym_end3_$ncount) + evaluate ($chain3 = $c3sym_seg3_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc3sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + + noe + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + end + + evaluate ($icount = $icount + 2) + evaluate ($i1start = $i1start + 2) + evaluate ($i2start = $i2start + 2) + evaluate ($i3start = $i3start + 2) + + end loop genc3sym + + end loop c3symloop + + ! Define S3 symmetry restraints for symmetrical multimers + ! + eval ($ncount = 0) + while ($ncount < $data.ns3sym) loop s3symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $s3sym_sta1_$ncount) + evaluate ($i1end = $s3sym_end1_$ncount) + evaluate ($chain1 = $s3sym_seg1_$ncount) + evaluate ($i2start = $s3sym_sta2_$ncount) + evaluate ($i2end = $s3sym_end2_$ncount) + evaluate ($chain2 = $s3sym_seg2_$ncount) + evaluate ($i3start = $s3sym_sta3_$ncount) + evaluate ($i3end = $s3sym_end3_$ncount) + evaluate ($chain3 = $s3sym_seg3_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + eval ($istep = 4) + eval ($istop = $i1end - $istep) + while ($i1start < $istop) loop gens3sym + + evaluate ($resst11 = $i1start) + evaluate ($resst21 = $i1start+1) + evaluate ($resst12 = $i2start) + evaluate ($resst22 = $i2start+1) + evaluate ($resst13 = $i3start) + evaluate ($resst23 = $i3start+1) + + + noe + + assign (resid $resst11 and (name CA or name P or name BB) and segid $chain1) + (resid $resst12 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst12 and (name CA or name P or name BB) and segid $chain2) + (resid $resst13 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst21 and (name CA or name P or name BB) and segid $chain1) + (resid $resst22 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst22 and (name CA or name P or name BB) and segid $chain2) + (resid $resst23 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + + end loop gens3sym + + end loop s3symloop + + ! Define C4 symmetry restraints for symmetrical multimers + ! + eval ($istep = 10) + eval ($ncount = 0) + while ($ncount < $data.nc4sym) loop c4symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c4sym_sta1_$ncount) + evaluate ($i1end = $c4sym_end1_$ncount) + evaluate ($chain1 = $c4sym_seg1_$ncount) + evaluate ($i2start = $c4sym_sta2_$ncount) + evaluate ($i2end = $c4sym_end2_$ncount) + evaluate ($chain2 = $c4sym_seg2_$ncount) + evaluate ($i3start = $c4sym_sta3_$ncount) + evaluate ($i3end = $c4sym_end3_$ncount) + evaluate ($chain3 = $c4sym_seg3_$ncount) + evaluate ($i4start = $c4sym_sta4_$ncount) + evaluate ($i4end = $c4sym_end4_$ncount) + evaluate ($chain4 = $c4sym_seg4_$ncount) + + !first check that the chain lengths are equal for the four defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + evaluate ($diff4 = $i4end - $i4start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff3 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc4sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resst4 = $i4start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + evaluate ($resen4 = $i4end - $icount) + + noe + + ! N to N sequential restraints to prevent anti-parallel arrangements + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + ! N to C sequential restraints to assure planarity + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + assign (resid $resen1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resen2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resen2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resen3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resen3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resen4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resen4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resen1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + evaluate ($i4start = $i4start + $istep) + + end loop genc4sym + + end loop c4symloop + + + ! Define C5 symmetry restraints for symmetrical multimers + ! + eval ($istep = 4) + eval ($ncount = 0) + while ($ncount < $data.nc5sym) loop c5symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c5sym_sta1_$ncount) + evaluate ($i1end = $c5sym_end1_$ncount) + evaluate ($chain1 = $c5sym_seg1_$ncount) + evaluate ($i2start = $c5sym_sta2_$ncount) + evaluate ($i2end = $c5sym_end2_$ncount) + evaluate ($chain2 = $c5sym_seg2_$ncount) + evaluate ($i3start = $c5sym_sta3_$ncount) + evaluate ($i3end = $c5sym_end3_$ncount) + evaluate ($chain3 = $c5sym_seg3_$ncount) + evaluate ($i4start = $c5sym_sta4_$ncount) + evaluate ($i4end = $c5sym_end4_$ncount) + evaluate ($chain4 = $c5sym_seg4_$ncount) + evaluate ($i5start = $c5sym_sta5_$ncount) + evaluate ($i5end = $c5sym_end5_$ncount) + evaluate ($chain5 = $c5sym_seg5_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + evaluate ($diff4 = $i4end - $i4start) + evaluate ($diff5 = $i5end - $i5start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff3 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff4 ne $diff5) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc5sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resst4 = $i4start) + evaluate ($resst5 = $i5start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + evaluate ($resen4 = $i4end - $icount) + evaluate ($resen5 = $i5end - $icount) + + noe + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + evaluate ($i4start = $i4start + $istep) + evaluate ($i5start = $i5start + $istep) + + end loop genc5sym + + end loop c5symloop + + ! Define C6 symmetry restraints for symmetrical multimers + ! + eval ($istep = 10) + eval ($ncount = 0) + while ($ncount < $data.nc6sym) loop c6symloop + + eval ($ncount = $ncount + 1) + evaluate ($i1start = $c6sym_sta1_$ncount) + evaluate ($i1end = $c6sym_end1_$ncount) + evaluate ($chain1 = $c6sym_seg1_$ncount) + evaluate ($i2start = $c6sym_sta2_$ncount) + evaluate ($i2end = $c6sym_end2_$ncount) + evaluate ($chain2 = $c6sym_seg2_$ncount) + evaluate ($i3start = $c6sym_sta3_$ncount) + evaluate ($i3end = $c6sym_end3_$ncount) + evaluate ($chain3 = $c6sym_seg3_$ncount) + evaluate ($i4start = $c6sym_sta4_$ncount) + evaluate ($i4end = $c6sym_end4_$ncount) + evaluate ($chain4 = $c6sym_seg4_$ncount) + evaluate ($i5start = $c6sym_sta5_$ncount) + evaluate ($i5end = $c6sym_end5_$ncount) + evaluate ($chain5 = $c6sym_seg5_$ncount) + evaluate ($i6start = $c6sym_sta6_$ncount) + evaluate ($i6end = $c6sym_end6_$ncount) + evaluate ($chain6 = $c6sym_seg6_$ncount) + + !first check that the chain lengths are equal for the two defined molecules + evaluate ($diff1 = $i1end - $i1start) + evaluate ($diff2 = $i2end - $i2start) + evaluate ($diff3 = $i3end - $i3start) + evaluate ($diff4 = $i4end - $i4start) + evaluate ($diff5 = $i5end - $i5start) + evaluate ($diff6 = $i6end - $i6start) + if ($diff1 ne $diff2) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff1 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff2 ne $diff3) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff3 ne $diff4) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff4 ne $diff5) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + if ($diff5 ne $diff6) then + display CHAIN LENGHT FOR SYMMETRY RESTRAINTS DO NOT MATCH + display PLEASE CHECK CAREFULLY YOUR INPUT + display ... stopping ... + stop + end if + + eval ($icount = 0) + while ($i1start < $i1end) loop genc6sym + + evaluate ($resst1 = $i1start) + evaluate ($resst2 = $i2start) + evaluate ($resst3 = $i3start) + evaluate ($resst4 = $i4start) + evaluate ($resst5 = $i5start) + evaluate ($resst6 = $i6start) + evaluate ($resen1 = $i1end - $icount) + evaluate ($resen2 = $i2end - $icount) + evaluate ($resen3 = $i3end - $icount) + evaluate ($resen4 = $i4end - $icount) + evaluate ($resen5 = $i5end - $icount) + evaluate ($resen6 = $i6end - $icount) + + noe + + ! Around the C6 ring + ! N to N sequential restraints to prevent anti-parallel arrangements + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resst3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resst4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resst5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resst6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resst1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resst2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + ! N to C sequential restraints to assure planarity + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + ! Triples + + assign (resid $resst1 and (name CA or name P or name BB) and segid $chain1) + (resid $resen3 and (name CA or name P or name BB) and segid $chain3) 0 0 0 + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + + assign (resid $resst3 and (name CA or name P or name BB) and segid $chain3) + (resid $resen5 and (name CA or name P or name BB) and segid $chain5) 0 0 0 + assign (resid $resst5 and (name CA or name P or name BB) and segid $chain5) + (resid $resen1 and (name CA or name P or name BB) and segid $chain1) 0 0 0 + + assign (resid $resst2 and (name CA or name P or name BB) and segid $chain2) + (resid $resen4 and (name CA or name P or name BB) and segid $chain4) 0 0 0 + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + + assign (resid $resst4 and (name CA or name P or name BB) and segid $chain4) + (resid $resen6 and (name CA or name P or name BB) and segid $chain6) 0 0 0 + assign (resid $resst6 and (name CA or name P or name BB) and segid $chain6) + (resid $resen2 and (name CA or name P or name BB) and segid $chain2) 0 0 0 + + end + + evaluate ($icount = $icount + $istep) + evaluate ($i1start = $i1start + $istep) + evaluate ($i2start = $i2start + $istep) + evaluate ($i3start = $i3start + $istep) + evaluate ($i4start = $i4start + $istep) + evaluate ($i5start = $i5start + $istep) + evaluate ($i6start = $i6start + $istep) + + end loop genc6sym + + end loop c6symloop + + + noe + potential symm symmetry + scale symm $Data.ksym + sqconstant symm 1.0 + sqexponent symm 2 + soexponent symm 1 + rswitch symm 0.5 + sqoffset symm 0.0 + asymptote symm 1.0 + end + +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ade524051f66de88167d9e89822cabe39fbbf555 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/sampling/rigidbody/defaults.yaml @@ -0,0 +1,4496 @@ +# +# Group molecule +# +mol_fix_origin_1: + default: false + type: boolean + title: Fix molecule + short: Fixes the molecule in its original position. + long: Fixes the molecule in its original position. + group: 'molecule' + explevel: expert +mol_shape_1: + default: false + type: boolean + title: Is the molecule a shape? + short: Defines a molecule as a shape. + long: Defines a molecule as a shape, which is a collection of beads. + group: 'molecule' + explevel: easy +# +# Group distance restraints +# +ambig_fname: + default: '' + type: file + title: Ambiguous distance restraints filename + short: Filename of the ambiguous distance restraints file + long: Filename of the ambiguous distance restraints file. By default 50% of those restraints will be randomly discared. + This can be changed/turned off and is controlled by the randremoval and npart parameters. + Note that this file can contain both ambiguous and unambiguous restraints. + group: 'distance restraints' + explevel: easy +previous_ambig: + default: false + type: boolean + title: Boolean condition on the previous ambiguous distance restraints file + short: Boolean condition on the previous ambiguous distance restraints file. + If true, use the the restraint information coming from the previous CNS module. If false, don't use previous information. + long: Boolean condition on the ambiguous distance restraints file. + If true, use the restraint information coming from the previous CNS module, as long as an ambig_fname is not defined for the current module. + If false, don't use previous information. + group: 'distance restraints' + explevel: expert +unambig_fname: + default: '' + type: file + title: Unambiguous restraints filename + short: Filename of the unambiguous distance restraints file + long: Filename of the unambiguous distance restraints file. All restraints in that file will be used. + Note that this file can contain both ambiguous and unambiguous restraints. + group: 'distance restraints' + explevel: easy +hbond_fname: + default: '' + type: file + title: H-bond restraints filename + short: Filename of the hydrogen bond distance restraints file + long: Filename of the hydrogen bond distance restraints file. Note that this file can contain any type of distance restraints. + group: 'distance restraints' + explevel: easy +ambig_scale: + default: 50 + type: integer + min: 0 + max: 1000 + title: Force constant for ambiguous distance restraints + short: Force constant applied to the distance restraints defined in ambig_fname. + long: Force constant applied to the distance restraints defined in ambig_fname. + group: 'distance restraints' + explevel: expert +unambig_scale: + default: 50 + type: integer + min: 0 + max: 1000 + title: Force constant for unambiguous distance restraints + short: Force constant applied to the distance restraints defined in unambig_fname. + long: Force constant applied to the distance restraints defined in unambig_fname. + group: 'distance restraints' + explevel: expert +hbond_scale: + default: 50 + type: integer + min: 0 + max: 1000 + title: Force constant for hbonds distance restraints + short: Force constant applied to the distance restraints defined in hbond_fname. + long: Force constant applied to the distance restraints defined in hbond_fname. + group: 'distance restraints' + explevel: expert +randremoval: + default: true + type: boolean + title: Random removal of ambiguous restraints + short: If set to true (default) this will cause the random removal of ambiguous restraints for each model generated. + long: If set to true (default) this will cause the random removal of ambiguous restraints for each model generated. + The fraction of restraints randomly removed depends on the npart parameter which defines in how many sets the restraints should be randomly split. + The first set will be removed. The fraction of randomly removed ambiguous restraints is thus 1/npart. + group: 'distance restraints' + explevel: expert +npart: + default: 2 + type: integer + min: 1 + max: 20 + title: Number partitions for ambiguous restraints + short: Number of sets into which to randomly partition the ambiguous restraints. + long: Number of sets into which to randomly partition the ambiguous restraints. + The fraction of restraints randomly removed depends on the npart parameter which defines in how many sets the restraints should be randomly split. + The first set will be removed. The fraction of randomly removed ambiguous restraints is thus 1/npart. + group: 'distance restraints' + explevel: expert +# +# Group ab initio mode +# +cmrest: + default: false + type: boolean + title: Center of mass restraints + short: Automatically defines distance restraints between the geometric center of the various molecules. + long: When turned on, this option will automatically define center of mass restraints between the various molecules. + This allows HADDOCK to operate in ab-initio mode in the absence of any other restraints. But those restraints can also + be combined with other restraints to ensure more compact solutions. The distance restraints are defined between the + geometrical centers of the various molecules (calculated on CA atoms for proteins (BB in case of Martini coarse-grained + molecules) and N1 atoms for nucleic acids. For small ligands, all atoms will be used to define the geometric center. + The upper limit distance is automatically calculated based on the dimension of the molecules (see cmtight description). + group: 'ab initio mode' + explevel: expert +cmtight: + default: true + type: boolean + title: Center of mass restraint tightness + short: Defines the upper distance limit based on the sum of the average dimension of the two molecule, + if cmtight=false all three dimensions are used, if set to true the shortest two only are used, + resulting in tighter distance restraints. + long: This parameter controls how the upper limit distance is defined for the center of mass restraints between molecules. + Each molecule is oriented along its principle components and the x,y and z dimensions are calculated. + If cmtight=true, the molecule distance (size) is set to the average of its smallest two half dimensions. + If cmtight=false, the molecule distance (size) is set to the average of its three half dimensions.. + In case of DNA or small ligands the molecule distance (size) is set to 0. + The effective upper distance limit for the center or mass distance restraint is the sum of the two molecule distances. + group: 'ab initio mode' + explevel: expert +kcm: + default: 1.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Center of mass restraints force constant + short: Force constant applied to the center of mass restraints + long: Force constant applied to the center of mass restraints + group: 'ab initio mode' + explevel: expert +ranair: + default: false + type: boolean + title: Random interaction restraints + short: Ambiguous interaction restraints will be defined randomly from surface patches around solvent accessible residues. + long: When turned on, this option will automatically define ambigous interaction restraints between the various molecules + from randomly selected surface patches from solvent accessible residues . + This allows HADDOCK to operate in ab-initio mode. + Note that this type of restraints can not be combined with any other distance restraints. + By default the entire surface will be sampled, but it is possible to define per molecule segments + from which the random restraints will be defined (see the nrair_X parameter). + group: 'ab initio mode' + explevel: expert +nrair_1: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_2: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_3: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_4: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_5: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_6: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_7: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_7_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_7_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_8: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_8_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_8_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_9: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_9_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_9_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_10: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_10_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_10_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_11: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_11_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_11_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_12: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_12_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_12_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_13: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_13_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_13_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_14: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_14_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_14_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_15: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_15_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_15_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_16: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_16_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_16_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_17: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_17_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_17_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_18: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_18_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_18_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_19: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_19_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_19_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +nrair_20: + default: 0 + type: integer + min: 0 + max: 100 + title: Number of segments from which to pick random restraints + short: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + long: Defines the number of segments for this molecule from which to randomly define random interaction restraints. + Only solvent accessible residues will be considered. See also the ranair parameter. + group: 'ab initio mode' + explevel: expert +rair_sta_20_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Starting residue number + short: Starting residue number for segment from which to define random interaction restraints + long: Starting residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +rair_end_20_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Ending residue number + short: Ending residue number for segment from which to define random interaction restraints + long: Ending residue number for segment from which to define random interaction restraints + group: 'ab initio mode' + explevel: expert +surfrest: + default: false + type: boolean + title: Surface contact restraints + short: Surface contact restraints between molecules + long: Surface contact restraints between molecules. These are defined as an ambiguous distance restraint + between all CA,BB or N1 atoms of two molecules (for small ligands all atoms are considered). + The upper limit is set to 7A (or 4.5A in case of small ligands). + Note that this option is computationally more expensive than the center of mass restraints (see cmrest). + group: 'ab initio mode' + explevel: expert +ksurf: + default: 1.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Surface contact restraints force constant + short: Force constant applied to the surface contact restraints. + long: Force constant applied to the surface contact restraints. + group: 'ab initio mode' + explevel: expert +# +# Group sampling +# +sampling: + default: 1000 + type: integer + min: 1 + max: 50000 + title: Number of models to generate + short: Number of rigidbody docking models to generate + long: Number of rigidbody docking models to generate + group: 'sampling' + explevel: easy +crossdock: + default: true + type: boolean + title: Cross docking of starting ensembles + short: In case ensembles of starting structures are provided, if set to true, takes all possible combinations for the docking. + long: This variable controls on starting models are combined in case ensembles of starting structures are provided. + If set to true, all possible combinations of starting models will be used for the docking. + If set to false, the first model from molecule1 will be combined with the first model from molecule2 and so on. + group: 'sampling' + explevel: expert +ntrials: + default: 5 + type: integer + min: 1 + max: 100 + title: Number of internal docking trials + short: Number of internal docking trials. Only the best model will be written to disk. + long: Number of internal docking trials. HADDOCK will repeat the docking internally multiple times, + ranking them internally and only writing the best model to disk. + group: 'sampling' + explevel: expert +rotate180: + default: true + type: boolean + title: Sample 180-rotated solutions + short: If true, HADDOCK will rotate the molecule by 180 degree around an axis perpendicular to the interface. + long: This parameter controls the sampling of 180 degree rotated solutions. + If set to true, HADDOCK will rotate the molecule by 180 degree around an axis perpendicular to the interface. + group: 'sampling' + explevel: expert +randorien: + default: true + type: boolean + title: No title yet + short: No short description yet + long: No long description yet + group: 'sampling' + explevel: easy +rigidtrans: + default: true + type: boolean + title: Allow translation during EM + short: Enables translation during rigidbody energy minimization + long: Enables translation during rigidbody energy minimization. + If set to false, only a rotational energy minimization will be performed. + group: 'sampling' + explevel: guru +iniseed: + default: 917 + type: integer + min: 0 + max: 9999999999999999 + title: Random seed + short: Random seed used in CNS to initialize the random seed function + long: Random seed used in CNS to initialize the random seed function + group: 'sampling' + explevel: guru +keepwater: + default: false + type: boolean + title: Write water molecules to output file + short: Write water molecules if present to the output file. + long: Write water molecules if present to the output file. + group: 'sampling' + explevel: guru +inter_rigid: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling of intermolecular interactions + short: Scaling of intermolecular interactions + long: Scaling of intermolecular interactions. This allows in particular to scale down intermolecular + interactions to reach buried sites (recommended value for this is 0.01). If scaled-down do note that + the van der Waals intermolecular energy might be bad because of clashes. In that case it is best to + also set the weight of the van der Waals energy term to 0 (w_vdw). + group: 'sampling' + explevel: expert +tolerance: + default: 5 + type: integer + min: 0 + max: 99 + precision: 3 + title: Failure tolerance percentage + short: Percentage of allowed failures for a module to successfully complete + long: Percentage of allowed failures for a module to successfully complete + group: 'module' + explevel: expert +log_level: + default: quiet + type: string + minchars: 0 + maxchars: 100 + choices: + - verbose + - normal + - quiet + title: Log level verbosity for CNS + short: Set the log level verbosity for CNS + long: CNS, the computational engine used by HADDOCK can generate a lot of output + messages. This parameter controls the verbosity of CNS (verbose, normal or quiet). + group: module + explevel: guru +# +# Group symmetry +# +sym_on: + default: false + type: boolean + title: Symmetry restraints + short: Enables symmetry restraints + long: Enables symmetry restraints. The symmetry type (C2,C3,C4,C5,C6,S3 supported) + and the segments to which those apply must be defined. In addition a custom symmetry restraint file can be supplied (symrest_fname). + group: 'symmetry' + explevel: expert +ksym: + default: 10.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Force constant for symmetry restraints + short: Force constant for symmetry restraints + long: Force constant for symmetry restraints + group: 'symmetry' + explevel: expert +symtbl_fname: + default: '' + type: file + title: Custom symmetry restraints filename + short: Filename of the custom symmetry restraints file + long: Filename of the custom symmetry restraints file. + group: 'symmetry' + explevel: expert +nc2sym: + default: 0 + type: integer + min: 0 + max: 40 + title: Number of C2 symmetry restraints + short: Defines the number of C2 symmetry restraints. + long: Defines the number of C2 symmetry restraints. + For each, a pair of segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: expert +c2sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C2 symmetry segment + long: Residue number of first residue in the first C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C2 symmetry segment + long: Residue number of last residue in the first C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C2 segment + short: Segment ID of first C2 segment + long: Segment ID of first C2 segment + group: 'symmetry' + explevel: expert +c2sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C2 symmetry segment + long: Residue number of first residue in the second C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C2 symmetry segment + long: Residue number of last residue in the second C2 symmetry segment + group: 'symmetry' + explevel: expert +c2sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C2 segment + short: Segment ID of second C2 segment + long: Segment ID of second C2 segment + group: 'symmetry' + explevel: expert +nc3sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C3 symmetry restraints + short: Defines the number of C3 symmetry restraints. + long: Defines the number of C3 symmetry restraints. + For each, three segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: expert +c3sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C3 symmetry segment + long: Residue number of first residue in the first C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C3 symmetry segment + long: Residue number of last residue in the first C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C3 segment + short: Segment ID of first C3 segment + long: Segment ID of first C3 segment + group: 'symmetry' + explevel: expert +c3sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C3 symmetry segment + long: Residue number of first residue in the second C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C3 symmetry segment + long: Residue number of last residue in the second C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C3 segment + short: Segment ID of second C3 segment + long: Segment ID of second C3 segment + group: 'symmetry' + explevel: expert +c3sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C3 symmetry segment + long: Residue number of first residue in the third C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C3 symmetry segment + long: Residue number of last residue in the third C3 symmetry segment + group: 'symmetry' + explevel: expert +c3sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C3 segment + short: Segment ID of third C3 segment + long: Segment ID of third C3 segment + group: 'symmetry' + explevel: expert +nc4sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C4 symmetry restraints + short: Defines the number of C4 symmetry restraints. + long: Defines the number of C4 symmetry restraints. + For each, four segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: expert +c4sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C4 symmetry segment + long: Residue number of first residue in the first C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C4 symmetry segment + long: Residue number of last residue in the first C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C4 segment + short: Segment ID of first C4 segment + long: Segment ID of first C4 segment + group: 'symmetry' + explevel: expert +c4sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C4 symmetry segment + long: Residue number of first residue in the second C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C4 symmetry segment + long: Residue number of last residue in the second C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C4 segment + short: Segment ID of second C4 segment + long: Segment ID of second C4 segment + group: 'symmetry' + explevel: expert +c4sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C4 symmetry segment + long: Residue number of first residue in the third C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C4 symmetry segment + long: Residue number of last residue in the third C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C4 segment + short: Segment ID of third C4 segment + long: Segment ID of third C4 segment + group: 'symmetry' + explevel: expert +c4sym_sta4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fourth C4 symmetry segment + long: Residue number of first residue in the fourth C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_end4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fourth C4 symmetry segment + long: Residue number of last residue in the fourth C4 symmetry segment + group: 'symmetry' + explevel: expert +c4sym_seg4_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fourth C4 segment + short: Segment ID of fourth C4 segment + long: Segment ID of fourth C4 segment + group: 'symmetry' + explevel: expert +nc5sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C5 symmetry restraints + short: Defines the number of C5 symmetry restraints. + long: Defines the number of C5 symmetry restraints. + For each, five segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: expert +c5sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C5 symmetry segment + long: Residue number of first residue in the first C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C5 symmetry segment + long: Residue number of last residue in the first C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C5 segment + short: Segment ID of first C5 segment + long: Segment ID of first C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C5 symmetry segment + long: Residue number of first residue in the second C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C5 symmetry segment + long: Residue number of last residue in the second C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C5 segment + short: Segment ID of second C5 segment + long: Segment ID of second C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C5 symmetry segment + long: Residue number of first residue in the third C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C5 symmetry segment + long: Residue number of last residue in the third C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C5 segment + short: Segment ID of third C5 segment + long: Segment ID of third C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fourth C5 symmetry segment + long: Residue number of first residue in the fourth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fourth C5 symmetry segment + long: Residue number of last residue in the fourth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg4_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fourth C5 segment + short: Segment ID of fourth C5 segment + long: Segment ID of fourth C5 segment + group: 'symmetry' + explevel: expert +c5sym_sta5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fifth C5 symmetry segment + long: Residue number of first residue in the fifth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_end5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fifth C5 symmetry segment + long: Residue number of last residue in the fifth C5 symmetry segment + group: 'symmetry' + explevel: expert +c5sym_seg5_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fifth C5 segment + short: Segment ID of fifth C5 segment + long: Segment ID of fifth C5 segment + group: 'symmetry' + explevel: expert +nc6sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of C6 symmetry restraints + short: Defines the number of C6 symmetry restraints. + long: Defines the number of C6 symmetry restraints. + For each, six segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: expert +c6sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first C6 symmetry segment + long: Residue number of first residue in the first C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first C6 symmetry segment + long: Residue number of last residue in the first C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first C6 segment + short: Segment ID of first C6 segment + long: Segment ID of first C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second C6 symmetry segment + long: Residue number of first residue in the second C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second C6 symmetry segment + long: Residue number of last residue in the second C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second C6 segment + short: Segment ID of second C6 segment + long: Segment ID of second C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third C6 symmetry segment + long: Residue number of first residue in the third C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third C6 symmetry segment + long: Residue number of last residue in the third C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third C6 segment + short: Segment ID of third C6 segment + long: Segment ID of third C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fourth C6 symmetry segment + long: Residue number of first residue in the fourth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end4_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fourth C6 symmetry segment + long: Residue number of last residue in the fourth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg4_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fourth C6 segment + short: Segment ID of fourth C6 segment + long: Segment ID of fourth C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the fifth C6 symmetry segment + long: Residue number of first residue in the fifth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end5_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the fifth C6 symmetry segment + long: Residue number of last residue in the fifth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg5_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of fifth C6 segment + short: Segment ID of fifth C6 segment + long: Segment ID of fifth C6 segment + group: 'symmetry' + explevel: expert +c6sym_sta6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the sixth C6 symmetry segment + long: Residue number of first residue in the sixth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_end6_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the sixth C6 symmetry segment + long: Residue number of last residue in the sixth C6 symmetry segment + group: 'symmetry' + explevel: expert +c6sym_seg6_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of sixth C6 segment + short: Segment ID of sixth C6 segment + long: Segment ID of sixth C6 segment + group: 'symmetry' + explevel: expert +ns3sym: + default: 0 + type: integer + min: 0 + max: 10 + title: Number of S3 symmetry restraints + short: Defines the number of S3 symmetry restraints. + long: Defines the number of S3 symmetry restraints. + For each, three segments on which the symmetry restraint is applied will have to be defined. + Those must all have the same length. + group: 'symmetry' + explevel: expert +s3sym_sta1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the first S3 symmetry segment + long: Residue number of first residue in the first S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_end1_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the first S3 symmetry segment + long: Residue number of last residue in the first S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_seg1_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of first S3 segment + short: Segment ID of first S3 segment + long: Segment ID of first S3 segment + group: 'symmetry' + explevel: expert +s3sym_sta2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the second S3 symmetry segment + long: Residue number of first residue in the second S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_end2_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the second S3 symmetry segment + long: Residue number of last residue in the second S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_seg2_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of second S3 segment + short: Segment ID of second S3 segment + long: Segment ID of second S3 segment + group: 'symmetry' + explevel: expert +s3sym_sta3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of first residue + short: Residue number of first residue in the third S3 symmetry segment + long: Residue number of first residue in the third S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_end3_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: Residue number of last residue + short: Residue number of last residue in the third S3 symmetry segment + long: Residue number of last residue in the third S3 symmetry segment + group: 'symmetry' + explevel: expert +s3sym_seg3_1: + default: '' + type: string + minchars: 0 + maxchars: 4 + title: Segment ID of third S3 segment + short: Segment ID of third S3 segment + long: Segment ID of third S3 segment + group: 'symmetry' + explevel: expert +# +# Group scoring +# +w_dist: + default: 0.01 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the distance restraint energy + short: Weight of the distance restraints energy in the scoring function + long: Weight of the distance restraints energy in the scoring function. + Note that this is different from the force constants used during the calculations. + group: 'scoring' + explevel: expert +w_air: + default: 0.01 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the distance restraint energy + short: Weight of the distance restraints energy in the scoring function + long: Weight of the distance restraints energy in the scoring function. + Note that this is different from the force constants used during the calculations. + group: 'scoring' + explevel: expert +w_bsa: + default: -0.01 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the buried surface area term + short: Weight of the buried surface area term in the scoring function + long: Weight of the buried surface area (BSA) term in the scoring function. + Note that the BSA is only used for scoring. + group: 'scoring' + explevel: expert +w_cdih: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the dihedral angle restraint energy + short: Weight of the dihedral angle restraints energy in the scoring function + long: Weight of the dihedral angle restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: expert +w_dani: + default: 0.01 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the relaxation anisotropy (DANI) restraint energy + short: Weight of the relaxation anisotropy (DANI) restraint energy + long: Weight of the relaxation anisotropy (DANI) restraint energy + group: 'scoring' + explevel: hidden +w_deint: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the interaction energy term + short: Weight of the interaction energy term + long: Weight of the interaction energy term calculated as the difference in total energy of the complex and of the separate components + group: 'scoring' + explevel: hidden +w_desolv: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the desolvation energy term + short: Weight of the desolvation energy term in the scoring function + long: Weight of the desolvation energy term in the scoring function. + Note that the desolvation energy is only used for scoring. + group: 'scoring' + explevel: expert +w_elec: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular electrostatic energy + short: Weight of the intermolecular electrostatic energy in the scoring function + long: Weight of the intermolecular electrostatic energy in the scoring function. + Note that this does not affect the electostatic energy during the rigidbody minimization. + group: 'scoring' + explevel: expert +w_lcc: + default: -400.0 + type: float + min: -9999 + max: 0 + precision: 3 + title: Weight of the EM local correlation coefficient + short: Weight of the EM local correlation coefficient + long: Weight of the EM local correlation coefficient + group: 'scoring' + explevel: hidden +w_rg: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the radius of gyration restraint energy + short: Weight of the radius of gyration restraint energy + long: Weight of the radius of gyration restraint energy + group: 'scoring' + explevel: hidden +w_sani: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (SANI) restraint energy + short: Weight of the residual dipolar coupling (SANI) restraint energy + long: Weight of the residual dipolar coupling (SANI) restraint energy + group: 'scoring' + explevel: hidden +w_sym: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the symmetry restraint energy + short: Weight of the symmetry restraints energy in the scoring function + long: Weight of the symmetry restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: expert +w_vdw: + default: 0.01 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular van der Waals energy + short: Weight of the intermolecular van der Waals energy in the scoring function + long: Weight of the intermolecular van der Waals energy in the scoring function. + Note that this does not affect the van der Waals energy during the rigidbody minimization. + group: 'scoring' + explevel: expert +w_vean: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (VEAN) restraint energy + short: Weight of the residual dipolar coupling (VEAN) restraint energy + long: Weight of the residual dipolar coupling (VEAN) restraint energy + group: 'scoring' + explevel: hidden +w_xpcs: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the pseudo contact shifts (XPCS) restraint energy + short: Weight of the pseudo contact shifts (XPCS) restraint energy + long: Weight of the pseudo contact shifts (XPCS) restraint energy + group: 'scoring' + explevel: hidden +w_xrdc: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (XRDC) restraint energy + short: Weight of the residual dipolar coupling (XRDC) restraint energy + long: Weight of the residual dipolar coupling (XRDC) restraint energy + group: 'scoring' + explevel: hidden +w_zres: + default: 0.1 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the Z-restraining potential energy + short: Weight of the Z-restraining potential energy + long: Weight of the Z-restraining potential energy + group: 'scoring' + explevel: hidden +# +# Group force field +# +ligand_param_fname: + default: '' + type: file + title: Custom ligand parameter file + short: Ligand parameter file in CNS format + long: Ligand parameter file in CNS format containing all force field parameters + (bond, angles, dihedrals, impropers, van der waals) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: expert +ligand_top_fname: + default: '' + type: file + title: Custom ligand topology file + short: Ligand topology file in CNS format + long: Ligand topology file in CNS format containing the ligand topologies + (atoms, masses, charges, bond definitions...) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: expert +elecflag: + default: true + type: boolean + title: Include electrostatics energy + short: Include electrostatics energy during the calculations. + long: Include electrostatics energy during the calculations. If set to false electrostatics will not be considered. + group: 'force field' + explevel: easy +dielec: + default: rdie + type: string + minchars: 0 + maxchars: 4 + choices: + - cdie + - rdie + title: Constant (cdie) or distance-dependent dielectric (rdie) constant. + short: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + long: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + A distance dependent dielectric constant will effectively scale down the electrostatic energy + by having a 1/r**2 dependency instead of 1/r + group: 'force field' + explevel: expert +epsilon: + default: 10.0 + type: float + min: 1 + max: 78 + precision: 1 + title: Dielectric constant + short: Dielectric constant for the electrostatic Coulomb energy term. + long: Dielectric constant for the electrostatic Coulomb energy term. + group: 'force field' + explevel: expert +# +# Group interaction matrix +# +int_1_1: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_2: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_3: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_1_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_2: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_3: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_2_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_3: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_3_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_4: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_4_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_5: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_5_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_6: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_6_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_7: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_8: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_7_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_8_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_9: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_9_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_10: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_10_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_11: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_11_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_12: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_12_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_13: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_13_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_14: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_14_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_15: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_15_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_16: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_16_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_17: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_17_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_18_18: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_18_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_18_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_19_19: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_19_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden +int_20_20: + default: 1.0 + type: float + min: 0 + max: 1 + precision: 3 + title: Scaling factor for intermolecular energies + short: Scaling factor for intermolecular energies + long: Scaling factor for intermolecular energies between the two molecules. + This can be used for example in ensemble docking to have two molecules binding to the same site without seeing eachother. + group: 'interaction matrix' + explevel: hidden diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._emscoring b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._emscoring new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._emscoring differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._mdscoring b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._mdscoring new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._mdscoring differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._prodigyligand b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._prodigyligand new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._prodigyligand differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._prodigyprotein b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._prodigyprotein new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._prodigyprotein differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._sasascore b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._sasascore new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/._sasascore differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..478d1e9088c7f6d7b745248e771e332728d670e6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/__init__.py @@ -0,0 +1,305 @@ +"""HADDOCK3 modules to score models.""" +import pandas as pd + +from haddock.core.typing import FilePath, Optional, Path, Any +from haddock.gear.haddockmodel import HaddockModel +from haddock.modules import BaseHaddockModule +from haddock.modules.base_cns_module import BaseCNSModule + + +class ScoringModule(BaseHaddockModule): + """Parent class for Scoring modules.""" + + def output( + self, + output_fname: FilePath, + sep: str = "\t", + ascending_sort: bool = True, + ) -> None: + r"""Save the output in comprehensive tables. + + Parameters + ---------- + output_fname : FilePath + Path to the file where to write scoring data. + sep : str, optional + Character used as separator in file, by default "\t" + ascending_sort : bool, optional + Should the data be sorted in ascending order, by default True + """ + # saves scoring data + sc_data = [ + [pdb.file_name, pdb.ori_name, pdb.md5, pdb.score] + for pdb in self.output_models + ] + + # converts to pandas dataframe and sorts by score + df_columns = ["structure", "original_name", "md5", "score"] + df_sc = pd.DataFrame(sc_data, columns=df_columns) + df_sc_sorted = df_sc.sort_values(by="score", ascending=ascending_sort) + # writes to disk + df_sc_sorted.to_csv( + output_fname, + sep=sep, + index=False, + na_rep="None", + float_format="%.3f", + ) + return + + +class CNSScoringModule(BaseCNSModule, ScoringModule): + """Parent class for CNS Scoring modules.""" + + def per_interface_output( + self, + output_fname: FilePath, + models: list[HaddockModel], + sep: str = "\t", + ascending_sort: bool = True, + ) -> None: + r"""Generate per interface scoring tsv output files. + + Parameters + ---------- + output_fname : FilePath + Path to the file where to write scoring data. + models : list[HaddockModel] + List of HaddockModel object obtained by loading the PDB files. + sep : str, optional + Character used as separator in file, by default "\t" + ascending_sort : bool, optional + Should the data be sorted in ascending order, by default True + """ + # Skip the analysis if not desired by the user + if not self.per_interface_scoring: + return + + # Retrieve all interfaces data for all pdb + set_interfaces: list[str] = [] + pdb_interfaces_scores: dict[tuple[Any, Any, Any], dict[str, dict[str, float]]] = {} # noqa : E501 + + # Loop over models to recover interfaces + for pdb, haddock_model in zip(self.output_models, models): + # if the pdb does not exist, skip + if not Path(pdb.file_name).exists(): + continue + # Make reverse interface checks + # Score A->B == Score B->A + reversed_interfaces_scores = {} + # Hold list of interfaces + for interface, scores in haddock_model.interface_energies.items(): + # Check if reverse chain order present + split_inter = interface.split("_") + reverse_interface = f"{split_inter[1]}_{split_inter[0]}" + if reverse_interface in set_interfaces: + reversed_interfaces_scores[reverse_interface] = scores + # Check if interface present + if interface not in set_interfaces: + set_interfaces.append(interface) + + # Combine with reversed interface scores + haddock_model.interface_energies.update(reversed_interfaces_scores) + # Hold data + pdbkey = (pdb.file_name, pdb.ori_name, pdb.md5) + pdb_interfaces_scores[pdbkey] = haddock_model.interface_energies + + # Preset output file basename and extension + output_file = Path(output_fname) + output_bn = output_file.stem + ouput_ext = "".join(output_file.suffixes) + # Write separated files for all interfaces + for interface in set_interfaces: + # Point data + sc_data = [] + for pdbkey, interfaces_scores in pdb_interfaces_scores.items(): + if interface not in interfaces_scores.keys(): + continue + interface_scores = interfaces_scores[interface] + score = interface_scores["HADDOCKscore"] + sc_data.append([pdbkey[0], pdbkey[1], pdbkey[2], score]) + # Check that the list is not empty + if len(sc_data) == 0: + continue + # converts to pandas dataframe and sorts by score + df_columns = ["structure", "original_name", "md5", "score"] + df_sc = pd.DataFrame(sc_data, columns=df_columns) + df_sc_sorted = df_sc.sort_values( + by="score", + ascending=ascending_sort, + ) + # Generate output filename + interface_output_fname = f"{output_bn}_{interface}{ouput_ext}" + # writes to disk + df_sc_sorted.to_csv( + interface_output_fname, + sep=sep, + index=False, + na_rep="None", + float_format="%.3f", + ) + return + + def extract_interface_combinations(self) -> list[str]: + """Read interface specific parameters. + + Removes the `interface_combinations` from the parameters as not + supported by CNS. + Sets the `per_interface_scoring` to True if `interface_combinations` + is not empty, as it is required for the interface-scores to be + present in the PDB file. + + Returns + ------- + interface_combinations : list[str] + List of user-defined combinations. + """ + # Here we pop the parameter as not supported by CNS and only used + # at the python level for downstream analysis + interface_combinations = self.params.pop("interface_combinations") + # Set the per_interface_scoring parameter value as set by the user + self.per_interface_scoring = self.params["per_interface_scoring"] + # Check if the parameter is used + if interface_combinations != []: + # NOTE: per_interface_scoring must be set to true for the interface + # scores to be present as REMARK in the header of the PDB file. + self.params["per_interface_scoring"] = True + return interface_combinations + + def update_pdb_scores( + self, + interface_combinations: list[str], + ) -> tuple[list[HaddockModel], dict[str, list[str]]]: + """Update the score attributes in the output pdb files. + + Parameters + ---------- + interface_combinations : list[str] + Input list of chains to be considered. + Each list entry must be composed of two chains separated by coma. + e.g.: + [] -> Consider all non-redundant chain pairs + ["A,H", "A,L"] -> Consider only the interface scores between A,H and A,L + + Returns + ------- + output_haddock_models : list[HaddockModel] + List of HaddockModel for each input pdb, that contain the actual + scores loaded from the file. + """ + # Obtain list of user defined interfaces + desired_interfaces = self.build_interface_sets_combinations( + interface_combinations + ) + # Get the weights from the parameters + _weight_keys = ("w_vdw", "w_elec", "w_desolv", "w_air", "w_bsa") + weights = {e: self.params[e] for e in _weight_keys} + + interface_errors: dict[str, list[str]] = {} + # Check for generated output, fail it not all expected files are found + output_haddock_models: list[HaddockModel] = [] + for pdb in self.output_models: + if pdb.is_present(): + # Convert pdb file into a HaddockModel to read the scores + haddock_model = HaddockModel(pdb.file_name) + # Set the unweighted energy terms + pdb.unw_energies = haddock_model.energies + # Compute set of interfaces if some are defined + if len(desired_interfaces) >= 1: + try: + score = self.compute_interfaces_score( + haddock_model.interface_energies, + desired_interfaces, + ) + # In case the output is None, fall back to standard + # haddock score that will always be ok to compute + except ValueError as interface_error: + # Hold that specific error + error_msg = str(interface_error) + if error_msg not in interface_errors.keys(): + interface_errors[error_msg] = [] + interface_errors[error_msg].append(pdb.file_name) + # Compute the haddock score instead + score = haddock_model.calc_haddock_score(**weights) + finally: + haddock_score = score + # Otherwise simply compute the standard haddock score + else: + # Compute the haddock score + haddock_score = haddock_model.calc_haddock_score(**weights) + # Set the score attribute + pdb.score = haddock_score + output_haddock_models.append(haddock_model) + # Log errors + for error_msg, models in interface_errors.items(): + self.log( + f"Interface error: '{error_msg}' occured {len(models)} times." + " Falling back on classic HADDOCKscore." + ) + return output_haddock_models + + @staticmethod + def build_interface_sets_combinations( + interface_combinations: list[str], + ) -> list[str]: + """Build desired combinatation of interfaces. + + Parameters + ---------- + interface_combinations : list[str] | None + Input list of chains to be considered. + Each list entry must be composed of two chains separated by coma. + e.g.: + [] -> Consider all non-redundant chain pairs + ["A,H", "A,L"] -> Consider only the interface scores between A,H and A,L + + Returns + ------- + combinations : list[str] + Unpacked list of interface combinations to consider. + ["A,H", "A,L"] -> ["A_H", "A_L"] + """ + combinations: list[str] = [ + "_".join([c.strip() for c in chains.split(",")]) + for chains in interface_combinations + if chains.count(",") == 1 # ensures input only contains pairs + ] + return combinations + + @staticmethod + def compute_interfaces_score( + interface_energies: dict[str, dict[str, float]], + interface_sets_combinations: list[str], + ) -> Optional[float]: + """Compute the sum of selected interface haddock score. + + Parameters + ---------- + interfaces_scores : dict[str, dict[str, float]] + Scores of the various interfaces present in the pdb. + interface_sets_combinations : list[str] + List of interface combinations to consider + """ + # Minimum set of interfaces must be >= 1 + if len(interface_sets_combinations) == 0: + raise ValueError("No input interfaces") + + # Get all desired interfaces scores + selected_interfaces_scores: list[float] = [] + for interface in interface_sets_combinations: + if interface in interface_energies.keys(): + interface_score = interface_energies[interface]["HADDOCKscore"] + selected_interfaces_scores.append(interface_score) + else: + # Check if reverse chain order present + split_inter = interface.split("_") + reverse_interface = f"{split_inter[1]}_{split_inter[0]}" + if reverse_interface in interface_energies.keys(): + interface_score = interface_energies[reverse_interface]["HADDOCKscore"] + selected_interfaces_scores.append(interface_score) + # Sum all desired interfaces scores + if len(selected_interfaces_scores) >= 1: + new_score = sum(selected_interfaces_scores) + else: + raise ValueError("Selected interface not found") + return new_score diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/._cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/._cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/._cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..7f2b4a7bf04fd6ecacd027789275995d085ecccc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/__init__.py @@ -0,0 +1,101 @@ +"""EM scoring module. + +This module performs energy minimization and scoring of the models generated in +the previous step of the workflow. No restraints are applied during this step. +""" + +from pathlib import Path + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import FilePath +from haddock.libs.libcns import prepare_cns_input, prepare_expected_pdb +from haddock.libs.libontology import PDBFile +from haddock.libs.libsubprocess import CNSJob +from haddock.modules import get_engine +from haddock.modules.scoring import CNSScoringModule + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(CNSScoringModule): + """HADDOCK3 module to perform energy minimization scoring.""" + + name = RECIPE_PATH.name + + def __init__( + self, order: int, path: Path, initial_params: FilePath = DEFAULT_CONFIG + ) -> None: + cns_script = Path(RECIPE_PATH, "cns", f"{self.name}.cns") + super().__init__(order, path, initial_params, cns_script=cns_script) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm module is installed.""" + return + + def _run(self) -> None: + """Execute module.""" + # Pool of jobs to be executed by the CNS engine + jobs: list[CNSJob] = [] + + try: + models_to_score = self.previous_io.retrieve_models(individualize=True) + except Exception as e: + self.finish_with_error(e) + + # Here we pop the parameter as not supported by CNS and only used + # at the python level for downstream analysis + interface_combinations = self.extract_interface_combinations() + + # Itereate over models to prepare CNS inputs + self.output_models = [] + for model_num, model in enumerate(models_to_score, start=1): + scoring_input = prepare_cns_input( + model_num, + model, + self.path, + self.recipe_str, + self.params, + self.name, + native_segid=True, + debug=self.params["debug"], + seed=model.seed if isinstance(model, PDBFile) else None, + ) + + scoring_out = f"{self.name}_{model_num}.out" + err_fname = f"{self.name}_{model_num}.cnserr" + + # create the expected PDBobject + expected_pdb = prepare_expected_pdb(model, model_num, ".", self.name) + # fill the ori_name field of expected_pdb + expected_pdb.ori_name = model.file_name + expected_pdb.md5 = model.md5 + expected_pdb.restr_fname = model.restr_fname + + self.output_models.append(expected_pdb) + + job = CNSJob(scoring_input, scoring_out, err_fname, envvars=self.envvars) + + jobs.append(job) + + # Run CNS Jobs + self.log(f"Running CNS Jobs n={len(jobs)}") + Engine = get_engine(self.params["mode"], self.params) + engine = Engine(jobs) + engine.run() + self.log("CNS jobs have finished") + + # Update the score attributes for each output pdb + output_haddock_models = self.update_pdb_scores(interface_combinations) + + # Set output filename + output_fname = f"{self.name}.tsv" + # Process per-interface analysis + self.per_interface_output(output_fname, output_haddock_models) + # Generate output + self.log(f"Saving output to {output_fname}") + self.output(output_fname) + # Export models to next module + self.export_io_models(faulty_tolerance=self.params["tolerance"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._calc_free-ene.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._calc_free-ene.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._calc_free-ene.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._check_coordinates.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._def_solv_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._emscoring.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._emscoring.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._emscoring.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._print_coorheader.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._read_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._restrain-ions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._restrain-ions.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._restrain-ions.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._scale_inter_final.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/._scale_intra_only.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/calc_free-ene.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/calc_free-ene.cns new file mode 100644 index 0000000000000000000000000000000000000000..7446e9921a6b2811cb61317ee38c452f6fa8d9a0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/calc_free-ene.cns @@ -0,0 +1,24 @@ +! calc_free-ene.cns +! Calculate the total energy of the separated components +! +! Script uses the store1 and store2 atom object, and COMP, REF and RMSD object +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +@MODULE:scale_intra_only.cns + +evaluate ($eintfree = 0.0) + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=10.0 nprint=25 end +end if +energy end + +evaluate ($eintfree = $bond + $angl + $impr + $dihe + $vdw + $elec) + +display FREE MOLECULES INTERNAL ENERGY = $eintfree diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..d23c8e64804060c61ff6aeea38925dc8e61dc8d6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/check_coordinates.cns @@ -0,0 +1,100 @@ +! check_coordinates.cns +! Check max/min coordinates for compatibility with PDB format +! +! *********************************************************************** +! * Copyright 2025 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($failure = false) + +!check for coordinates >9999.999 (max writable in PDB format) + +show max (x) (all) +evaluate ($maxcoor = $result) +show max (y) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +show max (z) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +if ($maxcoor gt 9999.999) then + evaluate ($failure = true) +end if + +!check for coordinates <-999.999 (min writable in PDB format) + +show min (x) (all) +evaluate ($mincoor = $result) +show min (y) (all) +if ($result lt $mincoor) then + evaluate ($maxcoor = $result) +end if +show min (z) (all) +if ($result lt $mincoor) then + evaluate ($mincoor = $result) +end if +if ($mincoor lt -999.999) then + evaluate ($failure = true) +end if + +!if problem detected try correcting it by centering the system around 4500,4500,4500 +!but only if no EM restraints are used + +if ($failure eq true) then + if ($data.flags.em eq false) then + + evaluate ($xc = 0.0) + evaluate ($yc = 0.0) + evaluate ($zc = 0.0) + show ave (x) (all) + evaluate ($xc = 4500 - $result) + show ave (y) (all) + evaluate ($yc = 4500 - $result) + show ave (z) (all) + evaluate ($zc = 4500 -$result) + + do (x = x + $xc) (all) + do (y = y + $yc) (all) + do (z = z + $zc) (all) + + evaluate ($failure = false) + evaluate ($maxcoor = -999) + evaluate ($mincoor = 9999) + !check again for coordinates >9999.999 (max writable in PDB format) + show max (x) (all) + evaluate ($maxcoor = $result) + show max (y) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + show max (z) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + if ($maxcoor gt 9999.999) then + evaluate ($failure = true) + end if + + !check for coordinates <-999.999 (min writable in PDB format) + show min (x) (all) + evaluate ($mincoor = $result) + show min (y) (all) + if ($result lt $mincoor) then + evaluate ($maxcoor = $result) + end if + show min (z) (all) + if ($result lt $mincoor) then + evaluate ($mincoor = $result) + end if + if ($mincoor lt -999.999) then + evaluate ($failure = true) + end if + end if +end if + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..5a9e07a042e08d15d5b98d859fa199151e7b4a43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/def_solv_param.cns @@ -0,0 +1,105 @@ +! def_solv_param.cns +! Define atomic solvation parameters +! Original valus taken from Fernandez-Recio et al. JMB 335:843 (2004) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($arofac = 6.26) +evaluate ($alifac = 1.27) +evaluate ($polfac = 2.30) + + +do (store1 = 0.0000) (all) +do (store1 = 0.0151 * $alifac) (name C*) +do (store1 = 0.0176 * $arofac) ((name CG* or name CD* or name CE* or name CH* or name CZ*) and (resn PHE or resn TYR or resn HIS or resn TRP)) +do (store1 = -0.0170 * $polfac) (name N*) +do (store1 = -0.0548 * $polfac) (name NT* or (name NZ* and resn LYS)) +do (store1 = -0.0273 * $polfac) (name NH* and resn ARG) +do (store1 = -0.0136 * $polfac) (name O*) +do (store1 = -0.0185 * $polfac) (name OG* or name OH) +do (store1 = -0.0299 * $polfac) ((name OD* and resn ASP) or (name OE* and resn GLU)) +do (store1 = 0.0112 * $polfac) (name S*) +do (store1 = 0.0022 * $polfac) ((name S* and attr charge = -0.3) or (name SD and resn MET)) +do (store1 = 0.0000) (name SHA) + +! +! CG parameters matched from the original terms +! +! Edesolv_aa +! ASP_cg = _________________________ +! ASA_cg +! +! ASA_cg and Edesol_aa calculated on a GGXGG peptide +! accuracy=0.0025, rh2o=1.4, delete H, sele=(resn X) +! +! e.g. BB bead alanine +! +! BB = CA + C + N + O +! ASA_cg = 176.4940 +! Edesolv_aa = -1.8889 +! +! ASP_cg = -0.0107 +! +! Charleen Don (2012), JR (2014), Jorge Roel (2017) +! +! + +do (store1 = 0.0000) (name BB or name SC*) +! Backbone beads +do (store1 = -0.0107) (name BB and resn ALA) +do (store1 = -0.0089) (name BB and resn GLY) +do (store1 = -0.0153) (name BB and resn ILE) +do (store1 = -0.0158) (name BB and resn VAL) +do (store1 = -0.0046) (name BB and resn PRO) +do (store1 = -0.0137) (name BB and resn ASN) +do (store1 = -0.0147) (name BB and resn GLN) +do (store1 = -0.0165) (name BB and resn THR) +do (store1 = -0.0154) (name BB and resn SER) +do (store1 = -0.0130) (name BB and resn MET) +do (store1 = -0.0167) (name BB and resn CYS) +do (store1 = -0.0126) (name BB and resn PHE) +do (store1 = -0.0134) (name BB and resn TYR) +do (store1 = -0.0134) (name BB and resn TRP) +do (store1 = -0.0169) (name BB and resn ASP) +do (store1 = -0.0150) (name BB and resn GLU) +do (store1 = -0.0155) (name BB and resn HIS) +do (store1 = -0.0163) (name BB and resn LYS) +do (store1 = -0.0162) (name BB and resn ARG) + +! Side-chain beads +!do (store1 = 0.0000) (name SC* and resn ALA) +!do (store1 = 0.0000) (name SC* and resn GLY) +do (store1 = 0.0255) (name SC* and resn ILE) +do (store1 = 0.0222) (name SC* and resn VAL) +do (store1 = 0.0230) (name SC* and resn PRO) +do (store1 = -0.0192) (name SC* and resn ASN) +do (store1 = -0.0135) (name SC* and resn GLN) +do (store1 = -0.0009) (name SC* and resn THR) +do (store1 = -0.0056) (name SC* and resn SER) +do (store1 = 0.0202) (name SC* and resn MET) +do (store1 = 0.0201) (name SC* and resn CYS) +do (store1 = 0.1005) (name SC* and resn PHE) +do (store1 = 0.0669) (name SC* and resn TYR) +do (store1 = 0.0872) (name SC* and resn TRP) +do (store1 = -0.0360) (name SC* and resn ASP) +do (store1 = -0.0301) (name SC* and resn GLU) +do (store1 = 0.0501) (name SC* and resn HIS) +do (store1 = -0.0210) (name SC* and resn LYS) +do (store1 = -0.0229) (name SC* and resn ARG) + +! Fake beads +do (store1 = 0.0) (name SCD* and resn ASN) +do (store1 = 0.0) (name SCD* and resn GLN) +do (store1 = 0.0) (name SCD* and resn SER) +do (store1 = 0.0) (name SCD* and resn THR) +do (store1 = 0.0) (name SCD* and resn ARG) +do (store1 = 0.0) (name SCD* and resn LYS) +do (store1 = 0.0) (name SCD* and resn GLU) +do (store1 = 0.0) (name SCD* and resn ASP) + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/emscoring.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/emscoring.cns new file mode 100644 index 0000000000000000000000000000000000000000..26b64ad46e1bc807913e0122674b6826d0426e48 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/emscoring.cns @@ -0,0 +1,227 @@ + +! scoring.cns +! Minimizes complex and score +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + +!==================================================================! +! Initialisation of variables +!==================================================================! + +evaluate ($ini_count =1) + +evaluate ($Data.flags.ncs = false) +evaluate ($Data.flags.sym = false) +evaluate ($Data.flags.cdih = false) +evaluate ($Data.flags.plan = false) +evaluate ($Data.flags.noe = false) +evaluate ($Data.flags.dihed = $dihedflag) +evaluate ($Data.flags.elec = $elecflag) +evaluate ($Data.flags.em = false) +evaluate ($Data.flags.rg = false) +evaluate ($Data.flags.zres = false) +evaluate ($Data.flags.sani = false) +evaluate ($Data.flags.xrdc = false) +evaluate ($Data.flags.xpcs = false) +evaluate ($Data.flags.dani = false) +evaluate ($Data.flags.vean = false) + +evaluate ($Data.noecv = false) +evaluate ($Data.randremoval = false) +evaluate ($refine.keepwater = false) + +evaluate ($data.ncomponents=$ncomponents) + +evaluate ($nmol=1) +while ($nmol <= $data.ncomponents) loop mol + evaluate ($toppar.prot_segid_$nmol = $prot_segid_$nmol) + evaluate ($mol_shape_$nmol = false) + evaluate ($nmol = $nmol + 1) +end loop mol + + +! non-bonded parameter set to use +evaluate ($toppar.par_nonbonded = "OPLSX") + +!Electrostatics: +evaluate ($Data.flags.dihed =$dihedflag) +evaluate ($Data.flags.elec =$elecflag) +evaluate ($Data.epsilon =$epsilon) +evaluate ($Data.dielec =$dielec) + +!==================================================================! + +{* Read paramters and set various force field related variables *} + +@MODULE:read_param.cns + +parameter + bond (resn WAT ) (resn WAT ) 1000 TOKEN + angle (resn WAT ) (resn WAT ) (resn WAT ) 500 TOKEN + bond (resn HOH ) (resn HOH ) 1000 TOKEN + angle (resn HOH ) (resn HOH ) (resn HOH ) 500 TOKEN + bond (resn TIP*) (resn TIP*) 1000 TOKEN + angle (resn TIP*) (resn TIP*) (resn TIP*) 500 TOKEN +end + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1 end + interaction (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) + (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) weight * 1 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0 end +end + +flag include bond angle impr vdw end + +if ($Data.flags.dihed eq true) then + flag include dihed end +end if + +if ($Data.flags.elec eq true) then + flag include elec end + if ($Data.dielec eq "rdie") then + parameter nbonds eps=$Data.epsilon rdie shift switch end end + ! shift statement needed first to activate switch (CNS bug?) + else + parameter nbonds eps=$Data.epsilon cdie end end + end if + parameter nbonds ? end end +else + evaluate ($elec=0.0) + flag exclude elec end +end if + + +{* Check for the presence of ions and add distance restraints / covalent bond == *} + +@MODULE:restrain-ions.cns + +{* Energy minimisation ========================================================= *} + +fix sele = (not all) end + +! Short minimization + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=10 end +end if + +{* ======================= calculate free molecules internal energy ============ *} + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM)) + (not (resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM)) weight * 1 end +end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +fix sele=(resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DMS) end + +inline @MODULE:calc_free-ene.cns + +fix sele=(not all) end + +do (x = refx) (all) +do (y = refy) (all) +do (z = refz) (all) + + +{* ===================== calculate complex internal energy *} + +evaluate ($kinter = 1.0) + +@MODULE:scale_intra_only.cns + +evaluate ($elec = 0.0) +evaluate ($eintcplx = 0.0) + +energy end + +evaluate ($eintcplx = $bond + $angl + $impr + $dihe + $vdw + $elec) +evaluate ($ebond = $bond) +evaluate ($eangl= $angl) +evaluate ($eimpr= $impr) +evaluate ($edihe= $dihe) + +evaluate ($result=0) +print thres=0.05 bonds +evaluate ($rms_bonds=$result) +evaluate ($result=0) +print thres=5. angles +evaluate ($rms_angles=$result) +evaluate ($result=0) +print thres=5. impropers +evaluate ($rms_impropers=$result) +evaluate ($result=0) +print thres=30. dihedrals +evaluate ($rms_dihedrals=$result) + + +{* ===================== calculate final energies and write structure *} +evaluate ($cdih=0.0) +evaluate ($noe=0.0) +if ($Data.ncomponents > 1) then + evaluate ($kinter = 1.0) + @MODULE:scale_inter_final.cns +else + @MODULE:scale_intra_only.cns +end if + +evaluate ($coll = 0.0) +evaluate ($eair = 0.0) +evaluate ($esym = 0.0) +evaluate ($ncs = 0.0) +evaluate ($zhar = 0.0) +evaluate ($dani = 0.0) +evaluate ($sani = 0.0) +evaluate ($vean = 0.0) +evaluate ($xrdc = 0.0) +evaluate ($xpcs = 0.0) +evaluate ($rms_noe=0.0) +evaluate ($violations_noe=0) +evaluate ($rms_test_noe=0.0) +evaluate ($violations_test_noe=0) + +energy end +evaluate ($etot = $ener - $noe) +evaluate ($noe = $eair) +evaluate ($etot = $etot + $noe) + +inline @MODULE:print_coorheader.cns + +coor sele= (not name H* and not resn ANI and not resn XAN and not resn DAN) orient end + +inline @MODULE:check_coordinates.cns + +if ($failure eq true) then + evaluate ($failfile = $output_pdb_filename - ".pdb" + ".fail") + set display=$failfile end + display "MAX/MIN possible coordinates exceeded - stopping" + close $failfile end + stop +else + write coordinates sele=(not (resn WA* or resn HOH or resn TIP* or resn DMS)) format=pdbo output=$output_pdb_filename end +end if + +set message=normal echo=on end + +display OUTPUT: $output_pdb_filename + +stop diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..be945dbe877b5cb3f549b95e85498d399f1d41ec --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/print_coorheader.cns @@ -0,0 +1,396 @@ +! print_coorheader.cns +! Generate the coordinate header (REMARKS) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +if ($Data.flags.dihed eq false) then evaluate ($dihe = 0) end if +if ($Data.flags.sani eq false) then evaluate ($sani = 0) end if +if ($Data.flags.xrdc eq false) then evaluate ($xrdc = 0) end if +if ($Data.flags.xpcs eq false) then evaluate ($xpcs = 0) end if +if ($Data.flags.dani eq false) then evaluate ($dani = 0) end if +if ($Data.flags.vean eq false) then evaluate ($vean = 0) end if +if ($Data.flags.cdih eq false) then evaluate ($cdih = 0) end if +if ($Data.flags.noe eq false) then evaluate ($noe = 0) end if +if ($Data.flags.rg eq false) then evaluate ($coll = 0) end if +if ($Data.flags.zres eq false) then evaluate ($zhar = 0) end if +if ($Data.flags.em eq false) then evaluate ($lcc = 0) end if + +evaluate($enerall=$etot) +evaluate($bondall=$ebond) +evaluate($anglall=$eangl) +evaluate($imprall=$eimpr) +evaluate($diheall=$edihe) +evaluate($vdwall=$vdw) +evaluate($elecall=$elec) +evaluate($noeall=$noe) +evaluate($rgall=$coll) +evaluate($zresall=$zhar) +evaluate($cdihall=$cdih) +evaluate($coupall=0) +evaluate($saniall=$sani+$xrdc) +evaluate($veanall=$vean) +evaluate($xpcsall=$xpcs) +evaluate($daniall=$dani) + +if ($Data.flags.sym eq true) then + evaluate ($result=0) + evaluate ($violations=0) + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) +end if + +if ($Data.randremoval eq false) then + evaluate ($violations_test_noe= 0) + evaluate ($rms_test_noe = 0) + evaluate ($npart = 0) +end if + +evaluate ($result=0) +evaluate ($violations=0) +print threshold=5. cdih +evaluate ($rms_cdih=$result) +evaluate ($violations_cdih=$violations) +evaluate ($result=0) +evaluate ($violations=0) +evaluate ($rms_coup = 0) +evaluate ($violations_coup = 0) + +evaluate( $rms_sani = 0) +evaluate( $violations_sani = 0) +if ($Data.flags.sani eq TRUE) then + sani print threshold = 0.20 class rd* end + evaluate( $rms_sani = $result) + evaluate( $violations_sani = $violations) +end if + +evaluate( $rms_xrdc = 0) +evaluate( $violations_xrdc = 0) +if ($Data.flags.xrdc eq TRUE) then + xrdc print threshold = 0.2 class xr* end + evaluate( $rms_xrdc = $result) + evaluate( $violations_xrdc = $violations) +end if + +evaluate( $violations_sani = $violations_sani + $violations_xrdc) +evaluate( $rms_sani = $rms_sani + $rms_xrdc) + +evaluate( $rms_xpcs = 0) +evaluate( $violations_xpcs = 0) +if ($Data.flags.xpcs eq TRUE) then + xpcs print threshold = 0.2 class pc* end + evaluate( $rms_xpcs = $result) + evaluate( $violations_xpcs = $violations) +end if + +evaluate( $rms_vean = 0) +evaluate( $violations_vean = 0) +if ($Data.flags.vean eq TRUE) then + vean print threshold = 5.00 class ve* end + evaluate( $rms_vean = $result) + evaluate( $violations_vean = $violations) +end if + +evaluate( $rms_dani = 0) +evaluate( $violations_dani = 0) +if ($Data.flags.dani eq TRUE) then + dani print threshold = 0.20 class da* end + evaluate( $rms_dani = $result) + evaluate( $violations_dani = $violations) +end if + +{====>} {* define ASA-based solvation parameters *} +inline @MODULE:def_solv_param.cns + +{====>} {* buried surface area and desolvation*} +evaluate ($nchain1 = 0) +evaluate ($saafree = 0) +evaluate ($esolfree = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate ($nchain1 = $nchain1 + 1) + {====>} {* buried surface area and desolvation*} + do (rmsd = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 sele=(segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end + show sum (rmsd) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($saafree = $saafree + $result) + evaluate ($saafree_$nchain1 = $result) + do (store2 = rmsd * store1) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + show sum (store2) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($esolfree = $esolfree + $result) + evaluate ($esolfree_$nchain1 = $result) +end loop nloop1 + +do (rmsd = 0) (all) +do (store2 = 0) (all) +surface mode=access accu=0.075 rh2o=1.4 sele=(not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end +show sum (rmsd) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +evaluate ($satot = $result) +do (store2 = rmsd * store1) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +show sum (store2) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +evaluate ($esolcplx = $result) +evaluate ($saburied = $saafree - $satot) +if ($saburied < 0) then + evaluate ($saburied = -999999) +end if + +evaluate ($edesolv = $esolcplx - $esolfree) + +evaluate ($dhbinding = $edesolv + $eintcplx - $eintfree + $elecall + $vdwall) + +evaluate ($nshape = 0) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop shape + evaluate ($ncount = $ncount + 1) + if ($mol_shape_$ncount eq true) then + evaluate ($nshape = $nshape + 1) + end if +end loop shape + +evaluate ($nonshape = $Data.ncomponents - $nshape) + +if ($nonshape = 1) then + evaluate ($saburied = 0) + evaluate ($edesolv = 0) + evaluate ($dhbinding = 0) + evaluate ($eintfree = $eintcplx) +end if + +if ($Data.flags.sym eq true) then + evaluate ($enerall = $enerall + $esym) +end if +if ($Data.flags.ncs eq true) then + evaluate ($enerall = $enerall + $ncs) +end if + +evaluate ($procwat = false) +if ($refine.keepwater eq true) then + evaluate ($procwat = true) +end if + +{====>} {* calculate interface-specific scores *} +if ($data.ncomponents > 1) then + if ($per_interface_scoring eq true) then + if ($data.ncomponents eq 2) then + {====>} {* dimer: no need to recalculate anything *} + evaluate ($nrstscore= 0.0) + evaluate($nchain1 = 1) + evaluate($nchain2 = 2) + evaluate ($bsa_$nchain1_$nchain2 = $saburied) + evaluate ($edesol_$nchain1_$nchain2 = $edesolv) + evaluate ($vdw_$nchain1_$nchain2 = $vdwall) + evaluate ($elec_$nchain1_$nchain2 = $elecall) + evaluate ($haddockscore_$nchain1_$nchain2 = $w_vdw * $vdw_$nchain1_$nchain2 + + $w_elec* $elec_$nchain1_$nchain2 + + $w_bsa * $bsa_$nchain1_$nchain2 + + $w_desolv * $edesol_$nchain1_$nchain2) + + evaluate ($nrstscore = $nrstscore + $haddockscore_$nchain1_$nchain2) + else + {====>} {* define ASA-based solvation parameters *} + do (store1 = 0) (all) + evaluate ($nrstscore= 0.0) + inline @MODULE:def_solv_param.cns + + eval($nchain1 = 1) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain2 = $nchain1 + 1) + while ($nchain2 <= $data.ncomponents) loop nloop2 + igroup + interaction (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS)) + (segid $prot_segid_$nchain2 and not (resn WAT or resn HOH or resn TIP* or resn DMS)) weight * 1.0 end + end + energy end + evaluate ($vdw_$nchain1_$nchain2 = $vdw) + evaluate ($elec_$nchain1_$nchain2 = $elec) + + do (rmsd = 0) (all) + do (store2 = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 + sele=((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end + show sum (rmsd) ((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($bsa_$nchain1_$nchain2 = $saafree_$nchain1 + $saafree_$nchain2 - $result) + if ($bsa_$nchain1_$nchain2 < 0) then + evaluate ($bsa_$nchain1_$nchain2 = 0) + end if + + do (store2 = rmsd * store1) ((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + show sum (store2) ((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($edesol_$nchain1_$nchain2 = $result - $esolfree_$nchain1 - $esolfree_$nchain2) + + evaluate ($haddockscore_$nchain1_$nchain2 = $w_vdw * $vdw_$nchain1_$nchain2 + + $w_elec* $elec_$nchain1_$nchain2 + + $w_bsa * $bsa_$nchain1_$nchain2 + + $w_desolv * $edesol_$nchain1_$nchain2) + + evaluate ($nrstscore = $nrstscore + $haddockscore_$nchain1_$nchain2) + + eval($nchain2 = $nchain2 + 1) + end loop nloop2 + eval($nchain1 = $nchain1 + 1) + end loop nloop1 + end if + end if +else + evaluate ($nrstscore = $w_vdw * $vdwall + $w_elec * $elecall + $w_bsa * $saburied + $w_desolv * $edesolv) +end if + + +if ($procwat eq true) then + ident (store3) (not all) + flag exclude * include vdw elec end + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + igroup + interaction (segid $prot_segid_$nchain1) ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (not segid $prot_segid_$nchain1) (resn WAT or resn HOH or resn TIP* or resn DMS) weight * 0.0 end + interaction (segid $prot_segid_$nchain1) (not ((resn WAT or resn HOH or resn TIP* or resn DMS) and store3)) weight * 0.0 end + end + energy end + evaluate ($ener_water_$nchain1 = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_$nchain1 = $vdw) + evaluate ($elec_water_$nchain1 = $elec) + + end loop nloop1 + if ($data.ncomponents > 1) then + eval($nchain1 = $data.ncomponents) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + end if + + eval($nchain1 = 0) + + igroup + while ($nchain1 < $data.ncomponents) loop nloop2 + eval($nchain1 = $nchain1 + 1) + interaction (segid $prot_segid_$nchain1) (all) weight * 0.0 end + end loop nloop2 + interaction ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) + ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (store3) (store3) weight * 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + interaction (resn SHA) (resn SHA) weight * 0.0 end + end + energy end + evaluate ($ener_water_water = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_water = $vdw) + evaluate ($elec_water_water = $elec) +else + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents ) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + evaluate ($ener_water_water = 0.0) + evaluate ($vdw_water_water = 0.0) + evaluate ($elec_water_water = 0.0) +end if + +! calculate the HADDOCK score +evaluate ($hscore = $w_vdw * $vdwall) +evaluate ($hscore = $hscore + $w_elec * $elecall) +evaluate ($hscore = $hscore + $w_air * $noeall) +evaluate ($hscore = $hscore + $w_rg * $rgall) +evaluate ($hscore = $hscore + $w_cdih * $cdihall) +evaluate ($hscore = $hscore + $w_sani * $saniall) +evaluate ($hscore = $hscore + $w_xpcs * $xpcsall) +evaluate ($hscore = $hscore + $w_dani * $daniall) +evaluate ($hscore = $hscore + $w_vean * $veanall) +evaluate ($hscore = $hscore + $w_sym * $esym) +evaluate ($hscore = $hscore + $w_bsa * $saburied) +evaluate ($hscore = $hscore + $w_desolv * $edesolv) +evaluate ($hscore = $hscore + $w_lcc * $lcc) + +set message=on echo=on end +set remarks=reset end +set remarks=accumulate end +remarks =============================================================== +remarks HADDOCK stats for $output_pdb_filename +remarks =============================================================== +remarks HADDOCK score: $hscore +remarks =============================================================== + +!list input molecules +evaluate ($nmol=1) +while ($nmol <=$data.ncomponents) loop mol + if ( $exist_input_pdb_filename_$nmol = true) then + remarks initial structure $nmol - $input_pdb_filename_$nmol + end if + evaluate ($nmol = $nmol + 1) +end loop mol + +remarks =============================================================== +remarks total,bonds,angles,improper,dihe,vdw,elec,air,cdih,coup,rdcs,vean,dani,xpcs,rg +remarks energies: $enerall, $bondall, $anglall, $imprall, $diheall, $vdwall, $elecall, $noeall, $cdihall, $coupall, $saniall, $veanall, $daniall, $xpcsall, $rgall +remarks =============================================================== +remarks bonds,angles,impropers,dihe,air,cdih,coup,rdcs,vean,dani,xpcs +remarks rms-dev.: $rms_bonds,$rms_angles,$rms_impropers,$rms_dihedrals,$rms_noe,$rms_cdih,$rms_coup, $rms_sani, $rms_vean, $rms_dani, $rms_xpcs +remarks =============================================================== +remarks air,cdih,coup,rdcs,vean,dani,xpcs +remarks >0.3,>5,>1,>0,>5,>0.2,>0.2 +remarks violations.: $violations_noe, $violations_cdih, $violations_coup, $violations_sani, $violations_vean, $violations_dani, $violations_xpcs +remarks =============================================================== +remarks CVpartition#,violations,rms +remarks AIRs cross-validation: $npart, $violations_test_noe, $rms_test_noe +remarks =============================================================== +remarks NCS energy: $ncs +remarks =============================================================== +remarks Symmetry energy: $esym +remarks =============================================================== +remarks Membrane restraining energy: $zresall +remarks =============================================================== +remarks Local cross-correlation: $lcc[f7.4] +remarks =============================================================== +remarks Desolvation energy: $edesolv +remarks Internal energy free molecules: $eintfree +remarks Internal energy complex: $eintcplx +remarks Binding energy: $dhbinding +remarks =============================================================== +remarks buried surface area: $saburied +remarks =============================================================== +if ($data.ncomponents > 1) then + if ($per_interface_scoring eq true) then + evaluate($nchain1 = 1) + remarks Interface Chain1 Chain2 HADDOCKscore Evdw Eelec Edesol BSA + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain2 = $nchain1 + 1) + while ($nchain2 <= $data.ncomponents) loop nloop2 + remarks Interface: $prot_segid_$nchain1 $prot_segid_$nchain2 $haddockscore_$nchain1_$nchain2 $vdw_$nchain1_$nchain2 $elec_$nchain1_$nchain2 $edesol_$nchain1_$nchain2 $bsa_$nchain1_$nchain2 + eval($nchain2 = $nchain2 + 1) + end loop nloop2 + eval($nchain1 = $nchain1 + 1) + end loop nloop1 + remarks Total HADDOCK score without restraints: $nrstscore + end if +else + remarks Total HADDOCK score without restraints: $nrstscore +end if +remarks =============================================================== +evaluate($ncount = 0) +while ($ncount < $data.ncomponents) loop waterremark + evaluate ($ncount = $ncount +1) + remarks water - chain-$prot_segid_$ncount: $ener_water_$ncount $vdw_water_$ncount $elec_water_$ncount +end loop waterremark +remarks =============================================================== +remarks water - water: $ener_water_water $vdw_water_water $elec_water_water +remarks =============================================================== diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..6f549a453e49c118de295658c1294a8a429b9365 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/read_param.cns @@ -0,0 +1,64 @@ +! read_param.cns +! Reads parameter files. +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +!! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** + +{* protein parameter file *} +eval ($prot_parameter_infile="TOPPAR:protein-allhdg5-4.param") + +{* nucleic acid parameter file *} +eval ($nucl_parameter_infile="TOPPAR:dna-rna-allatom-hj-opls-1.3.param") + +{* carbohydrate parameter file *} +eval ($carbo_parameter_infile="TOPPAR:carbohydrate.param") + +{* solvent parameter file *} +eval ($solv_parameter_infile="TOPPAR:solvent-allhdg5-4.param") + +{* fragment probes parameter file *} +eval ($ligands_parameter_infile="TOPPAR:fragment_probes.param") + +{* ion parameter file *} +eval ($ion_parameter_infile="TOPPAR:ion.param") + +{* heme parameter file *} +eval ($heme_parameter_infile="TOPPAR:hemes-allhdg.param") + +{* shape parameter file *} +eval ($shape_parameter_infile="TOPPAR:shape.param") + +{* cofactors parameter file *} +eval ($cofactors_parameter_infile="TOPPAR:cofactors.param") + +parameter + @@$prot_parameter_infile + @@$ion_parameter_infile + @@$nucl_parameter_infile + @@$carbo_parameter_infile + @@$solv_parameter_infile + @@$ligands_parameter_infile + @@$heme_parameter_infile + @@$shape_parameter_infile + @@$cofactors_parameter_infile + if ($ligand_param_fname # "") then + fileexist $ligand_param_fname end + if ($result eq true) then + @@$ligand_param_fname + end if + end if +end + +parameter + nbonds + nbxmod=5 atom cdie shift + cutnb=9.5 ctofnb=8.5 ctonnb=6.5 eps=1.0 e14fac=0.4 inhibit 0.25 + wmin=0.5 tolerance 0.5 + end +end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/restrain-ions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/restrain-ions.cns new file mode 100644 index 0000000000000000000000000000000000000000..52a5b3d2024ac21f44456d9ed204d455d8380ac2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/restrain-ions.cns @@ -0,0 +1,109 @@ +! restrain-ions.cns +! distance restraints between an ion and any coordinating atom within 5A +! to maintain the coordination topologu +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +noe class dist end + +! first deal with monoatomic ions +evaluate ($pcount = 0) +for $id1 in id ( name "LI+1" or name "F-1" or name "NA+1" or name "MG+2" or name "AL+3" + or name "CL-1" or name "K+1" or name "CA+2" or name "V+2" or name "V+3" + or name "CR+2" or name "CR+3" or name "MN+2" or name "MN+3" or name "FE+2" + or name "FE+3" or name "NI+2" or name "CO+2" or name "CO+3" or name "CU+1" + or name "CU+2" or name "ZN+2" or name "BR-1" or name "SR+2" or name "MO+3" + or name "AG+1" or name "CD+2" or name "I-1" or name "CS+2" or name "HO+3" + or name "YB+2" or name "YB+3" or name "OS+4" or name "IR+3" or name "PT+2" + or name "AU+1" or name "AU+2" or name "HG+1" or name "HG+2" or name "PB+2" + or name "U+3" or name "U+4" or name "ZN+1" or name "ZN" ) loop sions + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + for $id2 in id ( (name O* or name S* or name N*) and (id $id1) around $mindis and + (resn ACE or resn ALA or resn ALY or resn ARG or resn ASN or resn ASH or resn ASP or + resn CSP or resn CTN or resn CYC or resn CYF or resn CYM or resn CYS or resn DDZ or + resn GLN or resn GLH or resn GLU or resn GLY or resn HIS or resn HY3 or resn HYP or + resn ILE or resn LEU or resn LYS or resn M3L or resn MLY or resn MLZ or resn MET or + resn MSE or resn NEP or resn NME or resn PHE or resn PNS or resn PRO or resn PTR or + resn QSR or resn SEP or resn SER or resn SEC or resn THR or resn TOP or resn TRP or + resn TYP or resn TYR or resn TYS or resn VAL or resn A or resn C or resn G or + resn T or resn DA or resn DC or resn DG or resn DT or resn DJ )) loop search + + pick bond (id $id1) (id $id2) geometry + evaluate ($upper = $result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (name) (id $id2) + evaluate ($name2=$result) + + if ($segid1 eq $segid2) then + noe + assign (resid $resid1 and segid $segid1 and name $name1) + (resid $resid2 and segid $segid2 and name $name2) $upper 0.1 0.1 + end + end if + + end loop search + +end loop sions + +! then deal with multiatomic mions +evaluate ($pcount = 0) +for $id1 in id ( (resn SO4 or resn PO4 or resn WO4) and name O* ) loop mions + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + for $id2 in id ( (name O* or name S* or name N*) and (id $id1) around $mindis and + (resn ACE or resn ALA or resn ALY or resn ARG or resn ASN or resn ASH or resn ASP or + resn CSP or resn CTN or resn CYC or resn CYF or resn CYM or resn CYS or resn DDZ or + resn GLN or resn GLH or resn GLU or resn GLY or resn HIS or resn HY3 or resn HYP or + resn ILE or resn LEU or resn LYS or resn M3L or resn MLY or resn MLZ or resn MET or + resn MSE or resn NEP or resn NME or resn PHE or resn PNS or resn PRO or resn PTR or + resn QSR or resn SEP or resn SER or resn SEC or resn THR or resn TOP or resn TRP or + resn TYP or resn TYR or resn TYS or resn VAL or resn A or resn C or resn G or + resn T or resn DA or resn DC or resn DG or resn DT or resn DJ )) loop search + + pick bond (id $id1) (id $id2) geometry + evaluate ($upper = $result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (name) (id $id2) + evaluate ($name2=$result) + + if ($segid1 eq $segid2) then + noe + assign (resid $resid1 and segid $segid1 and name $name1) + (resid $resid2 and segid $segid2 and name $name2) $upper 0.1 0.1 + end + end if + + end loop search + +end loop mions diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..a8bf9c44f98b1303779d68d46e24855e47321548 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/scale_inter_final.cns @@ -0,0 +1,39 @@ +! scale_inter_final.cns +! Scaling of intermolecular interactions +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = 1.0) + interaction (segid $prot_segid_$nchain1 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) + (segid $prot_segid_$nchain2 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..15b0adfbb562862214f161c494c14a17dbf6beb7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/cns/scale_intra_only.cns @@ -0,0 +1,36 @@ +! scale_intra_only.cns +! Scaling of intramolecular energies (no intermolecular energies) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 end + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end + + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..58227eb82017aa6f0b4c935839d68d3698e531cd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/emscoring/defaults.yaml @@ -0,0 +1,324 @@ +# +# Group scoring +# +per_interface_scoring: + default: false + type: boolean + title: Interchains scoring + short: Output scores per interface in the PDB header. + long: With this option true, the interface of all combinations of chains will be analysed and the corresponding HADDOCK scores (without restraints terms) and their components (Eelec, Evdw, Edesol, BSA) will be written to the header of each PDB file. + group: 'scoring' + explevel: expert +interface_combinations: + default: [] + type: list + minitems: 0 + maxitems: 20 + title: Chains to be scored. + short: List of chains to be scored. Use this parameter to provide a list of + chain pairs (coma separated) that should be considered for the calculation. + If empty/unspecified, all inter-chains contacts will be considered + for the final prediction. + long: List of chains to be scored. If empty/unspecified, all inter-chains + contacts will be considered for the final prediction. In specific cases, + for example antibody-antigen complexes, some chains should be considered + as a single molecule. Use this parameter to provide a list of chain pairs + (separated by coma) that should be considered for the calculation. + [] => Compute all interface scores + ["A,H", "A,L"] => Compute sum of per-interface scores between chains A and H; A and L + group: 'scoring' + explevel: expert +w_air: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the distance restraint energy + short: Weight of the distance restraints energy in the scoring function + long: Weight of the distance restraints energy in the scoring function. + Note that this is different from the force constants used during the calculations. + group: 'scoring' + explevel: expert +w_bsa: + default: 0.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the buried surface area term + short: Weight of the buried surface area term in the scoring function + long: Weight of the buried surface area (BSA) term in the scoring function. + Note that the BSA is only used for scoring. + group: 'scoring' + explevel: expert +w_cdih: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the dihedral angle restraint energy + short: Weight of the dihedral angle restraints energy in the scoring function + long: Weight of the dihedral angle restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: expert +w_dani: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the relaxation anisotropy (DANI) restraint energy + short: Weight of the relaxation anisotropy (DANI) restraint energy + long: Weight of the relaxation anisotropy (DANI) restraint energy + group: 'scoring' + explevel: hidden +w_deint: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the interaction energy term + short: Weight of the interaction energy term + long: Weight of the interaction energy term calculated as the difference in total energy of the complex and of the separate components + group: 'scoring' + explevel: hidden +w_desolv: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the desolvation energy term + short: Weight of the desolvation energy term in the scoring function + long: Weight of the desolvation energy term in the scoring function. + Note that the desolvation energy is only used for scoring. + group: 'scoring' + explevel: expert +w_elec: + default: 0.2 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular electrostatic energy + short: Weight of the intermolecular electrostatic energy in the scoring function + long: Weight of the intermolecular electrostatic energy in the scoring function. + Note that this does not affect the electostatic energy during the EM minimization. + group: 'scoring' + explevel: expert +w_lcc: + default: -10000.0 + type: float + min: -10000.0 + max: 0 + precision: 3 + title: Weight of the EM local correlation coefficient + short: Weight of the EM local correlation coefficient + long: Weight of the EM local correlation coefficient + group: 'scoring' + explevel: hidden +w_rg: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the radius of gyration restraint energy + short: Weight of the radius of gyration restraint energy + long: Weight of the radius of gyration restraint energy + group: 'scoring' + explevel: hidden +w_sani: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (SANI) restraint energy + short: Weight of the residual dipolar coupling (SANI) restraint energy + long: Weight of the residual dipolar coupling (SANI) restraint energy + group: 'scoring' + explevel: hidden +w_sym: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the symmetry restraint energy + short: Weight of the symmetry restraints energy in the scoring function + long: Weight of the symmetry restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: hidden +w_vdw: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular van der Waals energy + short: Weight of the intermolecular van der Waals energy in the scoring function + long: Weight of the intermolecular van der Waals energy in the scoring function. + Note that this does not affect the van der Waals energy during the EM minimization. + group: 'scoring' + explevel: expert +w_vean: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (VEAN) restraint energy + short: Weight of the residual dipolar coupling (VEAN) restraint energy + long: Weight of the residual dipolar coupling (VEAN) restraint energy + group: 'scoring' + explevel: hidden +w_xpcs: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the pseudo contact shifts (XPCS) restraint energy + short: Weight of the pseudo contact shifts (XPCS) restraint energy + long: Weight of the pseudo contact shifts (XPCS) restraint energy + group: 'scoring' + explevel: hidden +w_xrdc: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (XRDC) restraint energy + short: Weight of the residual dipolar coupling (XRDC) restraint energy + long: Weight of the residual dipolar coupling (XRDC) restraint energy + group: 'scoring' + explevel: hidden +w_zres: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the Z-restraining potential energy + short: Weight of the Z-restraining potential energy + long: Weight of the Z-restraining potential energy + group: 'scoring' + explevel: hidden +# +# Group force field +# +ligand_param_fname: + default: '' + type: file + title: Custom ligand parameter file + short: Ligand parameter file in CNS format + long: Ligand parameter file in CNS format containing all force field parameters + (bond, angles, dihedrals, impropers, van der waals) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy +ligand_top_fname: + default: '' + type: file + title: Custom ligand topology file + short: Ligand topology file in CNS format + long: Ligand topology file in CNS format containing the ligand topologies + (atoms, masses, charges, bond definitions...) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy +elecflag: + default: true + type: boolean + title: Include electrostatics energy + short: Include electrostatics energy during the calculations. + long: Include electrostatics energy during the calculations. If set to false electrostatics will not be considered. + group: 'force field' + explevel: easy +dielec: + default: cdie + type: string + minchars: 0 + maxchars: 4 + choices: + - cdie + - rdie + title: Constant (cdie) or distance-dependent dielectric (rdie) constant. + short: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + long: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + A distance dependent dielectric constant will effectively scale down the electrostatic energy + by having a 1/r**2 dependency instead of 1/r + group: 'force field' + explevel: expert +epsilon: + default: 1.0 + type: float + min: 1 + max: 78 + precision: 1 + title: Dielectric constant + short: Dielectric constant for the electrostatic Coulomb energy term. + long: Dielectric constant for the electrostatic Coulomb energy term. + group: 'force field' + explevel: expert +dihedflag: + default: true + type: boolean + title: No title yet + short: No short description yet + long: No long description yet + group: 'force field' + explevel: expert +# +# Group sampling +# +individualize: + default: true + type: boolean + title: Individualise models + short: Treat each model in the PDB ensemble as a separate entity. + long: Treat each model in the PDB ensemble as a separate entity. This means that for each a separate topology file will be generated. The models in the ensemble can thus correspond to different molecules. + group: 'sampling' + explevel: expert +nemsteps: + default: 50 + type: integer + min: 0 + max: 10000 + title: Number of EM steps + short: Number of energy minimisation steps to perform. + long: Number of energy minimisation steps to perform. Note that the effective number might be smaller if the minimisation converges earlier. + group: 'sampling' + explevel: expert +tolerance: + default: 5 + type: integer + min: 0 + max: 99 + precision: 3 + title: Failure tolerance percentage + short: Percentage of allowed failures for a module to successfully complete + long: Percentage of allowed failures for a module to successfully complete + group: 'module' + explevel: expert +log_level: + default: quiet + type: string + minchars: 0 + maxchars: 100 + choices: + - verbose + - normal + - quiet + title: Log level verbosity for CNS + short: Set the log level verbosity for CNS + long: CNS, the computational engine used by HADDOCK can generate a lot of output + messages. This parameter controls the verbosity of CNS (verbose, normal or quiet) + group: module + explevel: guru + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/._cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/._cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/._cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..f992c34611c8d3121313bb4b1846e41a8144922d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/__init__.py @@ -0,0 +1,102 @@ +"""MD scoring module. + +This module will perform a short MD simulation on the input models and +score them. No restraints are applied during this step. +""" + +from pathlib import Path + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import FilePath +from haddock.gear.haddockmodel import HaddockModel +from haddock.libs.libcns import prepare_cns_input, prepare_expected_pdb +from haddock.libs.libontology import PDBFile +from haddock.libs.libsubprocess import CNSJob +from haddock.modules import get_engine +from haddock.modules.scoring import CNSScoringModule + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(CNSScoringModule): + """HADDOCK3 module to perform energy minimization scoring.""" + + name = RECIPE_PATH.name + + def __init__( + self, order: int, path: Path, initial_params: FilePath = DEFAULT_CONFIG + ) -> None: + cns_script = Path(RECIPE_PATH, "cns", f"{self.name}.cns") + super().__init__(order, path, initial_params, cns_script=cns_script) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm module is installed.""" + return + + def _run(self) -> None: + """Execute module.""" + # Pool of jobs to be executed by the CNS engine + jobs: list[CNSJob] = [] + + try: + models_to_score = self.previous_io.retrieve_models(individualize=True) + except Exception as e: + self.finish_with_error(e) + + # Here we pop the parameter as not supported by CNS and only used + # at the python level for downstream analysis + interface_combinations = self.extract_interface_combinations() + + # Prepare all CNS runs + self.output_models = [] + for model_num, model in enumerate(models_to_score, start=1): + scoring_inpyt = prepare_cns_input( + model_num, + model, + self.path, + self.recipe_str, + self.params, + self.name, + native_segid=True, + debug=self.params["debug"], + seed=model.seed if isinstance(model, PDBFile) else None, + ) + + scoring_out = f"{self.name}_{model_num}.out" + err_fname = f"{self.name}_{model_num}.cnserr" + + # create the expected PDBobject + expected_pdb = prepare_expected_pdb(model, model_num, ".", self.name) + # fill the ori_name field of expected_pdb + expected_pdb.ori_name = model.file_name + expected_pdb.md5 = model.md5 + expected_pdb.restr_fname = model.restr_fname + + self.output_models.append(expected_pdb) + + job = CNSJob(scoring_inpyt, scoring_out, err_fname, envvars=self.envvars) + + jobs.append(job) + + # Run CNS Jobs + self.log(f"Running CNS Jobs n={len(jobs)}") + Engine = get_engine(self.params["mode"], self.params) + engine = Engine(jobs) + engine.run() + self.log("CNS jobs have finished") + + # Update the score attributes for each output pdb + output_haddock_models = self.update_pdb_scores(interface_combinations) + + # Set output filename + output_fname = f"{self.name}.tsv" + # Process per-interface analysis + self.per_interface_output(output_fname, output_haddock_models) + # Make final output file + self.log(f"Saving output to {output_fname}") + self.output(output_fname) + # Export models + self.export_io_models(faulty_tolerance=self.params["tolerance"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._calc_free-ene.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._calc_free-ene.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._calc_free-ene.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._check_coordinates.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._contactairs.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._contactairs.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._contactairs.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._def_solv_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._dna-rna_restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._dna-rna_restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._dna-rna_restraints.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flex_segment_back.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flex_segment_back.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flex_segment_back.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flex_segment_side.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flex_segment_side.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flex_segment_side.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flexauto-neighbors.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flexauto-neighbors.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._flexauto-neighbors.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._generate_dmso.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._generate_dmso.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._generate_dmso.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._generate_water.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._generate_water.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._generate_water.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._mdscoring.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._mdscoring.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._mdscoring.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._print_coorheader.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-all.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-all.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-all.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-alpha-beta.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-alpha-beta.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-alpha-beta.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-alpha.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-alpha.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._protein-ss-restraints-alpha.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._read_param.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._restrain-ions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._restrain-ions.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._restrain-ions.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._scale_inter_final.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._scale_intra_only.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._setflags.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._setflags.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/._setflags.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/calc_free-ene.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/calc_free-ene.cns new file mode 100644 index 0000000000000000000000000000000000000000..0466f939be3a1b65c698e77621e36fbcd68e0174 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/calc_free-ene.cns @@ -0,0 +1,24 @@ +! calc_free-ene.cns +! Calculate the total energy of the separated components +! +! Script uses the store1 and store2 atom object, and COMP, REF and RMSD object +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +@MODULE:scale_intra_only.cns + +evaluate ($eintfree = 0.0) +@MODULE:flex_segment_back.cns +fix sele=(((attr store5 = 0) or resn ANI or resn DAN or resn XAN or resn SHA) and not name H* and not (resn WAT or resn HOH or resn TIP*)) end + +minimize powell nstep=100 drop=10.0 nprint=25 end +fix sele=(not all) end +energy end +evaluate ($eintfree = $bond + $angl + $impr + $dihe + $vdw + $elec) + +display FREE MOLECULES INTERNAL ENERGY = $eintfree diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..d23c8e64804060c61ff6aeea38925dc8e61dc8d6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/check_coordinates.cns @@ -0,0 +1,100 @@ +! check_coordinates.cns +! Check max/min coordinates for compatibility with PDB format +! +! *********************************************************************** +! * Copyright 2025 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($failure = false) + +!check for coordinates >9999.999 (max writable in PDB format) + +show max (x) (all) +evaluate ($maxcoor = $result) +show max (y) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +show max (z) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +if ($maxcoor gt 9999.999) then + evaluate ($failure = true) +end if + +!check for coordinates <-999.999 (min writable in PDB format) + +show min (x) (all) +evaluate ($mincoor = $result) +show min (y) (all) +if ($result lt $mincoor) then + evaluate ($maxcoor = $result) +end if +show min (z) (all) +if ($result lt $mincoor) then + evaluate ($mincoor = $result) +end if +if ($mincoor lt -999.999) then + evaluate ($failure = true) +end if + +!if problem detected try correcting it by centering the system around 4500,4500,4500 +!but only if no EM restraints are used + +if ($failure eq true) then + if ($data.flags.em eq false) then + + evaluate ($xc = 0.0) + evaluate ($yc = 0.0) + evaluate ($zc = 0.0) + show ave (x) (all) + evaluate ($xc = 4500 - $result) + show ave (y) (all) + evaluate ($yc = 4500 - $result) + show ave (z) (all) + evaluate ($zc = 4500 -$result) + + do (x = x + $xc) (all) + do (y = y + $yc) (all) + do (z = z + $zc) (all) + + evaluate ($failure = false) + evaluate ($maxcoor = -999) + evaluate ($mincoor = 9999) + !check again for coordinates >9999.999 (max writable in PDB format) + show max (x) (all) + evaluate ($maxcoor = $result) + show max (y) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + show max (z) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + if ($maxcoor gt 9999.999) then + evaluate ($failure = true) + end if + + !check for coordinates <-999.999 (min writable in PDB format) + show min (x) (all) + evaluate ($mincoor = $result) + show min (y) (all) + if ($result lt $mincoor) then + evaluate ($maxcoor = $result) + end if + show min (z) (all) + if ($result lt $mincoor) then + evaluate ($mincoor = $result) + end if + if ($mincoor lt -999.999) then + evaluate ($failure = true) + end if + end if +end if + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/contactairs.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/contactairs.cns new file mode 100644 index 0000000000000000000000000000000000000000..aa8028ab7d3b40e56df692afec9eda66b1a45c68 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/contactairs.cns @@ -0,0 +1,27 @@ +! contactairs.cns +! Define ambiguous distance restraints between residues at interfaces +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +eval($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + for $id in id (tag and segid $prot_segid_$nchain1 + and (not (segid $prot_segid_$nchain1 or resn ANI or resn DAN or resn XAN + or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM) around 5.0)) loop defnoe1 + show (resid) (id $id) + evaluate ($inres = $result) + noe + assign (resid $inres and segid $prot_segid_$nchain1) + (byres (not (segid $prot_segid_$nchain1 or resn ANI or resn DAN or resn XAN + or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM) + and (segid $prot_segid_$nchain1) around 5.0)) 2.0 2.0 0.0 + end + end loop defnoe1 +end loop nloop1 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/def_solv_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/def_solv_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..5a9e07a042e08d15d5b98d859fa199151e7b4a43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/def_solv_param.cns @@ -0,0 +1,105 @@ +! def_solv_param.cns +! Define atomic solvation parameters +! Original valus taken from Fernandez-Recio et al. JMB 335:843 (2004) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($arofac = 6.26) +evaluate ($alifac = 1.27) +evaluate ($polfac = 2.30) + + +do (store1 = 0.0000) (all) +do (store1 = 0.0151 * $alifac) (name C*) +do (store1 = 0.0176 * $arofac) ((name CG* or name CD* or name CE* or name CH* or name CZ*) and (resn PHE or resn TYR or resn HIS or resn TRP)) +do (store1 = -0.0170 * $polfac) (name N*) +do (store1 = -0.0548 * $polfac) (name NT* or (name NZ* and resn LYS)) +do (store1 = -0.0273 * $polfac) (name NH* and resn ARG) +do (store1 = -0.0136 * $polfac) (name O*) +do (store1 = -0.0185 * $polfac) (name OG* or name OH) +do (store1 = -0.0299 * $polfac) ((name OD* and resn ASP) or (name OE* and resn GLU)) +do (store1 = 0.0112 * $polfac) (name S*) +do (store1 = 0.0022 * $polfac) ((name S* and attr charge = -0.3) or (name SD and resn MET)) +do (store1 = 0.0000) (name SHA) + +! +! CG parameters matched from the original terms +! +! Edesolv_aa +! ASP_cg = _________________________ +! ASA_cg +! +! ASA_cg and Edesol_aa calculated on a GGXGG peptide +! accuracy=0.0025, rh2o=1.4, delete H, sele=(resn X) +! +! e.g. BB bead alanine +! +! BB = CA + C + N + O +! ASA_cg = 176.4940 +! Edesolv_aa = -1.8889 +! +! ASP_cg = -0.0107 +! +! Charleen Don (2012), JR (2014), Jorge Roel (2017) +! +! + +do (store1 = 0.0000) (name BB or name SC*) +! Backbone beads +do (store1 = -0.0107) (name BB and resn ALA) +do (store1 = -0.0089) (name BB and resn GLY) +do (store1 = -0.0153) (name BB and resn ILE) +do (store1 = -0.0158) (name BB and resn VAL) +do (store1 = -0.0046) (name BB and resn PRO) +do (store1 = -0.0137) (name BB and resn ASN) +do (store1 = -0.0147) (name BB and resn GLN) +do (store1 = -0.0165) (name BB and resn THR) +do (store1 = -0.0154) (name BB and resn SER) +do (store1 = -0.0130) (name BB and resn MET) +do (store1 = -0.0167) (name BB and resn CYS) +do (store1 = -0.0126) (name BB and resn PHE) +do (store1 = -0.0134) (name BB and resn TYR) +do (store1 = -0.0134) (name BB and resn TRP) +do (store1 = -0.0169) (name BB and resn ASP) +do (store1 = -0.0150) (name BB and resn GLU) +do (store1 = -0.0155) (name BB and resn HIS) +do (store1 = -0.0163) (name BB and resn LYS) +do (store1 = -0.0162) (name BB and resn ARG) + +! Side-chain beads +!do (store1 = 0.0000) (name SC* and resn ALA) +!do (store1 = 0.0000) (name SC* and resn GLY) +do (store1 = 0.0255) (name SC* and resn ILE) +do (store1 = 0.0222) (name SC* and resn VAL) +do (store1 = 0.0230) (name SC* and resn PRO) +do (store1 = -0.0192) (name SC* and resn ASN) +do (store1 = -0.0135) (name SC* and resn GLN) +do (store1 = -0.0009) (name SC* and resn THR) +do (store1 = -0.0056) (name SC* and resn SER) +do (store1 = 0.0202) (name SC* and resn MET) +do (store1 = 0.0201) (name SC* and resn CYS) +do (store1 = 0.1005) (name SC* and resn PHE) +do (store1 = 0.0669) (name SC* and resn TYR) +do (store1 = 0.0872) (name SC* and resn TRP) +do (store1 = -0.0360) (name SC* and resn ASP) +do (store1 = -0.0301) (name SC* and resn GLU) +do (store1 = 0.0501) (name SC* and resn HIS) +do (store1 = -0.0210) (name SC* and resn LYS) +do (store1 = -0.0229) (name SC* and resn ARG) + +! Fake beads +do (store1 = 0.0) (name SCD* and resn ASN) +do (store1 = 0.0) (name SCD* and resn GLN) +do (store1 = 0.0) (name SCD* and resn SER) +do (store1 = 0.0) (name SCD* and resn THR) +do (store1 = 0.0) (name SCD* and resn ARG) +do (store1 = 0.0) (name SCD* and resn LYS) +do (store1 = 0.0) (name SCD* and resn GLU) +do (store1 = 0.0) (name SCD* and resn ASP) + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/dna-rna_restraints.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/dna-rna_restraints.cns new file mode 100644 index 0000000000000000000000000000000000000000..feb27b3999cec077b4e20abd921dac061b7ded1f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/dna-rna_restraints.cns @@ -0,0 +1,424 @@ +! dna-rna_restraints.def +! Define backbone dihedral angles, hbonds and planarity restraints +! for nucleic acids +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: dna-rna_restraints.def +} +{+ description: Creates restraints to maintain conformation of DNA/RNA +} +{+ Additions and changes were made to allow for flexibility during docking +} +{+ comment:This file is to be read by refinement files that modify atom coordinates +} +{+ authors: Axel T. Brunger, and Paul D. Adams +} +{+ modified by Alexandre Bonvin and Marc van Dijk for HADDOCK use +} + +{============================================== base planarity =============================================} + +{* Restrain base planarity. This selection must only include nucleotide residues *} +evaluate ($dna_bases_planar=true) + +{=================================== sugar-pucker dihedral angle restraints ================================} + +{* Pick the dihedral angles of the sugar pucker from the input structure + and restrain them within the given error range *} +evaluate ($dna_pick_pucdih=true) + +{* dihedral C1'-C2'-C3'-C4' error range *} +evaluate ($error_nu2=0.0) +{* dihedral C5'-C4'-C3'-C2' error range *} +evaluate ($error_nu3=0.0) +{* dihedral C1'-O4'-C4'-C5' error range *} +evaluate ($error_nu4=0.0) + +{================================ phosphate backbone dihedral angle restraints =============================} + +{* Pick the dihedral angles of the phosphate backbone from the input structure and + restrain them within the given error range *} +evaluate ($dna_pick_bacdih=true) + +{* Error range for phosphate backbone dihedrals *} +{* alpha dihedral O3'-P-O5'-C5' error range *} +evaluate ($error_alpha=10.0) +{* beta dihedral P-O5'-C5'-C4' error range *} +evaluate ($error_beta=40.0) +{* gamma dihedral O5'-C5'-C4'-C3' error range *} +evaluate ($error_gamma=20.0) +{* delta dihedral C5'-C4'-C3'-O3' error range *} +evaluate ($error_delta=50.0) +{* epsilon dihedral C4'-C3'-O3'-P error range *} +evaluate ($error_eps=10.0) +{* zeta dihedral C3'-O3'-P-O5' error range *} +evaluate ($error_zeta=50.0) + + +{=========================================== Watson-Crick base pairs =======================================} + +{* automatically pick Watson-Crick restraint values from structure *} +evaluate ($dna_pick_wc=true) + +{* error range used for dna_pick_wc defined Watson-Crick restraints *} +evaluate ($wc_low=0.05) +evaluate ($wc_up=0.05) + + +{=========================================== Coarse-Grained ===========================================================} +{* Is the DNA/RNA molecule CG? *} +evaluate ($dna_cg=false) + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + + +{- find max and min residue numbers -} +evaluate ($min_resid = 99999) +evaluate ($max_resid = -99999) +show sum(1) ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) +if ( $result > 0 ) then + for $id in id ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) loop resid + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($min_resid = max($min_resid,$resid)) + evaluate ($max_resid = max($max_resid,$resid)) + end loop resid +end if + +{- the planarity restraints single bases -} +if ($dna_bases_planar=true) then + for $id in id ( tag and (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) ) loop plan + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) (id $id) + evaluate ($resid=decode($result)) + evaluate ($plweight = 20) + + restraints plane + group + selection=( segid $segid and resid $resid and + (resn T or resn C or resn G or resn A or resn U or + resn DT or resn DC or resn DG or resn DA) and + not (name c#' or name h#' or name h#'' or name o#p or + name h7# or name o#' or name p or name h#t or name o#t)) + weight=$plweight + end + end + end loop plan +end if + +{- Dihedral restraints for the sugar pucker -} + +if ($dna_pick_pucdih=true) then + show sum(1) ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) + if ( $result > 0 ) then + for $id in id ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + pick dihedral + ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name c2' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c4' ) + geometry + evaluatate ($dihedral_nu2=$result) + pick dihedral + ( segid $segid and resid $resid and name c5' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c2' ) + geometry + evaluatate ($dihedral_nu3=$result) + pick dihedral + ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name o4' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c5' ) + geometry + evaluatate ($dihedral_nu4=$result) + restraints dihedral + assign ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name c2' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c4' ) + 20.0 $dihedral_nu2 $error_nu2 2 + assign ( segid $segid and resid $resid and name c5' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c3' ) + ( segid $segid and resid $resid and name c2' ) + 20.0 $dihedral_nu3 $error_nu3 2 + assign ( segid $segid and resid $resid and name c1' ) + ( segid $segid and resid $resid and name o4' ) + ( segid $segid and resid $resid and name c4' ) + ( segid $segid and resid $resid and name c5' ) + 20.0 $dihedral_nu4 $error_nu4 2 + scale=20.0 + end + end loop resid + flags include cdih end + end if +end if + +{- Dihedral restraints for the phosphate backbone -} + +if ($dna_pick_bacdih=true) then + show sum(1) ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) + if ( $result > 0 ) then + evaluate ($resid=$min_resid) + evaluate ($nres=$max_resid - $min_resid + 1) + evaluate ($error_alpha=$error_alpha) + evaluate ($error_beta=$error_beta) + evaluate ($error_gamma=$error_gamma) + evaluate ($error_zeta=$error_zeta) + evaluate ($error_epsilon=$error_eps) + evaluate ($error_delta=$error_delta) + for $id in id ( (resn DA or resn A or resn DG or resn G or resn DT or resn T or resn DC or resn C or resn U) and tag ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + if ($resid > $min_resid) then + evaluate ($rprec = $resid - 1) + ! check if previous residue exists + show sum(1) ( resid $rprec and tag ) + if ( $result > 0 ) then + pick dihedral + ( segid $segid and resid $rprec and name O3' ) + ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + geometry + evaluatate ($dihedral_alpha=$result) + pick dihedral + ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + geometry + evaluatate ($dihedral_beta=$result) + restraint dihedral + ! alpha + assign ( segid $segid and resid $rprec and name O3' ) + ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + 1.0 $dihedral_alpha $error_alpha 2 + ! beta + assign ( segid $segid and resid $resid and name P ) + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + 1.0 $dihedral_beta $error_beta 2 + scale 200.0 + end + end if + end if + + pick dihedral + ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + geometry + evaluatate ($dihedral_gamma=$result) + pick dihedral + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + geometry + evaluatate ($dihedral_delta=$result) + + restraints dihedral + ! gamma + assign ( segid $segid and resid $resid and name O5' ) + ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + 1.0 $dihedral_gamma $error_gamma 2 + ! delta + assign ( segid $segid and resid $resid and name C5' ) + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + 1.0 $dihedral_delta $error_delta 2 + scale=200.0 + end + + if ($resid < $max_resid) then + evaluate ($rfoll = $resid + 1) + ! check if next residue exists + show sum(1) ( resid $rfoll and segid $segid and tag ) + if ( $result > 0 ) then + pick dihedral + ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + geometry + evaluatate ($dihedral_epsilon=$result) + pick dihedral + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + ( segid $segid and resid $rfoll and name O5' ) + geometry + evaluatate ($dihedral_zeta=$result) + restraint dihedral + ! epsilon + assign ( segid $segid and resid $resid and name C4' ) + ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + 1.0 $dihedral_epsilon $error_epsilon 2 + ! zeta + assign ( segid $segid and resid $resid and name C3' ) + ( segid $segid and resid $resid and name O3' ) + ( segid $segid and resid $rfoll and name P ) + ( segid $segid and resid $rfoll and name O5' ) + 1.0 $dihedral_zeta $error_zeta 2 + scale 200.0 + end + end if + end if + end loop resid + flags include cdih end + end if +end if + +{- Watson-Crick base pairing -} + +if ($dna_pick_wc = true) then + evaluate ($hbcut = 3.5) + ! We only to check for ADE and CYT + show sum(1) ( (resn DA or resn A or resn DC or resn C) and tag ) + if ( $result > 0 ) then + noe + class hres + averaging hres cent + potential hres square + sqconstant hres 1. + sqexponent hres 2 + scale hres 70. + end + for $id in id ( (resn DA or resn A or resn DC or resn C) and tag ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($presid=$resid-1) + evaluate ($fresid=$resid+1) + evaluate ($ares_name = none) + show ( resn ) (id $id) + evaluate ($ares=$result) + + if ( $ares = DA ) then + eval ($ares_name = ADE) + elseif ( $ares = A ) then + eval ($ares_name = ADE) + end if + + if ( $ares = DC ) then + eval ($ares_name = CYT) + elseif ( $ares = C ) then + eval ($ares_name = CYT) + end if + + if ($ares_name = ADE) then + show sum(1) ( ((resn DT or resn T or resn U) and not (resid $presid or resid $fresid) and name N3) + and (resid $resid and name N1) around $hbcut) + if ($result = 1) then + show (resid) ( ((resn DT or resn T or resn U) and not (resid $presid or resid $fresid) and name N3) + and (resid $resid and name N1) around $hbcut) + evaluate ($rpair = $result) + pick bond + (resid $resid and name N6) + (resid $rpair and name O4) + geometry + evaluate ($n6o4=$result) + pick bond + (resid $resid and name N1) + (resid $rpair and name N3) + geometry + evaluate ($n1n3=$result) + pick bond + (resid $resid and name N1) + (resid $rpair and name O4) + geometry + evaluate ($n1o4=$result) + pick bond + (resid $resid and name N1) + (resid $rpair and name O2) + geometry + evaluate ($n1o2=$result) + noe + assign (resid $resid and name N6) + (resid $rpair and name O4) + $n6o4 $wc_low $wc_up + assign (resid $resid and name N1) + (resid $rpair and name N3) + $n1n3 $wc_low $wc_up + assign (resid $resid and name N1) + (resid $rpair and name O4) + $n1o4 $wc_low $wc_up + assign (resid $resid and name N1) + (resid $rpair and name O2) + $n1o2 $wc_low $wc_up + end + end if + end if + + !find possible pairing for DC/C with DG/G + if ($ares_name = CYT) then + show sum(1) ( ((resn DG or resn G) and not (resid $presid or resid $fresid) and name N1) + and (resid $resid and name N3) around $hbcut) + if ($result = 1) then + show (resid) ( ((resn DG or resn G) and not (resid $presid or resid $fresid) and name N1) + and (resid $resid and name N3) around $hbcut) + evaluate ($rpair = $result) + pick bond + (resid $resid and name N3) + (resid $rpair and name N1) + geometry + evaluate ($n3n1=$result) + pick bond + (resid $resid and name N4) + (resid $rpair and name O6) + geometry + evaluate ($n4o6=$result) + pick bond + (resid $resid and name O2) + (resid $rpair and name N2) + geometry + evaluate ($o2n2=$result) + pick bond + (resid $resid and name N3) + (resid $rpair and name O6) + geometry + evaluate ($n3o6=$result) + pick bond + (resid $resid and name N3) + (resid $rpair and name N2) + geometry + evaluate ($n3n2=$result) + noe + assign (resid $resid and name N3) + (resid $rpair and name N1) $n3n1 $wc_low $wc_up + assign (resid $resid and name N4) + (resid $rpair and name O6) $n4o6 $wc_low $wc_up + assign (resid $resid and name O2) + (resid $rpair and name N2) $o2n2 $wc_low $wc_up + assign (resid $resid and name N3) + (resid $rpair and name O6) $n3o6 $wc_low $wc_up + assign (resid $resid and name N3) + (resid $rpair and name N2) $n3n2 $wc_low $wc_up + end + end if + end if + end loop resid + end if +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flex_segment_back.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flex_segment_back.cns new file mode 100644 index 0000000000000000000000000000000000000000..bc36e726eff3efc780d3805fa67bde831135d182 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flex_segment_back.cns @@ -0,0 +1,26 @@ +! flex_segment_back.cns +! Define the semi-flexible segments (both side-chains and backbone) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +do (store5 = 0) (all) +do (store6 = 0) (all) +do (store7 = 0) (all) + +!define interface flexible regions +evaluate($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate($nchain1 = $nchain1 + 1) + inline @MODULE:flexauto-neighbors.cns +end loop nloop1 + +do (store5 = 21) (resn WAT or resn HOH or resn TIP*) +do (store1 = 0) (all) +do (store1 = 1) ((resn WAT or resn HOH or resn TIP*) and name OH2) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flex_segment_side.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flex_segment_side.cns new file mode 100644 index 0000000000000000000000000000000000000000..f40eb6fd59aec01cec788a37e89a392826de01df --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flex_segment_side.cns @@ -0,0 +1,29 @@ +! flex_segment_side.cns +! Define semi-flexible segments (side-chains only) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +do (store5 = 0) (all) +do (store6 = 0) (all) +do (store7 = 0) (all) + +!define interface flexible regions +evaluate($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate($nchain1 = $nchain1 + 1) + inline @MODULE:flexauto-neighbors.cns +end loop nloop1 + +! freeze backbone +do (store5 = 0) (name CA or name BB or name C or name N or name O) + +do (store5 = 21) (resn WAT or resn HOH or resn TIP*) +do (store1 = 0) (all) +do (store1 = 1) ((resn WAT or resn HOH or resn TIP*) and name OH2) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flexauto-neighbors.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flexauto-neighbors.cns new file mode 100644 index 0000000000000000000000000000000000000000..38689b8dceef65e750e714ed535daaf9e7981354 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/flexauto-neighbors.cns @@ -0,0 +1,45 @@ +! flexauto-neighbors.cns +! Automatic definition of flexible segments for docking for contacting residues +! including neighboring residues of residues making contacts +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +evaluate ($flcut = 5.0) + +do (store5 = $nchain1) (byres (segid $prot_segid_$nchain1 + and (not (segid $prot_segid_$nchain1 or resn SHA)) around $flcut)) +do (store7 = $nchain1) (byres (segid $prot_segid_$nchain1 + and (not (segid $prot_segid_$nchain1 or resn SHA)) around $flcut)) + +do (store6 = 0) (segid $prot_segid_$nchain1) +for $id in id (tag and attr store5 >0 and not ((resn WAT or resn HOH or resn TIP*) or resn DMSO) and segid $prot_segid_$nchain1) loop flexres1 + show (resid) (id $id) + evaluate ($inres = decode($result)) + evaluate ($preres = $inres) + evaluate ($nexres = $inres) + evaluate ($preres = $preres - 1) + do (store6 = $nchain1) (resid $preres and segid $prot_segid_$nchain1) + do (store6 = $nchain1) (resid $nexres and segid $prot_segid_$nchain1) +end loop flexres1 + +do (store5 = store6) (segid $prot_segid_$nchain1) +do (store7 = store6) (segid $prot_segid_$nchain1) + +display THE FOLLOWING RESIDUES HAVE BEEN DEFINED AS FLEXIBLE for molecule $nchain1 +for $id in id (tag and attr store5 >0 and not ((resn WAT or resn HOH or resn TIP*) or resn DMSO) and segid $prot_segid_$nchain1) loop flexres2 + show (resid) (id $id) + evaluate ($inres = $result) + show (resn) (id $id) + evaluate ($nares = $result) + show (segid) (id $id) + evaluate ($seres = $result) + display AUTOMATICALLY SELECTED SEGMENT: $nares,$inres,$seres +end loop flexres2 + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/generate_dmso.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/generate_dmso.cns new file mode 100644 index 0000000000000000000000000000000000000000..2acdf950614511fcaac33db9ab7fa54cd478b947 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/generate_dmso.cns @@ -0,0 +1,121 @@ +! generate_dmso.cns +! Generate a DMSO solvent layer around the molecule +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +eval ($boxlength = 29.1) ! length of the dmso box +eval ($thickness = 12.5) ! maxi. initial dmso-protein distance (heavy atoms) +eval ($pw_dist = 2.4) ! mini. initial dmso-protein distance (heavy atoms) +eval ($dmso_diam = 4.1) ! diameter of dmso molecule +eval ($dyncount = 1) ! iteration number (usually 1) + +eval ($dmso = "DMS" + encode($dyncount)) + +!-------------------------------------------------- +! read in the same box of dmso several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + +show max (x) ((not resn dms) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($xmax = $result) +show min (x) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($xmin = $result) + +show max (y) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($ymax = $result) +show min (y) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($ymin = $result) + +show max (z) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($zmax = $result) +show min (z) ((not resn DMS) and not resn ANI and not resn DAN and not resn XAN or resn DUM or resn SHA) +evaluate ($zmin = $result) + + +! loop over several iterations of dmso filling and dynamics + + +!-------------------------------------------------- +! read in the same box of dmso several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + + +! determine how many boxes are necessary in each dimension +eval ($xbox = int( ($xmax - $xmin + 2 * ($thickness + $dmso_diam)) / $boxlength + 0.5)) +eval ($ybox = int( ($ymax - $ymin + 2 * ($thickness + $dmso_diam)) / $boxlength + 0.5)) +eval ($zbox = int( ($zmax - $zmin + 2 * ($thickness + $dmso_diam)) / $boxlength + 0.5)) + +eval ($xmtran = $xmax + $thickness - $boxlength/2 + $dmso_diam) +eval ($ymtran = $ymax + $thickness - $boxlength/2 + $dmso_diam) +eval ($zmtran = $zmax + $thickness - $boxlength/2 + $dmso_diam) + +eval ($xcount=0) +eval ($xtrans = $xmin - $thickness - $dmso_diam - $boxlength ) +while ($xtrans < $xmtran) loop dms1 + eval ($xcount=$xcount+1) + eval ($xtrans = $xtrans + $boxlength) + + eval ($ycount=0) + eval ($ytrans = $ymin - $thickness - $dmso_diam - $boxlength ) + while ($ytrans < $ymtran) loop dms2 + eval ($ycount=$ycount+1) + eval ($ytrans = $ytrans + $boxlength) + + eval ($zcount=0) + eval ($ztrans = $zmin - $thickness - $dmso_diam - $boxlength ) + while ($ztrans < $zmtran) loop dms3 + eval ($zcount=$zcount+1) + eval ($ztrans = $ztrans + $boxlength) + + segment + name=" " + chain + coordinates @@TOPPAR:dmso.pdb + end + end + coor @@TOPPAR/dmso.pdb + do (segid=DMSO) (segid " ") + coor sele=(segid DMSO) translate vector = ($xtrans $ytrans $ztrans) end + + ! all new dmso oxygens + ident (store1) (segid DMSO and name sd) + ! all new dmso oxygens close to a protein heavy atom + ident (store2) (store1 and (not (resn DMS or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $pw_dist) + ! all new dmso oxygens close to old dmso oxygens + ident (store3) (store1 and (segid DMS# and not hydro) around $dmso_diam) + ! all new dmso oxygens further than thickness away from a protein heavy atom + ident (store4) (store1 and not (not (resn DMS or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness) + delete sele= (byres (store2 or store3 or store4)) end + + + ! give dmso unique segid name + eval ($segid= "W" + encode($xcount) + encode($ycount) + encode($zcount)) + do (segid = $segid) (segid DMSO) + + end loop dms3 + end loop dms2 +end loop dms1 + +! now, give dmso a unique resid so that we get the segid to play around with +ident (store1) (all) +show min (store1) (segid w*) +do (store1 = store1 - $result + 1) (segid w*) +do (resid = encode(int(store1/3 -0.1) +1)) (segid w* and not segid DMS#) +do (segid = $dmso) (segid w* and not segid DMS#) + +! shave off any dmso that left +delete sele= (byres (name sd and not (not (resn DMS or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness)) end + +{* write out initial coordinates just for testing *} +!evaluate ($filename=$output_pdb_filename - ".pdb" + "wini.pdb") +!write coordinates sele= (all) output =$filename end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/generate_water.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/generate_water.cns new file mode 100644 index 0000000000000000000000000000000000000000..3590ca25a9294d764d8b146cb1727408179b3b93 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/generate_water.cns @@ -0,0 +1,122 @@ +! generate_water.cns +! Generate a water solvent layer around the molecule +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +eval ($boxlength = 18.856) ! length of Brooks' water box +eval ($thickness = 8) ! maxi. initial water-protein distance (heavy atoms) +eval ($pw_dist = 2.4) ! mini. initial water-protein distance (heavy atoms) +eval ($water_diam = 2.4) ! diameter of water molecule +eval ($dyncount = 21) ! for water segid (max number of molecules + 1) + +eval ($water = "WA" + encode($dyncount)) + +!-------------------------------------------------- +! read in the same box of water several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + +show max (x) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($xmax = $result) +show min (x) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($xmin = $result) + +show max (y) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($ymax = $result) +show min (y) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($ymin = $result) + +show max (z) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($zmax = $result) +show min (z) ((not (resn WAT or resn HOH or resn TIP*)) and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) +evaluate ($zmin = $result) + + +! loop over several iterations of water filling and dynamics + +!-------------------------------------------------- +! read in the same box of water several times, and move it around +! so as to cover all the space around the site of interest. +! take into account box offset + + +! determine how many boxes are necessary in each dimension +eval ($xbox = int( ($xmax - $xmin + 2 * ($thickness + $water_diam)) / $boxlength + 0.5)) +eval ($ybox = int( ($ymax - $ymin + 2 * ($thickness + $water_diam)) / $boxlength + 0.5)) +eval ($zbox = int( ($zmax - $zmin + 2 * ($thickness + $water_diam)) / $boxlength + 0.5)) + +eval ($xmtran = $xmax + $thickness - $boxlength/2 + $water_diam) +eval ($ymtran = $ymax + $thickness - $boxlength/2 + $water_diam) +eval ($zmtran = $zmax + $thickness - $boxlength/2 + $water_diam) + +eval ($xcount=0) +eval ($xtrans = $xmin - $thickness - $water_diam - $boxlength/2 ) +while ($xtrans < $xmtran) loop wat1 + eval ($xcount=$xcount+1) + eval ($xtrans = $xtrans + $boxlength) + + eval ($ycount=0) + eval ($ytrans = $ymin - $thickness - $water_diam - $boxlength/2 ) + while ($ytrans < $ymtran) loop wat2 + eval ($ycount=$ycount+1) + eval ($ytrans = $ytrans + $boxlength) + + eval ($zcount=0) + eval ($ztrans = $zmin - $thickness - $water_diam - $boxlength/2 ) + while ($ztrans < $zmtran) loop wat3 + eval ($zcount=$zcount+1) + eval ($ztrans = $ztrans + $boxlength) + segment + name=" " + chain + coordinates @@TOPPAR:boxtyp20.pdb + end + end + coor @@TOPPAR:boxtyp20.pdb + do (segid=W000) (segid " ") + coor sele=(segid W000) translate vector = ($xtrans $ytrans $ztrans) end + + ! all new water oxygens + ident (store1) (segid W000 and name OH2) + ! all new water oxygens close to a protein heavy atom + ident (store2) (store1 and (not (resn WAT or resn HOH or resn TIP* + or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $pw_dist) + ! all new water oxygens close to old water oxygens + ident (store3) (store1 and (segid wat# and not hydro) around $water_diam) + ! all new water oxygens further than thickness away from a protein heavy atom + ident (store4) (store1 and not (not (resn WAT or resn HOH or resn TIP* + or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness) + delete sele= (byres (store2 or store3 or store4)) end + + ! give waters unique segid name + eval ($segid= "W" + encode($xcount) + encode($ycount) + encode($zcount)) + do (segid = $segid) (segid W000) + + end loop wat3 + end loop wat2 +end loop wat1 + +! now, give waters a unique resid so that we get the segid to play around with +ident (store1) (all) +show min (store1) (segid w*) +do (store1 = store1 - $result + 1) (segid w*) +do (resid = encode(int(store1/3 -0.1) +1)) (segid w* and not segid wat#) +do (segid = $water) (segid w* and not segid wat#) + +! shave off any waters that left +delete sele= (byres (name oh2 and segid W* and + not (not (resn WAT or resn HOH or resn TIP* + or resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or hydro)) around $thickness)) end + +{* write out initial coordinates just for testing *} +!evaluate ($filename=$output_pdb_filename - ".pdb" + "wini.pdb") +!write coordinates sele= (all) output =$filename end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/mdscoring.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/mdscoring.cns new file mode 100644 index 0000000000000000000000000000000000000000..7deb6e54c858904970bde1366511062ae8102d9c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/mdscoring.cns @@ -0,0 +1,471 @@ +! mdref.cns +! Perform an explitic solvent (water or dmso) refinement +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + +!==================================================================! +! Initialisation of variables +!==================================================================! + +evaluate ($ini_count =1) + +evaluate ($Data.flags.ncs = false) +evaluate ($Data.flags.sym = false) +evaluate ($Data.flags.cdih = false) +evaluate ($Data.flags.plan = false) +evaluate ($Data.flags.noe = false) +evaluate ($Data.flags.dihed = $dihedflag) +evaluate ($Data.flags.elec = $elecflag) +evaluate ($Data.flags.em = false) +evaluate ($Data.flags.rg = false) +evaluate ($Data.flags.zres = false) +evaluate ($Data.flags.sani = false) +evaluate ($Data.flags.xrdc = false) +evaluate ($Data.flags.xpcs = false) +evaluate ($Data.flags.dani = false) +evaluate ($Data.flags.vean = false) + +evaluate ($Data.noecv = false) +evaluate ($refine.keepwater = false) + +evaluate ($data.ncomponents=$ncomponents) + +evaluate ($nmol=1) +while ($nmol <= $data.ncomponents) loop mol + evaluate ($toppar.prot_segid_$nmol = $prot_segid_$nmol) + evaluate ($mol_shape_$nmol = false) + evaluate ($nmol = $nmol + 1) +end loop mol + + +! non-bonded parameter set to use +evaluate ($toppar.par_nonbonded = "OPLSX") + +!Electrostatics: +evaluate ($Data.flags.dihed =$dihedflag) +evaluate ($Data.flags.elec =$elecflag) +evaluate ($Data.epsilon =$epsilon) +evaluate ($Data.dielec =$dielec) + + +! dihedrals, DNA and distance restraints +evaluate ($Data.dnarest =$dnarest_on) +evaluate ($Data.flags.cdih = false) +evaluate ($Data.ssdihed =$ssdihed) +evaluate ($Data.error_dih =$error_dih) + +! planarity restraints +evaluate ($Data.flags.plan = false) + +! distance restraints +evaluate ($Data.flags.noe = false) +evaluate ($data.randremoval = false) +evaluate ($data.npart=1) +evaluate ($data.contactairs=$contactairs) +evaluate ($data.kcont=$kcont) + + +! Other parameters +evaluate ($refine.keepwater = false) +evaluate ($refine.keepwater=$keepwater) +evaluate ($refine.solvent=$solvent) +evaluate ($refine.heatsteps=$waterheatsteps) +evaluate ($refine.steps=$watersteps) +evaluate ($refine.coolsteps=$watercoolsteps) +evaluate ($refine.iniseed=$iniseed) +evaluate ($refine.timestep=$timestep) +evaluate ($refine.fbeta=100) +evaluate ($refine.mass=100) + + +!==================================================================! + +{* Read paramters and set various force field related variables *} + +@MODULE:read_param.cns + +parameter + bond (resn WAT ) (resn WAT ) 1000 TOKEN + angle (resn WAT ) (resn WAT ) (resn WAT ) 500 TOKEN + bond (resn HOH ) (resn HOH ) 1000 TOKEN + angle (resn HOH ) (resn HOH ) (resn HOH ) 500 TOKEN + bond (resn TIP*) (resn TIP*) 1000 TOKEN + angle (resn TIP*) (resn TIP*) (resn TIP*) 500 TOKEN +end + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1 end + interaction (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) + (resn ANI or resn DAN or resn XAN or resn DUM or resn DUM) weight * 1 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0 end +end + +flag include bond angle impr vdw end + +if ($Data.flags.dihed eq true) then + flag include dihed end +end if + +if ($Data.flags.elec eq true) then + flag include elec end + if ($Data.dielec eq "rdie") then + parameter nbonds eps=$Data.epsilon rdie shift switch end end + ! shift statement needed first to activate switch (CNS bug?) + else + parameter nbonds eps=$Data.epsilon cdie end end + end if + parameter nbonds ? end end +else + evaluate ($elec=0.0) + flag exclude elec end +end if + +coor copy end + +topology @@TOPPAR:solvent-allhdg5-4.top end + +if ($refine.solvent = "water") then + do (segid = "PROT") (segid " ") + @MODULE:generate_water.cns + do (segid = " ") (segid "PROT") +elseif ($refine.solvent = "dmso") then + do (segid = "PROT") (segid " ") + @MODULE:generate_dmso.cns + do (segid = " ") (segid "PROT") +end if + +! The seed definition logic is handled at haddock.libs.libcns.prepare_cns_input (July 2024) +set seed $seed end + + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal" ) then + set message=normal echo=off end +else + set message=off echo=off end +end if + + +{* Check for other restraints ================================================== *} + +if ($Data.contactairs eq true ) then + evaluate ($Data.flags.noe = true) + noe + reset + nrestraints = 12000000 ! allocate space for contactairs + ceiling 1000 + averaging * sum + potential * soft + scale * $kcont + sqconstant * 1.0 + sqexponent * 2 + soexponent * 1 + rswitch * 0.5 + sqoffset * 0.0 + asymptote * 0.1 + msoexponent * 1 + masymptote * -0.1 + mrswitch * 0.5 + avexpo hbond 20 + end + @MODULE:contactairs.cns +end if + +if ($Data.dnarest eq true ) then + @MODULE:dna-rna_restraints.cns +end if + +if ($Data.ssdihed eq "all" ) then + inline @MODULE:protein-ss-restraints-all.cns +end if +if ($Data.ssdihed eq "alpha" ) then + inline @MODULE:protein-ss-restraints-alpha.cns +end if +if ($Data.ssdihed eq "alphabeta" ) then + inline @MODULE:protein-ss-restraints-alpha-beta.cns +end if + + +{* Check for the presence of ions and add distance restraints / covalent bond == *} + +@MODULE:restrain-ions.cns + + +{* set the energy flags ======================================================== *} + +inline @MODULE:setflags.cns + + +{* Energy minimisation of solvent first ============================================= *} + +! fix everything except the solvent for initial minimization +fix sele = (not (resn WAT or resn HOH or resn TIP* or resn DMS)) end + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=100 end +end if + + +{* Energy minimisation with harmonic restraints on the molecules ==================== *} + +fix sele = (not all) end + +! fix the shape +fix sele = (resn SHA) end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +! Define harmonic restraints on heavy atoms of molecules +restraints harmonic + exponent = 2 +end +do (harm = 0) (all) +do (harm = 5) (not name h* and not (resn WAT or resn HOH or resn TIP* or resn DMS)) + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn SHA)) (not (resn ANI or resn DAN or resn XAN or resn SHA)) weight * 1 end + interaction (resn ANI or resn DAN or resn XAN) + (resn ANI or resn DAN or resn XAN) weight * 1 vdw 0.0 elec 0.0 end +end + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=10 end +end if + + +{* MD refinement with harmonic restraints on the molecules ==================== *} + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +! Define harmonic restraints on heavy atoms of molecules +do (harm = 0) (all) +do (harm = 5) (not name h* and not resn ANI and not resn DAN and not resn XAN and not (resn WAT or resn HOH or resn TIP3)) +do (harm = 20) (resn ANI and name OO) +do (harm = 20) (resn DAN and name OO) + +! Remove harmonic restraints on interface side-chains +@MODULE:flex_segment_side.cns +eval ($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval ($nchain1=$nchain1+1) + do (harm = 0) (attribute store5 = $nchain1 and + not ( name CA or name BB or name C or name N or name P or name C# or name C## )) +end loop nloop1 + + +! Start MD refinement + +do (mass =$refine.mass) (all) +do (mass=1000) (resn ANI or resn DAN or resn XAN) +do (fbeta = 0) (all) +do (fbeta = $refine.fbeta {1/ps} ) ( all ) + +! heat to 300 K +for $bath in (100 200 300) loop heat + + do (vx=maxwell($bath)) (all) + do (vy=maxwell($bath)) (all) + do (vz=maxwell($bath)) (all) + + dynamics cartesian + nstep=$refine.heatsteps timest=0.002{ps} + temperature=$bath tcoupling = true + nprint=50 + end + +end loop heat + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +!define weaker harmonic restraints on heavy atoms of molecules +do (harm = 0) (all) +do (harm = 1) (not name h* and not resn ANI and not resn DAN and not resn XAN and not (resn WAT or resn HOH or resn TIP3)) + +!define flexible segments and remove harmonic restraints on backbone + side-chains of interface +@MODULE:flex_segment_back.cns +eval ($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval ($nchain1=$nchain1+1) + do (harm = 0) (attribute store5 = $nchain1) +end loop nloop1 +do (harm = 20) (resn ANI and name OO) +do (harm = 20) (resn DAN and name OO) + +! MD refinement +dynamics cartesian + nstep=$refine.steps timest=0.002{ps} + temperature=$bath tcoupling = true + nprint=50 +end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +! Define weak harmonic restraints on backbone only of molecules +do (harm = 0) (all) +do (harm = 1) (name CA or name BB or name C or name N or name P or name C# or name C##) +! Remove harmonic restraints on interface side-chains +@MODULE:flex_segment_side.cns +eval ($nchain1 = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + eval ($nchain1=$nchain1+1) + do (harm = 0) (attribute store5 = $nchain1) +end loop nloop1 +do (harm = 20) (resn ANI and name OO) +do (harm = 20) (resn DAN and name OO) + + +! cooling phase +for $bath in (300 200 100) loop cool + + dynamics cartesian + nstep=$refine.coolsteps timest=0.002{ps} + temperature=$bath tcoupling = true + nprint=50 + end + +end loop cool + + +! final minimization without harmonic restraints + +flag excl harm end + +if ($nemsteps > 0) then + minimize powell nstep=$nemsteps drop=10 end +end if + + +{* ======================= calculate free molecules internal energy *} + +igroup + interaction (not (resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM)) + (not (resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DUM)) weight * 1 end +end + +do (refx=x) (all) +do (refy=y) (all) +do (refz=z) (all) + +fix sele=(resn ANI or resn DAN or resn XAN or resn SHA or resn WAT or resn HOH or resn TIP* or resn DMS) end + +inline @MODULE:calc_free-ene.cns + +fix sele=(not all) end + +do (x = refx) (all) +do (y = refy) (all) +do (z = refz) (all) + + + +{* ===================== calculate complex internal energy *} + +evaluate ($kinter = 1.0) + +@MODULE:scale_intra_only.cns + +evaluate ($elec = 0.0) +evaluate ($eintcplx = 0.0) + +energy end + +evaluate ($eintcplx = $bond + $angl + $impr + $dihe + $vdw + $elec) +evaluate ($ebond = $bond) +evaluate ($eangl= $angl) +evaluate ($eimpr= $impr) +evaluate ($edihe= $dihe) + +evaluate ($result=0) +print thres=0.05 bonds +evaluate ($rms_bonds=$result) +evaluate ($result=0) +print thres=5. angles +evaluate ($rms_angles=$result) +evaluate ($result=0) +print thres=5. impropers +evaluate ($rms_impropers=$result) +evaluate ($result=0) +print thres=30. dihedrals +evaluate ($rms_dihedrals=$result) + + +{* ===================== calculate final energies and write structure *} +evaluate ($cdih=0.0) +evaluate ($noe=0.0) +if ($Data.ncomponents > 1) then + evaluate ($kinter = 1.0) + @MODULE:scale_inter_final.cns +else + @MODULE:scale_intra_only.cns +end if + +evaluate ($coll = 0.0) +evaluate ($eair = 0.0) +evaluate ($esym = 0.0) +evaluate ($ncs = 0.0) +evaluate ($zhar = 0.0) +evaluate ($dani = 0.0) +evaluate ($sani = 0.0) +evaluate ($vean = 0.0) +evaluate ($xrdc = 0.0) +evaluate ($xpcs = 0.0) +evaluate ($rms_noe=0.0) +evaluate ($violations_noe=0) +evaluate ($rms_test_noe=0.0) +evaluate ($violations_test_noe=0) + +energy end +evaluate ($etot = $ener - $noe) +evaluate ($noe = $eair) +evaluate ($etot = $etot + $noe) + +inline @MODULE:print_coorheader.cns + +coor sele= (not name H* and not resn ANI and not resn XAN and not resn DAN) orient end + +inline @MODULE:check_coordinates.cns + +if ($failure eq true) then + evaluate ($failfile = $output_pdb_filename - ".pdb" + ".fail") + set display=$failfile end + display "MAX/MIN possible coordinates exceeded - stopping" + close $failfile end + stop +else + write coordinates sele=(not (resn WA* or resn HOH or resn TIP* or resn DMS)) format=pdbo output=$output_pdb_filename end +end if + +if ($refine.keepwater eq true) then + evaluate ($filename= $output_pdb_filename - ".pdb" + "_solvent.pdb") + write coordinates sele=(all) format=pdbo output=$filename end +end if + +set message=normal echo=on end +display OUTPUT: $output_pdb_filename + +stop + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/print_coorheader.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/print_coorheader.cns new file mode 100644 index 0000000000000000000000000000000000000000..be945dbe877b5cb3f549b95e85498d399f1d41ec --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/print_coorheader.cns @@ -0,0 +1,396 @@ +! print_coorheader.cns +! Generate the coordinate header (REMARKS) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +if ($Data.flags.dihed eq false) then evaluate ($dihe = 0) end if +if ($Data.flags.sani eq false) then evaluate ($sani = 0) end if +if ($Data.flags.xrdc eq false) then evaluate ($xrdc = 0) end if +if ($Data.flags.xpcs eq false) then evaluate ($xpcs = 0) end if +if ($Data.flags.dani eq false) then evaluate ($dani = 0) end if +if ($Data.flags.vean eq false) then evaluate ($vean = 0) end if +if ($Data.flags.cdih eq false) then evaluate ($cdih = 0) end if +if ($Data.flags.noe eq false) then evaluate ($noe = 0) end if +if ($Data.flags.rg eq false) then evaluate ($coll = 0) end if +if ($Data.flags.zres eq false) then evaluate ($zhar = 0) end if +if ($Data.flags.em eq false) then evaluate ($lcc = 0) end if + +evaluate($enerall=$etot) +evaluate($bondall=$ebond) +evaluate($anglall=$eangl) +evaluate($imprall=$eimpr) +evaluate($diheall=$edihe) +evaluate($vdwall=$vdw) +evaluate($elecall=$elec) +evaluate($noeall=$noe) +evaluate($rgall=$coll) +evaluate($zresall=$zhar) +evaluate($cdihall=$cdih) +evaluate($coupall=0) +evaluate($saniall=$sani+$xrdc) +evaluate($veanall=$vean) +evaluate($xpcsall=$xpcs) +evaluate($daniall=$dani) + +if ($Data.flags.sym eq true) then + evaluate ($result=0) + evaluate ($violations=0) + print threshold=0.3 noe + evaluate ($rms_noe=$result) + evaluate ($violations_noe=$violations) +end if + +if ($Data.randremoval eq false) then + evaluate ($violations_test_noe= 0) + evaluate ($rms_test_noe = 0) + evaluate ($npart = 0) +end if + +evaluate ($result=0) +evaluate ($violations=0) +print threshold=5. cdih +evaluate ($rms_cdih=$result) +evaluate ($violations_cdih=$violations) +evaluate ($result=0) +evaluate ($violations=0) +evaluate ($rms_coup = 0) +evaluate ($violations_coup = 0) + +evaluate( $rms_sani = 0) +evaluate( $violations_sani = 0) +if ($Data.flags.sani eq TRUE) then + sani print threshold = 0.20 class rd* end + evaluate( $rms_sani = $result) + evaluate( $violations_sani = $violations) +end if + +evaluate( $rms_xrdc = 0) +evaluate( $violations_xrdc = 0) +if ($Data.flags.xrdc eq TRUE) then + xrdc print threshold = 0.2 class xr* end + evaluate( $rms_xrdc = $result) + evaluate( $violations_xrdc = $violations) +end if + +evaluate( $violations_sani = $violations_sani + $violations_xrdc) +evaluate( $rms_sani = $rms_sani + $rms_xrdc) + +evaluate( $rms_xpcs = 0) +evaluate( $violations_xpcs = 0) +if ($Data.flags.xpcs eq TRUE) then + xpcs print threshold = 0.2 class pc* end + evaluate( $rms_xpcs = $result) + evaluate( $violations_xpcs = $violations) +end if + +evaluate( $rms_vean = 0) +evaluate( $violations_vean = 0) +if ($Data.flags.vean eq TRUE) then + vean print threshold = 5.00 class ve* end + evaluate( $rms_vean = $result) + evaluate( $violations_vean = $violations) +end if + +evaluate( $rms_dani = 0) +evaluate( $violations_dani = 0) +if ($Data.flags.dani eq TRUE) then + dani print threshold = 0.20 class da* end + evaluate( $rms_dani = $result) + evaluate( $violations_dani = $violations) +end if + +{====>} {* define ASA-based solvation parameters *} +inline @MODULE:def_solv_param.cns + +{====>} {* buried surface area and desolvation*} +evaluate ($nchain1 = 0) +evaluate ($saafree = 0) +evaluate ($esolfree = 0) +while ($nchain1 < $data.ncomponents) loop nloop1 + evaluate ($nchain1 = $nchain1 + 1) + {====>} {* buried surface area and desolvation*} + do (rmsd = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 sele=(segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end + show sum (rmsd) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($saafree = $saafree + $result) + evaluate ($saafree_$nchain1 = $result) + do (store2 = rmsd * store1) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + show sum (store2) (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($esolfree = $esolfree + $result) + evaluate ($esolfree_$nchain1 = $result) +end loop nloop1 + +do (rmsd = 0) (all) +do (store2 = 0) (all) +surface mode=access accu=0.075 rh2o=1.4 sele=(not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end +show sum (rmsd) (not ((resn WAT or resn HOH or resn TIP*) or resn DMS or resn SHA)) +evaluate ($satot = $result) +do (store2 = rmsd * store1) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +show sum (store2) (not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) +evaluate ($esolcplx = $result) +evaluate ($saburied = $saafree - $satot) +if ($saburied < 0) then + evaluate ($saburied = -999999) +end if + +evaluate ($edesolv = $esolcplx - $esolfree) + +evaluate ($dhbinding = $edesolv + $eintcplx - $eintfree + $elecall + $vdwall) + +evaluate ($nshape = 0) +evaluate ($ncount = 0) +while ($ncount < $data.ncomponents) loop shape + evaluate ($ncount = $ncount + 1) + if ($mol_shape_$ncount eq true) then + evaluate ($nshape = $nshape + 1) + end if +end loop shape + +evaluate ($nonshape = $Data.ncomponents - $nshape) + +if ($nonshape = 1) then + evaluate ($saburied = 0) + evaluate ($edesolv = 0) + evaluate ($dhbinding = 0) + evaluate ($eintfree = $eintcplx) +end if + +if ($Data.flags.sym eq true) then + evaluate ($enerall = $enerall + $esym) +end if +if ($Data.flags.ncs eq true) then + evaluate ($enerall = $enerall + $ncs) +end if + +evaluate ($procwat = false) +if ($refine.keepwater eq true) then + evaluate ($procwat = true) +end if + +{====>} {* calculate interface-specific scores *} +if ($data.ncomponents > 1) then + if ($per_interface_scoring eq true) then + if ($data.ncomponents eq 2) then + {====>} {* dimer: no need to recalculate anything *} + evaluate ($nrstscore= 0.0) + evaluate($nchain1 = 1) + evaluate($nchain2 = 2) + evaluate ($bsa_$nchain1_$nchain2 = $saburied) + evaluate ($edesol_$nchain1_$nchain2 = $edesolv) + evaluate ($vdw_$nchain1_$nchain2 = $vdwall) + evaluate ($elec_$nchain1_$nchain2 = $elecall) + evaluate ($haddockscore_$nchain1_$nchain2 = $w_vdw * $vdw_$nchain1_$nchain2 + + $w_elec* $elec_$nchain1_$nchain2 + + $w_bsa * $bsa_$nchain1_$nchain2 + + $w_desolv * $edesol_$nchain1_$nchain2) + + evaluate ($nrstscore = $nrstscore + $haddockscore_$nchain1_$nchain2) + else + {====>} {* define ASA-based solvation parameters *} + do (store1 = 0) (all) + evaluate ($nrstscore= 0.0) + inline @MODULE:def_solv_param.cns + + eval($nchain1 = 1) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain2 = $nchain1 + 1) + while ($nchain2 <= $data.ncomponents) loop nloop2 + igroup + interaction (segid $prot_segid_$nchain1 and not (resn WAT or resn HOH or resn TIP* or resn DMS)) + (segid $prot_segid_$nchain2 and not (resn WAT or resn HOH or resn TIP* or resn DMS)) weight * 1.0 end + end + energy end + evaluate ($vdw_$nchain1_$nchain2 = $vdw) + evaluate ($elec_$nchain1_$nchain2 = $elec) + + do (rmsd = 0) (all) + do (store2 = 0) (all) + surface mode=access accu=0.075 rh2o=1.4 + sele=((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) end + show sum (rmsd) ((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($bsa_$nchain1_$nchain2 = $saafree_$nchain1 + $saafree_$nchain2 - $result) + if ($bsa_$nchain1_$nchain2 < 0) then + evaluate ($bsa_$nchain1_$nchain2 = 0) + end if + + do (store2 = rmsd * store1) ((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + show sum (store2) ((segid $prot_segid_$nchain1 or segid $prot_segid_$nchain2) and not (resn WAT or resn HOH or resn TIP* or resn DMS or resn SHA)) + evaluate ($edesol_$nchain1_$nchain2 = $result - $esolfree_$nchain1 - $esolfree_$nchain2) + + evaluate ($haddockscore_$nchain1_$nchain2 = $w_vdw * $vdw_$nchain1_$nchain2 + + $w_elec* $elec_$nchain1_$nchain2 + + $w_bsa * $bsa_$nchain1_$nchain2 + + $w_desolv * $edesol_$nchain1_$nchain2) + + evaluate ($nrstscore = $nrstscore + $haddockscore_$nchain1_$nchain2) + + eval($nchain2 = $nchain2 + 1) + end loop nloop2 + eval($nchain1 = $nchain1 + 1) + end loop nloop1 + end if + end if +else + evaluate ($nrstscore = $w_vdw * $vdwall + $w_elec * $elecall + $w_bsa * $saburied + $w_desolv * $edesolv) +end if + + +if ($procwat eq true) then + ident (store3) (not all) + flag exclude * include vdw elec end + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + igroup + interaction (segid $prot_segid_$nchain1) ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (not segid $prot_segid_$nchain1) (resn WAT or resn HOH or resn TIP* or resn DMS) weight * 0.0 end + interaction (segid $prot_segid_$nchain1) (not ((resn WAT or resn HOH or resn TIP* or resn DMS) and store3)) weight * 0.0 end + end + energy end + evaluate ($ener_water_$nchain1 = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_$nchain1 = $vdw) + evaluate ($elec_water_$nchain1 = $elec) + + end loop nloop1 + if ($data.ncomponents > 1) then + eval($nchain1 = $data.ncomponents) + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + end if + + eval($nchain1 = 0) + + igroup + while ($nchain1 < $data.ncomponents) loop nloop2 + eval($nchain1 = $nchain1 + 1) + interaction (segid $prot_segid_$nchain1) (all) weight * 0.0 end + end loop nloop2 + interaction ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) + ((resn WAT or resn HOH or resn TIP* or resn DMS) and not store3) weight * 1.0 end + interaction (store3) (store3) weight * 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + interaction (resn SHA) (resn SHA) weight * 0.0 end + end + energy end + evaluate ($ener_water_water = $ener) + evaluate ($enerall = $enerall + $ener) + evaluate ($vdw_water_water = $vdw) + evaluate ($elec_water_water = $elec) +else + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents ) loop nloop1 + eval($nchain1 = $nchain1 + 1) + evaluate ($ener_water_$nchain1 = 0.0) + evaluate ($vdw_water_$nchain1 = 0.0) + evaluate ($elec_water_$nchain1 = 0.0) + end loop nloop1 + evaluate ($ener_water_water = 0.0) + evaluate ($vdw_water_water = 0.0) + evaluate ($elec_water_water = 0.0) +end if + +! calculate the HADDOCK score +evaluate ($hscore = $w_vdw * $vdwall) +evaluate ($hscore = $hscore + $w_elec * $elecall) +evaluate ($hscore = $hscore + $w_air * $noeall) +evaluate ($hscore = $hscore + $w_rg * $rgall) +evaluate ($hscore = $hscore + $w_cdih * $cdihall) +evaluate ($hscore = $hscore + $w_sani * $saniall) +evaluate ($hscore = $hscore + $w_xpcs * $xpcsall) +evaluate ($hscore = $hscore + $w_dani * $daniall) +evaluate ($hscore = $hscore + $w_vean * $veanall) +evaluate ($hscore = $hscore + $w_sym * $esym) +evaluate ($hscore = $hscore + $w_bsa * $saburied) +evaluate ($hscore = $hscore + $w_desolv * $edesolv) +evaluate ($hscore = $hscore + $w_lcc * $lcc) + +set message=on echo=on end +set remarks=reset end +set remarks=accumulate end +remarks =============================================================== +remarks HADDOCK stats for $output_pdb_filename +remarks =============================================================== +remarks HADDOCK score: $hscore +remarks =============================================================== + +!list input molecules +evaluate ($nmol=1) +while ($nmol <=$data.ncomponents) loop mol + if ( $exist_input_pdb_filename_$nmol = true) then + remarks initial structure $nmol - $input_pdb_filename_$nmol + end if + evaluate ($nmol = $nmol + 1) +end loop mol + +remarks =============================================================== +remarks total,bonds,angles,improper,dihe,vdw,elec,air,cdih,coup,rdcs,vean,dani,xpcs,rg +remarks energies: $enerall, $bondall, $anglall, $imprall, $diheall, $vdwall, $elecall, $noeall, $cdihall, $coupall, $saniall, $veanall, $daniall, $xpcsall, $rgall +remarks =============================================================== +remarks bonds,angles,impropers,dihe,air,cdih,coup,rdcs,vean,dani,xpcs +remarks rms-dev.: $rms_bonds,$rms_angles,$rms_impropers,$rms_dihedrals,$rms_noe,$rms_cdih,$rms_coup, $rms_sani, $rms_vean, $rms_dani, $rms_xpcs +remarks =============================================================== +remarks air,cdih,coup,rdcs,vean,dani,xpcs +remarks >0.3,>5,>1,>0,>5,>0.2,>0.2 +remarks violations.: $violations_noe, $violations_cdih, $violations_coup, $violations_sani, $violations_vean, $violations_dani, $violations_xpcs +remarks =============================================================== +remarks CVpartition#,violations,rms +remarks AIRs cross-validation: $npart, $violations_test_noe, $rms_test_noe +remarks =============================================================== +remarks NCS energy: $ncs +remarks =============================================================== +remarks Symmetry energy: $esym +remarks =============================================================== +remarks Membrane restraining energy: $zresall +remarks =============================================================== +remarks Local cross-correlation: $lcc[f7.4] +remarks =============================================================== +remarks Desolvation energy: $edesolv +remarks Internal energy free molecules: $eintfree +remarks Internal energy complex: $eintcplx +remarks Binding energy: $dhbinding +remarks =============================================================== +remarks buried surface area: $saburied +remarks =============================================================== +if ($data.ncomponents > 1) then + if ($per_interface_scoring eq true) then + evaluate($nchain1 = 1) + remarks Interface Chain1 Chain2 HADDOCKscore Evdw Eelec Edesol BSA + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain2 = $nchain1 + 1) + while ($nchain2 <= $data.ncomponents) loop nloop2 + remarks Interface: $prot_segid_$nchain1 $prot_segid_$nchain2 $haddockscore_$nchain1_$nchain2 $vdw_$nchain1_$nchain2 $elec_$nchain1_$nchain2 $edesol_$nchain1_$nchain2 $bsa_$nchain1_$nchain2 + eval($nchain2 = $nchain2 + 1) + end loop nloop2 + eval($nchain1 = $nchain1 + 1) + end loop nloop1 + remarks Total HADDOCK score without restraints: $nrstscore + end if +else + remarks Total HADDOCK score without restraints: $nrstscore +end if +remarks =============================================================== +evaluate($ncount = 0) +while ($ncount < $data.ncomponents) loop waterremark + evaluate ($ncount = $ncount +1) + remarks water - chain-$prot_segid_$ncount: $ener_water_$ncount $vdw_water_$ncount $elec_water_$ncount +end loop waterremark +remarks =============================================================== +remarks water - water: $ener_water_water $vdw_water_water $elec_water_water +remarks =============================================================== diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-all.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-all.cns new file mode 100644 index 0000000000000000000000000000000000000000..ce6537b77378451041f63bb9fb07cb9fce35b4d7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-all.cns @@ -0,0 +1,88 @@ +! protein-ss-restraints-all.def +! Define automatically secondary stucture dihedral angle restraints for all residues +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: protein-ss-restraints.def +} +{+ description: Creates dihedral angle restraints to maintain conformation of the protein backbone +} +{+ authors: Axel T. Brunger, and Paul D. Adams, +} +{+ modified by Alexandre Bonvin for HADDOCK use +} + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + +{- Dihedral restraints for the protein backbone -} +restraint dihedral + nass = 50000 +end +do (store1 = 1) (all) +evaluate ($group=1) +evaluate ($done=false) +while ( $done = false ) loop bdihe + if ( $exist_prot_segid_$group = true ) then + show sum(1) ( segid $prot_segid_$group ) + if ( $result > 0 ) then + evaluate ($error_phi=$Data.error_dih) + evaluate ($error_psi=$Data.error_dih) + for $id in id ( segid $prot_segid_$group and tag and not resn TIP3 ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($rprec = $resid - 1) + show sum (store1) (resid $rprec and name C) + if ($result ne 0) then + evaluate ($rprec = $resid - 1) + pick dihedral + ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + geometry + evaluatate ($dihedral_phi=$result) + restraint dihedral + ! phi + assign ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + 1.0 $dihedral_phi $error_phi 2 + scale 200.0 + end + end if + evaluate ($rnext = $resid + 1) + show sum (store1) (resid $rnext and name N) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + geometry + evaluatate ($dihedral_psi=$result) + restraint dihedral + ! psi + assign ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + 1.0 $dihedral_psi $error_psi 2 + scale 200.0 + end + end if + end loop resid + end if + else + evaluate ($done=true) + end if + evaluate ($group=$group+1) +end loop bdihe + +flags include cdih end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha-beta.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha-beta.cns new file mode 100644 index 0000000000000000000000000000000000000000..0d6d8e4aa9b00b11bd201f8f9917a4628821978b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha-beta.cns @@ -0,0 +1,128 @@ +! protein-ss-restraints-alpha-beta.cns +! Define automatically secondary structure dihedral angle restraints +! for helical and beta-sheet segments +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: protein-ss-restraints.def +} +{+ description: Creates dihedral angle restraints to maintain conformation of the protein backbone +} +{+ comment:This file is to be read by refinement files that modify atom coordinates +} +{+ authors: Axel T. Brunger, and Paul D. Adams +} +{+ modified by Alexandre Bonvin for HADDOCK use +} + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + +{- Dihedral restraints for the protein backbone in alpha-beta regions -} + +do (store1 = 1) (all) +restraint dihedral + nass = 50000 +end +evaluate ($group=1) +evaluate ($done=false) +while ( $done = false ) loop bdihe + if ( $exist_prot_segid_$group = true ) then + show sum(1) ( segid $prot_segid_$group ) + if ( $result > 0 ) then + evaluate ($error_phi=$Data.error_dih) + evaluate ($error_psi=$Data.error_dih) + for $id in id ( segid $prot_segid_$group and tag and not resn TIP* ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($alphaphi = 0) + evaluate ($alphapsi = 0) + evaluate ($alpha_check = 0) + evaluate ($betaphi = 0) + evaluate ($betapsi = 0) + evaluate ($beta_check = 0) + evaluate ($rprec = $resid - 1) + show sum (store1) (resid $rprec and name C) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + geometry + evaluate ($dihedral_phi=$result) + evaluate ($alphaphi=max($dihedral_phi,-77)) + evaluate ($alphaphi=max($dihedral_phi,-37)) + if ($alphaphi eq -37) then + evaluate ($alpha_check = 1) + else + evaluate ($alpha_check = 0) + end if + evaluate ($betaphi=max($dihedral_phi,-145)) + evaluate ($betaphi=max($dihedral_phi,-105)) + if ($betaphi eq -105) then + evaluate ($beta_check = 1) + else + evaluate ($beta_check = 0) + end if + end if + evaluate ($rnext = $resid + 1) + show sum (store1) (resid $rnext and name N) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + geometry + evaluate ($dihedral_psi=$result) + evaluate ($alphapsi=max($dihedral_psi,-67)) + evaluate ($alphapsi=max($dihedral_psi,-27)) + if ($alphapsi eq -27) then + evaluate ($alpha_check = $alpha_check + 1) + end if + evaluate ($betapsi=max($dihedral_psi,105)) + evaluate ($betapsi=max($dihedral_psi,145)) + if ($betapsi eq 145) then + evaluate ($beta_check = $beta_check + 1) + end if + end if + evaluate ($defrest = 0) + if ($alpha_check eq 2) then + evaluate ($defrest = 1) + end if + if ($beta_check eq 2) then + evaluate ($defrest = 1) + end if + if ($defrest = 1) then + restraint dihedral + ! phi + assign ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + 1.0 $dihedral_phi $error_phi 2 + ! psi + assign ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + 1.0 $dihedral_psi $error_psi 2 + scale 200.0 + end + end if + end loop resid + end if + else + evaluate ($done=true) + end if + evaluate ($group=$group+1) +end loop bdihe + +flags include cdih end + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha.cns new file mode 100644 index 0000000000000000000000000000000000000000..38416657fc086d88a8288b50371b1f3e697103a8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha.cns @@ -0,0 +1,109 @@ +! protein-ss-restraints-alpha.cns +! Define automatically secondary structure dihedral angle restraints +! for helical segments +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{+ file: protein-ss-restraints.def +} +{+ description: Creates dihedral angle restraints to maintain conformation of the protein backbone +} +{+ comment:This file is to be read by refinement files that modify atom coordinates +} +{+ authors: Axel T. Brunger, and Paul D. Adams +} +{+ modified by Alexandre Bonvin for HADDOCK use +} + +{=========================================================================================================} +{ things below this line do not normally need to be changed } +{=========================================================================================================} + +{- Dihedral restraints for the protein backbone in alpha-helical regions -} +restraint dihedral + nass = 50000 +end +do (store1 = 1) (all) +evaluate ($group=1) +evaluate ($done=false) +while ( $done = false ) loop bdihe + if ( $exist_prot_segid_$group = true ) then + show sum(1) ( segid $prot_segid_$group ) + if ( $result > 0 ) then + evaluate ($error_phi=$Data.error_dih) + evaluate ($error_psi=$Data.error_dih) + for $id in id (segid $prot_segid_$group and tag and not resn TIP3 ) loop resid + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) ( id $id ) + evaluate ($resid=decode($result)) + evaluate ($alphaphi = 0) + evaluate ($alphapsi = 0) + evaluate ($alpha_check = 0) + evaluate ($rprec = $resid - 1) + show sum (store1) (resid $rprec and name C) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + geometry + evaluate ($dihedral_phi=$result) + evaluate ($alphaphi=max($dihedral_phi,-77)) + evaluate ($alphaphi=max($dihedral_phi,-37)) + if ($alphaphi eq -37) then + evaluate ($alpha_check = 1) + else + evaluate ($alpha_check = 0) + end if + end if + evaluate ($rnext = $resid + 1) + show sum (store1) (resid $rnext and name N) + if ($result ne 0) then + pick dihedral + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + geometry + evaluate ($dihedral_psi=$result) + evaluate ($alphapsi=max($dihedral_psi,-67)) + evaluate ($alphapsi=max($dihedral_psi,-27)) + if ($alphapsi eq -27) then + evaluate ($alpha_check = $alpha_check + 1) + end if + end if + evaluate ($defrest = 0) + if ($alpha_check eq 2) then + evaluate ($defrest = 1) + end if + if ($defrest = 1) then + restraint dihedral + ! phi + assign ( segid $segid and resid $rprec and name C ) + ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + 1.0 $dihedral_phi $error_phi 2 + ! psi + assign ( segid $segid and resid $resid and name N ) + ( segid $segid and resid $resid and name CA ) + ( segid $segid and resid $resid and name C ) + ( segid $segid and resid $rnext and name N ) + 1.0 $dihedral_psi $error_psi 2 + scale 200.0 + end + end if + end loop resid + end if + else + evaluate ($done=true) + end if + evaluate ($group=$group+1) +end loop bdihe + +flags include cdih end + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/read_param.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/read_param.cns new file mode 100644 index 0000000000000000000000000000000000000000..6f549a453e49c118de295658c1294a8a429b9365 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/read_param.cns @@ -0,0 +1,64 @@ +! read_param.cns +! Reads parameter files. +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +!! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** + +{* protein parameter file *} +eval ($prot_parameter_infile="TOPPAR:protein-allhdg5-4.param") + +{* nucleic acid parameter file *} +eval ($nucl_parameter_infile="TOPPAR:dna-rna-allatom-hj-opls-1.3.param") + +{* carbohydrate parameter file *} +eval ($carbo_parameter_infile="TOPPAR:carbohydrate.param") + +{* solvent parameter file *} +eval ($solv_parameter_infile="TOPPAR:solvent-allhdg5-4.param") + +{* fragment probes parameter file *} +eval ($ligands_parameter_infile="TOPPAR:fragment_probes.param") + +{* ion parameter file *} +eval ($ion_parameter_infile="TOPPAR:ion.param") + +{* heme parameter file *} +eval ($heme_parameter_infile="TOPPAR:hemes-allhdg.param") + +{* shape parameter file *} +eval ($shape_parameter_infile="TOPPAR:shape.param") + +{* cofactors parameter file *} +eval ($cofactors_parameter_infile="TOPPAR:cofactors.param") + +parameter + @@$prot_parameter_infile + @@$ion_parameter_infile + @@$nucl_parameter_infile + @@$carbo_parameter_infile + @@$solv_parameter_infile + @@$ligands_parameter_infile + @@$heme_parameter_infile + @@$shape_parameter_infile + @@$cofactors_parameter_infile + if ($ligand_param_fname # "") then + fileexist $ligand_param_fname end + if ($result eq true) then + @@$ligand_param_fname + end if + end if +end + +parameter + nbonds + nbxmod=5 atom cdie shift + cutnb=9.5 ctofnb=8.5 ctonnb=6.5 eps=1.0 e14fac=0.4 inhibit 0.25 + wmin=0.5 tolerance 0.5 + end +end + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/restrain-ions.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/restrain-ions.cns new file mode 100644 index 0000000000000000000000000000000000000000..52a5b3d2024ac21f44456d9ed204d455d8380ac2 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/restrain-ions.cns @@ -0,0 +1,109 @@ +! restrain-ions.cns +! distance restraints between an ion and any coordinating atom within 5A +! to maintain the coordination topologu +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +noe class dist end + +! first deal with monoatomic ions +evaluate ($pcount = 0) +for $id1 in id ( name "LI+1" or name "F-1" or name "NA+1" or name "MG+2" or name "AL+3" + or name "CL-1" or name "K+1" or name "CA+2" or name "V+2" or name "V+3" + or name "CR+2" or name "CR+3" or name "MN+2" or name "MN+3" or name "FE+2" + or name "FE+3" or name "NI+2" or name "CO+2" or name "CO+3" or name "CU+1" + or name "CU+2" or name "ZN+2" or name "BR-1" or name "SR+2" or name "MO+3" + or name "AG+1" or name "CD+2" or name "I-1" or name "CS+2" or name "HO+3" + or name "YB+2" or name "YB+3" or name "OS+4" or name "IR+3" or name "PT+2" + or name "AU+1" or name "AU+2" or name "HG+1" or name "HG+2" or name "PB+2" + or name "U+3" or name "U+4" or name "ZN+1" or name "ZN" ) loop sions + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + for $id2 in id ( (name O* or name S* or name N*) and (id $id1) around $mindis and + (resn ACE or resn ALA or resn ALY or resn ARG or resn ASN or resn ASH or resn ASP or + resn CSP or resn CTN or resn CYC or resn CYF or resn CYM or resn CYS or resn DDZ or + resn GLN or resn GLH or resn GLU or resn GLY or resn HIS or resn HY3 or resn HYP or + resn ILE or resn LEU or resn LYS or resn M3L or resn MLY or resn MLZ or resn MET or + resn MSE or resn NEP or resn NME or resn PHE or resn PNS or resn PRO or resn PTR or + resn QSR or resn SEP or resn SER or resn SEC or resn THR or resn TOP or resn TRP or + resn TYP or resn TYR or resn TYS or resn VAL or resn A or resn C or resn G or + resn T or resn DA or resn DC or resn DG or resn DT or resn DJ )) loop search + + pick bond (id $id1) (id $id2) geometry + evaluate ($upper = $result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (name) (id $id2) + evaluate ($name2=$result) + + if ($segid1 eq $segid2) then + noe + assign (resid $resid1 and segid $segid1 and name $name1) + (resid $resid2 and segid $segid2 and name $name2) $upper 0.1 0.1 + end + end if + + end loop search + +end loop sions + +! then deal with multiatomic mions +evaluate ($pcount = 0) +for $id1 in id ( (resn SO4 or resn PO4 or resn WO4) and name O* ) loop mions + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + for $id2 in id ( (name O* or name S* or name N*) and (id $id1) around $mindis and + (resn ACE or resn ALA or resn ALY or resn ARG or resn ASN or resn ASH or resn ASP or + resn CSP or resn CTN or resn CYC or resn CYF or resn CYM or resn CYS or resn DDZ or + resn GLN or resn GLH or resn GLU or resn GLY or resn HIS or resn HY3 or resn HYP or + resn ILE or resn LEU or resn LYS or resn M3L or resn MLY or resn MLZ or resn MET or + resn MSE or resn NEP or resn NME or resn PHE or resn PNS or resn PRO or resn PTR or + resn QSR or resn SEP or resn SER or resn SEC or resn THR or resn TOP or resn TRP or + resn TYP or resn TYR or resn TYS or resn VAL or resn A or resn C or resn G or + resn T or resn DA or resn DC or resn DG or resn DT or resn DJ )) loop search + + pick bond (id $id1) (id $id2) geometry + evaluate ($upper = $result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (name) (id $id2) + evaluate ($name2=$result) + + if ($segid1 eq $segid2) then + noe + assign (resid $resid1 and segid $segid1 and name $name1) + (resid $resid2 and segid $segid2 and name $name2) $upper 0.1 0.1 + end + end if + + end loop search + +end loop mions diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/scale_inter_final.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/scale_inter_final.cns new file mode 100644 index 0000000000000000000000000000000000000000..a8bf9c44f98b1303779d68d46e24855e47321548 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/scale_inter_final.cns @@ -0,0 +1,39 @@ +! scale_inter_final.cns +! Scaling of intermolecular interactions +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + eval($nchain2 = $nchain1 ) + while ($nchain2 < $data.ncomponents) loop nloop2 + eval($nchain2 = $nchain2 + 1) + eval($scalfac = 1.0) + interaction (segid $prot_segid_$nchain1 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) + (segid $prot_segid_$nchain2 and not + (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA or resn DPP or resn PCW or resn PEE)) weight * 1.0 vdw $scalfac elec $scalfac end + end loop nloop2 + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/scale_intra_only.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/scale_intra_only.cns new file mode 100644 index 0000000000000000000000000000000000000000..15b0adfbb562862214f161c494c14a17dbf6beb7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/scale_intra_only.cns @@ -0,0 +1,36 @@ +! scale_intra_only.cns +! Scaling of intramolecular energies (no intermolecular energies) +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +igroup interaction (not all) (not all) end + +igroup + + eval($nchain1 = 0) + + while ($nchain1 < $data.ncomponents) loop nloop1 + eval($nchain1 = $nchain1 + 1) + + interaction (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) + (segid $prot_segid_$nchain1 and not (resn ANI or resn DAN or resn XAN or resn DUM or resn SHA)) weight * 1.0 end + + end loop nloop1 + + interaction (resn ANI) (resn ANI) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DAN) (resn DAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn XAN) (resn XAN) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn DUM) (resn DUM) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (resn SHA) weight * 1.0 vdw 0.0 elec 0.0 end + interaction (resn SHA) (not resn SHA) weight * 0.0 end + +end + + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/setflags.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/setflags.cns new file mode 100644 index 0000000000000000000000000000000000000000..fd3e181f3cc822ca390f8d3f0ec6368c7305498b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/cns/setflags.cns @@ -0,0 +1,21 @@ +! setflags.cns +! Defines energy flags +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +if ($Data.flags.noe = TRUE) then + flags include noe end +end if +if ($Data.flags.cdih = TRUE) then + flags include cdih end +end if +if ($Data.flags.ncs = TRUE) then + flags include ncs end +end if diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ed3bfa9df711f38d47bd893afc2626d19de6989b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/mdscoring/defaults.yaml @@ -0,0 +1,474 @@ +# +# Group scoring +# +per_interface_scoring: + default: false + type: boolean + title: Interchain scoring + short: Output scores per interface in the PDB header. + long: With this option true, the interface of all combinations of chains will be analysed and the corresponding HADDOCK scores (without restraints terms) and their components (Eelec, Evdw, Edesol, BSA) will be written to the header of each PDB file. + group: 'scoring' + explevel: expert +interface_combinations: + default: [] + type: list + minitems: 0 + maxitems: 20 + title: Chains to be scored. + short: List of chains to be scored. Use this parameter to provide a list of + chain pairs (coma separated) that should be considered for the calculation. + If empty/unspecified, all inter-chains contacts will be considered + for the final prediction. + long: List of chains to be scored. If empty/unspecified, all inter-chains + contacts will be considered for the final prediction. In specific cases, + for example antibody-antigen complexes, some chains should be considered + as a single molecule. Use this parameter to provide a list of chain pairs + (separated by coma) that should be considered for the calculation. + [] => Compute all interface scores + ["A,H", "A,L"] => Compute sum of per-interface scores between chains A and H; A and L + group: 'scoring' + explevel: expert +w_air: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the distance restraint energy + short: Weight of the distance restraints energy in the scoring function + long: Weight of the distance restraints energy in the scoring function. + Note that this is different from the force constants used during the calculations. + group: 'scoring' + explevel: hidden +w_bsa: + default: 0.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the buried surface area term + short: Weight of the buried surface area term in the scoring function + long: Weight of the buried surface area (BSA) term in the scoring function. + Note that the BSA is only used for scoring. + group: 'scoring' + explevel: expert +w_cdih: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the dihedral angle restraint energy + short: Weight of the dihedral angle restraints energy in the scoring function + long: Weight of the dihedral angle restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: expert +w_dani: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the relaxation anisotropy (DANI) restraint energy + short: Weight of the relaxation anisotropy (DANI) restraint energy + long: Weight of the relaxation anisotropy (DANI) restraint energy + group: 'scoring' + explevel: hidden +w_deint: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the interaction energy term + short: Weight of the interaction energy term + long: Weight of the interaction energy term calculated as the difference in total energy of the complex and of the separate components + group: 'scoring' + explevel: hidden +w_desolv: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the desolvation energy term + short: Weight of the desolvation energy term in the scoring function + long: Weight of the desolvation energy term in the scoring function. + Note that the desolvation energy is only used for scoring. + group: 'scoring' + explevel: expert +w_elec: + default: 0.2 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular electrostatic energy + short: Weight of the intermolecular electrostatic energy in the scoring function + long: Weight of the intermolecular electrostatic energy in the scoring function. + Note that this does not affect the electostatic energy during the MD refinement. + group: 'scoring' + explevel: expert +w_lcc: + default: -10000.0 + type: float + min: -10000.0 + max: 0 + precision: 3 + title: Weight of the EM local correlation coefficient + short: Weight of the EM local correlation coefficient + long: Weight of the EM local correlation coefficient + group: 'scoring' + explevel: hidden +w_rg: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the radius of gyration restraint energy + short: Weight of the radius of gyration restraint energy + long: Weight of the radius of gyration restraint energy + group: 'scoring' + explevel: hidden +w_sani: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (SANI) restraint energy + short: Weight of the residual dipolar coupling (SANI) restraint energy + long: Weight of the residual dipolar coupling (SANI) restraint energy + group: 'scoring' + explevel: hidden +w_sym: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the symmetry restraint energy + short: Weight of the symmetry restraints energy in the scoring function + long: Weight of the symmetry restraints energy in the scoring function. + Note that this is different from the force constant used during the calculations. + group: 'scoring' + explevel: hidden +w_vdw: + default: 1.0 + type: float + min: -9999 + max: 9999 + precision: 3 + title: Weight of the intermolecular van der Waals energy + short: Weight of the intermolecular van der Waals energy in the scoring function + long: Weight of the intermolecular van der Waals energy in the scoring function. + Note that this does not affect the van der Waals energy during the EM minimization. + group: 'scoring' + explevel: expert +w_vean: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (VEAN) restraint energy + short: Weight of the residual dipolar coupling (VEAN) restraint energy + long: Weight of the residual dipolar coupling (VEAN) restraint energy + group: 'scoring' + explevel: hidden +w_xpcs: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the pseudo contact shifts (XPCS) restraint energy + short: Weight of the pseudo contact shifts (XPCS) restraint energy + long: Weight of the pseudo contact shifts (XPCS) restraint energy + group: 'scoring' + explevel: hidden +w_xrdc: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the residual dipolar coupling (XRDC) restraint energy + short: Weight of the residual dipolar coupling (XRDC) restraint energy + long: Weight of the residual dipolar coupling (XRDC) restraint energy + group: 'scoring' + explevel: hidden +w_zres: + default: 0.0 + type: float + min: 0 + max: 9999 + precision: 3 + title: Weight of the Z-restraining potential energy + short: Weight of the Z-restraining potential energy + long: Weight of the Z-restraining potential energy + group: 'scoring' + explevel: hidden +# +# Group distance restraints +# +contactairs: + default: false + type: boolean + title: Contact restraints + short: Contact restraints between molecules + long: Contact restraints between molecules. These are defined as ambiguous distance restraint + between each residue of a molecule and all residues of the other molecules with 5A from that residue. + This can be used to restraint the contacts between the interfaces. Note that this can generate a large number of ambiguous restraints + and slow down the computations + group: 'distance restraints' + explevel: expert +kcont: + default: 1.0 + type: float + min: 0 + max: 1000 + precision: 1 + title: Contact restraints force constant + short: Force constant applied to the contact restraints. + long: Force constant applied to the contact restraints. + group: 'distance restraints' + explevel: expert +# +# Group dihedral restraints +# +ssdihed: + default: none + type: string + minchars: 0 + maxchars: 100 + choices: + - none + - all + - alpha + - alphabeta + title: Define automatically backbone dihedral angle restraints + short: If turned on, this option will automatically defined backbone dihedral angle restraints for the selected regions. + long: This option allows to utomatically defined backbone dihedral angle restraints for the selected regions. + The restraints will be defined for the phi and psi backbone dihedral angles of amino acids, with the target value taken from + the measured angle in the input structure, and the error bound defined by the error_dih parameter. + Those restraints can be applied to the entire structure (all), the alpha/beta secondary structure elements (alphabeta) or + only to the alpha helical regions (alpha). Those are automatically detected based on the measured dihedral angle combinations. + group: 'dihedral restraints' + explevel: easy +error_dih: + default: 10 + type: integer + min: 0 + max: 1000 + title: Force constant for backbone dihedral angle restraints + short: Force constant for backbone dihedral angle restraints (ssdihed option) + long: Force constant for backbone dihedral angle restraints (ssdihed option) + group: 'dihedral restraints' + explevel: easy +# +# Group other restraints +# +dnarest_on: + default: false + type: boolean + title: Restrain the DNA conformation + short: Automatically creates restraints to maintain the conformation of DNA/RNA + long: "This option allows to restraint the conformation of nucleic acids based on the values from the input structures. + The following restraints will be automatically defined: + - single base planarity + - sugar pucker + - phosphate backbone diherdral angle restraints + - Watson-Crick base pairing" + group: 'other restraints' + explevel: easy +# +# Group force field +# +ligand_param_fname: + default: '' + type: file + title: Custom ligand parameter file + short: Ligand parameter file in CNS format + long: Ligand parameter file in CNS format containing all force field parameters + (bond, angles, dihedrals, impropers, van der waals) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy +ligand_top_fname: + default: '' + type: file + title: Custom ligand topology file + short: Ligand topology file in CNS format + long: Ligand topology file in CNS format containing the ligand topologies + (atoms, masses, charges, bond definitions...) for any ligand not supported by default by HADDOCK + group: 'force field' + explevel: easy +elecflag: + default: true + type: boolean + title: Include electrostatics energy + short: Include electrostatics energy during the calculations. + long: Include electrostatics energy during the calculations. If set to false electrostatics will not be considered. + group: 'force field' + explevel: easy +dielec: + default: cdie + type: string + minchars: 0 + maxchars: 4 + choices: + - cdie + - rdie + title: Constant (cdie) or distance-dependent dielectric (rdie) constant. + short: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + long: Use a constant (cdie option) or a distance-dependent dielectric (rdie) constant in the Coulomb potential. + A distance dependent dielectric constant will effectively scale down the electrostatic energy + by having a 1/r**2 dependency instead of 1/r + group: 'force field' + explevel: expert +epsilon: + default: 1.0 + type: float + min: 1 + max: 78 + precision: 1 + title: Dielectric constant + short: Dielectric constant for the electrostatic Coulomb energy term. + long: Dielectric constant for the electrostatic Coulomb energy term. + group: 'force field' + explevel: expert +dihedflag: + default: true + type: boolean + title: Use torsion angle dihedral energy term + short: Turns on the torsion angle dihedral energy terms of the force field. + long: Turns on the torsion angle dihedral energy terms of the force field. + group: 'force field' + explevel: expert +# +# Group sampling +# +individualize: + default: true + type: boolean + title: Individualise models + short: Treat each model in the PDB ensemble as a separate entity. + long: Treat each model in the PDB ensemble as a separate entity. This means that for each a separate topology file will be generated. The models in the ensemble can thus correspond to different molecules. + group: 'sampling' + explevel: expert +solvent: + default: water + type: string + minchars: 0 + maxchars: 100 + choices: + - water + - dmso + title: Solvent + short: Solvent to use during the short MD refinement + long: Solvent to use during the short MD refinement. Water and DMSO are supported. + A solvent shelll is generated by shifting pre-equilibrated boxes around the complex. + For water an 8A water shell is generated and for DMSO a 12.5A shell. + For DMSO, + group: '' + explevel: easy +nemsteps: + default: 200 + type: integer + min: 0 + max: 10000 + title: Number of EM steps + short: Number of energy minimisation steps to perform. + long: Number of energy minimisation steps to perform in the various EM stages of this refinement protocol. + Note that the effective number might be smaller if the minimisation converges earlier. + group: 'sampling' + explevel: expert +timestep: + default: 0.002 + type: float + min: 0.0005 + max: 0.004 + precision: 4 + title: MD integrating time step + short: Integration time step for the molecular dynamics. + long: Integration time step for the molecular dynamics. + group: 'sampling' + explevel: guru +waterheatsteps: + default: 100 + type: integer + min: 0 + max: 10000 + title: Number of MD steps for the heating + short: Number of MD steps for the heating phase. + long: Number of MD steps for the heating phase. The heating consists of three successive + short molecular dynamics simluations at 100, 200 and 300 Kelvin. + group: 'sampling' + explevel: expert +watersteps: + default: 1250 + type: integer + min: 0 + max: 100000 + title: Number of MD steps at 300K. + short: Number of MD steps for 300K simulation. + long: Number of MD steps for 300K simulation. This is the sampling state of the refinement. + group: 'sampling' + explevel: expert +watercoolsteps: + default: 500 + type: integer + min: 0 + max: 10000 + title: Number of MD steps for the cooling + short: Number of MD steps for the cooling phase. + long: Number of MD steps for the cooling phase. The cooling consists of three successive + short molecular dynamics simluations at 300, 200 and 100 Kelvin. + group: 'sampling' + explevel: expert +iniseed: + default: 917 + type: integer + min: 0 + max: 9999999999999999 + title: Random seed + short: Random seed used in CNS to initialize the random seed function + long: Random seed used in CNS to initialize the random seed function + group: 'sampling' + explevel: guru +keepwater: + default: false + type: boolean + title: Write water molecules to output file + short: Write water molecules if present to the output file. + long: Write water molecules if present to the output file. + group: 'sampling' + explevel: guru +tolerance: + default: 5 + type: integer + min: 0 + max: 99 + precision: 3 + title: Failure tolerance percentage + short: Percentage of allowed failures for a module to successfully complete + long: Percentage of allowed failures for a module to successfully complete + group: 'module' + explevel: expert +log_level: + default: quiet + type: string + minchars: 0 + maxchars: 100 + choices: + - verbose + - normal + - quiet + title: Log level verbosity for CNS + short: Set the log level verbosity for CNS + long: CNS, the computational engine used by HADDOCK can generate a lot of output + messages. This parameter controls the verbosity of CNS (verbose, normal or quiet). + group: module + explevel: guru diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/._prodigylig.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/._prodigylig.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/._prodigylig.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8c11aeadf3661d9fe3c9dd527b5ac806bbc68d7d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/__init__.py @@ -0,0 +1,92 @@ +"""PRODIGY-ligand scoring module. + +This module performs the scoring of input complexes using PRODIGY-ligand. +It predicts deltaG of the complex and can return predictions as either deltaG +or pKd values. +""" + +from pathlib import Path + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import FilePath +from haddock.libs.libontology import PDBFile +from haddock.libs.libprodigy import CheckInstall +from haddock.modules import get_engine +from haddock.modules.scoring import ScoringModule +from haddock.modules.scoring.prodigyligand.prodigylig import ProdigyJob + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(ScoringModule): + """HADDOCK3 module to perform energy minimization scoring.""" + + name = RECIPE_PATH.name + + def __init__( + self, + order: int, + path: Path, + initial_params: FilePath = DEFAULT_CONFIG, + ) -> None: + super().__init__(order, path, initial_params) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm module is installed.""" + CheckInstall() + return + + def _run(self) -> None: + """Execute module.""" + # Retrieve previous models + try: + models_to_score = self.previous_io.retrieve_models(individualize=True) + except Exception as e: + self.finish_with_error(e) + + # Pool of Prodigy jobs to be executed + jobs: list[ProdigyJob] = [] + self.output_models: list[PDBFile] = [] + + for mi, model in enumerate(models_to_score): + self.output_models.append(model) + prodigy_job = ProdigyJob( + model, + self.params, + index=mi, + ) + jobs.append(prodigy_job) + + # Run CNS Jobs + self.log(f"Running {len(jobs)} Prodigy Jobs") + Engine = get_engine(self.params["mode"], self.params) + engine = Engine(jobs) + engine.run() + self.log("Prodigy jobs have finished") + + # Loop over results and set computed scores are attributes to models + successes: int = 0 + for model_score in engine.results: + # point score stored in engine + prodigy_score = model_score.score + model_index = model_score.index + # Point corresponding model + self.output_models[model_index].score = prodigy_score + if prodigy_score: + successes += 1 + + # Printing number of successful predictions + self.log( + f"Number of successful prodigy-ligand predictions: {successes:d} " + f"({successes * 100 / len(models_to_score):.2f} %)" + ) + + # Generate a tsv file containing the computed scores + output_fname = "prodigyligand.tsv" + self.log(f"Saving output to {output_fname}") + self.output(output_fname) + # Finalise module by exporting models + self.export_io_models() diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..cf0d3e2c5ba866ca3d20921a2d1b331bd93ebe2d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/defaults.yaml @@ -0,0 +1,76 @@ +receptor_chain: + default: "A" + type: string + minchars: 1 + maxchars: 1 + title: Chain ID of the receptor. + short: Chain ID of the receptor. + long: Chain ID of the receptor. Used to know what chain should be considered as receptor interacting with the ligand. + group: scoring + explevel: easy + +ligand_chain: + default: "B" + type: string + minchars: 1 + maxchars: 1 + title: Chain ID of the ligand. + short: Chain ID of the ligand. + long: Chain of the ligand to score. Used to know in which chain the ligand is found. + group: scoring + explevel: easy + +ligand_resname: + default: "UNK" + type: string + minchars: 1 + maxchars: 3 + title: Residue name of the ligand. + short: Residue name of the ligand. + long: Residue name of the ligand to score. Must be present in the ligand chain. + group: scoring + explevel: easy + +temperature: + default: 25.00 + type: float + min: -273.15 + max: 95.00 + precision: 2 + title: Temperature (°C) at which to perform the conversion to pKd. + short: Temperature (°C) at which to perform the conversion from deltaG (kcal.mol-1) to pKd. + long: Temperature (°C) at which to perform the conversion from deltaG (kcal.mol-1) to pKd. + group: conversion + explevel: easy + +electrostatics: + default: true + type: boolean + title: Use the electrostatic component. + short: Use the electrostatic component from the input model to make the prediction. + long: Use the electrostatic component from the input model to make the prediction, + if available. The electroststics must have been computed by HADDOCK and written + in the REMARK of the model. + group: scoring + explevel: expert + +to_pkd: + default: true + type: boolean + title: Converts binding affinity values to pKd. + short: Converts binding affinity values to pKd. + long: By default, prodigy-lig results in deltaG (kcal.mol-1), but this parameter allows to convert results to pKd. + group: conversion + explevel: easy + +distance_cutoff: + default: 10.5 + type: float + min: 1.00 + max: 100.00 + precision: 2 + title: Distance cutoff (Å) to extract amino-acids from the receptor. + short: Distance cutoff (Å) to extract amino-acids from the receptor. + long: Distance cutoff (Å) to extract amino-acids from the receptor in contact with the ligand. + group: scoring + explevel: expert diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/prodigylig.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/prodigylig.py new file mode 100644 index 0000000000000000000000000000000000000000..19abbff80d183d24b56e98b96c848a47b33984d9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyligand/prodigylig.py @@ -0,0 +1,85 @@ +"""Set of functionalities to run prodigy-ligand. + +DevNotes: +The magic happens in haddock/libs/libprodigy.py +""" + +from haddock.core.typing import FilePath, ParamDict +from haddock.libs.libontology import PDBFile +from haddock.libs.libprodigy import ProdigyBaseJob, ProdigyWorker + + +class ProdigyLigand(ProdigyWorker): + """Class managing the computation of protein-ligand with prodigy.""" + + def __init__(self, model: FilePath, params: ParamDict) -> None: + """Instantiate the class with superclass.""" + super().__init__(model, params) + # Hold specific parameters + self.receptor_chain = params["receptor_chain"] + self.lig_resname = params["ligand_resname"] + self.lig_chain = params["ligand_chain"] + self.use_electrostatics = params["electrostatics"] + + def evaluate_complex(self) -> float: + """Evaluate a complex with prodigy-lig. + + Returns + ------- + deltaG : float + The computed DeltaG of the input complex. + """ + from prodigy_lig.prodigy_lig import ( + basename, + extract_electrostatics, + FastMMCIFParser, + PDBParser, + ProdigyLig, + splitext, + ) + # Mimic prodigy-ligand main + fname, s_ext = splitext(basename(self.model)) + if s_ext in (".pdb", ".ent", ): + parser = PDBParser(QUIET=1) + elif s_ext == ".cif": + parser = FastMMCIFParser(QUIET=1) + + with open(self.model) as in_file: + # try to set electrostatics from input file if not provided by user + electrostatics = extract_electrostatics(in_file) + # Setup the prodigy lig object + prodigy_lig = ProdigyLig( + parser.get_structure(fname, in_file), + chains=[ + f"{self.receptor_chain},{self.lig_chain}", + f"{self.lig_chain}:{self.lig_resname}", + ], + electrostatics=electrostatics, + cutoff=self.dist_cutoff, + ) + # Run predictions + prodigy_lig.predict() + # Retrieve DeltaG + if self.use_electrostatics and prodigy_lig.dg_elec: + deltaG = prodigy_lig.dg_elec + else: + deltaG = prodigy_lig.dg + return deltaG + + +class ProdigyJob(ProdigyBaseJob): + """Managing the computation of prodigy scores within haddock3.""" + + def __init__( + self, + model: PDBFile, + params: ParamDict, + index: int = 1, + ) -> None: + """Instantiate the class with superclass.""" + super().__init__(model, params, index) + + @staticmethod + def get_worker() -> object: + """Return the appropriate worker.""" + return ProdigyLigand diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/._prodigy.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/._prodigy.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/._prodigy.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..65d8351cf45f4e8d838652bf77b7e91ed0f0ce25 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/__init__.py @@ -0,0 +1,94 @@ +"""PRODIGY protein complex scoring module + +This module performs the scoring of input complexes using PRODIGY (protein). +It predicts deltaG of the complex and can return predictions as either deltaG +or pKd values. + +Note that PRODIGY-protein is limited to natural amino-acids. +""" + +from pathlib import Path + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import FilePath +from haddock.libs.libontology import PDBFile +from haddock.libs.libprodigy import CheckInstall +from haddock.modules import get_engine +from haddock.modules.scoring import ScoringModule +from haddock.modules.scoring.prodigyprotein.prodigy import ProdigyJob + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(ScoringModule): + """HADDOCK3 module to perform energy minimization scoring.""" + + name = RECIPE_PATH.name + + def __init__( + self, + order: int, + path: Path, + initial_params: FilePath = DEFAULT_CONFIG, + ) -> None: + super().__init__(order, path, initial_params) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm module is installed.""" + CheckInstall() + return + + def _run(self) -> None: + """Execute module.""" + # Retrieve previous models + try: + models_to_score = self.previous_io.retrieve_models(individualize=True) + except Exception as e: + self.finish_with_error(e) + + # Pool of Prodigy jobs to be executed + jobs: list[ProdigyJob] = [] + self.output_models: list[PDBFile] = [] + + for mi, model in enumerate(models_to_score): + self.output_models.append(model) + prodigy_job = ProdigyJob( + model, + self.params, + index=mi, + ) + jobs.append(prodigy_job) + + # Run CNS Jobs + self.log(f"Running {len(jobs)} Prodigy Jobs") + Engine = get_engine(self.params["mode"], self.params) + engine = Engine(jobs) + engine.run() + self.log("Prodigy jobs have finished") + + # Loop over results and set computed scores are attributes to models + successes: int = 0 + for model_score in engine.results: + # point score stored in engine + prodigy_score = model_score.score + model_index = model_score.index + # Point corresponding model + self.output_models[model_index].score = prodigy_score + if prodigy_score: + successes += 1 + + # Printing number of successful predictions + self.log( + f"Number of successful prodigy-protein predictions: {successes:d} " + f"({successes * 100 / len(models_to_score):.2f} %)" + ) + + # Generate a tsv file containing the computed scores + output_fname = "prodigyprotein.tsv" + self.log(f"Saving output to {output_fname}") + self.output(output_fname) + # Finalise module by exporting models + self.export_io_models() diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..228abf1a142dc7e82501739b942331347eb66ce7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/defaults.yaml @@ -0,0 +1,64 @@ +chains: + default: [] + type: list + minitems: 0 + maxitems: 20 + title: Chains to be scored. + short: List of chains to be scored. If empty/unspecified, all inter-chains + contacts will be considered for the final prediction. + long: List of chains to be scored. If empty/unspecified, all inter-chains + contacts will be considered for the final prediction. In specific cases, + for example antibody-antigen complexes, some chains should be considered + as a single molecule. Use the chains parameter to provide a list of chains + that should be considered for the calculation. Use commas to include + multiple chains as part of a single group. + ["A", "B"] => Contacts calculated (only) between chains A and B. + ["A,B", "C"] => Contacts calculated (only) between chains A and C; and B and C. + ["A", "B", "C"] => Contacts calculated (only) between chains A and B; B and C; and A and C. + group: scoring + explevel: easy + +distance_cutoff: + default: 5.5 + type: float + min: 1.00 + max: 100.00 + precision: 2 + title: Distance cutoff (Å) to extract amino-acids in contact between the two chains. + short: Distance cutoff (Å) to extract amino-acids in contact between the two chains. + long: Distance cutoff (Å) to extract amino-acids in contact between the two chains. + group: scoring + explevel: expert + +accessibility_cutoff: + default: 0.05 + type: float + min: 0.00 + max: 1.00 + precision: 2 + title: Accessibility threshold for BSA analysis. + short: Accessibility threshold for BSA analysis. + long: Accessibility threshold for BSA analysis. + group: scoring + explevel: expert + +temperature: + default: 25.00 + type: float + min: -273.15 + max: 95.00 + precision: 2 + title: Temperature (°C) at which to perform the conversion to pKd. + short: Temperature (°C) at which to perform the conversion from deltaG (kcal.mol-1) to pKd. + long: Temperature (°C) at which to perform the conversion from deltaG (kcal.mol-1) to pKd. + group: conversion + explevel: easy + +to_pkd: + default: true + type: boolean + title: Converts binding affinity values to pKd. + short: Converts binding affinity values to pKd. + long: By default, prodigy-lig results in deltaG (kcal.mol-1), but this parameter allows to convert results to pKd. + group: conversion + explevel: easy diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/prodigy.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/prodigy.py new file mode 100644 index 0000000000000000000000000000000000000000..5e6621b295449f0bf349f64be80773e796f19d6c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/prodigyprotein/prodigy.py @@ -0,0 +1,78 @@ +"""Set of functionalities to run prodigy-protein. + +DevNotes: +The magic happens in haddock/libs/libprodigy.py +""" + +from haddock.core.typing import FilePath, Optional, ParamDict +from haddock.libs.libontology import PDBFile +from haddock.libs.libprodigy import ProdigyBaseJob, ProdigyWorker + + +class ProdigyProtein(ProdigyWorker): + """Class managing the computation of protein-protein with prodigy.""" + + def __init__(self, model: FilePath, params: ParamDict) -> None: + """Instantiate the class with superclass.""" + super().__init__(model, params) + # Hold specific parameters + self.acc_cutoff = params["accessibility_cutoff"] + self.chains = self.convert_chains(params["chains"]) + + @staticmethod + def convert_chains(chains: list[str]) -> Optional[list[str]]: + """Read and convert the `chains` parameter. + + Parameters + ---------- + chains : Optional[list[str]] + Content of the chains parameter as provided by the user. + + Returns + ------- + Optional[list[str]] + None or list of strings containing the chains. + """ + if len(chains) == 0: + return None + else: + # Removes potential spaces if user is inputing something wrong + # e.g.: "A, B" needs to be "A,B" + return [c.replace(" ", "") for c in chains] + + def evaluate_complex(self) -> float: + """Evaluate a complex with prodigy-prot. + + Returns + ------- + deltaG : float + The computed DeltaG of the input complex. + """ + from prodigy_prot.modules.prodigy import Prodigy + from prodigy_prot.modules.parsers import parse_structure + structure, _n_chains, _n_res = parse_structure(self.model) + prodigy = Prodigy(structure, self.chains, self.temperature) + prodigy.predict( + distance_cutoff=self.dist_cutoff, + acc_threshold=self.acc_cutoff, + ) + deltaG = prodigy.ba_val + return deltaG + + +class ProdigyJob(ProdigyBaseJob): + """Managing the computation of prodigy scores within haddock3.""" + + def __init__( + self, + model: PDBFile, + params: ParamDict, + index: int = 1, + ) -> None: + """Instantiate the class with superclass.""" + super().__init__(model, params, index) + + @staticmethod + def get_worker() -> object: + """Return the appropriate worker.""" + return ProdigyProtein diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/._sasascore.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/._sasascore.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/._sasascore.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ed82f39ebb20e0d4f396d329422a3fe4b5a2cc60 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/__init__.py @@ -0,0 +1,126 @@ +""" +Surface accessibility scoring module. + +This module performs a solvent accessibility analysis based on +some user-defined residues that should be buried or accessible. + +If a supposedly buried (resp. accessible) residue is accessible (resp. buried), +the score should increase by one. The lower the final score the more consistent +the model with the user data. + +To run this module, the user must provide a dictionary with the buried and/or accessible +residues. The keys of the dictionary should be the chain identifiers and the values +should be lists of residue numbers. + +Example: + +>>> resdic_buried_A: [1, 2, 3] +>>> resdic_accessible_B: [4, 5, 6] +""" +from pathlib import Path +import os + +from haddock.core.defaults import MODULE_DEFAULT_YAML +from haddock.core.typing import FilePath +from haddock.modules import get_engine +from haddock.modules.scoring import ScoringModule +from haddock.libs.libontology import PDBFile +from haddock.libs.libutil import parse_ncores +from haddock.libs.libparallel import get_index_list, Scheduler +from haddock.modules.scoring.sasascore.sasascore import ( + AccScore, + extract_data_from_accscore_class + ) + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +class HaddockModule(ScoringModule): + """HADDOCK3 module to perform accessibility scoring.""" + + name = RECIPE_PATH.name + + def __init__(self, + order: int, + path: Path, + initial_params: FilePath = DEFAULT_CONFIG) -> None: + super().__init__(order, path, initial_params) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm module is installed.""" + return + + def _run(self) -> None: + """Execute module.""" + try: + models_to_score = self.previous_io.retrieve_models( + individualize=True + ) + except Exception as e: + self.finish_with_error(e) + if self.params["mode"] == "mpi": + input_ncores_slurm = int(os.getenv('SLURM_CPUS_ON_NODE', 1)) + input_ncores_pbs = int(os.getenv('PBS_CPUS_ON_NODE', 1)) + ncores = max(input_ncores_slurm, input_ncores_pbs) + else: + ncores = self.params["ncores"] + # loading buried and accessible residue dictionaries + buried_resdic = { + key[-1]: value for key, value + in self.params.items() + if key.startswith("resdic_buried") + } + acc_resdic = { + key[-1]: value for key, value + in self.params.items() + if key.startswith("resdic_accessible") + } + # remove _ + buried_resdic.pop("_") + acc_resdic.pop("_") + + self.output_models: list[PDBFile] = [] + # initialize jobs + sasascore_jobs: list[AccScore] = [] + for i, model_to_be_evaluated in enumerate(models_to_score): + accscore_obj = AccScore( + model=model_to_be_evaluated, + path=Path("."), + buried_resdic=buried_resdic, + acc_resdic=acc_resdic, + cutoff=self.params["cutoff"], + probe_radius=self.params["probe_radius"], + identificator=i, + ) + sasascore_jobs.append(accscore_obj) + # append model to output models + self.output_models.append(model_to_be_evaluated) + + # Run sasascore Jobs using Scheduler + engine = Scheduler( + ncores=ncores, + tasks=sasascore_jobs, + ) + engine.run() + + # extract results and overwrite scores + sasascore_jobs = engine.results + sasascore_jobs = sorted(sasascore_jobs, + key=lambda accscore: accscore.identificator) + + for i, job in enumerate(sasascore_jobs): + pdb = self.output_models[i] + pdb.score = job.data[3] + output_name = Path("sasascore.tsv") + self.output(output_name) + + # now violations + viol_output_name = Path("violations.tsv") + extract_data_from_accscore_class( + sasascore_objects=sasascore_jobs, + violations_output_fname=viol_output_name + ) + + self.export_io_models() diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..4744f43e57ed14adfb658e005cbe2cb3d1586cb3 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/defaults.yaml @@ -0,0 +1,49 @@ +# +# Group scoring +# +cutoff: + default: 0.4 + type: float + min: 0.0 + max: 1.0 + precision: 3 + title: relative side chain surface accessibility cutoff + short: relative side chain surface accessibility cutoff + long: relative side chain surface accessibility cutoff. Residues with a relative side chain surface accessibility below this value are considered buried. + group: 'scoring' + explevel: easy +resdic_buried_: + default: [] + type: list + minitems: 0 + maxitems: 100 + title: List of residues supposed to be buried + short: List of residues supposed to be buried + long: resdic_buried_* is an expandable parameter. You can provide resdic_buried_A, + resdic_buried_B, resdic_buried_C, etc, where the last capital letter is the chain + identifier. + group: analysis + explevel: easy +resdic_accessible_: + default: [] + type: list + minitems: 0 + maxitems: 100 + title: List of residues supposed to be accessible + short: List of residues supposed to be accessible + long: resdic_* is an expandable parameter. You can provide resdic_accessible_A, + resdic_accessible_B, resdic_accessible_C, etc, where the last capital letter is the chain + identifier. + group: analysis + explevel: easy +probe_radius: + default: 1.4 + type: float + min: 0.0 + max: 10.0 + precision: 3 + title: Probe radius + short: Probe radius + long: Sets the probe radius (in Angstrom) used to compute solvent accessible surface area. + group: analysis + explevel: expert \ No newline at end of file diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/sasascore.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/sasascore.py new file mode 100644 index 0000000000000000000000000000000000000000..947f5e937a57c2e961764abb8a8f2990a2df5b70 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/scoring/sasascore/sasascore.py @@ -0,0 +1,151 @@ +"""Accessibility scoring calculations.""" +import copy +from pathlib import Path + +from typing import Optional + +from haddock.libs.libio import write_nested_dic_to_file +from haddock import log +from haddock.core.typing import ParamDict +from haddock.clis.restraints.calc_accessibility import ( + apply_cutoff, + get_accessibility, + ) + + +def calc_acc_score(result_dict, buried_resdic, acc_resdic): + """Calculate the accessibility score. + + The accessibility score is calculated as the sum of the number of + residues that are not in the correct category (buried or accessible). + + Parameters + ---------- + result_dict : dict + A dictionary with the results from the accessibility calculation. + + buried_resdic : dict + A dictionary with the buried residues. + + acc_resdic : dict + A dictionary with the accessible residues. + + Returns + ------- + acc_score : int + The accessibility score. + """ + # filter the residues + acc_score: int = 0 + b_viols: dict[str, set] = {} + a_viols: dict[str, set] = {} + for ch in result_dict: + if ch in buried_resdic: + # for every supposedly buried residue that is not buried, + # the score should increase by one. + b_viols[ch] = set(buried_resdic[ch]).intersection(result_dict[ch]) + buried_viol_sc = len(b_viols[ch]) + acc_score += buried_viol_sc + if ch in acc_resdic: + # now the opposite logic with the accessible amino acids. + a_viols[ch] = set(acc_resdic[ch]).difference(result_dict[ch]) + acc_viol_sc = len(a_viols[ch]) + acc_score += acc_viol_sc + return acc_score, b_viols, a_viols + + +class AccScore: + """AccScore class.""" + + def __init__( + self, + model, + path, + buried_resdic, + acc_resdic, + cutoff, + probe_radius, + identificator, + ): + """Initialise AccScore class.""" + self.model = model + self.path = path + self.buried_resdic = buried_resdic + self.acc_resdic = acc_resdic + self.cutoff = cutoff + self.data = [] + self.violations = [] + self.probe_radius = probe_radius + self.violations_data = [self.model.file_name] + self.identificator = identificator + + def run(self) -> None: + """Run accessibility calculations.""" + mod_path = str(Path(self.model.path, self.model.file_name)) + try: + access_data = get_accessibility(mod_path, + probe_radius=self.probe_radius) + result_dic = apply_cutoff(access_data, self.cutoff) + acc_sc, b_viols, a_viols = calc_acc_score(result_dic, + self.buried_resdic, + self.acc_resdic) + except AssertionError as e: + log.warning(f"Error in get_accessibility for {self.model}: {e}.") + acc_sc, b_viols, a_viols = None, None, None + self.data = [self.model.file_name, self.model.ori_name, self.model.md5, acc_sc] + for ch in self.buried_resdic: + if ch in b_viols and b_viols[ch] != set(): + buried_str = ",".join([str(res) for res in sorted(b_viols[ch])]) + self.violations_data.append(buried_str) + else: + self.violations_data.append(None) + for ch in self.acc_resdic: + if ch in a_viols and a_viols[ch] != set(): + acc_str = ",".join([str(res) for res in sorted(a_viols[ch])]) + self.violations_data.append(acc_str) + else: + self.violations_data.append(None) + return copy.deepcopy(self) + + +def extract_data_from_accscore_class(sasascore_objects: list[AccScore], + violations_output_fname: Path + ) -> Optional[dict[int, ParamDict]]: + """ + Extracts data attributes from a list of AccScore objects into a structured dictionary, + optionally sorts the data based on a specified key, and writes the sorted data to + a file. + + Args: + sasascore_objects (list[AccScore]): List of AccScore objects containing data attributes + to be extracted. + violations_output_fname (Path): Path to the output file with the sorted violations data + + Returns: + Optional[dict[int, ParamDict]]: The structured violations_data dictionary + Raises: + (Include any specific exceptions the function may raise) + """ + violations_data: dict[int, ParamDict] = {} + for i, sasa_obj in enumerate(sasascore_objects): + nbur = len(sasa_obj.buried_resdic) + + # fill in violations + violations_data[i] = { + "structure": sasa_obj.data[0], + } + for b, bur in enumerate(sasa_obj.buried_resdic): + bur_key = f"bur_{bur}" + violations_data[i].update( + {bur_key: sasa_obj.violations_data[b+1]} + ) + for a, acc in enumerate(sasa_obj.acc_resdic): + acc_key = f"acc_{acc}" + violations_data[i].update( + {acc_key: sasa_obj.violations_data[nbur+a+1]} + ) + + # violations do not need to be sorted + write_nested_dic_to_file(violations_data, violations_output_fname) + + return violations_data diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/._topoaa b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/._topoaa new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/._topoaa differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..29db3cd6576b0258f712894fffc6ea915ed35c65 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/__init__.py @@ -0,0 +1 @@ +"""HADDOCK3 modules to create topologies.""" diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/._cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/._cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/._cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/._defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/._defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/._defaults.yaml differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/__init__.py b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..30135ff012ae469defb2a4c452ef63fb5da46fdc --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/__init__.py @@ -0,0 +1,390 @@ +"""Create and manage CNS all-atom topology. + +The ``[topoaa]`` module is dedicated to the generation of CNS compatible +parameters (.param) and topologies (.psf) for each of the input structures. + +It will: +- Detect missing atoms, including hydrogens +- Re-build them when missing +- Build and write out topologies (psf) and coordinates (pdb) files + +This module is a pre-requisite to run any downstream modules using CNS. +Having access to parameters and topology is mandatory for any kind +of EM/MD related tasks. +Therefore this is the reason why the module [topoaa] is often used as first +module in a workflow. + +Note that for non-standard bio-molecules +(apart from standard amino-acids, some modified ones, DNA, RNA, ions +and carbohydrates ... see `detailed list of supported molecules +`_), +such as small-molecules, parameters and topology must be obtained and provided +by the user, as there is currently no built-in solution to generate +them on the fly. +""" + +import operator +import os +import re +from copy import deepcopy +from functools import partial +from pathlib import Path + +from haddock.core.defaults import MODULE_DEFAULT_YAML, cns_exec +from haddock.core.typing import FilePath, Optional, ParamDict, ParamMap, Union +from haddock.libs import libligand, libpdb +from haddock.libs.libcns import ( + find_desired_linkfiles, + generate_default_header, + load_workflow_params, + prepare_output, + prepare_single_input, +) +from haddock.libs.libontology import Format, PDBFile, TopologyFile +from haddock.libs.libstructure import make_molecules +from haddock.libs.libsubprocess import CNSJob +from haddock.modules import get_engine +from haddock.modules.base_cns_module import BaseCNSModule + + +RECIPE_PATH = Path(__file__).resolve().parent +DEFAULT_CONFIG = Path(RECIPE_PATH, MODULE_DEFAULT_YAML) + + +def generate_topology( + input_pdb: Path, + recipe_str: str, + defaults: ParamMap, + mol_params: ParamMap, + default_params_path: Optional[FilePath] = None, + write_to_disk: Optional[bool] = True, +) -> Union[Path, str]: + """Generate a HADDOCK topology file from input_pdb.""" + # generate params headers + general_param = load_workflow_params(**defaults) + input_mols_params = load_workflow_params(param_header="", **mol_params) + general_param = general_param + input_mols_params + + # generate default headers + _link, trans_vec, tensor, scatter, axis, water_box = generate_default_header( + path=default_params_path + ) + + output = prepare_output( + output_pdb_filename=f"{input_pdb.stem}_haddock{input_pdb.suffix}", + output_psf_filename=f"{input_pdb.stem}_haddock.{Format.TOPOLOGY}", + ) + + input_str = prepare_single_input(str(input_pdb)) + # Order CNS statements + inp_parts = ( + general_param, + input_str, + output, + trans_vec, + tensor, + scatter, + axis, + water_box, + recipe_str, + ) + # Combine all CNS statments as a single string + inp = "".join(inp_parts) + + if write_to_disk: + output_inp_filename = Path(f"{input_pdb.stem}.{Format.CNS_INPUT}") + output_inp_filename.write_text(inp) + return output_inp_filename + else: + return inp + + +class HaddockModule(BaseCNSModule): + """HADDOCK3 module to create CNS all-atom topologies.""" + + name = RECIPE_PATH.name + + def __init__( + self, order: int, path: Path, initial_params: FilePath = DEFAULT_CONFIG + ) -> None: + cns_script = RECIPE_PATH / "cns" / "generate-topology.cns" + super().__init__(order, path, initial_params, cns_script=cns_script) + + @classmethod + def confirm_installation(cls) -> None: + """Confirm if module is installed.""" + return + + @staticmethod + def get_md5(ensemble_f: FilePath) -> dict[int, str]: + """Get MD5 hash of a multi-model PDB file.""" + md5_dic: dict[int, str] = {} + text = Path(ensemble_f).read_text() + lines = text.split(os.linesep) + REMARK_lines = (line for line in lines if line.startswith("REMARK")) + remd5 = re.compile(r"^[a-f0-9]{32}$") + for line in REMARK_lines: + parts = line.strip().split() + + try: + idx = parts.index("MODEL") + except ValueError: # MODEL not in parts, this line can be ignored + continue + + # check if there's a md5 hash in line + for part in parts: + group = remd5.fullmatch(part) + if group: + # the model num comes after the MODEL + model_num = int(parts[idx + 1]) + md5_dic[model_num] = group.string # md5 hash + break + + return md5_dic + + @staticmethod + def get_ensemble_origin(ensemble_f: FilePath) -> dict[int, str]: + """Try to find origin for each model in ensemble. + + Parameters + ---------- + ensemble_f : FilePath + Path to a pdb file containing an ensemble. + + Returns + ------- + origin_dic : dict[int, str] + Dictionary holding as keys the modelID and values its origin. + """ + origin_dic: dict[int, str] = {} + text = Path(ensemble_f).read_text() + lines = text.split(os.linesep) + REMARK_lines = (line for line in lines if line.startswith("REMARK")) + re_origin = re.compile( + r"REMARK\s+MODEL\s+(\d+)\s+(FROM|from|From)\s+(([\w_-]+\.?)+)" + ) + for line in REMARK_lines: + if match := re_origin.search(line): + model_num = int(match.group(1).strip()) + original_path = match.group(3).strip() + original_name = Path(original_path).stem + origin_dic[model_num] = original_name + return origin_dic + + def _run(self) -> None: + """Execute module.""" + if self.order == 0: + # topoaa is the first step in the workflow + molecules = make_molecules(self.params.pop("molecules")) + + else: + # in case topoaa is not the first step, the topology is rebuilt for + # each retrieved model + _molecules = self.previous_io.retrieve_models() + molecules_paths: list[Path] = [mol.rel_path for mol in _molecules] # type: ignore + molecules = make_molecules(molecules_paths, no_parent=True) + + # extracts `input` key from params. The `input` keyword needs to + # be treated separately + mol_params: ParamDict = {} + for k in list(self.params.keys()): + if k.startswith("mol") and k[3:].isdigit(): + mol_params[k] = self.params.pop(k) + + # to facilitate the for loop down the line, we create a list with the + # keys of `mol_params` with inverted order (we will use .pop) + mol_params_keys = list(mol_params.keys())[::-1] + + # limit is only useful when order == 0 + if self.order == 0 and self.params["limit"]: + mol_params_get = mol_params_keys.pop + + # `else` is used in any case where limit is False. + else: + mol_params_get = partial(operator.getitem, mol_params_keys, -1) + + # Pool of jobs to be executed by the CNS engine + jobs: list[CNSJob] = [] + + models_dic: dict[int, list[Path]] = {} + ens_dic: dict[int, dict[int, str]] = {} + origi_ens_dic: dict[int, dict[int, str]] = {} + for i, molecule in enumerate(molecules, start=1): + self.log(f"Molecule {i}: {molecule.file_name.name}") + models_dic[i] = [] + # Copy the molecule to the step folder + + # Split models + self.log( + f"Split models if needed for {molecule.with_parent}", + level="debug", + ) + # these come already sorted + splited_models = libpdb.split_ensemble( + molecule.with_parent, + dest=Path.cwd(), + ) + + # get the MD5 hash of each model + ens_dic[i] = self.get_md5(molecule.with_parent) + origi_ens_dic[i] = self.get_ensemble_origin(molecule.with_parent) + # nice variable name, isn't it? :-) + # molecule parameters are shared among models of the same molecule + parameters_for_this_molecule = deepcopy(mol_params[mol_params_get()]) + + # Extract termini parameters + charged_nter = parameters_for_this_molecule.pop("charged_nter") + charged_cter = parameters_for_this_molecule.pop("charged_cter") + phosphate_5 = parameters_for_this_molecule.pop("5_phosphate") + self.log( + f"Termini of molecule {i}:{os.linesep}" + f" N-ter: {'un' if not charged_nter else ''}charged" + f" C-ter: {'un' if not charged_cter else ''}charged" + f" 5'phosphate: {'yes' if phosphate_5 else 'no'}" + ) + # Find appropriate link files for this molecule + link_files = find_desired_linkfiles( + charged_nter=charged_nter, + charged_cter=charged_cter, + phosphate_5=phosphate_5, + path=self.toppar_path, + ) + # Update molecule parameters with full path to link files + parameters_for_this_molecule.update(link_files) + + # Loop over molecules conformations + for _task_id, model in enumerate(splited_models): + self.log(f"Sanitizing molecule {model.name}") + models_dic[i].append(model) + + if self.params["ligand_top_fname"]: + custom_top = self.params["ligand_top_fname"] + self.log(f"Using custom topology {custom_top}") + libpdb.sanitize( + model, + overwrite=True, + custom_topology=custom_top, + ) + _params = self.params + + elif self.params["autotoppar"]: + # No `ligand_top_fname` was provided, check if there are any unknown molecules + unknown = libligand.identify_unknown_hetatms(model) + if unknown: + self.log( + f"Unknown ligand(s) {unknown} detected, " + "running PRODRG to generate topology" + ) + top_path = "" + par_path = "" + try: + top_path, par_path = libligand.run_prodrg(model, Path(".")) + except RuntimeError as e: + self.finish_with_error( + f"Your input contains unknown atoms, you did not provide the `top`/`param` files and we could not execute PRODRG to get them automatically: {e}" + ) + # Inject the automated toppar into the params for module + _params = { + **self.params, + "ligand_top_fname": top_path, + "ligand_param_fname": par_path, + } + # Overwrite `ligand_top_fname` and `ligand_param_fname` in the following modules + # this means that if these were NOT defined in other modules, they will take the + # values defined here + self._output_params["ligand_top_fname"] = top_path + self._output_params["ligand_param_fname"] = par_path + + libpdb.sanitize(model, overwrite=True, custom_topology=top_path) + else: + self.log("No unknown atoms found") + _params = self.params + else: + libpdb.sanitize(model, overwrite=True) + _params = self.params + + # Prepare generation of topologies jobs + topoaa_input = generate_topology( + model, + self.recipe_str, + _params, + parameters_for_this_molecule, + default_params_path=self.toppar_path, + write_to_disk=self.params["debug"], + ) + + self.log("Topology CNS input created") + + # Add new job to the pool + output_filename = Path(f"{model.stem}.{Format.CNS_OUTPUT}") + err_fname = f"{model.stem}.cnserr" + job = CNSJob( + topoaa_input, + output_filename, + err_fname, + envvars=self.envvars, + cns_exec=cns_exec, + ) + + jobs.append(job) + + # Run CNS Jobs + self.log(f"Running CNS Jobs n={len(jobs)}") + Engine = get_engine(self.params["mode"], self.params) + engine = Engine(jobs) + engine.run() + self.log("CNS jobs have finished") + + # Check for generated output, fail it not all expected files + # are found + expected: dict[int, dict[int, PDBFile]] = {} + for i in models_dic: + expected[i] = {} + md5_dic = ens_dic[i] + origin_names = origi_ens_dic[i] + for j, model in enumerate(models_dic[i]): + md5_hash = None + try: + model_id = int(model.stem.split("_")[-1]) + except ValueError: + model_id = 0 + + if model_id in md5_dic: + md5_hash = md5_dic[model_id] + + model_name = model.stem + processed_pdb = Path(f"{model_name}_haddock.{Format.PDB}") + processed_topology = Path(f"{model_name}_haddock.{Format.TOPOLOGY}") + + # Check if origin or md5 is available + if md5_hash or model_id in origin_names.keys(): + # Select prefix + if md5_hash: + prefix_name = md5_hash + else: + prefix_name = origin_names[model_id] + # Check if topology and file created + if processed_pdb.exists() and processed_topology.exists(): + # Build new filename + model_name = f"{prefix_name}_from_{model_name}" + # Rename files + processed_pdb = processed_pdb.rename( + f"{model_name}_haddock.{Format.PDB}" + ) + processed_topology = processed_topology.rename( + f"{model_name}_haddock.{Format.TOPOLOGY}" + ) + + topology = TopologyFile(processed_topology, path=".") + pdb = PDBFile( + file_name=processed_pdb, + topology=topology, + path=".", + md5=md5_hash, + ) + pdb.ori_name = model.stem + expected[i][j] = pdb + + # Save module information + self.output_models = list(expected.values()) # type: ignore + self.export_io_models(faulty_tolerance=self.params["tolerance"]) diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._auto-his.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._auto-his.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._auto-his.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._bondglycans.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._bondglycans.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._bondglycans.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._build-missing.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._build-missing.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._build-missing.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._check_coordinates.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._coval-ace-cys.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._coval-ace-cys.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._coval-ace-cys.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._covalheme.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._covalheme.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._covalheme.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._dna_break.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._dna_break.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._dna_break.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._generate-topology.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._generate-topology.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._generate-topology.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._patch-bb-cg.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._patch-bb-cg.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._patch-bb-cg.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._patch-types-cg.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._patch-types-cg.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._patch-types-cg.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._prot_break.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._prot_break.cns new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/._prot_break.cns differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/auto-his.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/auto-his.cns new file mode 100644 index 0000000000000000000000000000000000000000..1fa5cdab445bdfa316860a3a027db03f398cbd43 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/auto-his.cns @@ -0,0 +1,141 @@ +! auto-his.cns +! Automatically define the protonation state of histidines +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +{- turn on electrostatic and proper non-bonded-} +parameter + nbonds + repel=0 + nbxmod=5 atom cdie shift + cutnb=9.5 ctofnb=8.5 ctonnb=6.5 eps=10.0 e14fac=0.4 inhibit 0.25 + wmin=0.5 + tolerance 0.5 + end +end + +flags exclude * include bond angl impr dihe vdw elec end + +evaluate ($nhisd = 0) +evaluate ($nhise = 0) + +for $id1 in id ( resn HIS and name CA ) loop hisp + + evaluate ($hisdpatch = false) + evaluate ($hisepatch = false) + evaluate ($hiselec = 9999999) + + igroup interaction (not all) (not all) end + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + do (refx = x) (all) + do (refy = y) (all) + do (refz = z) (all) + + igroup interaction (segid $segid1 and resid $resid1) (not (segid $segid1 and resid $resid1)) end + minimize powell nstep=10 drop=40.0 nprint=5 end + energy end + evaluate ($hiselec = $elec) + + do (x = refx) (all) + do (y = refy) (all) + do (z = refz) (all) + + !change partial charges of HIS side-chain to minic HISD + + do (charge = 0.00) (segid $segid1 and resid $resid1 and name CB) + do (charge = 0.13) (segid $segid1 and resid $resid1 and name CG) + do (charge = -0.57) (segid $segid1 and resid $resid1 and name ND1) + do (charge = 0.42) (segid $segid1 and resid $resid1 and name HD1) + do (charge = 0.10) (segid $segid1 and resid $resid1 and name CD2) + do (charge = -0.49) (segid $segid1 and resid $resid1 and name NE2) + do (charge = 0.41) (segid $segid1 and resid $resid1 and name CE1) + do (charge = 0.00) (segid $segid1 and resid $resid1 and name HE2) + + minimize powell nstep=10 drop=40.0 nprint=5 end + energy end + if ($elec < $hiselec) then + evaluate ($hiselec = $elec) + evaluate ($hisdpatch = true) + end if + + do (x = refx) (all) + do (y = refy) (all) + do (z = refz) (all) + + !change partial charges of HIS side-chain to minic HISE + + do (charge = 0.00) (segid $segid1 and resid $resid1 and name CB) + do (charge = 0.13) (segid $segid1 and resid $resid1 and name CG) + do (charge = -0.49) (segid $segid1 and resid $resid1 and name ND1) + do (charge = 0.00) (segid $segid1 and resid $resid1 and name HD1) + do (charge = 0.10) (segid $segid1 and resid $resid1 and name CD2) + do (charge = -0.57) (segid $segid1 and resid $resid1 and name NE2) + do (charge = 0.41) (segid $segid1 and resid $resid1 and name CE1) + do (charge = 0.42) (segid $segid1 and resid $resid1 and name HE2) + + minimize powell nstep=10 drop=40.0 nprint=5 end + energy end + if ($elec < $hiselec) then + evaluate ($hiselec = $elec) + evaluate ($hisepatch = true) + evaluate ($hisdpatch = false) + end if + + !change partial charges of HIS side-chain to the initial default + + do (charge = 0.00) (segid $segid1 and resid $resid1 and name CB) + do (charge = 0.33) (segid $segid1 and resid $resid1 and name CG) + do (charge = -0.54) (segid $segid1 and resid $resid1 and name ND1) + do (charge = 0.46) (segid $segid1 and resid $resid1 and name HD1) + do (charge = 0.33) (segid $segid1 and resid $resid1 and name CD2) + do (charge = -0.54) (segid $segid1 and resid $resid1 and name NE2) + do (charge = 0.50) (segid $segid1 and resid $resid1 and name CE1) + do (charge = 0.46) (segid $segid1 and resid $resid1 and name HE2) + + do (x = refx) (all) + do (y = refy) (all) + do (z = refz) (all) + + if ($hisdpatch = true) then + evaluate ($nhisd = $nhisd + 1) + evaluate ($seg1.$nhisd=$segid1) + evaluate ($res1.$nhisd=$resid1) + end if + if ($hisepatch = true) then + evaluate ($nhise = $nhise + 1) + evaluate ($seg2.$nhise=$segid1) + evaluate ($res2.$nhise=$resid1) + end if + +end loop hisp + +evaluate ($counter=1) +while ( $counter <= $nhisd ) loop hisd + buffer message + display Patching histidine $res1.$counter to HISD + end + patch hisd reference=nil=(segid $seg1.$counter and resid $res1.$counter) end + evaluate ($counter=$counter+1) +end loop hisd + +evaluate ($counter=1) +while ( $counter <= $nhise ) loop hise + buffer message + display Patching histidine $res2.$counter to HISE + end + patch hise reference=nil=(segid $seg2.$counter and resid $res2.$counter) end + evaluate ($counter=$counter+1) +end loop hise + +igroup interaction (all) (all) end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/bondglycans.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/bondglycans.cns new file mode 100644 index 0000000000000000000000000000000000000000..422fc1457f4d84c406157c2d27494c3081790e53 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/bondglycans.cns @@ -0,0 +1,728 @@ +! +! Patches covalent bonds involving N-linked carbohydrates. +! +! Adapted from CNS 1.3 +! modules/xtal/mtfautogenerate +! +! *********************************************************************** +! * Copyright 2020 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +checkversion 1.3 + +display +display autogenerating linkages involving N-linked carbohydrates +display + +define +( + {- define all alpha anomer carbo residues for the links below -} + alpha= ( resname GLC or resname GLA or resname MAN or resname NDG or resname A2G or resname FUC or resname FCA or resname NDG + or resname MMA or resname XYS or resname RAM or resname ABE); + + {- define all beta anomer carbo residues for the links below -} + beta= ( resname BGC or resname GAL or resname BMA or resname NAG or resname NGA or resname FUL or resname FCB or resname XYP + or resname NAG or resname NGA or resname BDP); + + {- Maximum distance between linkable atoms -} + carbo_dist= 2.0; +) + +{- this is OK here after reading the coordinates since the various -} +{- patches used here do not create or rename atoms -} + +{- first we build a data structure for the patches, and then apply the patches later -} +{- the reason we do it this way is that patch may delete or add atoms which will currently + reset the STORE and loop arrays -} + +eval ($npatch=0) + +{- NAG-C1 or NGA-C1 or NDG-C1 or BGC-C1 to ASN-ND2 -} +for $id1 in id ( (resname NAG or resname NGA or resname NDG or resname BGC) and name C1 and known ) loop B1Na + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + + for $id2 in id ( resname ASN and name ND2 and known ) loop B1Nb + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="NDG") then + evaluate ($pres.$npatch="B1N") ! force to beta anomer, ATB 02/03/2010 + display warning: unusual NDG to ASN patch for NDG segid= $segid1 resid= $resid1 - forced to beta anomer + else + evaluate ($pres.$npatch="B1N") + buffer message + display ASN-glycosylation detected for $resid2 of chain $segid2 + end + + end if + end if + + end loop B1Nb + +end loop B1Na + +{- NAG-C1 or NGA-C1 or NDG-C1 or BGC-C1 to THR-OG1 -} +for $id1 in id ( (resname NAG or resname NGA or resname NDG or resname BGC) and name C1 and known ) loop B1Ta + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + + for $id2 in id ( resname THR and name OG1 and known ) loop B1Tb + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="NDG") then + evaluate ($pres.$npatch="B1T") ! force to beta anomer, ATB 02/03/2010 + display warning: unusual NDG to THR patch for NDG segid= $segid1 resid= $resid1 - forced to beta anomer + else + evaluate ($pres.$npatch="B1T") + buffer message + display THR-glycosylation detected for $resid2 of chain $segid2 + end + + end if + end if + + end loop B1Tb + +end loop B1Ta + +{- A11: GLC to GLC -} +for $id1 in id ( (resname GLC) and name C1 and known ) loop A11a + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + for $id2 in id ( (resname GLC) and name O1 and known ) loop A11b + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + evaluate ($pres.$npatch="A11") + end if + + end loop A11b + +end loop A11a + +{- A23: GAL, NGA to SIA, SIB -} +for $id1 in id ( (resname GAL or resname NGA) and name C2 and known ) loop A23a + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + for $id2 in id ( (resname SIA or resname SIB) and name O3 and known ) loop A23b + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + evaluate ($pres.$npatch="A23") + end if + + end loop A23b + +end loop A23a + +{- A23: SIA,SIB to GAL,NGA -} +for $id1 in id ( (resname SIA or resname SIB) and name C2 and known ) loop A23c + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + for $id2 in id ( (resname GAL or resname NGA) and name O3 and known ) loop A23d + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + evaluate ($pres.$npatch="A23") + end if + + end loop A23d + +end loop A23c + +{- A26: GAL,NGA to SIA,SIB -} +for $id1 in id ( (resname GAL or resname NGA) and name C2 and known ) loop A26a + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + for $id2 in id ( (resname SIA or resname SIB) and name O6 and known ) loop A26b + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + evaluate ($pres.$npatch="A26") + end if + + end loop A26b + +end loop A26a + +{- A26: SIA,SIB to GAL,NGA -} +for $id1 in id ( (resname SIA or resname SIB) and name C2 and known ) loop A26c + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + for $id2 in id ( (resname GAL or resname NGA) and name O6 and known ) loop A26d + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + evaluate ($pres.$npatch="A26S") + end if + + end loop A26d + +end loop A26c + +{- A28: SIA,SIB to SIA,SIB -} +for $id1 in id ( (resname SIA or resname SIB) and name C2 and known ) loop A28a + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + for $id2 in id ( (resname SIA or resname SIB) and name O8 and known ) loop A28b + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + evaluate ($pres.$npatch="A28S") + end if + + end loop A28b + +end loop A28a + +{- now the beta-anomer to any links -} +{- for B12: beta(1,2) link from beta-anomer to any -} +ident (store2) ( ( &alpha or &beta ) and name O2 and known ) +{- for B13: beta(1,3) link from beta-anomer to any -} +ident (store3) ( ( &alpha or &beta ) and name O3 and known ) +{- for B14: beta(1,4) link from beta-anomer to any -} +ident (store4) ( ( &alpha or &beta ) and name O4 and known ) +{- for B16: beta(1,6) link from beta-anomer to any -} +ident (store6) ( ( &alpha or &beta ) and name O6 and known ) + +for $id1 in id ( &beta and name C1 and known ) loop B1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + + for $id2 in id ( recall2 ) loop B12 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUL") then + evaluate ($pres.$npatch="B12L") + else + evaluate ($pres.$npatch="B12") + end if + end if + end if + + end loop B12 + + for $id2 in id ( recall3 ) loop B13 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUL") then + evaluate ($pres.$npatch="B13L") + else + evaluate ($pres.$npatch="B13") + end if + end if + end if + + end loop B13 + + for $id2 in id ( recall4 ) loop B14 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUL") then + evaluate ($pres.$npatch="B14L") + else + evaluate ($pres.$npatch="B14") + end if + end if + end if + + end loop B14 + + for $id2 in id ( recall6 ) loop B16 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUL") then + evaluate ($pres.$npatch="B16L") + else + evaluate ($pres.$npatch="B16") + end if + end if + end if + + end loop B16 + +end loop B1 + +{- now the alpha anomer to any links -} +{- for A12: alpha(1,2) link from alpha-anomer to any -} +ident (store2) ( ( &alpha or &beta) and name O2 and known ) +{- for A13: alpha(1,3) link from alpha-anomer to any -} +ident (store3) ( ( &alpha or &beta) and name O3 and known ) +{- for A14: alpha(1,4) link from alpha-anomer to any -} +ident (store4) ( ( &alpha or &beta) and name O4 and known ) +{- for A16: alpha(1,6) link from alpha-anomer to any -} +ident (store6) ( ( &alpha or &beta) and name O6 and known ) + +for $id1 in id ( &alpha and name C1 and known ) loop A1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + + for $id2 in id ( recall2 ) loop A12 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUC") then + evaluate ($pres.$npatch="A12L") + else + evaluate ($pres.$npatch="A12") + end if + end if + end if + + end loop A12 + + for $id2 in id ( recall3 ) loop A13 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUC") then + evaluate ($pres.$npatch="A13L") + else + evaluate ($pres.$npatch="A13") + end if + end if + end if + + end loop A13 + + for $id2 in id ( recall4 ) loop A14 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUC") then + evaluate ($pres.$npatch="A14L") + else + evaluate ($pres.$npatch="A14") + end if + end if + end if + + end loop A14 + + for $id2 in id ( recall6 ) loop A16 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + evaluate ($identical=false) + if ($resid1 = $resid2) then + if ($segid1 = $segid2) then + evaluate ($identical=true) + end if + end if + + if ($identical=false) then + show (x) ( id $id1 ) evaluate ($x1=$result) + show (y) ( id $id1 ) evaluate ($y1=$result) + show (z) ( id $id1 ) evaluate ($z1=$result) + show (x) ( id $id2 ) evaluate ($x2=$result) + show (y) ( id $id2 ) evaluate ($y2=$result) + show (z) ( id $id2 ) evaluate ($z2=$result) + evaluate ($distance=sqrt( ($x1-$x2)^2 + ($y1-$y2)^2 + ($z1-$z2)^2 )) + + if ( $distance <= &carbo_dist ) then + evaluate ($npatch=$npatch+1) + evaluate ($seg1.$npatch=$segid1) + evaluate ($seg2.$npatch=$segid2) + evaluate ($res1.$npatch=$resid1) + evaluate ($res2.$npatch=$resid2) + if ($resname1="FUC") then + evaluate ($pres.$npatch="A16L") + else + evaluate ($pres.$npatch="A16") + end if + end if + end if + + end loop A16 + +end loop A1 + + +{- now we apply all the patches -} +evaluate ($counter=1) +while ( $counter <= $npatch ) loop patc + + patch $pres.$counter + reference=-=(segid $seg1.$counter and resid $res1.$counter) + reference=+=(segid $seg2.$counter and resid $res2.$counter) + end + + display $pres.$counter link added: $seg1.$counter[a4] $res1.$counter[a4] to $seg2.$counter[a4] $res2.$counter[a4] + evaluate ($counter=$counter+1) +end loop patc diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/build-missing.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/build-missing.cns new file mode 100644 index 0000000000000000000000000000000000000000..710629e31248e57f45f9a1c2384d34e4619a10cd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/build-missing.cns @@ -0,0 +1,296 @@ +! build-missing.cns +! build missing atoms +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +define(atom_build=(not(known))) + +identity (store9) (none) + +identity (store9) (&atom_build) +if ( &hydrogen_build = "all" ) then + identity (store9) (store9 or hydrogen) +elseif ( &hydrogen_build = "unknown" ) then + identity (store9) (store9 or (not(known) and hydrogen)) +end if + +show sum(1) (store9) +evaluate ($tobuild=$result) + +if ( $tobuild > 0 ) then + + fix selection=(not(store9)) end + + show sum(1) (store9) + evaluate ($moving=$result) + + if ( $moving > 0 ) then + for $id in id (tag and byres(store9)) loop avco + + show ave(x) (byres(id $id) and known) + evaluate ($ave_x=$result) + show ave(y) (byres(id $id) and known) + evaluate ($ave_y=$result) + show ave(z) (byres(id $id) and known) + evaluate ($ave_z=$result) + + do (x=$ave_x) (byres(id $id) and store9) + do (y=$ave_y) (byres(id $id) and store9) + do (z=$ave_z) (byres(id $id) and store9) + + !The following is to deal with problems with THY methyl group + show (x) (byres(id $id) and known and name C7) + evaluate ($ave_x=$result) + show ave(y) (byres(id $id) and known and name C7) + evaluate ($ave_y=$result) + show ave(z) (byres(id $id) and known and name C7) + evaluate ($ave_z=$result) + + do (x=$ave_x) (byres(id $id) and store9 and name H7*) + do (y=$ave_y) (byres(id $id) and store9 and name H7*) + do (z=$ave_z) (byres(id $id) and store9 and name H7*) + + end loop avco + + ! Assign average b-factor of known atoms to unknown ones + if ($set_bfactor = false) then + for $id in id (tag and byres(store9)) loop bfac + show ave(b) (byres(id $id) and not store9) + do (b=$result) (byres(id $id) and store9) + end loop bfac + end if + + ! Better initial position for rebuilding if atoms to which a missing atom is bonded to exist + for $id in id (store9) loop bndto + + show sum(1) (bondedto(id $id) and known) + if ($result > 0) then + show ave(x) (bondedto(id $id) and known) + evaluate ($ave_x=$result) + show ave(y) (bondedto(id $id) and known) + evaluate ($ave_y=$result) + show ave(z) (bondedto(id $id) and known) + evaluate ($ave_z=$result) + end if + + end loop bndto + + for $id in id (store9) loop radis + do (x=x+2*random(1.0)-1) (id $id) + do (y=y+2*random(1.0)-1) (id $id) + do (z=z+2*random(1.0)-1) (id $id) + end loop radis + + {- start parameter for the side chain building -} + parameter + nbonds + rcon=20. nbxmod=-2 repel=0.9 wmin=0.1 tolerance=1. + rexp=2 irexp=2 inhibit=0.25 + end + end + + {- Friction coefficient, in 1/ps. -} + do (fbeta=100) (store9) + + evaluate ($bath=300.0) + evaluate ($nstep=500) + evaluate ($timestep=0.0005) + + do (refy=mass) (store9) + + do (mass=20) (store9) + + igroup interaction + (store9) (store9 or known) + end + + {- turn on initial energy terms -} + flags exclude * include bond angle vdw end + + minimize powell nstep=50 nprint=10 end + + set seed=$iniseed end + + do (vx=maxwell($bath)) (store9) + do (vy=maxwell($bath)) (store9) + do (vz=maxwell($bath)) (store9) + + flags exclude vdw include impr end + + dynamics cartesian + nstep=50 + timestep=$timestep + tcoupling=true temperature=$bath + nprint=$nstep + cmremove=false + end + + flags include vdw end + + minimize powell nstep=50 nprint=10 end + + set seed=$iniseed end + + do (vx=maxwell($bath)) (store9) + do (vy=maxwell($bath)) (store9) + do (vz=maxwell($bath)) (store9) + + dynamics cartesian + nstep=50 + timestep=$timestep + tcoupling=true temperature=$bath + nprint=$nstep + cmremove=false + end + + parameter + nbonds + rcon=2. nbxmod=-3 repel=0.75 + end + end + + minimize powell nstep=100 nprint=25 end + + set seed=$iniseed end + + do (vx=maxwell($bath)) (store9) + do (vy=maxwell($bath)) (store9) + do (vz=maxwell($bath)) (store9) + + dynamics cartesian + nstep=$nstep + timestep=$timestep + tcoupling=true temperature=$bath + nprint=$nstep + cmremove=false + end + + {- turn on all energy terms -} + flags include dihe ? end + + {- set repel to ~vdw radii -} + parameter + nbonds + repel=0.89 + end + end + + minimize powell nstep=500 nprint=50 end + + flags exclude * include bond angl impr dihe vdw elec end + + minimize powell nstep=500 nprint=50 end + + {- return masses to something sensible -} + do (mass=refy) (store9) + + set seed=$iniseed end + + do (vx=maxwell($bath)) (store9) + do (vy=maxwell($bath)) (store9) + do (vz=maxwell($bath)) (store9) + + dynamics cartesian + nstep=$nstep + timestep=$timestep + tcoupling=true temperature=$bath + nprint=$nstep + cmremove=false + end + + {- some final minimisation -} + minimize powell nstep=500 drop=40.0 nprint=50 end + + print thres=0.02 bonds + print thres=5. angles + + end if + + noe reset end + rest dihe reset end + + + ! Check for D-amino acids + + for $id in id ( name HA and not resn GLY ) loop ltod + + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) (id $id) + evaluate ($resid=$result) + show (resn) (id $id) + evaluate ($resn=$result) + + show ave(x) (segid $segid and resid $resid and (name CB or name C or name N) and known) + evaluate ($ave_x=$result) + show ave(y) (segid $segid and resid $resid and (name CB or name C or name N) and known) + evaluate ($ave_y=$result) + show ave(z) (segid $segid and resid $resid and (name CB or name C or name N) and known) + evaluate ($ave_z=$result) + show ave(x) (segid $segid and resid $resid and name CA and known) + evaluate ($ha_x=3*$result-2*$ave_x) + show ave(y) (segid $segid and resid $resid and name CA and known) + evaluate ($ha_y=3*$result-2*$ave_y) + show ave(z) (segid $segid and resid $resid and name CA and known) + evaluate ($ha_z=3*$result-2*$ave_z) + + do (x=$ha_x) (segid $segid and resid $resid and name HA) + do (y=$ha_y) (segid $segid and resid $resid and name HA) + do (z=$ha_z) (segid $segid and resid $resid and name HA) + + flags exclude * include bond angle vdw end + minimize powell nstep=50 drop=40.0 nprint=50 end + + pick impr + (segid $segid and resid $resid and name HA) + (segid $segid and resid $resid and name N) + (segid $segid and resid $resid and name C) + (segid $segid and resid $resid and name CB) + geometry + + if ($result lt 0) then + patch LTOD reference=nil=(segid $segid and resid $resid) end + buffer message + display D-amino acid detected for $resn $resid of chain $segid + end + flag exclude * include bond impr end + minimize powell nstep=50 drop=10.0 nprint=10 end + flag include angle end + minimize powell nstep=50 drop=10.0 nprint=10 end + flag include vdw end + minimize powell nstep=50 drop=10.0 nprint=10 end + end if + + end loop ltod + + fix selection=( none ) end + + flag incl noe cdih end + print threshold=0.3 noe + print threshold=5. cdih + + energy end + + print threshold=0.3 noe + print threshold=5. cdih + print thres=0.02 bonds + print thres=5. angles + flag excl noe cdih end + +end if + +do (store2=0) (all) +for $id in id (tag and name BB) loop cgmodel + do (store2=1) (byres(id $id)) +end loop cgmodel + +fix sele=(attr store2 = 0) end +minimize powell nstep=50 drop=40.0 nprint=10 end + +fix selection=( none ) end diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/check_coordinates.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/check_coordinates.cns new file mode 100644 index 0000000000000000000000000000000000000000..d23c8e64804060c61ff6aeea38925dc8e61dc8d6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/check_coordinates.cns @@ -0,0 +1,100 @@ +! check_coordinates.cns +! Check max/min coordinates for compatibility with PDB format +! +! *********************************************************************** +! * Copyright 2025 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($failure = false) + +!check for coordinates >9999.999 (max writable in PDB format) + +show max (x) (all) +evaluate ($maxcoor = $result) +show max (y) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +show max (z) (all) +if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) +end if +if ($maxcoor gt 9999.999) then + evaluate ($failure = true) +end if + +!check for coordinates <-999.999 (min writable in PDB format) + +show min (x) (all) +evaluate ($mincoor = $result) +show min (y) (all) +if ($result lt $mincoor) then + evaluate ($maxcoor = $result) +end if +show min (z) (all) +if ($result lt $mincoor) then + evaluate ($mincoor = $result) +end if +if ($mincoor lt -999.999) then + evaluate ($failure = true) +end if + +!if problem detected try correcting it by centering the system around 4500,4500,4500 +!but only if no EM restraints are used + +if ($failure eq true) then + if ($data.flags.em eq false) then + + evaluate ($xc = 0.0) + evaluate ($yc = 0.0) + evaluate ($zc = 0.0) + show ave (x) (all) + evaluate ($xc = 4500 - $result) + show ave (y) (all) + evaluate ($yc = 4500 - $result) + show ave (z) (all) + evaluate ($zc = 4500 -$result) + + do (x = x + $xc) (all) + do (y = y + $yc) (all) + do (z = z + $zc) (all) + + evaluate ($failure = false) + evaluate ($maxcoor = -999) + evaluate ($mincoor = 9999) + !check again for coordinates >9999.999 (max writable in PDB format) + show max (x) (all) + evaluate ($maxcoor = $result) + show max (y) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + show max (z) (all) + if ($result gt $maxcoor) then + evaluate ($maxcoor = $result) + end if + if ($maxcoor gt 9999.999) then + evaluate ($failure = true) + end if + + !check for coordinates <-999.999 (min writable in PDB format) + show min (x) (all) + evaluate ($mincoor = $result) + show min (y) (all) + if ($result lt $mincoor) then + evaluate ($maxcoor = $result) + end if + show min (z) (all) + if ($result lt $mincoor) then + evaluate ($mincoor = $result) + end if + if ($mincoor lt -999.999) then + evaluate ($failure = true) + end if + end if +end if + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/coval-ace-cys.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/coval-ace-cys.cns new file mode 100644 index 0000000000000000000000000000000000000000..0536f6d8c1bc11b85d3a1448b7991cfc504ef11a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/coval-ace-cys.cns @@ -0,0 +1,57 @@ +! coval-ace-cys.cns +! Add a covalent bond between an acetylated Nter and a cysteine sulphur +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +for $id1 in id ( name CA and resn ACE ) loop ace + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + show (chem) (id $id1) + evaluate ($chem1=$result) + + evaluate ($mindis = 3.0) + evaluate ($minid = 0) + for $id2 in id ( name SG and (id $id1) around 3.0 and + (resn CYS or resn CYF) ) loop search + + pick bond (id $id1) (id $id2) geometry + + if ( $result < $mindis) then + evaluate ($mindis = $result) + evaluate ($minid = $id2) + end if + + end loop search + + if ($minid > 0) then + show (segid) (id $minid) + evaluate ($segid2=$result) + show (resid) (id $minid) + evaluate ($resid2=$result) + show (resname) (id $minid) + evaluate ($resname2=$result) + show (name) (id $minid) + evaluate ($name2=$result) + show (chem) (id $minid) + evaluate ($chem2=$result) + + evaluate ($pat1 = "1"+$name1) + evaluate ($pat2 = "2"+$name2) + patch accy refe=1=(resid $resid1 and segid $segid1) refe=2=(resid $resid2 and segid $segid2) end + display COVAL-ACE-CYS: ADDED ONE COVALENT BOND BETWEEN $name1 $resid1 AND $name2 $resname2 $resid2 + end if + +end loop ace diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/covalheme.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/covalheme.cns new file mode 100644 index 0000000000000000000000000000000000000000..e286d3af81d9347edb2ad1ff9df526225f1df137 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/covalheme.cns @@ -0,0 +1,125 @@ +! covalheme.cns +! Add a covalent bond between a hemeC and a cysteine +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($ncac = 0) +for $id1 in id ( name CAC and resn HEC ) loop heme1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + evaluate ($minid = 0) + for $id2 in id ( name SG and (id $id1) around 4.0 and (resn CYS or resn CYF) ) loop search + pick bond (id $id1) (id $id2) geometry + if ( $result < $mindis) then + evaluate ($mindis = $result) + evaluate ($minid = $id2) + end if + end loop search + + if ($minid > 0) then + evaluate ($ncac = $ncac + 1) + show (segid) (id $minid) + evaluate ($segid2=$result) + show (resid) (id $minid) + evaluate ($resid2=$result) + show (resname) (id $minid) + evaluate ($resname2=$result) + show (name) (id $minid) + evaluate ($name2=$result) + + evaluate ($seg1.$ncac=$segid1) + evaluate ($seg2.$ncac=$segid2) + evaluate ($res1.$ncac=$resid1) + evaluate ($res2.$ncac=$resid2) + end if + +end loop heme1 + +evaluate ($counter=1) +while ( $counter <= $ncac ) loop ncac + + patch phcc + refe=2=(resid $res1.$counter and segid $seg1.$counter) + refe=1=(resid $res2.$counter and segid $seg2.$counter) + end + buffer message + display COVALHEME: ADDED ONE COVALENT BOND BETWEEN $name1 $resid1 AND $name2 $resname2 $resid2 + end + evaluate ($counter=$counter+1) +end loop ncac + + +evaluate ($ncab = 0) +for $id1 in id ( name CAB and resn HEC ) loop heme2 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resname) (id $id1) + evaluate ($resname1=$result) + show (name) (id $id1) + evaluate ($name1=$result) + + evaluate ($mindis = 4.0) + evaluate ($minid = 0) + for $id2 in id ( name SG and (id $id1) around 4.0 and + (resn CYS or resn CYF) ) loop search + + pick bond (id $id1) (id $id2) geometry + + if ( $result < $mindis) then + evaluate ($mindis = $result) + evaluate ($minid = $id2) + end if + + end loop search + + if ($minid > 0) then + evaluate ($ncab = $ncab + 1) + show (segid) (id $minid) + evaluate ($segid2=$result) + show (resid) (id $minid) + evaluate ($resid2=$result) + show (resname) (id $minid) + evaluate ($resname2=$result) + show (name) (id $minid) + evaluate ($name2=$result) + + evaluate ($seg1.$ncab=$segid1) + evaluate ($seg2.$ncab=$segid2) + evaluate ($res1.$ncab=$resid1) + evaluate ($res2.$ncab=$resid2) + end if + +end loop heme2 + +evaluate ($counter=1) +while ( $counter <= $ncab ) loop ncab + + patch phcb + refe=2=(resid $res1.$counter and segid $seg1.$counter) + refe=1=(resid $res2.$counter and segid $seg2.$counter) + end + buffer message + display COVALHEME: ADDED ONE COVALENT BOND BETWEEN $name1 $resid1 AND $name2 $resname2 $resid2 + end + evaluate ($counter=$counter+1) + +end loop ncab + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/dna_break.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/dna_break.cns new file mode 100644 index 0000000000000000000000000000000000000000..fe6db19316d2ee2b96578db3226809cc602bc280 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/dna_break.cns @@ -0,0 +1,82 @@ +! dna_break.cns +! Check for DNA chain breaks +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! + +evaluate ($dbreak=0) + +for $id1 in id ( name O5' and bondedto(name C5') ) loop dbreak + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resn) (id $id1) + evaluate ($resn1=$result) + + show sum(1) (id $id1) + if ( $result = 0 ) then + display unknown coordinates for segid $segid1 resn $resn1 resid $resid1 name O5' + display this coordinate must be known for automatic dna chain break detection + abort + end if + + identity (store1) ( name O3' and bondedto( segid $segid1 and resid $resid1 and name P ) ) + + if ( $select = 1 ) then + show element (store1) (attribute store1 > 0) + evaluate ($id2=$result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (resn) (id $id2) + evaluate ($resn2=$result) + + show sum(1) (id $id2) + if ( $result = 0 ) then + display unknown coordinates for segid $segid2 resn $resn2 resid $resid2 name O3' + display this coordinate must be known for automatic dna chain break detection + abort + end if + + pick bond + (name P and segid $segid1 and resid $resid1) + (name O3' and segid $segid2 and resid $resid2) + geometry + + if ( $result > &dbreak_cutoff ) then + evaluate ($dbreak=$dbreak+1) + evaluate ($seg1.$dbreak=$segid2) + evaluate ($res1.$dbreak=$resid2) + evaluate ($seg2.$dbreak=$segid1) + evaluate ($res2.$dbreak=$resid1) + evaluate ($patch.$dbreak=DNUC) + end if + end if + +end loop dbreak + +evaluate ($counter=1) + +while ($counter <= $dbreak) loop delete + patch $patch.$counter + reference=-=(segid $seg1.$counter and resid $res1.$counter) + reference=+=(segid $seg2.$counter and resid $res2.$counter) + end + buffer message + display dna link removed (applied $patch.$counter): from \ +$seg1.$counter[a4] $res1.$counter[a4] to $seg2.$counter[a4] $res2.$counter[a4] + end + evaluate ($counter=$counter+1) +end loop delete + + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/generate-topology.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/generate-topology.cns new file mode 100644 index 0000000000000000000000000000000000000000..3b08ca865dd28955798476c961e180a2b8adb91e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/generate-topology.cns @@ -0,0 +1,775 @@ +! generate-topology.inp +! Generates missing coordinates and topology +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * and from the CNS distriution of Brunger and Adams * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** + +define( + +{============================== important =================================} + +{* Different chains in the structure must have either unique segid or + chainid records. If this is no the case, the end of a chain must + be delimited by a TER card. *} + +{* A break in a chain can be detected automatically or should be delimited + by a BREAK card. In this case no patch (head, tail or link) will be + applied between the residues that bound the chain break. *} + +{* NB. The input PDB file must finish with an END statement *} + +{* convert chainid to segid if chainid is non-blank *} +{+ choice: true false +} +{===>} convert=true; + +{* separate chains by segid - a new segid starts a new chain *} +{+ choice: true false +} +{===>} separate=true; +{============================ renaming atoms ===============================} + +{* some atoms may need to be renamed in the topology database to conform + to what is present in the coordinate file *} + +{* delta carbon in isoleucine is named CD in CNS + what is it currently called in the coordinate file? *} +{* this will not be changed if left blank *} +{===>} ile_CD_becomes="CD1"; + +{* terminal oxygens are named OT1 and OT2 in CNS + what are they currently called in the coordinate file? *} +{* these will not be changed if left blank *} +{===>} OT1_becomes="O"; +{===>} OT2_becomes="OXT"; + +{======================= automatic mainchain breaks ========================} + +{* automatically detect mainchain breaks in proteins based on distance *} +{* the peptide link at break points will be removed *} +{+ choice: true false +} +{===>} auto_break=true; + +{* cutoff distance in Angstroms for identification of breaks *} +{* the default of 2.5A for peptide bonds should be reasonable for most cases. If the input + structure has bad geometry it may be necessary to increase this distance *} +{===>} pbreak_cutoff=3.5; +{===>} pcgbreak_cutoff=8.0; +{* the default of 2.5A for nucleic acid linkages should be reasonable for most cases. If the input + structure has bad geometry it may be necessary to increase this distance *} +{===>} dbreak_cutoff=4.5; + +{* file containing patches to delete nucleic acid links *} +{===>} dna_break_infile="TOPPAR:dna_break.top"; + +{======================= automatic disulphide bonds ========================} + +{* cutoff distance in Angstroms for identification of disulphides *} +{* the default of 3.0A should be reasonable for most cases. If the input + structure has bad geometry it may be necessary to increase this distance *} +{===>} disulphide_dist=3.0; + +{======================= automatic cyclic peptidic bond ====================} + +{* cutoff distance in Angstroms for identification of cyclic peptide*} +{* the default of 2.0A should be reasonable for most cases. If the input + structure has bad geometry it may be necessary to increase this distance *} +{===>} cyclicpept_dist=2.0; + +{======================= automatic iron cluster bonds ======================} + +{* cutoff distance in Angstroms for identification of iron cluster bonds *} +{* the default of 8.0A should be reasonable for most cases. If the input + structure has bad geometry it may be necessary to increase this distance *} +{===>} iron1cluster_dist=5.0; +{===>} iron2cluster_dist=8.0; + +{======================= automatic cis peptide bonds =======================} + +{* select atoms to be included in calculation of omega angles *} +{* to define cis peptides*} +{===>} atom_select=(known and not hydrogen); + +{========================= generate parameters =============================} + +{* hydrogen flag - determines whether hydrogens will be output *} +{* must be true for NMR, atomic resolution X-ray crystallography + or modelling. Set to false for most X-ray crystallographic + applications at resolution > 1A *} +{+ choice: true false +} +{===>} hydrogen_flag=true; + +{* which hydrogens to build *} +{+ choice: "all" "unknown" +} +{===>} hydrogen_build="all"; + +{* selection of atoms other than hydrogens for which coordinates + will be generated *} +{* to generate coordinates for all unknown atoms use: (not(known)) *} +{===>} atom_build=(not(known)); + +{* selection of atoms to be deleted *} +{* to delete no atoms use: (none) *} +{===>} atom_delete=(none); + +{* set bfactor value *} +{===>} bfactor=15.0; + +{* set occupancy flag *} +{+ choice: true false +} +{===>} set_occupancy=false; + +{* set occupancy value *} +{===>} occupancy=1.0; + +{================== protein topology and parameter files ===================} + +{* protein topology file *} +{===>} prot_topology_infile="TOPPAR:protein-allhdg5-4.top"; + +{* protein parameter file *} +{===>} prot_parameter_infile="TOPPAR:protein-allhdg5-4.param"; + +{================ nucleic acid topology and parameter files =================} + +{* nucleic acid topology file *} +{===>} nucl_topology_infile="TOPPAR:dna-rna-allatom-hj-opls-1.3.top"; + +{* nucleic acid parameter file *} +{===>} nucl_parameter_infile="TOPPAR:dna-rna-allatom-hj-opls-1.3.param"; + +{================= carbohydrate topology and parameter files ===============} + +{* carbohydrate topology file *} +{===>} carbo_topology_infile="TOPPAR:carbohydrate.top"; + +{* carbohydrate parameter file *} +{===>} carbo_parameter_infile="TOPPAR:carbohydrate.param"; + +{================= solvent topology and parameter files ====================} + +{* solvent topology file *} +{===>} solv_topology_infile="TOPPAR:solvent-allhdg5-4.top"; + +{* solvent parameter file *} +{===>} solv_parameter_infile="TOPPAR:solvent-allhdg5-4.param"; + +{================= cofactor topology and parameter files ===================} + +{* co-factor topology file *} +{===>} cofactors_topology_infile="TOPPAR:cofactors.top"; + +{* co-factor parameter file *} +{===>} cofactors_parameter_infile="TOPPAR:cofactors.param"; + + +{================= known ligands topology and parameter files ==============} + +{* ligands topology file *} +{===>} ligands_topology_infile="TOPPAR:fragment_probes.top"; + +{* ligands parameter file *} +{===>} ligands_parameter_infile="TOPPAR:fragment_probes.param"; + +{===================== ion topology and parameter files ====================} + +{* ion topology file *} +{===>} ion_topology_infile="TOPPAR:ion.top"; + +{* ion parameter file *} +{===>} ion_parameter_infile="TOPPAR:ion.param"; + +{===================== heme topology and parameter files ==================} + +{* heme topology file *} +{===>} heme_topology_infile="TOPPAR:hemes-allhdg.top"; + +{* heme parameter file *} +{===>} heme_parameter_infile="TOPPAR:hemes-allhdg.param"; + +{================= shape topology and parameter files =====================} + +{* shape topology file *} +{===>} shape_topology_infile="TOPPAR:shape.top"; + +{* shape parameter file *} +{===>} shape_parameter_infile="TOPPAR:shape.param"; + +{===================== default number of histidines for patching ===========} + + ) {- end block parameter definition -} + +evaluate ($chain = 1) +evaluate($coor_infile= $file) + +topology + if ( &BLANK%prot_topology_infile = false ) then + @@&prot_topology_infile + end if + if ( &BLANK%cofactors_topology_infile = false ) then + @@&cofactors_topology_infile + end if + if ( &BLANK%ion_topology_infile = false ) then + @@&ion_topology_infile + end if + if ( &BLANK%nucl_topology_infile = false ) then + @@&nucl_topology_infile + end if + if ( &BLANK%carbo_topology_infile = false ) then + @@&carbo_topology_infile + end if + if ( &BLANK%solv_topology_infile = false ) then + @@&solv_topology_infile + end if + if ( &BLANK%heme_topology_infile = false ) then + @@&heme_topology_infile + end if + if ( &BLANK%shape_topology_infile = false ) then + @@&shape_topology_infile + end if + if ( &BLANK%dna_break_infile = false ) then + @@&dna_break_infile + end if + if ($ligand_top_fname # "") then + fileexist $ligand_top_fname end + if ($result eq true) then + @@$ligand_top_fname + end if + end if +end + +parameter + if ( &BLANK%prot_parameter_infile = false ) then + @@&prot_parameter_infile + end if + if ( &BLANK%cofactors_parameter_infile = false ) then + @@&cofactors_parameter_infile + end if + if ( &BLANK%ion_parameter_infile = false ) then + @@&ion_parameter_infile + end if + if ( &BLANK%nucl_parameter_infile = false ) then + @@&nucl_parameter_infile + end if + if ( &BLANK%carbo_parameter_infile = false ) then + @@&carbo_parameter_infile + end if + if ( &BLANK%solv_parameter_infile = false ) then + @@&solv_parameter_infile + end if + if ( &BLANK%heme_parameter_infile = false ) then + @@&heme_parameter_infile + end if + if ( &BLANK%shape_parameter_infile = false ) then + @@&shape_parameter_infile + end if + if ($ligand_param_fname # "") then + fileexist $ligand_param_fname end + if ($result eq true) then + @@$ligand_param_fname + end if + end if +end + +segment + chain + if ( &convert = true ) then + convert=true + end if + if ( &separate = true ) then + separate=true + end if + @@$prot_link_infile + @@$nucl_link_infile + if ( &BLANK%carbo_link_infile = false ) then + @@&carbo_link_infile + end if + coordinates @@$coor_infile + end +end + +coordinates @@$coor_infile + +! next line to remove the MAP atom defined in the DUM residue +! in case of use of dummy particles +delete sele=(name MAP) end + +if ( &BLANK%ile_CD_becomes = false ) then + do (name=&ile_CD_becomes) (resn ILE and name CD) +end if +if ( &BLANK%OT1_becomes = false ) then + do (name=&OT1_becomes) (name OT1) +end if +if ( &BLANK%OT2_becomes = false ) then + do (name=&OT2_becomes) (name OT2) +end if + +!for the histidine patches: +if ($autohis = false) then + evaluate($hisd_counter=1) + while ($hisd_counter le $nhisd) loop hisd + show (resn) (tag and resid $hisd_$hisd_counter) + if ($result eq "HIS") then + patch hisd reference=nil=(resid $hisd_$hisd_counter) end + end if + evaluate($hisd_counter=$hisd_counter + 1) + end loop hisd + + evaluate($hise_counter=1) + while ($hise_counter le $nhise) loop hise + show (resn) (tag and resid $hise_$hise_counter) + if ($result eq "HIS") then + patch hise reference=nil=(resid $hise_$hise_counter) end + end if + evaluate($hise_counter=$hise_counter + 1) + end loop hise +end if + +! The following patches would define covalent bond between a CA+2 and oxygen ligands +! from Asp and Glu (first selection is amino-acid, second is ion) +! patch dca2 refe=1=(resid 25) refe=2=(resid 83) end +! patch dca2 refe=1=(resid 29) refe=2=(resid 83) end +! patch dca2 refe=1=(resid 35) refe=2=(resid 83) end +! patch eca2 refe=1=(resid 36) refe=2=(resid 83) end +! +! following patch is to attach a heme (resid YY) CAB atom to a cys (resid XX) +! patch phcb refe=1=(resid XX) refe=2=(resid YY) end +! following patch is to attach a heme (resid YY) CAC atom to a cys (resid XX) +! patch phcc refe=1=(resid XX) refe=2=(resid YY) end +! +! following patch is to define an isopeptide bond between a Cter and a Lys side-chain +! patch clys refe=1=(resid 72) refe=2=(resid 148) end +! +! following patch is to define an isopeptide bond between a Cter and a Lys side-chain +! patch clys refe=1=(resid 72) refe=2=(resid 148) end + +! N-linked glycosylation patches +inline @MODULE:bondglycans.cns + +if ($delenph = true) then + delete sele=(name H* and attr charge = 0) end +end if + +set seed=$iniseed end + +show sum(1) ( not(hydrogen) and not(known) ) +if ( $select = 0 ) then + display %INFO: There are no coordinates missing for non-hydrogen atoms +end if + +if ( $log_level = "verbose" ) then + set message=all echo=on end +elseif ( $log_level = "normal") then + set message=normal echo=off end +else + set message=off echo=off end +end if + +inline @MODULE:build-missing.cns + +if ( &auto_break = true ) then + inline @MODULE:prot_break.cns + inline @MODULE:dna_break.cns +end if + + +! checkfor disulphide bonds + +evaluate ($disu=0) + +for $id1 in id ( resn CYS and name SG ) loop dis1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + identity (store9) (all) + + for $id2 in id ( resn CYS and name SG and + ( attr store9 > $id1 ) ) loop dis2 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + pick bond (id $id1) (id $id2) geometry + + if ( $result <= $disulphide_dist ) then + evaluate ($disu=$disu+1) + evaluate ($seg1.$disu=$segid1) + evaluate ($seg2.$disu=$segid2) + evaluate ($res1.$disu=$resid1) + evaluate ($res2.$disu=$resid2) + end if + + end loop dis2 +end loop dis1 + +evaluate ($counter=1) +while ( $counter <= $disu ) loop disu + patch disu + reference=1=(segid $seg1.$counter and resid $res1.$counter) + reference=2=(segid $seg2.$counter and resid $res2.$counter) + end + buffer message + display disulphide added: from \ +$seg1.$counter[a4] $res1.$counter[a4] to $seg2.$counter[a4] $res2.$counter[a4] + end + evaluate ($counter=$counter+1) +end loop disu + + +! check for cyclid peptidic bonds + +if ($cyclicpept eq TRUE ) then + + evaluate ($cycp=0) + + for $id1 in id ( tag and name N ) loop cyp1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resn) (id $id1) + evaluate ($resn1=$result) + + for $id2 in id ( name C and bondedto (name O and not resid $resid1 ) ) loop cyp2 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (resn) (id $id2) + evaluate ($resn2=$result) + + evaluate ($rdiff = decode($resid2) - decode($resid1)) + + if ($rdiff gt 2) then + + pick bond (id $id1) (id $id2) geometry + if ( $result <= $cyclicpept_dist ) then + evaluate ($cycp=$cycp+1) + evaluate ($seg1.$cycp=$segid1) + evaluate ($seg2.$cycp=$segid2) + evaluate ($res1.$cycp=$resid1) + evaluate ($res2.$cycp=$resid2) + evaluate ($rsn1.$cycp=$resn1) + evaluate ($rsn2.$cycp=$resn2) + end if + + end if + + end loop cyp2 + + end loop cyp1 + + evaluate ($counter=1) + + while ( $counter <= $cycp ) loop cypep + + evaluate ($ptype = PEPT) + evaluate ($patchdone = 0) + if ( $rsn2.$counter eq GLY) then + if ($rsn1.$counter eq PRO) then + evaluate ($ptype = PPGP) + evaluate ($patchdone = 1) + end if + if ($rsn1.$counter eq GLY) then + evaluate ($ptype = PPGG) + evaluate ($patchdone = 1) + end if + if ($patchdone eq 0) then + evaluate ($ptype = PPG1) + end if + else + if ($rsn1.$counter eq PRO) then + evaluate ($ptype = PEPP) + end if + if ($rsn1.$counter eq GLY) then + evaluate ($ptype = PPG2) + end if + end if + + patch $ptype + reference=+=(segid $seg1.$counter and resid $res1.$counter) + reference=-=(segid $seg2.$counter and resid $res2.$counter) + end + + buffer message + display cyclic peptide detected: peptidic bond added between \ +$seg1.$counter[a4] $res1.$counter[a4] and $seg2.$counter[a4] $res2.$counter[a4] + end + evaluate ($counter=$counter+1) + end loop cypep + +end if ! check for cyclic peptide + + +! check for covalently-linked hemeC + +inline @MODULE:covalheme.cns + + +! check for covalently-linked Acetylated Nter to CYS + +inline @MODULE:coval-ace-cys.cns + +evaluate ($ironclus=0) + +! check for FE1 bonds in iron cluster +for $id1 in id ( resname CFE and name SG ) loop fes1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + identity (store9) (all) + + for $id2 in id ( resname CYF and name SG ) loop fes2 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + pick bond (id $id1) (id $id2) geometry + + if ( $result <= &iron1cluster_dist ) then + evaluate ($ironclus=$ironclus+1) + evaluate ($seg1.$ironclus=$segid1) + evaluate ($seg2.$ironclus=$segid2) + evaluate ($res1.$ironclus=$resid1) + evaluate ($res2.$ironclus=$resid2) + end if + + end loop fes2 + +end loop fes1 + +evaluate ($counter=1) +while ( $counter <= $ironclus ) loop iron1 + patch sef1 + reference=1=(segid $seg1.$counter and resid $res1.$counter) + reference=2=(segid $seg2.$counter and resid $res2.$counter) + end + buffer message + display iron FE1 sulphur bond added: from $seg1.$counter[a4] $res1.$counter[a4] to $seg2.$counter[a4] $res2.$counter[a4] + end + evaluate ($counter=$counter+1) +end loop iron1 + +evaluate ($ironclus=0) + +! check for FE2 bonds in iron cluster +for $id1 in id ( resname CFE and name SG ) loop fes1 + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + + identity (store9) (all) + + for $id2 in id ( resname CYF and name SG ) loop fes2 + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + + pick bond (id $id1) (id $id2) geometry + + if ( $result <= &iron2cluster_dist ) then + if ($result > &iron1cluster_dist ) then + evaluate ($ironclus=$ironclus+1) + evaluate ($seg1.$ironclus=$segid1) + evaluate ($seg2.$ironclus=$segid2) + evaluate ($res1.$ironclus=$resid1) + evaluate ($res2.$ironclus=$resid2) + end if + end if + + end loop fes2 + +end loop fes1 + +evaluate ($counter=1) +while ( $counter <= $ironclus ) loop iron2 + patch sef2 + reference=1=(segid $seg1.$counter and resid $res1.$counter) + reference=2=(segid $seg2.$counter and resid $res2.$counter) + end + buffer message + display iron FE2 sulphur bond added: from $seg1.$counter[a4] $res1.$counter[a4] to $seg2.$counter[a4] $res2.$counter[a4] + end + evaluate ($counter=$counter+1) +end loop iron2 + + +! Check for cis-PRO + +for $id in id ( &atom_select and name ca and resn PRO) loop cisp + + show (segid) (id $id) + evaluate ($segid=$result) + show (resid) (id $id) + evaluate ($resid=$result) + show (resn) (id $id) + evaluate ($resn=$result) + + identity (store9) ( &atom_select and ( name c and bondedto + ( name n and resid $resid and segid $segid ) ) ) + if ( $select = 1 ) then + show element (store9) (attribute store9 > 0) + evaluate ($id_prev=$result) + show (segid) (id $id_prev) + evaluate ($segid_prev=$result) + show (resid) (id $id_prev) + evaluate ($resid_prev=$result) + show (resn) (id $id_prev) + evaluate ($resn_prev=$result) + + pick dihedral + (name ca and segid $segid_prev and resid $resid_prev) + (name c and segid $segid_prev and resid $resid_prev) + (name n and segid $segid and resid $resid) + (name ca and segid $segid and resid $resid) + geometry + + evaluate ($dihedral=mod($result+360,360)) + + if ( $dihedral > 180 ) then + evaluate ($dihedral=$dihedral-360) + end if + + evaluate ($absdihedral=abs($dihedral)) + + if ( $absdihedral < 25 ) then + patch cisp reference=NIL=(segid $segid_prev and resid $resid_prev) end + display CIS peptide bon detected for residue $resid_prev + end if + + end if + +end loop cisp + +if (&hydrogen_flag=false) then + delete selection=( hydrogen ) end +end if + +delete selection=( &atom_delete ) end + +!check for histidine protonation state if auto mode on +if ($autohis = true) then + inline @MODULE:auto-his.cns +end if + +energy end +evaluate ($bonded = $bond + $angl + $impr) +if ($bonded > 10000) then + minimize powell nstep=100 drop=10.0 nprint=10 end + energy end + evaluate ($bonded = $bond + $angl + $impr) +end if +if ($bonded > 10000) then + evaluate ($dispfile = $output_pdb_filename - ".pdb" + ".warn") + set display=$dispfile end + display WARNING: the bonded energy is very high: + display Ebonded-total=$bonded Ebond=$bond Eangl=$angl Eimpr=$impr + display Something is possibly wrong with your input structure + close $dispfile end +end if + +show sum(1) (not(known)) +if ( $result < 100 ) then + for $id in id (not(known)) loop print + show (segid) (id $id) + evaluate ($segid=$result) + show (resn) (id $id) + evaluate ($resn=$result) + show (resid) (id $id) + evaluate ($resid=$result) + show (name) (id $id) + evaluate ($name=$result) + buffer message + display unknown coordinates for atom: $segid[a4] $resn[a4] $resid[a4] $name[a4] + end + end loop print +else + buffer message + display unknown coordinates for more than 100 atoms + end +end if + +if ($set_bfactor=true) then + do (b=&bfactor) ( all ) +end if + +if (&set_occupancy=true) then + if (&set_occupancy=true) then + do (q=&occupancy) ( all ) + end if +else + if (&set_occupancy=true) then + do (q=&occupancy) ( not(store9) ) + do (q=0.0) (store9) + end if +end if + +show sum(1) (store9) +if ( $result < 100 ) then + for $id in id (store9) loop print + show (segid) (id $id) + evaluate ($segid=$result) + show (resn) (id $id) + evaluate ($resn=$result) + show (resid) (id $id) + evaluate ($resid=$result) + show (name) (id $id) + evaluate ($name=$result) + buffer message + display coordinates built for atom: $segid[a4] $resn[a4] $resid[a4] $name[a4] + end + end loop print +else + buffer message + display coordinates built for more than 100 hundred atoms + end +end if + +set remarks=reset end + +buffer message + to=remarks + dump +end +buffer message reset end + +inline @MODULE:check_coordinates.cns + +if ($failure eq true) then + evaluate ($failfile = $output_pdb_filename - ".pdb" + ".fail") + set display=$failfile end + display "MAX/MIN possible coordinates exceeded - stopping" + close $failfile end + stop +else + write structure output=$output_psf_filename end + write coordinates format=pdbo output=$output_pdb_filename end +end if + +display OUTPUT: $output_pdb_filename +display OUTPUT: $output_psf_filename + +stop + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/patch-bb-cg.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/patch-bb-cg.cns new file mode 100644 index 0000000000000000000000000000000000000000..6531a087c13f9b9f350a96b8b70d2472d64ffee5 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/patch-bb-cg.cns @@ -0,0 +1,240 @@ +! patch-bb-cg.cns +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * and from the CNS distriution of Brunger and Adams * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +! define cutoff for chain break +evaluate ($bdbreak = 8.0) + +! encode beads info +evaluate ($bdnum = 0) +for $id in id (name BB) loop cg1 + evaluate ($bdnum = $bdnum + 1) + show (name) (id $id) + evaluate ($bdname_$bdnum = $result) + show (resid) (id $id) + evaluate ($bdresi_$bdnum = $result) + show (name) (bondedto (name $bdname_$bdnum and resid $bdresi_$bdnum)) + if ($result NE 0) then + evaluate ($sbdname_$bdnum = $result) + else + evaluate ($sbdname_$bdnum = "XXX") + end if +end loop cg1 + + +!!! BBB Angles + +evaluate ($ncount = 0) +evaluate ($nend = $bdnum - 2) +while ($ncount < $nend) loop cg2 + evaluate ($ncount = $ncount + 1) + + ! define three consecutive backbone beads + evaluate ($nat1 = $ncount) + evaluate ($nat2 = $ncount + 1) + evaluate ($nat3 = $ncount + 2) + + ! get their atom names + evaluate ($bname1 = $bdname_$nat1) + evaluate ($bname2 = $bdname_$nat2) + evaluate ($bname3 = $bdname_$nat3) + + ! get their residue number + evaluate ($bresi1 = $bdresi_$nat1) + evaluate ($bresi2 = $bdresi_$nat2) + evaluate ($bresi3 = $bdresi_$nat3) + + ! define atom names for patch + evaluate ($pat1 = "1"+$bname1) + evaluate ($pat2 = "2"+$bname2) + evaluate ($pat3 = "3"+$bname3) + + ! check for breaks before defining any angle + evaluate ($break = "FALSE") + pick bond (name $bname1 and resid $bresi1) (name $bname2 and resid $bresi2) geometry + if ($result > $bdbreak) then + evaluate ($break = "TRUE") + end if + pick bond (name $bname2 and resid $bresi2) (name $bname3 and resid $bresi3) geometry + if ($result > $bdbreak) then + evaluate ($break = "TRUE") + end if + + if ($break EQ FALSE) then + + ! define new backbone angle patch + topology + presidue cgang ! Patch to add an angle between three beads + add angle $pat1 $pat2 $pat3 + end + end + + ! apply new patch to the selected three beads + patch cgang refe=1=(resid $bresi1) refe=2=(resid $bresi2) refe=3=(resid $bresi3) end + display PATCH-BB-CG: ADDED ONE ANGLE BETWEEN $bname1 $bresi1 , $bname2 $bresi2 , $bname3 $bresi3 + + end if + +end loop cg2 + + +!!! BBS Angles +evaluate ($ncount = 0) +evaluate ($nend = $bdnum - 1) +while ($ncount < $nend) loop cg3 + evaluate ($ncount = $ncount + 1) + + !! BBA Angles + ! define two consecutive backbone beads + evaluate ($nat1 = $ncount) + evaluate ($nat2 = $ncount + 1) + + ! get their atom names + evaluate ($bname1 = $bdname_$nat1) + evaluate ($bname2 = $bdname_$nat2) + + ! get their side-chain beads names + evaluate ($sbname1 = $sbdname_$nat1) + evaluate ($sbname2 = $sbdname_$nat2) + + ! get their residue number + evaluate ($bresi1 = $bdresi_$nat1) + evaluate ($bresi2 = $bdresi_$nat2) + + ! define atom names for patch + evaluate ($pat1 = "1"+$bname1) + evaluate ($pat2 = "2"+$bname2) + evaluate ($pas1 = "1"+$sbname1) + evaluate ($pas2 = "2"+$sbname2) + + ! check for breaks before defining any angle + evaluate ($break = "FALSE") + evaluate ($pbreak = "FALSE") + pick bond (name $bname1 and resid $bresi1) (name $bname2 and resid $bresi2) geometry + if ($result > $bdbreak) then + evaluate ($break = "TRUE") + evaluate ($pbreak = "TRUE") + end if + + if ($break EQ FALSE) then + + ! define new side-chain angle patch for 1st residue + if ($ncount EQ 1) then + if ($sbname1 NE "XXX") then + ! define SBB angle patch + topology + presidue scgang ! Patch to add an angle between three beads + add angle $pas1 $pat1 $pat2 + end + end + ! apply new patch to the selected three beads + patch scgang refe=1=(resid $bresi1) refe=2=(resid $bresi1) refe=3=(resid $bresi2) end + display PATCH-SBB-CG: ADDED ONE SIDE-CHAIN/BB ANGLE BETWEEN $sbname1 $bresi1 , $bname1 $bresi1 , $bname2 $bresi2 + end if + end if + + ! define new side-chain angle patch for 1st residue after chain break + if ($pbreak EQ TRUE) then + if ($sbname1 NE "XXX") then + ! define SBB angle patch + topology + presidue scgsang ! Patch to add an angle between three beads + add angle $pas1 $pat1 $pat2 + end + end + ! apply new patch to the selected three beads + patch scgsang refe=1=(resid $bresi1) refe=2=(resid $bresi1) refe=3=(resid $bresi2) end + display PATCH-SBB-CG: ADDED ONE SIDE-CHAIN/BB ANGLE BETWEEN $sbname1 $bresi1 , $bname1 $bresi1 , $bname2 $bresi2 + end if + end if + + ! define BBS angle patch + if ($sbname2 NE "XXX") then + topology + presidue cgsang ! Patch to add an angle between three beads + add angle $pat1 $pat2 $pas2 + end + end + ! apply new patch to the selected three beads + patch cgsang refe=1=(resid $bresi1) refe=2=(resid $bresi2) refe=3=(resid $bresi2) end + display PATCH-BBS-CG: ADDED ONE BB/SIDE-CHAIN ANGLE BETWEEN $bname1 $bresi1 , $bname2 $bresi2 , $sbname2 $bresi2 + end if + + end if + +end loop cg3 + + +!! BBB dihedral + +evaluate ($ncount = 0) +evaluate ($nend = $bdnum - 3) +while ($ncount < $nend) loop cg4 + evaluate ($ncount = $ncount + 1) + + ! define four consecutive beads + evaluate ($nat1 = $ncount) + evaluate ($nat2 = $ncount + 1) + evaluate ($nat3 = $ncount + 2) + evaluate ($nat4 = $ncount + 3) + + ! get their atom names + evaluate ($bname1 = $bdname_$nat1) + evaluate ($bname2 = $bdname_$nat2) + evaluate ($bname3 = $bdname_$nat3) + evaluate ($bname4 = $bdname_$nat4) + + ! get their residue number + evaluate ($bresi1 = $bdresi_$nat1) + evaluate ($bresi2 = $bdresi_$nat2) + evaluate ($bresi3 = $bdresi_$nat3) + evaluate ($bresi4 = $bdresi_$nat4) + + ! define atom names for patch + evaluate ($pat1 = "1"+$bname1) + evaluate ($pat2 = "2"+$bname2) + evaluate ($pat3 = "3"+$bname3) + evaluate ($pat4 = "4"+$bname4) + + evaluate ($break = "FALSE") + ! check for breaks before defining any dihedral + pick bond (name $bname1 and resid $bresi1) (name $bname2 and resid $bresi2) geometry + if ($result > $bdbreak) then + evaluate ($break = "TRUE") + end if + pick bond (name $bname2 and resid $bresi2) (name $bname3 and resid $bresi3) geometry + if ($result > $bdbreak) then + evaluate ($break = "TRUE") + end if + pick bond (name $bname3 and resid $bresi3) (name $bname4 and resid $bresi4) geometry + if ($result > $bdbreak) then + evaluate ($break = "TRUE") + end if + + if ($break EQ FALSE) then + + ! define new patch + topology + presidue cgdihe ! Patch to add a dihedral angle between four beads + add dihedral $pat1 $pat2 $pat3 $pat4 + end + end + + ! apply new patch to the selected four beads + patch cgdihe refe=1=(resid $bresi1) refe=2=(resid $bresi2) refe=3=(resid $bresi3) refe=4=(resid $bresi4) end + display PATCH-BB-CG: ADDED ONE DIHEDRAL BETWEEN $bname1 $bresi1 , $bname2 $bresi2 , $bname3 $bresi3 , $bname4 $bresi4 + + end if + +end loop cg4 + + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/patch-types-cg.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/patch-types-cg.cns new file mode 100644 index 0000000000000000000000000000000000000000..97d3d69b6d361ef1c5b145c7254373b9228740c7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/patch-types-cg.cns @@ -0,0 +1,83 @@ +! patch-types-cg.cns +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * Originally adapted from Aria 1.2 from Nilges and Linge, EMBL. * +! * and from the CNS distriution of Brunger and Adams * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +! encode beads info +evaluate ($bdnum = 0) +for $id in id (name BB and (not (resn ALA or resn PRO or resn HY3 or resn HYP))) loop cgt1 + evaluate ($bdnum = $bdnum + 1) + show (name) (id $id) + evaluate ($bdname_$bdnum = $result) + show (resid) (id $id) + evaluate ($bdresi_$bdnum = $result) + show (b) (id $id) + evaluate ($bfactor_$bdnum = $result) + evaluate ($ptype= "PTY"+encode($bfactor_$bdnum)) + patch $ptype refe=NIL=(resid $bdresi_$bdnum) end +end loop cgt1 + +! encode beads info for ALA +evaluate ($bdnum = 0) +for $id in id (name BB and resn ALA) loop cgt2 + evaluate ($bdnum = $bdnum + 1) + show (name) (id $id) + evaluate ($bdname_$bdnum = $result) + show (resid) (id $id) + evaluate ($bdresi_$bdnum = $result) + show (b) (id $id) + evaluate ($bfactor_$bdnum = $result) + evaluate ($ptype= "PTA"+encode($bfactor_$bdnum)) + patch $ptype refe=NIL=(resid $bdresi_$bdnum) end +end loop cgt2 + +! encode beads info for PRO +evaluate ($bdnum = 0) +for $id in id (name BB and resn PRO) loop cgt3 + evaluate ($bdnum = $bdnum + 1) + show (name) (id $id) + evaluate ($bdname_$bdnum = $result) + show (resid) (id $id) + evaluate ($bdresi_$bdnum = $result) + show (b) (id $id) + evaluate ($bfactor_$bdnum = $result) + evaluate ($ptype= "PTP"+encode($bfactor_$bdnum)) + patch $ptype refe=NIL=(resid $bdresi_$bdnum) end +end loop cgt3 + +! encode beads info for HY3 +evaluate ($bdnum = 0) +for $id in id (name BB and resn HY3) loop cgt4 + evaluate ($bdnum = $bdnum + 1) + show (name) (id $id) + evaluate ($bdname_$bdnum = $result) + show (resid) (id $id) + evaluate ($bdresi_$bdnum = $result) + show (b) (id $id) + evaluate ($bfactor_$bdnum = $result) + evaluate ($ptype= "PTH"+encode($bfactor_$bdnum)) + patch $ptype refe=NIL=(resid $bdresi_$bdnum) end +end loop cgt4 + + +! encode beads info for HYP +evaluate ($bdnum = 0) +for $id in id (name BB and resn HYP) loop cgt4 + evaluate ($bdnum = $bdnum + 1) + show (name) (id $id) + evaluate ($bdname_$bdnum = $result) + show (resid) (id $id) + evaluate ($bdresi_$bdnum = $result) + show (b) (id $id) + evaluate ($bfactor_$bdnum = $result) + evaluate ($ptype= "PTH"+encode($bfactor_$bdnum)) + patch $ptype refe=NIL=(resid $bdresi_$bdnum) end +end loop cgt4 + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/prot_break.cns b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/prot_break.cns new file mode 100644 index 0000000000000000000000000000000000000000..629d570b5183ce7198620931c7880f1eb739795d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/cns/prot_break.cns @@ -0,0 +1,141 @@ +! prot_break.cns +! Detect protein chain breaks +! +! *********************************************************************** +! * Copyright 2003-2022 Alexandre Bonvin, Utrecht University. * +! * All rights reserved. * +! * This code is part of the HADDOCK software and governed by its * +! * license. Please see the LICENSE file that should have been included * +! * as part of this package. * +! *********************************************************************** +! +evaluate ($pbreak=0) + +for $id1 in id ( name C and bondedto(name CA) and bondedto(name O) ) loop pbreak + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resn) (id $id1) + evaluate ($resn1=$result) + + show sum(1) (id $id1) + if ( $result = 0 ) then + display unknown coordinates for segid $segid1 resn $resn1 resid $resid1 name C + display this coordinate must be known for automatic protein chain break detection + abort + end if + + identity (store1) ( name N and bondedto( segid $segid1 and resid $resid1 and name c ) ) + + if ( $select = 1 ) then + show element (store1) (attribute store1 > 0) + evaluate ($id2=$result) + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (resn) (id $id2) + evaluate ($resn2=$result) + + show sum(1) (id $id2) + if ( $result = 0 ) then + display unknown coordinates for segid $segid2 resn $resn2 resid $resid2 name N + display this coordinate must be known for automatic protein chain break detection + abort + end if + + pick bond + (name c and segid $segid1 and resid $resid1) + (name n and segid $segid2 and resid $resid2) + geometry + + if ( $result > &pbreak_cutoff ) then + evaluate ($pbreak=$pbreak+1) + evaluate ($seg1.$pbreak=$segid1) + evaluate ($res1.$pbreak=$resid1) + evaluate ($seg2.$pbreak=$segid2) + evaluate ($res2.$pbreak=$resid2) + if ( $resn2 = PRO ) then + evaluate ($patch.$pbreak=DPPP) + elseif ( $resn2 = CPR ) then + evaluate ($patch.$pbreak=DPPP) + else + evaluate ($patch.$pbreak=DPEP) + end if + end if + end if + +end loop pbreak + +for $id1 in id ( name BB ) loop cgpbreak + + show (segid) (id $id1) + evaluate ($segid1=$result) + show (resid) (id $id1) + evaluate ($resid1=$result) + show (resn) (id $id1) + evaluate ($resn1=$result) + + show sum(1) (id $id1) + if ( $result = 0 ) then + display unknown coordinates for segid $segid1 resn $resn1 resid $resid1 name BB + display this coordinate must be known for automatic protein chain break detection + abort + end if + + for $id2 in id ( name BB and bondedto( segid $segid1 and resid $resid1 and name BB ) ) loop cg2pbreak + + show (segid) (id $id2) + evaluate ($segid2=$result) + show (resid) (id $id2) + evaluate ($resid2=$result) + show (resn) (id $id2) + evaluate ($resn2=$result) + + show sum(1) (id $id2) + if ( $result = 0 ) then + display unknown coordinates for segid $segid2 resn $resn2 resid $resid2 name BB + display this coordinate must be known for automatic protein chain break detection + abort + end if + + pick bond + (name BB and segid $segid1 and resid $resid1) + (name BB and segid $segid2 and resid $resid2) + geometry + + if ( $result > &pcgbreak_cutoff ) then + evaluate ($pbreak=$pbreak+1) + evaluate ($seg1.$pbreak=$segid1) + evaluate ($res1.$pbreak=$resid1) + evaluate ($seg2.$pbreak=$segid2) + evaluate ($res2.$pbreak=$resid2) + evaluate ($patch.$pbreak=DCGP) + end if + + end loop cg2pbreak + +end loop cgpbreak + +evaluate ($counter=1) + +while ($counter <= $pbreak) loop delete + if ($patch.$counter ne "DCGP") then + patch $patch.$counter + reference=-=(segid $seg1.$counter and resid $res1.$counter) + reference=+=(segid $seg2.$counter and resid $res2.$counter) + end + else + patch $patch.$counter + reference=-=(segid $seg1.$counter and resid $res1.$counter and name BB) + reference=+=(segid $seg2.$counter and resid $res2.$counter and name BB) + end + end if + buffer message + display peptide link removed (applied $patch.$counter): from \ +$seg1.$counter[a4] $res1.$counter[a4] to $seg2.$counter[a4] $res2.$counter[a4] + end + evaluate ($counter=$counter+1) +end loop delete diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/defaults.yaml b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/defaults.yaml new file mode 100644 index 0000000000000000000000000000000000000000..0238b30130548e71471180396470263d0be8ba60 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/modules/topology/topoaa/defaults.yaml @@ -0,0 +1,239 @@ +autohis: + default: true + type: boolean + title: Automatic HIS protonation state + short: + "The protonation state of histidine (+1: HIS or 0: HISD/HISE) will be automatically + set by HADDOCK" + long: + "If set to true, HADDOCK will automatically define the protonation state of + histidines ((+1: HIS or 0: HISD/HISE) by selecting the state leading to the lowest + electrostatic energy" + group: molecule + explevel: expert +autotoppar: + default: false + type: boolean + title: Automatically generate topologies and parameters for unknown atoms + short: Automatically generate topologies and parameters for unknown atoms + long: Automatically generate topologies and parameters for unknown atoms + group: molecule + explevel: easy +delenph: + default: true + type: boolean + title: Keep or remove non-polar hydrogen atoms + short: + If set to true, non-polar hydrogen atoms will be discarded to save computing + time + long: + Since HADDOCK uses a united atom force field, the non-polar hydrogen atoms + can be in principle discarded. This saves computing time. However this should + not be done if you are defining distance restraints to specific hydrogen atoms + (e.g. when using NMR distance restraints). + group: molecule + explevel: easy +log_level: + default: quiet + type: string + minchars: 0 + maxchars: 100 + choices: + - verbose + - normal + - quiet + title: Log level verbosity for CNS + short: Set the log level verbosity for CNS + long: + CNS, the computational engine used by HADDOCK can generate a lot of output + messages. This parameter controls the verbosity of CNS (verbose, normal or quiet). + group: module + explevel: guru +iniseed: + default: 917 + type: integer + min: 0 + max: 9999999999999999 + title: Random seed + short: Random seed used in CNS to initialize the random seed function + long: Random seed used in CNS to initialize the random seed function + group: molecule + explevel: guru +ligand_param_fname: + default: "" + type: file + title: Custom ligand parameter file + short: Ligand parameter file in CNS format + long: + Ligand parameter file in CNS format containing all force field parameters + (bond, angles, dihedrals, impropers, van der waals) for any ligand not supported by default by HADDOCK + group: force field + explevel: easy +ligand_top_fname: + default: "" + type: file + title: Custom ligand topology file + short: Ligand topology file in CNS format + long: Ligand topology file in CNS format containing the ligand topologies + (atoms, masses, charges, bond definitions...) for any ligand not supported by default by HADDOCK + group: force field + explevel: easy +limit: + default: true + type: boolean + title: Limit the number of input molecules. + short: When true, the topoaa module can accept any number of input molecules. + long: Enable/disable the limit of input molecules for the topoaa module. + Setting the limit to false is useful when the topoaa module is followed by + scoring modules such as emscoring, or other analysis modules. If topoaa is + used in the middle of the workflow this parameter has no effect. + group: sampling + explevel: expert +set_bfactor: + default: true + type: boolean + title: Define if the b-factor column must be overwritten + short: When true (default), all b-factors are set to a default value of 15 + long: Defines if the original b-factor values are kept (true) or + all b-factors are set to a default value for 15 (false). + group: module + explevel: expert +tolerance: + default: 0 + type: integer + min: 0 + max: 99 + precision: 3 + title: Failure tolerance percentage + short: Percentage of allowed failures for a module to successfully complete + long: Percentage of allowed failures for a module to successfully complete + group: module + explevel: expert +cyclicpept_dist: + default: 2.00 + type: float + precision: 2 + min: 0.00 + max: 999999.99 + title: Cutoff distance for cyclisation + short: Cutoff distance in Angstroms for identification of backbone cyclic peptide + long: Cutoff distance in Angstroms for identification of backbone cyclic peptide (N - C) + group: molecule + explevel: guru +disulphide_dist: + default: 2.20 + type: float + precision: 2 + min: 0.00 + max: 999999.99 + title: Cutoff distance for S-S bonds + short: Cutoff distance in Angstroms for identification of disulphide bonds + long: Cutoff distance in Angstroms for identification of disulphide bonds (SH - SH) + group: molecule + explevel: guru +mol1: + type: dict + group: input molecules + explevel: easy + title: Input molecule configuration + short: Specific molecule configuration + long: + You can expand this parameter and associated sub-parameters to the other input molecules. For example, + if you input three molecules, you can define mol1, mol2, and mol3 + subparameters. Those not defined will be populated with the defaults. + cyclicpept: + default: false + type: boolean + title: Cyclic peptide + short: Defines the molecule as a cyclic peptide + long: + This option defines the molecule as a cyclic peptide and HADDOCK will generate a peptide bond between the N- and C-ter provided those are within 2A. + This cutoff can be changed in the generate-topology.cns script. + group: molecule + explevel: easy + nhisd: + default: 0 + type: integer + min: 0 + max: 9999 + title: Number of HISD residue + short: Defines the number of HISD residues (neutral HIS with the proton on the ND atom) residues when autohis=false + long: + Defines the number of HISD residues (neutral HIS with the proton on the ND atom) residues. + The corresponding residue numbers must be defined in the following parameter (hisd_1, hisd_2, ...). Add as many as needed. + Note that HIS is interpreted as a charged Histidine) + group: molecule + explevel: expert + hisd_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: HISD residue number + short: Residue number of the Histidine to be defined as HISD + long: Residue number of the Histidine to be defined as HISD + group: molecule + explevel: expert + nhise: + default: 0 + type: integer + min: 0 + max: 9999 + title: Number of HISE residue + short: Defines the number of HISE residues (neutral HIS with the proton on the NE atom) residues when autohis=false + long: + Defines the number of HISE residues (neutral HIS with the proton on the NE atom) residues. + The corresponding residue numbers must be defined in the following parameter (hise_1, hise_2, ...). Add as many as needed. + Note that HIS is interpreted as a charged Histidine) + group: molecule + explevel: expert + hise_1: + default: .nan + type: integer + min: -9999 + max: 9999 + title: HISE residue number + short: Residue number of the Histidine to be defined as HISE + long: Residue number of the Histidine to be defined as HISE + group: molecule + explevel: expert + charged_nter: + default: false + type: boolean + title: N-ter topology + short: Define if N-terminus should be charged or uncharged + long: + This option defines how N-terminus residue should be. If false (default), N-ter will be an uncharged NH, + as it would be in a peptide bond. If true, N-ter will be a charged NH3+. + group: molecule + explevel: easy + charged_cter: + default: false + type: boolean + title: C-ter topology + short: Define if C-terminus should be charged or uncharged + long: + This option defines how N-terminus residue should be. If false (default), C-ter will be an uncharged CO, + as it would be in a peptide bond. If true, C-ter will be a charged COO-. + group: molecule + explevel: easy + 5_phosphate: + default: false + type: boolean + title: Nucleic Acids 5' topology + short: Define if 5' end should be phosphate or not. + long: + This option defines how nucleic acid 5' residue should be. If false (default), + 5' end will be an OH. If true, 5' end will be a phosphate. + group: molecule + explevel: easy +molecules: + default: false + type: boolean + title: Input molecules + short: Path to the input molecules. + long: This parameter is a general mandatory parameter but is masked here to + allow parameter validation while preparing the run. Therefore, the default + and type values of this parameter are meaningless. + explevel: hidden + group: molecules diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg.param b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg.param new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg.param differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_aarch64-linux b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_aarch64-linux new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_aarch64-linux differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_arm64-darwin b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_arm64-darwin new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_arm64-darwin differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_x86_64-linux b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_x86_64-linux new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/._prodrg_x86_64-linux differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg.param b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg.param new file mode 100644 index 0000000000000000000000000000000000000000..9058b1f2f5caebb289f446e16e54672a63693d92 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg.param differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_aarch64-linux b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_aarch64-linux new file mode 100644 index 0000000000000000000000000000000000000000..9986e4a55b26800f13d3e7aa6bbdee923bb46f4d --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_aarch64-linux @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:46062721b37653cb7b4ce2beea327739e2ca354dca788686cbf9a5cb5da1ce85 +size 1919656 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_arm64-darwin b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_arm64-darwin new file mode 100644 index 0000000000000000000000000000000000000000..52d09c60d81aaae7fa4e6fda9e2191f4e1cab9e9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_arm64-darwin @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5310cfe5b99fdac912c76138f6cab712cd1270a3f4fe3f3f649278d966b987fd +size 737144 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_x86_64-linux b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_x86_64-linux new file mode 100644 index 0000000000000000000000000000000000000000..74524a3647b52dff6d0dd1c11761e94bafd5df8a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock/prodrg/prodrg_x86_64-linux @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:777a2a1f5ab28c3d5a4bcb0a442cd9a4abb5fe180119669c48e96fa0b20ae95d +size 1904548 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._INSTALLER b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._INSTALLER differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._METADATA b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._METADATA new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._METADATA differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._RECORD b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._RECORD new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._RECORD differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._REQUESTED b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._REQUESTED differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._WHEEL b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._WHEEL differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._entry_points.txt b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._entry_points.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._licenses b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._licenses new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._licenses differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._top_level.txt b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/._top_level.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/INSTALLER b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/METADATA b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..7433b3729bfad9f946ac1516f2f6762f95fdf33c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/METADATA @@ -0,0 +1,205 @@ +Metadata-Version: 2.4 +Name: haddock3 +Version: 2026.3.0 +Summary: HADDOCK3 +Author-email: BonvinLab +License: Apache License 2.0 +Project-URL: Homepage, https://github.com/haddocking/haddock3 +Project-URL: Documentation, https://github.com/haddocking/haddock3#readme +Project-URL: Issue Tracker, https://github.com/haddocking/haddock3/issues +Project-URL: Discussion Forum, https://github.com/haddocking/haddock3/issues +Keywords: Structural Biology,Biochemistry,Docking,Protein docking,Proteins +Classifier: Development Status :: 5 - Production/Stable +Classifier: License :: OSI Approved :: Apache Software License +Classifier: Natural Language :: English +Classifier: Operating System :: POSIX +Classifier: Operating System :: POSIX :: Linux +Classifier: Operating System :: MacOS +Classifier: Intended Audience :: Science/Research +Classifier: Topic :: Scientific/Engineering :: Bio-Informatics +Classifier: Topic :: Scientific/Engineering :: Chemistry +Classifier: Topic :: Scientific/Engineering :: Physics +Classifier: Programming Language :: Python :: 3.9 +Classifier: Programming Language :: Python :: 3.10 +Classifier: Programming Language :: Python :: 3.11 +Classifier: Programming Language :: Python :: 3.12 +Classifier: Programming Language :: Python :: 3.13 +Classifier: Programming Language :: Python :: 3.14 +Requires-Python: <3.15,>=3.9 +Description-Content-Type: text/markdown +License-File: LICENSE +Requires-Dist: pdb-tools>=2.5.0 +Requires-Dist: biopython==1.* +Requires-Dist: jsonpickle>=2.1.0 +Requires-Dist: numpy==2.* +Requires-Dist: pyyaml>=6.0 +Requires-Dist: scipy>=1.10.0 +Requires-Dist: toml>=0.10.2 +Requires-Dist: pandas==2.* +Requires-Dist: prodigy-prot==2.3.0 +Requires-Dist: prodigy-lig==1.1.4 +Requires-Dist: plotly==6.5.2 +Requires-Dist: freesasa>=2.2.1 +Provides-Extra: dev +Requires-Dist: coverage==7.10.7; extra == "dev" +Requires-Dist: pytest==8.4.2; extra == "dev" +Requires-Dist: pytest-cov==7.0.0; extra == "dev" +Requires-Dist: hypothesis==6.141.1; extra == "dev" +Requires-Dist: pytest-mock==3.15.1; extra == "dev" +Requires-Dist: fastapi==0.128.8; extra == "dev" +Requires-Dist: httpx==0.28.1; extra == "dev" +Requires-Dist: kaleido==1.2.0; extra == "dev" +Requires-Dist: pytest-random-order==1.2.0; extra == "dev" +Provides-Extra: docs +Requires-Dist: sphinx>=7; extra == "docs" +Requires-Dist: sphinx-argparse>=0.4.0; extra == "docs" +Requires-Dist: sphinx_rtd_theme>=3.0.1; extra == "docs" +Requires-Dist: CommonMark>=0.9.1; extra == "docs" +Requires-Dist: mock>=5.1.0; extra == "docs" +Requires-Dist: myst-parser>=3.0.1; extra == "docs" +Provides-Extra: mpi +Requires-Dist: mpi4py>=4.0.2; extra == "mpi" +Provides-Extra: notebooks +Requires-Dist: py3Dmol>=2.5.2; extra == "notebooks" +Dynamic: license-file + +# `haddock3` + +![haddock3-logo](https://raw.githubusercontent.com/haddocking/haddock3/refs/heads/main/docs/figs/HADDOCK3-logo.png) + +[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.16914680.svg)](https://doi.org/10.5281/zenodo.16914680) +[![Research Software Directory](https://img.shields.io/badge/rsd-haddock3-00a3e3.svg)](https://research-software-directory.org/software/haddock3) +[![fair-software.eu](https://img.shields.io/badge/fair--software.eu-%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F%20%20%E2%97%8F-green)](https://fair-software.eu) +[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/8844/badge)](https://www.bestpractices.dev/projects/8844) + +[![Downloads](https://static.pepy.tech/badge/haddock3)](https://pepy.tech/project/haddock3) +![PyPI - Version](https://img.shields.io/pypi/v/haddock3) +![PyPI - Python Version](https://img.shields.io/pypi/pyversions/haddock3) +[![SBGrid Badge](https://img.shields.io/badge/haddock3-blue?label=SBGrid&labelColor=%3D)](https://sbgrid.org/software/titles/haddock3) + +[![ci](https://github.com/haddocking/haddock3/actions/workflows/ci.yml/badge.svg)](https://github.com/haddocking/haddock3/actions/workflows/ci.yml) +[![pages](https://github.com/haddocking/haddock3/actions/workflows/pages.yml/badge.svg)](https://github.com/haddocking/haddock3/actions/workflows/pages.yml) +[![CodeQL](https://github.com/haddocking/haddock3/actions/workflows/github-code-scanning/codeql/badge.svg)](https://github.com/haddocking/haddock3/actions/workflows/github-code-scanning/codeql) +[![Codacy Badge](https://app.codacy.com/project/badge/Grade/e11e7f45400f4e8589cdf5941f95233a)](https://app.codacy.com/gh/haddocking/haddock3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_grade) +[![Codacy Badge](https://app.codacy.com/project/badge/Coverage/e11e7f45400f4e8589cdf5941f95233a)](https://app.codacy.com/gh/haddocking/haddock3/dashboard?utm_source=gh&utm_medium=referral&utm_content=&utm_campaign=Badge_coverage) + +## Introduction + +HADDOCK, standing for **H**igh **A**mbiguity **D**riven protein-protein **DOCK**ing, is a widely used computational tool for the integrative modeling of biomolecular interactions. Developed by researchers at [Utrecht University](https://uu.nl) in the [BonvinLab](https://bonvinlab.org) for more than 20 years, it integrates various types of experimental data, biochemical, biophysical, bioinformatic prediction and knowledge to guide the docking process. + +## Installation + +Simple installation of the [latest release](https://pypi.org/project/haddock3/) of HADDOCK3 (assuming you have a Python version 3.9 to 3.13 installed and the rights to install the software - if not refer to the instructions in [INSTALL.md](docs/INSTALL.md) for using either `venv` or `conda`) . + +```bash +pip install haddock3 +``` + +To install haddock3 with MPI support (required an OpenMPI installation - refer +to the instructions in [INSTALL.md](docs/INSTALL.md) use: + +```bash +pip install 'haddock3[mpi]' +``` + +In case you rather install the latest unreleased version use instead: + +```bash +git clone https://github.com/haddocking/haddock3.git +cd haddock3 +pip install . +``` + +For detailed instructions and installation of third-party software, please check [INSTALL.md](docs/INSTALL.md) + +You might also want to check the following utilities: + +- [`haddock-restraints`](https://github.com/haddocking/haddock-restraints): Tool to generate restraints to be used in `haddock3`. +- [`haddock-runner`](https://github.com/haddocking/haddock-runner): Tool to run large scale `haddock3` simulations using multiple input molecules in different scenarios +- [`haddock-tools`](https://github.com/haddocking/haddock-tools): Set of useful utility scripts developed over the years by the BonvinLab group members + +## Usage + +The most basic usage is: + +```bash +haddock3 +``` + +For help on haddock3 usage: + +```bash +$ haddock3 -h +usage: haddock3 [-h] [--restart RESTART] [--extend-run EXTEND_RUN] [--setup] [--log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL}] [-v] recipe + +positional arguments: + recipe The input recipe file path + +optional arguments: + -h, --help show this help message and exit + --restart RESTART Restart the run from a given step. Previous folders from the selected step onwards will be deleted. + --extend-run EXTEND_RUN + Start a run from a run directory previously prepared with the `haddock3-copy` CLI. Provide the run directory created with `haddock3-copy` CLI. + --setup Only setup the run, do not execute + --log-level {DEBUG,INFO,WARNING,ERROR,CRITICAL} + -v, --version show version +``` + +Check the [EXAMPLES](https://github.com/haddocking/haddock3/blob/main/examples/README.md) page for more some usage examples and the [User manual](https://www.bonvinlab.org/haddock3-user-manual) for a more detailed explanation of the configuration file. + +## Support + +If you encounter any code-related issues, [please open an issue](https://github.com/haddocking/haddock3/issues/new/choose). + +If you have any other questions or need help, please contact us at [ask.bioexcel.eu](https://ask.bioexcel.eu/). + +If you clone this repository and use `haddock3` for your research, please support us by signing up in [this form](https://forms.gle/LCUHiYHh1hE9rd8L6). This will allow us contact you when needed for `haddock3`-related issues, and also provide us a mean to demonstrate impact when reporting for grants - which grealty helps us to keep the project alive! + +## Cite us + +If you used `haddock3` for your research, please cite us: + +- **Research article**: M. Giulini, V. Reys, J.M.C. Teixeira, B. Jiménez-García, R.V. Honorato, A. Kravchenko, X. Xu, R. Versini, A. Engel, S. Verhoeven, A.M.J.J. Bonvin, [*HADDOCK3: A modular and versatile platform for integrative modelling of biomolecular complexes*](https://pubs.acs.org/doi/10.1021/acs.jcim.5c00969) Journal of Chemical Information and Modeling (2025). doi: 10.1021/acs.jcim.5c00969 [[BioRxiv]](https://www.biorxiv.org/content/10.1101/2025.04.30.651432v1) + +- **Cite this repository**: M.C. Teixeira, J., Vargas Honorato, R., Giulini, M., Bonvin, A., SarahAlidoost, Reys, V., Jimenez, B., Schulte, D., van Noort, C., Verhoeven, S., Vreede, B., SSchott, & Tsai, R. (2024). haddocking/haddock3: v3.0.0-beta.5 (Version 3.0.0-beta.5) [Computer software]. [https://doi.org/10.5281/zenodo.10527751](https://doi.org/10.5281/zenodo.10527751) + +## Useful resources + +- [User manual](https://www.bonvinlab.org/haddock3-user-manual): The online HADDOCK3 guide describing every aspects of the tool. +- [Best practice guide](https://www.bonvinlab.org/software/bpg/) (HADDOCK2.X series) +- [The HADDOCK2.4 web server: A leap forward in integrative modelling of biomolecular complexes. Nature Prot. 2024](https://www.nature.com/articles/s41596-024-01011-0) + +## Development + +Please check [DEVELOPMENT](https://github.com/haddocking/haddock3/blob/main/DEVELOPMENT.md) for instructions on how to develop `haddock3` + +### Code Documentation + +The code documentation is automatically built and hosted at [bonvinlab.org/haddock3](https://www.bonvinlab.org/haddock3/). + +To build it locally it is necessary to have some extra packages installed. You can install them using the following command: + +```bash +pip install -e '.[docs]' +``` + +Then, to build the documentation, run the following commands: + +```bash +sphinx-apidoc -f -e -o docs/ src/haddock -d 1 +sphinx-build -b html docs haddock3-docs +``` + +> Warning messages are expected, but the documentation should be built successfully. + +The rendered documentation will be available at `haddock3-docs/index.html`. This will open a local webpage with the + +### Contributing + +Check the [CONTRIBUTING](CONTRIBUTING.md) file for instructions on how to contribute with the project! + + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/RECORD b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..5fc92f9cc3be706c933dc745c99a8c5fc24c795f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/RECORD @@ -0,0 +1,571 @@ +../../../bin/haddock-restraints,sha256=Yags-YNY67tJLwfMd2_pZq_sz-aP_6FuwvicD8S3DBw,234 +../../../bin/haddock3,sha256=HbfycSqG7JkHVfu1D9670SESUMQzg8OInaflb02qREE,217 +../../../bin/haddock3-analyse,sha256=qCpYoFSoGA9gdvuRbu46H91TjHtxUwIHcbCWafUuoHs,225 +../../../bin/haddock3-cfg,sha256=Nqqqvi-PZyVx2i0JH1g3rde6uYAT3W_g2I4WcZmFCPE,221 +../../../bin/haddock3-clean,sha256=U5jXBhPP7vqMp2rsFrXptxExOkcG63EL1FNDMakHNHQ,223 +../../../bin/haddock3-copy,sha256=rcvMAxwINQe-Qv24fUD3nee2jGdB9ZCXuqt07jL1gKw,220 +../../../bin/haddock3-dmn,sha256=exb1Aop7kqqAhrptONYsqtFPT3dqWc9LdoGotYJuwPY,221 +../../../bin/haddock3-mpitask,sha256=47Cg7mItK8Dj53_JQ1861-wSoCCT0WXfkkSjFX4AgcU,221 +../../../bin/haddock3-pp,sha256=B8Cm4L42TSeRiRzH9iIWmICVFUUPsEXtA-SBy20ar5Q,220 +../../../bin/haddock3-re,sha256=MJ4Vw8DptOivUx3wOQbhbODMA1SBIH14Wwy2OOHwCdc,220 +../../../bin/haddock3-restraints,sha256=CZ94yeu7W_hRwcUffa4LeYvrlSr36O3Z-R46m6P3ZWw,228 +../../../bin/haddock3-score,sha256=EOcjnW0I9aCephqoxTkow13ucouSYkD-fdvSPyy1Sg0,223 +../../../bin/haddock3-traceback,sha256=_9PDyQF__1wI3w1XWCC97TEOjZTCOA33NuEO301pBek,227 +../../../bin/haddock3-unpack,sha256=r1oU7rdrcK6b_aW08m2I_-yPJxmo7fKkIXhzbm5X1pY,224 +haddock/__init__.py,sha256=fIVrlAmZV9hM6SOJ1WyB0Poh2vShgepyMsy3BiJpGiE,1325 +haddock/__pycache__/__init__.cpython-312.pyc,, +haddock/bin/contact_fcc,sha256=DJQb0bttBNGHK0nRmTEdstqltzFIW129po9kIAEoxDY,73320 +haddock/bin/contact_fcc.cpython-312-darwin.so,sha256=FOj9VPji2dkAtHCMOH7bnmEEHtdErF_QNZ4-E7QKKLo,89904 +haddock/bin/fast-rmsdmatrix,sha256=zxAahCUM1PGyjV5uq5me5xy7JD4JIM3TxDIZHFq8tEs,52512 +haddock/bin/fast_rmsdmatrix.cpython-312-darwin.so,sha256=KgN-7iQLhS0-PBPJxJjcldF2ocXYjzkzzjSCYJaZCdA,69048 +haddock/bin/haddock-restraints,sha256=Das8qLkNpGtjcL1q9Ilo3T3Nud649qCFptDM5PTx6mk,2157456 +haddock/clis/__init__.py,sha256=hQdjlVdnd-_1BJHBTojZc5dpJPM2HtJ8ueluHj1VnUk,211 +haddock/clis/__pycache__/__init__.cpython-312.pyc,, +haddock/clis/__pycache__/cli.cpython-312.pyc,, +haddock/clis/__pycache__/cli_analyse.cpython-312.pyc,, +haddock/clis/__pycache__/cli_cfg.cpython-312.pyc,, +haddock/clis/__pycache__/cli_clean.cpython-312.pyc,, +haddock/clis/__pycache__/cli_cp.cpython-312.pyc,, +haddock/clis/__pycache__/cli_dmn.cpython-312.pyc,, +haddock/clis/__pycache__/cli_mpi.cpython-312.pyc,, +haddock/clis/__pycache__/cli_pp.cpython-312.pyc,, +haddock/clis/__pycache__/cli_re.cpython-312.pyc,, +haddock/clis/__pycache__/cli_restraints.cpython-312.pyc,, +haddock/clis/__pycache__/cli_score.cpython-312.pyc,, +haddock/clis/__pycache__/cli_traceback.cpython-312.pyc,, +haddock/clis/__pycache__/cli_unpack.cpython-312.pyc,, +haddock/clis/__pycache__/wrapper_haddock_restraints.cpython-312.pyc,, +haddock/clis/cli.py,sha256=HNfcDz4F2xQAaPn7ntg5JukG_HfyVayawErv4UhSe9s,6064 +haddock/clis/cli_analyse.py,sha256=06uPRsRW72qDcR1uM2qM4GipA_tEKacJJeyaqUGZPLo,25845 +haddock/clis/cli_cfg.py,sha256=97OY3h0d9APVUBEojBQQrmSMzlPWrzKsuChG4uHyHls,6514 +haddock/clis/cli_clean.py,sha256=lf2s6PGQbzkLjUHhOp9_jtiLHnrj5oPW_tQaST4-Fu4,2976 +haddock/clis/cli_cp.py,sha256=kT3thSQ55T-DE8AsvKWutCXIst_TAHb47dDUGEGH2jg,4687 +haddock/clis/cli_dmn.py,sha256=r28ByoEwQMZUuFcr2mbj-mRvsKdSpOOsvueAUV3s7YM,8863 +haddock/clis/cli_mpi.py,sha256=-xwqD3s0-jOtVKYhWw1eoxLgBpKJjbNp9n85Amdiw8U,3114 +haddock/clis/cli_pp.py,sha256=I5vIswQgYr7hsdTxL_8z_krKEcV2YuvOnmmwEKQZpqo,4357 +haddock/clis/cli_re.py,sha256=oi8J-fag-NcSDq6eLc8OUi1zXlYmDWJ4i2k_VlolyGQ,1663 +haddock/clis/cli_restraints.py,sha256=g6cKYGz16mAwimhNfC4LW-SJmBVh7G3xVPHiuXQAgpU,4304 +haddock/clis/cli_score.py,sha256=8hd7c4YK74tKr8K9EJWe6zb62yZpSSyufyc6kDMlfMM,8874 +haddock/clis/cli_traceback.py,sha256=WLU9rvhTofaepCSE1V0n7hqkGIgf_GAg9Jl3GUeCgDk,12694 +haddock/clis/cli_unpack.py,sha256=qVGHgJtIpZ9XQdJ_srWn0OxN5rnkJueVjayu40g_gG4,3540 +haddock/clis/re/__init__.py,sha256=AbpHGcgLb-kRsJGnwFEktk7uzpZOCcBY74-YBdrKVGs,1 +haddock/clis/re/__pycache__/__init__.cpython-312.pyc,, +haddock/clis/re/__pycache__/clustfcc.cpython-312.pyc,, +haddock/clis/re/__pycache__/clustrmsd.cpython-312.pyc,, +haddock/clis/re/__pycache__/score.cpython-312.pyc,, +haddock/clis/re/clustfcc.py,sha256=8R_57DdEgxvmjv1xokV3_nYCpk8zeuaLiqekX2h9f3o,6623 +haddock/clis/re/clustrmsd.py,sha256=7Ktju36_SEvgL2aPi-aAEKJkTIWV-D2pf-tjZy7bagk,8825 +haddock/clis/re/score.py,sha256=aIfH1a47wtgobNBf2xaW5JM6SdN1y1SDcim1NmI3DYc,4540 +haddock/clis/restraints/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +haddock/clis/restraints/__pycache__/__init__.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/active_passive_to_ambig.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/calc_accessibility.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/passive_from_active.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/random_removal.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/restrain_bodies.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/restrain_ligand.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/validate_tbl.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/webservice.cpython-312.pyc,, +haddock/clis/restraints/__pycache__/z_surface_restraints.cpython-312.pyc,, +haddock/clis/restraints/active_passive_to_ambig.py,sha256=EjG0fM1W5UuWEYZQamisc0x3FikLSLz8vonbug1XueA,2283 +haddock/clis/restraints/calc_accessibility.py,sha256=M9Z4zhNXM7PXEkZaW816KMwMNgE51_GlOaY4deL1Ef8,11269 +haddock/clis/restraints/naccess.config,sha256=bk8sLKHwBo2StPKMAZD5MrB7CXHi0Ms19rHSgW4-DEo,4493 +haddock/clis/restraints/passive_from_active.py,sha256=7xVfgod0kTh6OSYBmsMV3mG7IqPlsGNxE4WCankx-bI,2192 +haddock/clis/restraints/random_removal.py,sha256=ZC5xbZ7HkeQeEzzDhiRW8lY44JP_f2tSAOTW0g4749Q,5274 +haddock/clis/restraints/restrain_bodies.py,sha256=osq-RLusT08rkECU5xduq526nI45P_yb3c-KKQk5uNE,1705 +haddock/clis/restraints/restrain_ligand.py,sha256=2wgTBiWKdQjUfcoS-kpKqDKtrETAGjUDUa2BRTSSd_E,7477 +haddock/clis/restraints/validate_tbl.py,sha256=4Sag8zN6KHdCVvwcPud4Lzp-SqkKHx7_TgNV1m7fT9U,1694 +haddock/clis/restraints/webservice.py,sha256=Gtakyjba8rsPwehm8PiQhdpzYMLgydVWSRLBmZjx8nE,9774 +haddock/clis/restraints/z_surface_restraints.py,sha256=qKBYYx2NKn7j93pOyxujOf3cYtJAP03CWDQTM3-Vrvg,23114 +haddock/clis/wrapper_haddock_restraints.py,sha256=qkK7jgaAUtD0oe1U5EArqSJb6XyIlDE189Xv5shyTBs,432 +haddock/cns/bin/aarch64-linux.bin,sha256=cgiN1cg69k5XbNlpP7t6AbrZU0GS7-KSiQyK17u7uXQ,3947816 +haddock/cns/bin/arm64-darwin.bin,sha256=5v6_dOzLdA-LxdSZVcyPwgICXV1kLhKedzjnKArZWog,4171768 +haddock/cns/bin/x86_64-darwin.bin,sha256=UR0WNJL4h4vojnQDP7-PnzHJdRW78Wo4di8_zQwP8x0,4089832 +haddock/cns/bin/x86_64-linux.bin,sha256=zmsMa5044JmR-xVDFALpLLOMcjVEstzKeo3Ci2ZkOSc,6363048 +haddock/cns/toppar/boxtyp20.pdb,sha256=sROuDiaM-qLE2ktszjP9ZSWckF2Nb0S2_kKVh81SRwA,51077 +haddock/cns/toppar/carbohydrate.param,sha256=vPGsd7ljzfe5vY6Ps0pLNQm_wisQIll5W7y6Im6C0QY,12136 +haddock/cns/toppar/carbohydrate.top,sha256=Q4zyL0GJ--GaakL_TW-LLWIKF0nggMbFIZ0J2QUgj6w,87186 +haddock/cns/toppar/cofactors.param,sha256=zsmdvfZS_M5SQpT2xOPaCt03mXqM4Y0UMg7xktnx18U,144746 +haddock/cns/toppar/cofactors.pep,sha256=daEdpEyAJIa8b2VkCqSKcw8PaExcB6Qro80XNes_sHA,2 +haddock/cns/toppar/cofactors.top,sha256=WxfXuY29EZVGfRlZqG6Zbzd5LvMzFfkr2UQSD-2AXek,85089 +haddock/cns/toppar/dmso.pdb,sha256=in1vU16IwxIYK00FzxQjxeEHtQbTA9Kbq0LZ0KzhvEM,57626 +haddock/cns/toppar/dna-rna-1.3.link,sha256=FugBWXkMYrc6m0wmptr01bKLCPC8KmS5jmt1BIj3ylU,2259 +haddock/cns/toppar/dna-rna-CG-MARTINI-2-1p-break.top,sha256=SZ2x6DLH5wcyz3SoHBNtUATt2qiqLanYnfokzfNoRAM,499 +haddock/cns/toppar/dna-rna-CG-MARTINI-2-1p.link,sha256=SF_9DDUQgVImO_whCjop8kImw4oxAmaipztiZ2NeB98,1267 +haddock/cns/toppar/dna-rna-CG-MARTINI-2-1p.param,sha256=gPlvW0DGdmzfK7ORBvkLNnIzW2XCWlFL361MZmGjUBY,76501 +haddock/cns/toppar/dna-rna-CG-MARTINI-2-1p.top,sha256=1sLHl25iT5QhtxwWLd-koiPEUcBaZbZAscMTYj-6hrU,8756 +haddock/cns/toppar/dna-rna-allatom-hj-opls-1.3.param,sha256=5W5PHA9vJFvrzbDWrnCl8L2a8Ihp9PT3hNEZTykETN0,62721 +haddock/cns/toppar/dna-rna-allatom-hj-opls-1.3.top,sha256=BKACbR5dmo3yB_or_zLM_7A6erILgdiwySdHJRpM2xA,38255 +haddock/cns/toppar/dna-rna-pho-1.3.link,sha256=TAdg38H-8aR1WbtHDlGyyvXueRGjFYdS5La7TAkmyW8,2230 +haddock/cns/toppar/dna_break.top,sha256=jNWk98MIiiuVAv-D7nbsCz4VRJbyxXA7mOefOYl0J78,553 +haddock/cns/toppar/fragment_probes.param,sha256=WkjBh_7xOdtQnnC5iMT3FAdMC-hPAjzhx5sibl3Cw9Q,27601 +haddock/cns/toppar/fragment_probes.top,sha256=dqwqOyLA3dKrnHjdMYCJLy2jML8VZhWJTv8eD1_vtOM,60109 +haddock/cns/toppar/heme.pdb,sha256=dIRbmE_a1TxTvpx8nFxWuYVjr-Fa9ED7uiFobxsV7GA,6372 +haddock/cns/toppar/heme.psf,sha256=AO7A04zsDO6c_77JNmAo2neBmbLznohXejdIVPh1gGU,7674 +haddock/cns/toppar/hemeB.pdb,sha256=CUBqwwh0afEIPoqWh1HXzYQIFIZs7wc2YGg_97bbMr0,5746 +haddock/cns/toppar/hemeB.psf,sha256=6GAfkNHU1qEmWtb0DPVD1f7OxrwkENe9Jf0m52eFzQI,14147 +haddock/cns/toppar/hemes-allhdg.param,sha256=tWeMEsN27BGNm7SxIfNJRGLkU3Asc51LUJhScFPKKqU,11258 +haddock/cns/toppar/hemes-allhdg.top,sha256=3NRn1rwAOnS9MeVrQ2_28C6yl3lraR7-gL2PpKPBqtU,19060 +haddock/cns/toppar/hemes.pep,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +haddock/cns/toppar/initial_positions/trans_vector_0,sha256=SwBBT7HxN1lS4_7Lv-C6Nuln3RLzCP1y9Wow4DVnmXY,114 +haddock/cns/toppar/initial_positions/trans_vector_1,sha256=rtjduBEEzPBSHQ0gB0_XhHLGeMIp1XVQRaGrddmKRaA,117 +haddock/cns/toppar/initial_positions/trans_vector_10,sha256=32pz0VLs4s31FrvxB0K46WlN9u7U72tqx9K-3QvE7bo,1189 +haddock/cns/toppar/initial_positions/trans_vector_11,sha256=KVJgv3lu5ma0DdKSlhM7b6pMtMxWgZ2V3xQ-4o_nTEI,1310 +haddock/cns/toppar/initial_positions/trans_vector_12,sha256=iXXjxf7-hC2hr-f1-nuLKQAROiwpU1TlBfmkW0plu3E,1431 +haddock/cns/toppar/initial_positions/trans_vector_13,sha256=Z6Z31uhsvOrIYuWf70D4qMClfW_A16avVM8FjNw5GPQ,1552 +haddock/cns/toppar/initial_positions/trans_vector_14,sha256=MIw7czOW-HiA0o_z4kh5rWxc0dhszpqNccs5gA_M_O8,1674 +haddock/cns/toppar/initial_positions/trans_vector_15,sha256=6Y6T1AQ1jLu7dspPUDSo7hGDpZ_xu3hyYnBUONh5TcQ,1795 +haddock/cns/toppar/initial_positions/trans_vector_16,sha256=IFWYxzto9yFNw_ji4vHF5dtyVD8Wwz_zqtck7sxkHyU,1918 +haddock/cns/toppar/initial_positions/trans_vector_17,sha256=EaxylLQsSGoQd5DAZl-T1qMJ7O6k_WcGFuNwc8bN-Jw,2038 +haddock/cns/toppar/initial_positions/trans_vector_18,sha256=YhCaxXSpINoWUvjKJHtBysbj0SyqMyQc72dPS0I97KI,2160 +haddock/cns/toppar/initial_positions/trans_vector_19,sha256=Mfz8J0K-qaQTQv_d6J_KdHGoQMQjABY4-qTWjD-f8DU,2281 +haddock/cns/toppar/initial_positions/trans_vector_2,sha256=GPonFreK6rDPuXricSRuEpIzgBXSNRUNQmM-zxUXTcw,237 +haddock/cns/toppar/initial_positions/trans_vector_20,sha256=ODBLpHkiI7B-BeYmeRyBL7182HaX3ymH0EUfPk2yv7U,2403 +haddock/cns/toppar/initial_positions/trans_vector_21,sha256=LsnG3uIodEESa5dU0ce3NLSc-XdivibppxraS5cGfTY,2524 +haddock/cns/toppar/initial_positions/trans_vector_22,sha256=6X2ZJrO2v74Z82f1z-DYO9ig-TCbOnE_ZL9drC0Yj38,2645 +haddock/cns/toppar/initial_positions/trans_vector_23,sha256=JvaB2-s36qbj0jjjQYFUnx8Qq7U9AkGipCXE8hcc94Y,2766 +haddock/cns/toppar/initial_positions/trans_vector_24,sha256=TZseOIIOUBV13vTHUawpqOsA-ZBpWRkEohVFg5NybQE,2887 +haddock/cns/toppar/initial_positions/trans_vector_25,sha256=jbv61_C9SBrRieeezOJL6o4VdYyEPRVMInuH7i8r17c,3010 +haddock/cns/toppar/initial_positions/trans_vector_26,sha256=SNR8glIMs4FxrlnluzQrunRriSWYBfJM80r5poFRd70,3133 +haddock/cns/toppar/initial_positions/trans_vector_27,sha256=HOgRJTe02k1nUAFUTIRuRBmSlO9v6k-LyjTytazjfc8,3253 +haddock/cns/toppar/initial_positions/trans_vector_28,sha256=cCXRYBF57mrBvk6nys0YEVwiZr5r8RI6xY0HtLWRyDE,3376 +haddock/cns/toppar/initial_positions/trans_vector_29,sha256=8pk1hA6-6sltWoHAAQnT6BbRKmIKdY-L-ep0tiN0-Vc,3497 +haddock/cns/toppar/initial_positions/trans_vector_3,sha256=pbeRX5_vbSFuAGRPkKF2z4ocjPUvt9GiXcEoJrxpgAw,354 +haddock/cns/toppar/initial_positions/trans_vector_30,sha256=9z4s49cys49ZVZ2Clx2iGHCPqmTYdxzjLkUpinnPQvA,3618 +haddock/cns/toppar/initial_positions/trans_vector_31,sha256=CNqWOwLO94DpfpfHBJCMQF2_PBt6rdMes4GTVuRgp4A,3740 +haddock/cns/toppar/initial_positions/trans_vector_32,sha256=f3RkyjF9cbfpOGC_BLNOqRrGtLkzuLQ5uM9WVh_XmNs,3861 +haddock/cns/toppar/initial_positions/trans_vector_33,sha256=vp_i7RtNAoCrp_3qZ3dGp6qylVgWJ6JHewSOe5ZRrdk,3981 +haddock/cns/toppar/initial_positions/trans_vector_34,sha256=VuePwiByUCWn782UBW9-_R-B0iLEGd1ly93Qy0NCF9M,4103 +haddock/cns/toppar/initial_positions/trans_vector_35,sha256=HY5NNYbKDTv5pReRTMha-dEhxVjPRHfArmorkXARzVI,4226 +haddock/cns/toppar/initial_positions/trans_vector_36,sha256=qSUHqc4NXWNFOjunMYhBdne0nKDuUBKbt2ri2vkuGDE,4347 +haddock/cns/toppar/initial_positions/trans_vector_37,sha256=cabhHC2gbUAV-ua4BdhhHQRT_VAflOlOJMJ7nfidmIQ,4469 +haddock/cns/toppar/initial_positions/trans_vector_38,sha256=G-_8b9YYa5o6dXbgNrborVMKBdWwMDM9zqOiMQLHCJo,4590 +haddock/cns/toppar/initial_positions/trans_vector_39,sha256=QfQuaGCg746MM7sWrOiUFhvkGCWK7CqdPGMSxENoCKI,4713 +haddock/cns/toppar/initial_positions/trans_vector_4,sha256=KQX0wW1AeAvuf53HsNBzGXQkQ7bZDL1cFr-SUbAxhEc,473 +haddock/cns/toppar/initial_positions/trans_vector_40,sha256=M0drggL_YM04LxUgN0-oPXFfKsGVhOvsLL-osiXhlQM,4834 +haddock/cns/toppar/initial_positions/trans_vector_41,sha256=6MNh7CpvoxHY1-4bFlXa6x4b2GOygGbsovxBeU23x40,4958 +haddock/cns/toppar/initial_positions/trans_vector_42,sha256=yPXV9K00LiWw6dh5oWsI1KFq2eFGpqdgc5TtNOYyFEA,5076 +haddock/cns/toppar/initial_positions/trans_vector_43,sha256=44heeC_5LKC2QE4t5-jCHxwMnBAkog3p8mzr5PdNiLc,5197 +haddock/cns/toppar/initial_positions/trans_vector_44,sha256=t8ruh9HCr-PPs_n3otR83TfK1aQDO3wS3dX0kZWGqtc,5319 +haddock/cns/toppar/initial_positions/trans_vector_45,sha256=DQiDSGzGyUwjoDmZ5sQ9GgKJIwp6ORNc5a1iXqO9PSk,5441 +haddock/cns/toppar/initial_positions/trans_vector_46,sha256=c4pDHAHFeDmCsJK6uQa98Z3L6zHGM4JjFUvdjMflk6w,5561 +haddock/cns/toppar/initial_positions/trans_vector_47,sha256=c33i0zyY4PWNSR0VIUktvvQBbLW-dzOwD9hVKaRV2wA,5684 +haddock/cns/toppar/initial_positions/trans_vector_48,sha256=rXq0tH2X6ti4XggzLXjuM1bgK1SHMGDE_hWSaRwpS8s,5805 +haddock/cns/toppar/initial_positions/trans_vector_49,sha256=QYw2KQMINmghAok-OhixWHdC2shDiKeq9CDCYAu98eg,5927 +haddock/cns/toppar/initial_positions/trans_vector_5,sha256=LYAdBIeAZphgR9FVnwA1rHaITSdLw66WHKolliA4zlI,592 +haddock/cns/toppar/initial_positions/trans_vector_50,sha256=f9VzoGOVTr02Q6JJ_LeNZYb5oklx5ZddFpFmDNP_zA8,6049 +haddock/cns/toppar/initial_positions/trans_vector_6,sha256=M2MYuXSCQ-Di1CFgcHDtv7LJ7HEW2_DeXHIu9RRsSgY,711 +haddock/cns/toppar/initial_positions/trans_vector_7,sha256=rqZC9pS6I4jywcIB7-kHcvpPN2BEq-eLJVvFitNccZI,831 +haddock/cns/toppar/initial_positions/trans_vector_8,sha256=-5Zxpbwwm2FF1dJXn57e8Wii0aRxCs8WzeWDzNXAI7E,950 +haddock/cns/toppar/initial_positions/trans_vector_9,sha256=MkreysXN4ZqX-HIX0ghG-ju3n6wzy6Nfsl9dSS-D-10,1067 +haddock/cns/toppar/ion.param,sha256=hv0AZDT9-1oNa8mQN1nRJ6Cqkt5gPw1X3u_QwnFVk-4,5179 +haddock/cns/toppar/ion.top,sha256=tUWJkmafNh4q9tiDnrfGdAgMT-87RJ8GVQnzfVl7_fw,10961 +haddock/cns/toppar/metalcenter.tbl,sha256=nE6urZxJZXq1kJcEHRGNwJg8V8kAXxXnN8AWx93uJQo,160 +haddock/cns/toppar/par_axis.pro,sha256=QcvLoIrq12XuQNJlypyGNg0_CNp_Zh0Hhh7RORtsCz0,700 +haddock/cns/toppar/par_axis_dani.pro,sha256=qewpcxTdFm74WZ1GbB98NKt5WRX0ZqcEAeAeFCKoyN8,652 +haddock/cns/toppar/protein-CG-Martini-2-2.link,sha256=R-JGxuijAbjpq5L2ikjl2gnQ_vrx_RL5KZvb8za78FQ,56248 +haddock/cns/toppar/protein-CG-Martini-2-2.param,sha256=QgHFxgd805NxI84pDhaatYkAbUmOGMTMVCVh4KcQXaM,1404087 +haddock/cns/toppar/protein-CG-Martini-2-2.top,sha256=DnmVsFid_xacYmmh7uPnIbt9ImvaiSkyq3XtsHSMRGk,7823 +haddock/cns/toppar/protein-CG-Martini.link,sha256=R-JGxuijAbjpq5L2ikjl2gnQ_vrx_RL5KZvb8za78FQ,56248 +haddock/cns/toppar/protein-CG-Martini.param,sha256=1SZ1ajgJltklg5b0qqGmGcotiBYDZTNzQmSz8TiHKTc,1833141 +haddock/cns/toppar/protein-CG-Martini.top,sha256=F87Xg0vU5_sCV26G7wf1U7dSzenBXzv8uVrRmgWJE74,7303 +haddock/cns/toppar/protein-allhdg5-4-noCter.link,sha256=MSGO8LLiT1O6L4ODQQrD--9zvSwSRyU04aZLlamDokM,94690 +haddock/cns/toppar/protein-allhdg5-4-noNter.link,sha256=nAQpiIU5pxmkkkx0GF32VYymGgvgO5lDj_KoFzV370I,94589 +haddock/cns/toppar/protein-allhdg5-4-noter.link,sha256=1tiK4XQ1Lt2O5ipdM6w2hBQQzeDp7-J-lePhkdPNrLA,93387 +haddock/cns/toppar/protein-allhdg5-4.link,sha256=YIVnKQ4LUEE88qi0PwgXyYPAa7Z54AlH1a07H4DEPPI,95891 +haddock/cns/toppar/protein-allhdg5-4.param,sha256=8h30h3ieGkRro1_or2bDz1U2TaqMUjAaK6_T3tf9W2k,119314 +haddock/cns/toppar/protein-allhdg5-4.top,sha256=1c37BXS6tGAJCIMJy2Ry2Hce-j7aBfRsDTPnzdxXFlE,106529 +haddock/cns/toppar/scatter.lib,sha256=QbuDzDND0nXUHnPGE1j5xjMU4eG9gghXoafMgWjkn3M,27508 +haddock/cns/toppar/shape.param,sha256=3Ns17S4SR6WqXLq6hU1-yb1SDVl4L1i4o5ejsAHLgYU,229 +haddock/cns/toppar/shape.top,sha256=e4V32_I13vtNPGdJLihWgh-lWNzFSKKWN0JnscgdZNQ,352 +haddock/cns/toppar/solvent-allhdg5-4.param,sha256=BaapuWG0qUlTQjUvYgB5QZjbErnRVHI-3HuJi4eDQ0w,1376 +haddock/cns/toppar/solvent-allhdg5-4.top,sha256=SzVG8KirJ460WHS0YSaAuWqxRg7kivtHrr1ErEcju44,3983 +haddock/cns/toppar/tensor.pdb,sha256=FxQeD9NNeaNAlDwldq0dgHm5_RFWcxu0SUBuHJWFs0A,3253 +haddock/cns/toppar/tensor.psf,sha256=WcmWCaVK33MnfCneVRWkj3AKFzd3UFRVJJLlm-YycaM,3303 +haddock/cns/toppar/tensor_dani.pdb,sha256=WWshNHksvNUOvAlgfMpQs-oETqph2kFmqaM6AIxeFLc,1750 +haddock/cns/toppar/tensor_dani.psf,sha256=qq0Uef1h1q2dbJO0i1JdAX_cR-dBi3AlR2RLDbvfqtk,2135 +haddock/cns/toppar/tensor_para.pdb,sha256=QUUM3dPUW3x0L5zJYAIsg_TwKsadzQPtRsFoKMVmH2o,3260 +haddock/cns/toppar/tensor_para.psf,sha256=deVGT8ZwFqE4YjNhOLE5hHzlbRbWMdnVPfwe0XU2IT8,3430 +haddock/cns/toppar/top_axis.pro,sha256=Z-Sikf-PDxIQG67l-SphHbUo-B7dJkR0HhmyjSDRL9Y,976 +haddock/cns/toppar/top_axis_dani.pro,sha256=XgxnQVlXDm45_VHPM7wNEsjKjhIAuOKeUq1tbh5j2yc,533 +haddock/core/__init__.py,sha256=LvOBCQzcgwxQPixN3ae2TjxXlDdjw0Ax2Rds4h1UFEE,39 +haddock/core/__pycache__/__init__.cpython-312.pyc,, +haddock/core/__pycache__/cns_paths.cpython-312.pyc,, +haddock/core/__pycache__/defaults.cpython-312.pyc,, +haddock/core/__pycache__/exceptions.cpython-312.pyc,, +haddock/core/__pycache__/supported_molecules.cpython-312.pyc,, +haddock/core/__pycache__/typing.cpython-312.pyc,, +haddock/core/cns_paths.py,sha256=qJyE6Z-Uty5by6OiYXm60_tVv84j53t3vwHYCe7Cb7Y,2828 +haddock/core/defaults.py,sha256=yKknPzxichto_jG3ZJ48wsSAcyrpZPmROdmzJMwKI7I,1413 +haddock/core/exceptions.py,sha256=T86eYzR0biAFyIt2XKEtjoEjH5DiXZm8PT6e_fGlVIQ,1535 +haddock/core/mandatory.yaml,sha256=wX-qX6eZN_r8hWOq7viqzrcXv4A9XpZDpIQelApHtqU,496 +haddock/core/optional.yaml,sha256=cNkWKEPh6I6PspNb4x4IUUt-5YKCKVMYGq9ObO9pGQU,1590 +haddock/core/supported_molecules.py,sha256=ilmim2ZnlWpoYPWvjgpXBAbo43wfM_quRkVe5Foh3hA,16077 +haddock/core/typing.py,sha256=zVKozQwtcohx-Lfa8HM8y4fx_xi5ti1z2Zv99_e_BcE,4555 +haddock/deps/contact_fcc.cpp,sha256=ITn5R6VQmurHZ2XEuNpC0aeu54YbDgXZekpOshvTOKs,2948 +haddock/deps/fast-rmsdmatrix.c,sha256=IXXeREAcNmrWKcCHvLRG1_4IzA5noeY-1je4HbHCJbE,29676 +haddock/fcc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +haddock/fcc/__pycache__/__init__.cpython-312.pyc,, +haddock/fcc/__pycache__/calc_fcc_matrix.cpython-312.pyc,, +haddock/fcc/__pycache__/cluster_fcc.cpython-312.pyc,, +haddock/fcc/calc_fcc_matrix.py,sha256=L1I-q5PZLGRwtw365y3rXchX6bqtm-XfS9cOujVIT5k,2453 +haddock/fcc/cluster_fcc.py,sha256=uRL_hM6ObhHSL_IMLhzIk8SyunZC5u5aWO-bIid1hpA,4628 +haddock/gear/__init__.py,sha256=DISpBt2ms1ySWT0xuSistlspfN9pzeXEcX53-U222Ec,274 +haddock/gear/__pycache__/__init__.cpython-312.pyc,, +haddock/gear/__pycache__/clean_steps.cpython-312.pyc,, +haddock/gear/__pycache__/config.cpython-312.pyc,, +haddock/gear/__pycache__/expandable_parameters.cpython-312.pyc,, +haddock/gear/__pycache__/extend_run.cpython-312.pyc,, +haddock/gear/__pycache__/greetings.cpython-312.pyc,, +haddock/gear/__pycache__/haddockmodel.cpython-312.pyc,, +haddock/gear/__pycache__/known_cns_errors.cpython-312.pyc,, +haddock/gear/__pycache__/parameters.cpython-312.pyc,, +haddock/gear/__pycache__/postprocessing.cpython-312.pyc,, +haddock/gear/__pycache__/prepare_run.cpython-312.pyc,, +haddock/gear/__pycache__/preprocessing.cpython-312.pyc,, +haddock/gear/__pycache__/restart_run.cpython-312.pyc,, +haddock/gear/__pycache__/validations.cpython-312.pyc,, +haddock/gear/__pycache__/yaml2cfg.cpython-312.pyc,, +haddock/gear/__pycache__/zerofill.cpython-312.pyc,, +haddock/gear/clean_steps.py,sha256=rOlXliZ93XrRwU-WfpUuu6-FT37AYoRxMOBej-Dd5jM,7379 +haddock/gear/config.py,sha256=oH2Wnzf4HF7f5sU1noE3aDzBWn1vOZatevaScAHaUGY,9820 +haddock/gear/expandable_parameters.py,sha256=AtHl24Fw7Qeqd22lJjwxIU96GV7zNZrQjm1PxMiM5aY,27121 +haddock/gear/extend_run.py,sha256=RlrnlGdyYeo2Y4fWRUKB6AciIUE7K-Nv2WNucvlaDow,8139 +haddock/gear/greetings.py,sha256=OWfnxg-_RN3gjBNMg_1Ec3ukX2eIZRlXrjyc_TsCIAk,3516 +haddock/gear/haddockmodel.py,sha256=2xBtLlMkYsOd7CQ0Qq2RyKV7XowRcJlhURE_n14_XRA,5437 +haddock/gear/known_cns_errors.py,sha256=CDtBJ1RSWBmRAJzuiCT5BrfCC5Ch2Hw_hOR3J130zr8,6910 +haddock/gear/parameters.py,sha256=e7ZAOzOZzijlKWHTqeDgHP-QGu0HKCdlinc6Klk3M68,749 +haddock/gear/postprocessing.py,sha256=xnNurZ8P5VYRb1TeZOYOwM2ZC8LQYJdqQP0qIeMJN1k,1439 +haddock/gear/prepare_run.py,sha256=b9JXlHSrDBwucLbTezMYVOfA_TRx0YKDBTEajTjLpKc,47960 +haddock/gear/preprocessing.py,sha256=IoJivA3VDBhfK_3nj2LrKHmZQUyDjKYdMtAW7_iO3ls,31188 +haddock/gear/restart_run.py,sha256=QO6ROHqg24m36r1_NkEyPJ1eX57QZSo1M8d8xMaIWis,1803 +haddock/gear/validations.py,sha256=79Hii60bB58g4NJziYPQWh3rm4u70gvj0u1Ff9KNBzI,4376 +haddock/gear/yaml2cfg.py,sha256=DATeKFsLJv2Ly506O_J20wqmbLncbzDL6l21Yl4vw94,9133 +haddock/gear/zerofill.py,sha256=TesdOODdbIKdekwXRaO4l2jdggo5P7lMYGwBGVgXhn8,3373 +haddock/libs/__init__.py,sha256=v4-UCEx7R8hJRTKSBQzPvkyXnQb6q7hvkQCmPVA6AnU,47 +haddock/libs/__pycache__/__init__.cpython-312.pyc,, +haddock/libs/__pycache__/libalign.cpython-312.pyc,, +haddock/libs/__pycache__/libcli.cpython-312.pyc,, +haddock/libs/__pycache__/libclust.cpython-312.pyc,, +haddock/libs/__pycache__/libcns.cpython-312.pyc,, +haddock/libs/__pycache__/libfcc.cpython-312.pyc,, +haddock/libs/__pycache__/libfunc.cpython-312.pyc,, +haddock/libs/__pycache__/libgrid.cpython-312.pyc,, +haddock/libs/__pycache__/libhpc.cpython-312.pyc,, +haddock/libs/__pycache__/libinteractive.cpython-312.pyc,, +haddock/libs/__pycache__/libio.cpython-312.pyc,, +haddock/libs/__pycache__/libligand.cpython-312.pyc,, +haddock/libs/__pycache__/liblog.cpython-312.pyc,, +haddock/libs/__pycache__/libmath.cpython-312.pyc,, +haddock/libs/__pycache__/libmpi.cpython-312.pyc,, +haddock/libs/__pycache__/libnotebooks.cpython-312.pyc,, +haddock/libs/__pycache__/libontology.cpython-312.pyc,, +haddock/libs/__pycache__/libparallel.cpython-312.pyc,, +haddock/libs/__pycache__/libpdb.cpython-312.pyc,, +haddock/libs/__pycache__/libplots.cpython-312.pyc,, +haddock/libs/__pycache__/libprodigy.cpython-312.pyc,, +haddock/libs/__pycache__/librestraints.cpython-312.pyc,, +haddock/libs/__pycache__/libstructure.cpython-312.pyc,, +haddock/libs/__pycache__/libsubprocess.cpython-312.pyc,, +haddock/libs/__pycache__/libtimer.cpython-312.pyc,, +haddock/libs/__pycache__/libutil.cpython-312.pyc,, +haddock/libs/__pycache__/libworkflow.cpython-312.pyc,, +haddock/libs/assets/__init__.py,sha256=OHnRgMfl3EKH39_jt29TsQgdlCh77a-S2ckhajnR5RE,361 +haddock/libs/assets/__pycache__/__init__.cpython-312.pyc,, +haddock/libs/assets/index.css,sha256=zQhm56MPdkCiONjcDcbJGOJzxcsE62IwpoHpWMZ5LR0,10785 +haddock/libs/assets/report.bundle.js,sha256=wJLAYIGv-zCto98hmwFLB3dtsl7xpNdkjB6Fqx-rxpo,1481453 +haddock/libs/libalign.py,sha256=THxG3qZqWAQnJRkjTrHY77egeu1hQJ6iO66Fhc0nlY0,38721 +haddock/libs/libcli.py,sha256=jYvqc8-m9BUevDitjw4ps97mO_2-OQ_okECJ1wwloYM,2716 +haddock/libs/libclust.py,sha256=n7LG4n5bI0TCKJNP-6j2DwRBJOR2G-2JC7BnDeWOC4w,9655 +haddock/libs/libcns.py,sha256=4voTSRCv7VjAyy1JC4mfnamB-pDWNBBOenoqWefRbDo,14193 +haddock/libs/libfcc.py,sha256=zk8-uss90KFfBEsphXOVuz_jHn8pY9fcsholiL1od-s,6562 +haddock/libs/libfunc.py,sha256=Y6afr2DT7Rx42FBHoRm4TIL3qRueKldKKyW-s7Z8JZA,2274 +haddock/libs/libgrid.py,sha256=R0nC-f9A5hKK7kKgKw5c_mJ1IxFvvfr1JR-6SbvDyN4,29623 +haddock/libs/libhpc.py,sha256=EQpn5for3hRLkp6OrIx00t18ZvkjplOh04g88Ay7yf0,12354 +haddock/libs/libinteractive.py,sha256=WtO3vNf3pKpZ3rlzhflE9wb8zuztNTI3qTKoCGwfkmE,7329 +haddock/libs/libio.py,sha256=R3wDEO7YGYZZEFBvG7OKm6THq4JsELoRDMT0tK2-47E,16530 +haddock/libs/libligand.py,sha256=2CKBNWSXE0X49kRaigMu-GzdnZ2SAvsvco0wLhLrzkU,5462 +haddock/libs/liblog.py,sha256=xp1Qinu8Ct8LVHPEAVb4ik_mj48kK096GnBoMq6G37I,2333 +haddock/libs/libmath.py,sha256=PdPROXkAuA4Ujq7cfG-u8VsQjFTnO8nhM7gANqvVr5o,865 +haddock/libs/libmpi.py,sha256=yl_peJ6JNQpU-gNzCcY03Q9RGfFbxBzM6MQH-DZtwD8,1803 +haddock/libs/libnotebooks.py,sha256=wAO--cC-PGENU8-N-rqMnhdyV6RKuMj6jC42pllOF9w,9460 +haddock/libs/libontology.py,sha256=iTUJlmFc2u8Qy8w1Uem4zE1TeZ9pB93yB0me1GnY97k,8332 +haddock/libs/libparallel.py,sha256=2-EolmGZb5Av_MR5AROX5MaxfuMxL9TejWoqtym3zJo,6379 +haddock/libs/libpdb.py,sha256=IjNy6HCQlMvNc57QMf9tqrXOJj30SxpDuuwtGcNkmRU,16280 +haddock/libs/libplots.py,sha256=rMx85zZKQ5yWcMxG2ONwqxHbehG_ZCyb4Pl_rnWa3UI,49143 +haddock/libs/libprodigy.py,sha256=ofVMTELREPyxwJzVuLGPzehk7eNTWkgY2CDD_pALx4k,5026 +haddock/libs/librestraints.py,sha256=OBemuZSLFlfuubMox1lBQz0Ju8WkqWAmM-E29b-LuqU,28610 +haddock/libs/libstructure.py,sha256=uRPaaJsZPbiB7jyWFJwBeLwbA6OfEZbHavhxlrjK7f8,1367 +haddock/libs/libsubprocess.py,sha256=o8zQeOJ3BlhujxnL46irHd7uNYMQd0mGIQty-bGBnps,8033 +haddock/libs/libtimer.py,sha256=8vFHFbBSRM5AkJ4b-I4Ph4NYBMYEeYIZ5ttTu3tD2n4,1607 +haddock/libs/libutil.py,sha256=nso_xPfqlY0JUqUE2bF9DSCcpd-dq0ReWTk7y7xnNSI,14005 +haddock/libs/libworkflow.py,sha256=HhNYok2Wx0yRzsnelwKrndvrcp4zaWomLZI0nY_gGzM,7364 +haddock/modules/__init__.py,sha256=adGlrDRDtzl9ot3sz3jW3pfyTxGmIRYicn6S04uGaKM,17125 +haddock/modules/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/__pycache__/base_cns_module.cpython-312.pyc,, +haddock/modules/_template_cat/README.md,sha256=q1EPD15gNjWwQa6QCTnlRhTBaBHZjMOMiWslkBM6LHM,1694 +haddock/modules/_template_cat/_template_mod/__init__.py,sha256=gbz7p-C7DbePqq3w0R9nuiD8ymnEs2N6nnxz_bEIPyQ,5548 +haddock/modules/_template_cat/_template_mod/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/_template_cat/_template_mod/defaults.yaml,sha256=EKZzFFd9tfO6_MNG9OGyM_6mLuVfeiuyffZcys2iTM4,1941 +haddock/modules/analysis/__init__.py,sha256=OUxBnttEXAAjGXnJWHJ8k-Jir8HyLzeqyEhtS9e9YDo,1926 +haddock/modules/analysis/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/alascan/__init__.py,sha256=EDeh6qzv1lpijgH5c6DELOG3JhIe5xzf-q5v9ibJQmw,7862 +haddock/modules/analysis/alascan/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/alascan/__pycache__/scan.cpython-312.pyc,, +haddock/modules/analysis/alascan/defaults.yaml,sha256=C1EK-pA7YwPtWyfx4MChQ788P7WGSCFqO0zl1aHnK9Q,3753 +haddock/modules/analysis/alascan/scan.py,sha256=sp2KdjR3Sumk3_9mg3Ov57GbFoptethENSwJWC-z38A,33797 +haddock/modules/analysis/caprieval/__init__.py,sha256=trmXV9nFx-WdvcV8Rml6BnI1WbUk7ao0qR8LW5qWTpI,9880 +haddock/modules/analysis/caprieval/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/caprieval/__pycache__/capri.cpython-312.pyc,, +haddock/modules/analysis/caprieval/capri.py,sha256=t2aLsqYCrWZiNKKf9kN_wCMN3zBCACYg_xDW10oJgPc,39733 +haddock/modules/analysis/caprieval/defaults.yaml,sha256=jRrJdXHmdQ78xgLJ46P_L2f63w9-TfYD9NN0a9Lck6k,6944 +haddock/modules/analysis/clustfcc/__init__.py,sha256=ZEKa0_hWYrzrCmsw_L5hnlonAJbvG4gZTlTDv0qE5EU,7456 +haddock/modules/analysis/clustfcc/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/clustfcc/__pycache__/clustfcc.cpython-312.pyc,, +haddock/modules/analysis/clustfcc/clustfcc.py,sha256=U-CV-LcXxMbDGcAP0hCDP0GcFg8nDxjioL3KXM3siI8,6114 +haddock/modules/analysis/clustfcc/defaults.yaml,sha256=zoQGTLJtvDZwJdzZfI-vZpz9hN0Qvhn3PZ8eHPjl8QA,2519 +haddock/modules/analysis/clustrmsd/__init__.py,sha256=wB_zfn5Ray5SA6jlSruqeFc6NKwiEJA1isDy4QLsIgg,6350 +haddock/modules/analysis/clustrmsd/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/clustrmsd/__pycache__/clustrmsd.cpython-312.pyc,, +haddock/modules/analysis/clustrmsd/clustrmsd.py,sha256=1AbNzmz0LnYczZnKB30iXZILBvBY19J2NfFDp6MCS_E,12387 +haddock/modules/analysis/clustrmsd/defaults.yaml,sha256=ko2SVYIfdXsZTeRXMtbr3W5HKNVrayR0fyWe7kW-B6k,2044 +haddock/modules/analysis/contactmap/__init__.py,sha256=XV1qnG_ZC1ou8envXBvhpDKRP1DA2fY-1F0SuqURyAA,4424 +haddock/modules/analysis/contactmap/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/contactmap/__pycache__/contmap.cpython-312.pyc,, +haddock/modules/analysis/contactmap/contmap.py,sha256=Qv0-penTUsWCWvugHS7KwR8F81nu0egyfKyk4AHnpBs,74236 +haddock/modules/analysis/contactmap/defaults.yaml,sha256=3gMMRx7TXBaae9A1jIF9Z-yiPbgnvmcKmYNJ8DcRC8o,3263 +haddock/modules/analysis/filter/__init__.py,sha256=8dnxVQpOEJ6JlGL7TYKCRTg-_gxSsgkpkGvdypdRvek,3736 +haddock/modules/analysis/filter/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/filter/defaults.yaml,sha256=LaRHAWiGarOWQEvDjjB749G5TRk9LFGHORmC9S-WH0s,371 +haddock/modules/analysis/ilrmsdmatrix/__init__.py,sha256=Tg9DEGYxh1VaYUeIvPg_RNF9QyGd3TYD1Wskgfv7awI,14168 +haddock/modules/analysis/ilrmsdmatrix/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/ilrmsdmatrix/__pycache__/ilrmsd.cpython-312.pyc,, +haddock/modules/analysis/ilrmsdmatrix/defaults.yaml,sha256=DmdQo293VbE1VUHIYdSbvuEFo8z222lt9Byk0g-i1SU,2474 +haddock/modules/analysis/ilrmsdmatrix/ilrmsd.py,sha256=asoMkpLtMoi_ScFIo3J7aDQAZqzzFSY6w-SJCotd6dk,3809 +haddock/modules/analysis/rmsdmatrix/__init__.py,sha256=C0vjkTQho3iW7FlLfmFz3kvAn3O_YKCm-mhJVsgRiWU,8373 +haddock/modules/analysis/rmsdmatrix/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/rmsdmatrix/__pycache__/rmsd.cpython-312.pyc,, +haddock/modules/analysis/rmsdmatrix/defaults.yaml,sha256=cS_Y7XKiolEaNDFOltU00xjBzYMx5CoGrVciDmr4V68,1639 +haddock/modules/analysis/rmsdmatrix/rmsd.py,sha256=NEDc23-ITL7cbsRwObyETZgO25Iy_9nwMiT30sHfx1Y,3872 +haddock/modules/analysis/seletop/__init__.py,sha256=crGU45EQGDbKE8lBgRc5Bz396eVSMD9vzEv_fGYgAWs,2162 +haddock/modules/analysis/seletop/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/seletop/defaults.yaml,sha256=HpnqYme7nFFeyjKB6wg7or4dlzZN-61biyj0HTyJbNI,412 +haddock/modules/analysis/seletopclusts/__init__.py,sha256=vj8kudb81Y8wX832NWH43018l_DQxYCuXVKybHJRFEA,2908 +haddock/modules/analysis/seletopclusts/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/analysis/seletopclusts/__pycache__/seletopclusts.cpython-312.pyc,, +haddock/modules/analysis/seletopclusts/defaults.yaml,sha256=dWxN_rdic4WRUTLzdiG2FAxqOMnKKrczMAEtfWhMlbY,1414 +haddock/modules/analysis/seletopclusts/seletopclusts.py,sha256=MOwuIyuJuRYc5ml58zOvi7H-Ko7T7ARe6whaqXs0EHc,7051 +haddock/modules/base_cns_module.py,sha256=OyrDmj4ed2lJkgy1ArBwjpzTYpKfv8xp8WL89EMvkd4,6366 +haddock/modules/defaults.yaml,sha256=xmAr6EZ03_u0Qy8P86R8eMJhaS86I4g1RY6u7kukKbw,6014 +haddock/modules/extras/__init__.py,sha256=cDHmAvelnn80uqO6ouvds1ahgFBIgI0DqFv9Z0Jo8rY,175 +haddock/modules/extras/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/extras/exit/__init__.py,sha256=37VlCgPBIiLU8vtFDgioJMRamTtK4SzTdCpTkf2w1RQ,1703 +haddock/modules/extras/exit/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/extras/exit/defaults.yaml,sha256=9OTiEcCv4zBEYfle2uTwAdmMEKazk5a6TuShUv1SEE8,238 +haddock/modules/refinement/__init__.py,sha256=cMG5Zt4JDKvNK207ct6FMJ0EgbmU0e_1L-V_ZXCsOZc,48 +haddock/modules/refinement/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/refinement/emref/__init__.py,sha256=bhWdqXv9M5MqTfihaGzz_q6WbCDby7T1RTE0XeofBWk,5143 +haddock/modules/refinement/emref/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/refinement/emref/cns/calc_free-ene.cns,sha256=oiXJjYSnG23nizBMv1D6YbeI-c4kDdQahRsuq0rn2w0,1116 +haddock/modules/refinement/emref/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/refinement/emref/cns/contactairs.cns,sha256=LtMZm33ScEAnNE1J5HE-iQ95R8CtpTTCne4F23w7moc,1426 +haddock/modules/refinement/emref/cns/def_solv_param.cns,sha256=hRyLXwbnm7zoCidi_Eeztq-NvBjSiWIJfxo9WXcRzPo,4071 +haddock/modules/refinement/emref/cns/dna-rna_restraints.cns,sha256=gkljYrv7AqP3x9ujcjQYVSmhH6vknqW0GKmqyCBH-SY,19764 +haddock/modules/refinement/emref/cns/emref.cns,sha256=HKePIsUY7IUdYEU3T0f5K-yelyDXakuZuhsmBcWktdo,13409 +haddock/modules/refinement/emref/cns/flex_segment_back.cns,sha256=ZcURFVmlEIXHw96PSZ-GPmM_IyrCivG5A_8AKotuSQw,2320 +haddock/modules/refinement/emref/cns/flexauto-neighbors.cns,sha256=TysMjn197bNZ1gPSty-f0341t5fHc-K-I4aEvfE2-DA,1934 +haddock/modules/refinement/emref/cns/print_coorheader.cns,sha256=AdRuACCZ5TIWwBPuSVXVvQhD6728rIUxhwtN4yiLWmw,12246 +haddock/modules/refinement/emref/cns/protein-ss-restraints-all.cns,sha256=Ng7k_RoSrORIj77EFUIPuQ5xLwqMkcTw8byDF6ets70,4239 +haddock/modules/refinement/emref/cns/protein-ss-restraints-alpha-beta.cns,sha256=v02vtd4tzMDvoLr9tQgAkiKah2yJGBUJ0ufO8-8r2IE,6002 +haddock/modules/refinement/emref/cns/protein-ss-restraints-alpha.cns,sha256=zp_fje9KlUkwrqN9C6RVoXtAo674GEj69AmAALuLz48,5163 +haddock/modules/refinement/emref/cns/read_data.cns,sha256=5timDjMPd5_cTA8djQjuLxoIBBhOAwefdlFOj-BE6ms,2026 +haddock/modules/refinement/emref/cns/read_noes.cns,sha256=nLADAFcVjbJ-WN8Zza5mgYZFkvZNldL9feUidQRVN1I,1817 +haddock/modules/refinement/emref/cns/read_param.cns,sha256=Dm_oGn9aIJILPsFIa1RvAp21w5AeekXLxJLdh7u9BXY,2021 +haddock/modules/refinement/emref/cns/restrain-ions.cns,sha256=gb6AqflQscIatvKUSXno6wO6G2-kbncNNwaId2b5J7U,5237 +haddock/modules/refinement/emref/cns/scale_inter.cns,sha256=mKIJ7R65tB9DuqAMCOfADPW2vZY5aFnFvo-Xkxjxy_w,2349 +haddock/modules/refinement/emref/cns/scale_inter_final.cns,sha256=WPncZ_1Rp757GyOZL9YFp0ONAfpIzV7WW6Lvrhy4LNQ,1836 +haddock/modules/refinement/emref/cns/scale_intra_only.cns,sha256=BIA9k5ETYoSswYiZXTnVaE5g6N7k0TTIhhG-Amot3Q8,1489 +haddock/modules/refinement/emref/cns/setflags.cns,sha256=BWCTCEU-7i6rDsArjZ_EWJd6pe-sj275phmD9EJs0Es,771 +haddock/modules/refinement/emref/cns/symmultimer.cns,sha256=v-RvMEcmhxmwJgetDufqr2OHO9JTOaHIU1cm_vshTf8,32233 +haddock/modules/refinement/emref/defaults.yaml,sha256=SjCKBbTRPrqWGc7v-dd19_jFzI7G2x0-zXH0dBL2sU8,162391 +haddock/modules/refinement/flexref/__init__.py,sha256=dSHD9Rbwl9CZnWX2oen9HXX5FYhtC3pIAs2zBiOGflM,5835 +haddock/modules/refinement/flexref/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/refinement/flexref/cns/calc_free-ene.cns,sha256=oiXJjYSnG23nizBMv1D6YbeI-c4kDdQahRsuq0rn2w0,1116 +haddock/modules/refinement/flexref/cns/check-homomers.cns,sha256=t0rPTSXU44EPwZ-Q6Av73QyEXjaYvjzAHXm7FGIQZms,1736 +haddock/modules/refinement/flexref/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/refinement/flexref/cns/cm-restraints.cns,sha256=31ZR8M-kl5i4VoJcihgMCZTxjwvla3yfi7gWXYgUSJ4,5043 +haddock/modules/refinement/flexref/cns/contactairs.cns,sha256=LtMZm33ScEAnNE1J5HE-iQ95R8CtpTTCne4F23w7moc,1426 +haddock/modules/refinement/flexref/cns/covalions.cns,sha256=V5UzRQ7iWJPzu3eDxGAbHYX_9ao9eSIBycUo78Zsg5o,3912 +haddock/modules/refinement/flexref/cns/def_solv_param.cns,sha256=hRyLXwbnm7zoCidi_Eeztq-NvBjSiWIJfxo9WXcRzPo,4071 +haddock/modules/refinement/flexref/cns/dna-rna_restraints.cns,sha256=gkljYrv7AqP3x9ujcjQYVSmhH6vknqW0GKmqyCBH-SY,19764 +haddock/modules/refinement/flexref/cns/flex_segment.cns,sha256=kMA5ImQM1njQQ3xTlT4VxqL2FZyIwUlFZ7zKJR0cycg,1243 +haddock/modules/refinement/flexref/cns/flex_segment_back.cns,sha256=ZcURFVmlEIXHw96PSZ-GPmM_IyrCivG5A_8AKotuSQw,2320 +haddock/modules/refinement/flexref/cns/flex_segment_side.cns,sha256=tOdJBjWTb-17NM0LCxKXLC9iNIareaEXHNAkrGfHq4c,2552 +haddock/modules/refinement/flexref/cns/flexauto-neighbors.cns,sha256=TysMjn197bNZ1gPSty-f0341t5fHc-K-I4aEvfE2-DA,1934 +haddock/modules/refinement/flexref/cns/flexref.cns,sha256=xscNwfyX-7gj5BA-4_qkx7rL-8pl8x1Xd7m4rMFNjN8,18672 +haddock/modules/refinement/flexref/cns/numtrees.cns,sha256=vJ3TVqvRuGzRAnBK5r6FCFogOxIsbvbezyk1xzfO8mE,3281 +haddock/modules/refinement/flexref/cns/print_coorheader.cns,sha256=AdRuACCZ5TIWwBPuSVXVvQhD6728rIUxhwtN4yiLWmw,12246 +haddock/modules/refinement/flexref/cns/protein-ss-restraints-all.cns,sha256=Ng7k_RoSrORIj77EFUIPuQ5xLwqMkcTw8byDF6ets70,4239 +haddock/modules/refinement/flexref/cns/protein-ss-restraints-alpha-beta.cns,sha256=v02vtd4tzMDvoLr9tQgAkiKah2yJGBUJ0ufO8-8r2IE,6002 +haddock/modules/refinement/flexref/cns/protein-ss-restraints-alpha.cns,sha256=zp_fje9KlUkwrqN9C6RVoXtAo674GEj69AmAALuLz48,5163 +haddock/modules/refinement/flexref/cns/random_rotations.cns,sha256=6XnCXDtAMmtkbvIolx8BctAKxz8lTMw79zRom_tJtVk,7800 +haddock/modules/refinement/flexref/cns/read_data.cns,sha256=5timDjMPd5_cTA8djQjuLxoIBBhOAwefdlFOj-BE6ms,2026 +haddock/modules/refinement/flexref/cns/read_noes.cns,sha256=nLADAFcVjbJ-WN8Zza5mgYZFkvZNldL9feUidQRVN1I,1817 +haddock/modules/refinement/flexref/cns/read_param.cns,sha256=Dm_oGn9aIJILPsFIa1RvAp21w5AeekXLxJLdh7u9BXY,2021 +haddock/modules/refinement/flexref/cns/restrain-ions.cns,sha256=gb6AqflQscIatvKUSXno6wO6G2-kbncNNwaId2b5J7U,5237 +haddock/modules/refinement/flexref/cns/sa_ltad_cool1.cns,sha256=_WhHrttAUlWUHG4KSESfRIPkcvAxm7CpZm9COAhzW0A,3809 +haddock/modules/refinement/flexref/cns/sa_ltad_cool2.cns,sha256=HPNvgZ7n0zHjPz84fzJIIeyzL_VelU8_9SoAVoPjIE0,3868 +haddock/modules/refinement/flexref/cns/sa_ltad_cool3.cns,sha256=n35MVRjpa0lKSHtFc-KK9PbCXOr6tdS5GWrFCqr9hJ0,3867 +haddock/modules/refinement/flexref/cns/sa_ltad_hightemp.cns,sha256=9kR5ji8ehi4eIafTgh8U8FnnNsuauU02dodZOlxEXGM,1818 +haddock/modules/refinement/flexref/cns/scale_inter.cns,sha256=mKIJ7R65tB9DuqAMCOfADPW2vZY5aFnFvo-Xkxjxy_w,2349 +haddock/modules/refinement/flexref/cns/scale_inter_final.cns,sha256=WPncZ_1Rp757GyOZL9YFp0ONAfpIzV7WW6Lvrhy4LNQ,1836 +haddock/modules/refinement/flexref/cns/scale_inter_only.cns,sha256=MfJwiYsd8Vn8R-Qbaiq02maAI6E89yC-Fg07E3rS2D8,2071 +haddock/modules/refinement/flexref/cns/scale_intra_only.cns,sha256=BIA9k5ETYoSswYiZXTnVaE5g6N7k0TTIhhG-Amot3Q8,1489 +haddock/modules/refinement/flexref/cns/separate.cns,sha256=s_mqxZNmhRNe94BTIsf9XiI_hI_JAbgI17KKn3aqcp8,9324 +haddock/modules/refinement/flexref/cns/setflags.cns,sha256=gllgQGuPPqtCHymIfuGIzvS8MglQzAcPzZRNFR6O9zI,850 +haddock/modules/refinement/flexref/cns/symmultimer.cns,sha256=v-RvMEcmhxmwJgetDufqr2OHO9JTOaHIU1cm_vshTf8,32233 +haddock/modules/refinement/flexref/cns/torsiontop.cns,sha256=5GivVQJOpUV6eFqYY_CMK_yEqDMQp4bLT7tHQQwFOs4,4595 +haddock/modules/refinement/flexref/defaults.yaml,sha256=llNeXA7UC1Qj3seiQaRxoQViba9m8jLxIE6VUh6_NFc,183524 +haddock/modules/refinement/mdref/__init__.py,sha256=y3mrMhmeT0ctA0ThZksvsOp1-9F2ix1u5Wh5YBtmg1g,5661 +haddock/modules/refinement/mdref/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/refinement/mdref/cns/calc_free-ene.cns,sha256=oiXJjYSnG23nizBMv1D6YbeI-c4kDdQahRsuq0rn2w0,1116 +haddock/modules/refinement/mdref/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/refinement/mdref/cns/cm-restraints.cns,sha256=XqI2yLh8WagcEeY3VAObuUPrdgAeVvyGv4r-udFDfH0,5511 +haddock/modules/refinement/mdref/cns/contactairs.cns,sha256=LtMZm33ScEAnNE1J5HE-iQ95R8CtpTTCne4F23w7moc,1426 +haddock/modules/refinement/mdref/cns/def_solv_param.cns,sha256=hRyLXwbnm7zoCidi_Eeztq-NvBjSiWIJfxo9WXcRzPo,4071 +haddock/modules/refinement/mdref/cns/dna-rna_restraints.cns,sha256=gkljYrv7AqP3x9ujcjQYVSmhH6vknqW0GKmqyCBH-SY,19764 +haddock/modules/refinement/mdref/cns/flex_segment_back.cns,sha256=iysr0Gz16kj1IxvPDCA7VkW1rAmZv_qHoJIn1INCFGk,2263 +haddock/modules/refinement/mdref/cns/flex_segment_side.cns,sha256=LLv1xUQO-n5z7fSHb9fs5ro-Bj8JsVLHzlbSTBxwr3c,1906 +haddock/modules/refinement/mdref/cns/flexauto-neighbors.cns,sha256=TysMjn197bNZ1gPSty-f0341t5fHc-K-I4aEvfE2-DA,1934 +haddock/modules/refinement/mdref/cns/generate_dmso.cns,sha256=-wuKZONhjDS-EjnsLQmcuLzf6mjWTqs_HUBzPw6r49Y,5433 +haddock/modules/refinement/mdref/cns/generate_water.cns,sha256=GO6nyT7pXZtHKBE8mh9MT8q8dbntQxHEXMxeB_Eo3I0,5792 +haddock/modules/refinement/mdref/cns/mdref.cns,sha256=ryxfLCB2SLWSdnt2DZgS2Fxil0sU4J2v9bT8leJubTY,16910 +haddock/modules/refinement/mdref/cns/print_coorheader.cns,sha256=AdRuACCZ5TIWwBPuSVXVvQhD6728rIUxhwtN4yiLWmw,12246 +haddock/modules/refinement/mdref/cns/protein-ss-restraints-all.cns,sha256=Ng7k_RoSrORIj77EFUIPuQ5xLwqMkcTw8byDF6ets70,4239 +haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha-beta.cns,sha256=v02vtd4tzMDvoLr9tQgAkiKah2yJGBUJ0ufO8-8r2IE,6002 +haddock/modules/refinement/mdref/cns/protein-ss-restraints-alpha.cns,sha256=zp_fje9KlUkwrqN9C6RVoXtAo674GEj69AmAALuLz48,5163 +haddock/modules/refinement/mdref/cns/read_data.cns,sha256=5timDjMPd5_cTA8djQjuLxoIBBhOAwefdlFOj-BE6ms,2026 +haddock/modules/refinement/mdref/cns/read_noes.cns,sha256=nLADAFcVjbJ-WN8Zza5mgYZFkvZNldL9feUidQRVN1I,1817 +haddock/modules/refinement/mdref/cns/read_param.cns,sha256=Dm_oGn9aIJILPsFIa1RvAp21w5AeekXLxJLdh7u9BXY,2021 +haddock/modules/refinement/mdref/cns/restrain-ions.cns,sha256=QktROUdVSPaRC4ckEWjAsy0lY9sUZ6Rp1-2iDGfl3y4,5213 +haddock/modules/refinement/mdref/cns/scale_inter.cns,sha256=mKIJ7R65tB9DuqAMCOfADPW2vZY5aFnFvo-Xkxjxy_w,2349 +haddock/modules/refinement/mdref/cns/scale_inter_final.cns,sha256=WPncZ_1Rp757GyOZL9YFp0ONAfpIzV7WW6Lvrhy4LNQ,1836 +haddock/modules/refinement/mdref/cns/scale_intra_only.cns,sha256=BIA9k5ETYoSswYiZXTnVaE5g6N7k0TTIhhG-Amot3Q8,1489 +haddock/modules/refinement/mdref/cns/setflags.cns,sha256=BWCTCEU-7i6rDsArjZ_EWJd6pe-sj275phmD9EJs0Es,771 +haddock/modules/refinement/mdref/cns/symmultimer.cns,sha256=v-RvMEcmhxmwJgetDufqr2OHO9JTOaHIU1cm_vshTf8,32233 +haddock/modules/refinement/mdref/defaults.yaml,sha256=rfrSOsbTcZszZesA-Y_KEzPIBCanm89SBcosDhZB68Y,166304 +haddock/modules/refinement/openmm/__init__.py,sha256=XGNlzJZmG5aG2YMasSen-5FwxNu-P7dHq5beV5yUmTs,6152 +haddock/modules/refinement/openmm/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/refinement/openmm/__pycache__/openmm.cpython-312.pyc,, +haddock/modules/refinement/openmm/defaults.yaml,sha256=_MVC_1YAGiy3O8UzBb4lEyRrDiAOu-Iwv1aa14KEyO4,9080 +haddock/modules/refinement/openmm/openmm.py,sha256=ojd8N6fQ0Uqjfr4jy2svBSRmXqR-aLfirDDTRZgRD1A,37361 +haddock/modules/sampling/__init__.py,sha256=IzSJ1tIiCpDEi6ItmP_kq_kpYG3--qR27oTGO--3njI,37 +haddock/modules/sampling/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/sampling/lightdock/__init__.py,sha256=YsnXGhgkqwuaQ0r0pt0QMN4uZtDVfvuFLEmiXxMgpfA,5819 +haddock/modules/sampling/lightdock/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/sampling/lightdock/defaults.yaml,sha256=cbXG0qE_WUaKvwOU3rxtDhcIbjmCBXbm9BFMHLVV3B0,2671 +haddock/modules/sampling/rigidbody/__init__.py,sha256=bjKEyHC_vmH9DpEnwnF7GlFxDipEGLO0tohR4irqW74,10714 +haddock/modules/sampling/rigidbody/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/sampling/rigidbody/cns/bestener.cns,sha256=EW2EJ1eMhKx6BgLc2K1DURHIkajYcQYuXy4Td09XnXw,3055 +haddock/modules/sampling/rigidbody/cns/bsa.cns,sha256=BGhJFQpEHo_tpsWu1qqk4H4-TGyr27m2r49F5ajWUsc,2493 +haddock/modules/sampling/rigidbody/cns/charge-beads-interactions.cns,sha256=YZO2HosC75DLThsSaCBcejZHyit5pjiioT6XkcE8d9k,1755 +haddock/modules/sampling/rigidbody/cns/check-homomers.cns,sha256=t0rPTSXU44EPwZ-Q6Av73QyEXjaYvjzAHXm7FGIQZms,1736 +haddock/modules/sampling/rigidbody/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/sampling/rigidbody/cns/cm-restraints.cns,sha256=31ZR8M-kl5i4VoJcihgMCZTxjwvla3yfi7gWXYgUSJ4,5043 +haddock/modules/sampling/rigidbody/cns/def_solv_param.cns,sha256=hRyLXwbnm7zoCidi_Eeztq-NvBjSiWIJfxo9WXcRzPo,4071 +haddock/modules/sampling/rigidbody/cns/get_random_rotation.cns,sha256=5zHg-lEkWBE_8Zrrv9RqBzo60avmXPmO_yC6TScaOq8,3875 +haddock/modules/sampling/rigidbody/cns/print_coorheader.cns,sha256=AdRuACCZ5TIWwBPuSVXVvQhD6728rIUxhwtN4yiLWmw,12246 +haddock/modules/sampling/rigidbody/cns/random_rotations.cns,sha256=6XnCXDtAMmtkbvIolx8BctAKxz8lTMw79zRom_tJtVk,7800 +haddock/modules/sampling/rigidbody/cns/randomairs.cns,sha256=Bv5TjtwCQMwwDLRHoNc8bQNH-KxCwkPyzQGQRPnTIaw,8970 +haddock/modules/sampling/rigidbody/cns/read_noes.cns,sha256=nLADAFcVjbJ-WN8Zza5mgYZFkvZNldL9feUidQRVN1I,1817 +haddock/modules/sampling/rigidbody/cns/read_param.cns,sha256=Dm_oGn9aIJILPsFIa1RvAp21w5AeekXLxJLdh7u9BXY,2021 +haddock/modules/sampling/rigidbody/cns/rigidbody.cns,sha256=VuZv32U8XiI3KPz5SZCVW2t8ncmn2tHR-UrTFkxjUSo,18700 +haddock/modules/sampling/rigidbody/cns/rotation180.cns,sha256=J0UXXhjj67-hKInI54n8y3Qlt8GeOT1k5VaTPLp6M-s,2749 +haddock/modules/sampling/rigidbody/cns/scale_inter_final.cns,sha256=WPncZ_1Rp757GyOZL9YFp0ONAfpIzV7WW6Lvrhy4LNQ,1836 +haddock/modules/sampling/rigidbody/cns/scale_inter_mini.cns,sha256=QwfEU3fBxBqTOeB5BDUbRfa9FrGvifnraUVFLRIvfCw,1711 +haddock/modules/sampling/rigidbody/cns/scale_inter_only.cns,sha256=MfJwiYsd8Vn8R-Qbaiq02maAI6E89yC-Fg07E3rS2D8,2071 +haddock/modules/sampling/rigidbody/cns/scale_intra_only.cns,sha256=BIA9k5ETYoSswYiZXTnVaE5g6N7k0TTIhhG-Amot3Q8,1489 +haddock/modules/sampling/rigidbody/cns/separate.cns,sha256=s_mqxZNmhRNe94BTIsf9XiI_hI_JAbgI17KKn3aqcp8,9324 +haddock/modules/sampling/rigidbody/cns/surf-restraints.cns,sha256=Xsh9rKXeB4bEELsGQ_06xYCLGAGYD1kjh1h8MmXRPNU,2722 +haddock/modules/sampling/rigidbody/cns/symmultimer.cns,sha256=v-RvMEcmhxmwJgetDufqr2OHO9JTOaHIU1cm_vshTf8,32233 +haddock/modules/sampling/rigidbody/defaults.yaml,sha256=PClF41pu2WYClCm0mNXMEGwC2XdP6i_c31Msk-1BQ9o,156404 +haddock/modules/scoring/__init__.py,sha256=uZKaVaMaDApf0Yng0biAeXWhV4AYYngjl5abZRbPdfA,12816 +haddock/modules/scoring/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/scoring/emscoring/__init__.py,sha256=C6A1vSY-udbKWiws11aVKPxA0elBb54yt7jDOC61vTs,3627 +haddock/modules/scoring/emscoring/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/scoring/emscoring/cns/calc_free-ene.cns,sha256=ImZyyS30ThEOJ9y_B1QLOs7AJALMJ5yH699RmGN4XZE,962 +haddock/modules/scoring/emscoring/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/scoring/emscoring/cns/def_solv_param.cns,sha256=hRyLXwbnm7zoCidi_Eeztq-NvBjSiWIJfxo9WXcRzPo,4071 +haddock/modules/scoring/emscoring/cns/emscoring.cns,sha256=8pHOygMxS8NAoRVlruXegYIupQ9FmAtSMKASOHXgWfQ,6388 +haddock/modules/scoring/emscoring/cns/print_coorheader.cns,sha256=unXp0Ufe6_RvB10xqlZjPADQI2TYafGux8ujPAHdD6c,17115 +haddock/modules/scoring/emscoring/cns/read_param.cns,sha256=Dm_oGn9aIJILPsFIa1RvAp21w5AeekXLxJLdh7u9BXY,2021 +haddock/modules/scoring/emscoring/cns/restrain-ions.cns,sha256=gb6AqflQscIatvKUSXno6wO6G2-kbncNNwaId2b5J7U,5237 +haddock/modules/scoring/emscoring/cns/scale_inter_final.cns,sha256=tV57zFF1vHt0texcYIsNqw5xyVRR8ft6ahIPuaGnx2k,1801 +haddock/modules/scoring/emscoring/cns/scale_intra_only.cns,sha256=BIA9k5ETYoSswYiZXTnVaE5g6N7k0TTIhhG-Amot3Q8,1489 +haddock/modules/scoring/emscoring/defaults.yaml,sha256=9YAkIq5rLwdloKpcFP3aMv4e9qS3VMCRViL7WUXiJXw,10496 +haddock/modules/scoring/mdscoring/__init__.py,sha256=C3HQP2U0BXJHvO_UbQiuV0oGAgCLkzwLsJdOUOPzZ80,3612 +haddock/modules/scoring/mdscoring/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/scoring/mdscoring/cns/calc_free-ene.cns,sha256=oiXJjYSnG23nizBMv1D6YbeI-c4kDdQahRsuq0rn2w0,1116 +haddock/modules/scoring/mdscoring/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/scoring/mdscoring/cns/contactairs.cns,sha256=LtMZm33ScEAnNE1J5HE-iQ95R8CtpTTCne4F23w7moc,1426 +haddock/modules/scoring/mdscoring/cns/def_solv_param.cns,sha256=hRyLXwbnm7zoCidi_Eeztq-NvBjSiWIJfxo9WXcRzPo,4071 +haddock/modules/scoring/mdscoring/cns/dna-rna_restraints.cns,sha256=gkljYrv7AqP3x9ujcjQYVSmhH6vknqW0GKmqyCBH-SY,19764 +haddock/modules/scoring/mdscoring/cns/flex_segment_back.cns,sha256=xOirchd_aVDHcOrViWbUwJyA3otme_U5tvdWUQXj-PI,1031 +haddock/modules/scoring/mdscoring/cns/flex_segment_side.cns,sha256=40dJPmGgkOUzw8cNZ-iGdgKA40Thj-TjAffGD28Fhxs,1101 +haddock/modules/scoring/mdscoring/cns/flexauto-neighbors.cns,sha256=lk3g471rwmcySIEIhQVrYWzN0jd1rWQxBiybwBuoxp8,2141 +haddock/modules/scoring/mdscoring/cns/generate_dmso.cns,sha256=-wuKZONhjDS-EjnsLQmcuLzf6mjWTqs_HUBzPw6r49Y,5433 +haddock/modules/scoring/mdscoring/cns/generate_water.cns,sha256=GO6nyT7pXZtHKBE8mh9MT8q8dbntQxHEXMxeB_Eo3I0,5792 +haddock/modules/scoring/mdscoring/cns/mdscoring.cns,sha256=llZxBUqZHBULj75RdxiGlxDJabfuAPEI3kn-cXeEwdw,12973 +haddock/modules/scoring/mdscoring/cns/print_coorheader.cns,sha256=unXp0Ufe6_RvB10xqlZjPADQI2TYafGux8ujPAHdD6c,17115 +haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-all.cns,sha256=Ng7k_RoSrORIj77EFUIPuQ5xLwqMkcTw8byDF6ets70,4239 +haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha-beta.cns,sha256=v02vtd4tzMDvoLr9tQgAkiKah2yJGBUJ0ufO8-8r2IE,6002 +haddock/modules/scoring/mdscoring/cns/protein-ss-restraints-alpha.cns,sha256=zp_fje9KlUkwrqN9C6RVoXtAo674GEj69AmAALuLz48,5163 +haddock/modules/scoring/mdscoring/cns/read_param.cns,sha256=Dm_oGn9aIJILPsFIa1RvAp21w5AeekXLxJLdh7u9BXY,2021 +haddock/modules/scoring/mdscoring/cns/restrain-ions.cns,sha256=gb6AqflQscIatvKUSXno6wO6G2-kbncNNwaId2b5J7U,5237 +haddock/modules/scoring/mdscoring/cns/scale_inter_final.cns,sha256=tV57zFF1vHt0texcYIsNqw5xyVRR8ft6ahIPuaGnx2k,1801 +haddock/modules/scoring/mdscoring/cns/scale_intra_only.cns,sha256=BIA9k5ETYoSswYiZXTnVaE5g6N7k0TTIhhG-Amot3Q8,1489 +haddock/modules/scoring/mdscoring/cns/setflags.cns,sha256=BWCTCEU-7i6rDsArjZ_EWJd6pe-sj275phmD9EJs0Es,771 +haddock/modules/scoring/mdscoring/defaults.yaml,sha256=roDENFSMB2X38YHsAZQIgSCO22GNNzFcy9TWCXIL-mg,15687 +haddock/modules/scoring/prodigyligand/__init__.py,sha256=C_hWOypd2yMxT5Iawfbu0DxtADDmPI50laVJV_QgSAQ,3030 +haddock/modules/scoring/prodigyligand/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/scoring/prodigyligand/__pycache__/prodigylig.cpython-312.pyc,, +haddock/modules/scoring/prodigyligand/defaults.yaml,sha256=9OcxMUB6J3a3dq03A3u59oTDGE1ZlE8AodRzYeq0KEg,2285 +haddock/modules/scoring/prodigyligand/prodigylig.py,sha256=XVFFJ9G4M8iXOc76aOIiwdYsQscVD6ViG1fBFJFJfrc,2805 +haddock/modules/scoring/prodigyprotein/__init__.py,sha256=XvGR90BHRp55RkswI_QJmZgRYwEcDzHHay89Tg1lv_4,3103 +haddock/modules/scoring/prodigyprotein/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/scoring/prodigyprotein/__pycache__/prodigy.cpython-312.pyc,, +haddock/modules/scoring/prodigyprotein/defaults.yaml,sha256=VKzgmWkYJYTYfBTfvyVVVv0cCDUUQzk2RPlsYWuVbbc,2287 +haddock/modules/scoring/prodigyprotein/prodigy.py,sha256=xnnOwKNpa0GeeykptAmm2l5D_WMuu_O-bO6mnEEcdPc,2506 +haddock/modules/scoring/sasascore/__init__.py,sha256=E35Jf30jzFjB2B0Q25U_aTkRBCCSYnbP_i4bMq9_FNk,4283 +haddock/modules/scoring/sasascore/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/scoring/sasascore/__pycache__/sasascore.cpython-312.pyc,, +haddock/modules/scoring/sasascore/defaults.yaml,sha256=QPYj269Cz4wzl3QavYeAEacII8xE5Dfxst2O9X2zpOo,1457 +haddock/modules/scoring/sasascore/sasascore.py,sha256=nULoqFPCs7EGMGITTqmAtfgA7UnvoWOHz07QsXZ2nic,5478 +haddock/modules/topology/__init__.py,sha256=T1QD23IIPMdLplN1AE8fH6ayk5x1ClewgCI9jtgkycs,45 +haddock/modules/topology/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/topology/topoaa/__init__.py,sha256=AK5LuSH-iYkpEqYvnYf9aDgQ9ikXrX4Iq3uLIuykVmM,15344 +haddock/modules/topology/topoaa/__pycache__/__init__.cpython-312.pyc,, +haddock/modules/topology/topoaa/cns/auto-his.cns,sha256=sdzqMBcvQHMB1tMtbkQ_ZKOmWopZtVvm0pNqOKKIJdY,4999 +haddock/modules/topology/topoaa/cns/bondglycans.cns,sha256=HeUkl-Nn188E6FBkSgtlBXDrvKro99IXTUp5TNJZvCU,22854 +haddock/modules/topology/topoaa/cns/build-missing.cns,sha256=Z1il-I46XEAqkpfue8buc_R7rgRCyUUlKqqLILxeLK4,8912 +haddock/modules/topology/topoaa/cns/check_coordinates.cns,sha256=diLUZz3XxMMb1towOaeWlGRiSNh72dgB5oX6tV57tFg,3015 +haddock/modules/topology/topoaa/cns/coval-ace-cys.cns,sha256=ZOZmDA0wDRulagAhy2EQzEGV0OlPPULJAy-omC9-z6M,2015 +haddock/modules/topology/topoaa/cns/covalheme.cns,sha256=PtPpIoTBFFUYeg5-mQ4s08V57SevYFE8jg4FFiTYB_M,3768 +haddock/modules/topology/topoaa/cns/dna_break.cns,sha256=YBfMhmQVIFg_bZR7IFp6KyCF0ubhBoQ3JSXW-87shFE,2738 +haddock/modules/topology/topoaa/cns/generate-topology.cns,sha256=MXOt00CBq_I2z8P_50waJCcjcWaVQUYXxEWs8I9MeAU,23545 +haddock/modules/topology/topoaa/cns/patch-bb-cg.cns,sha256=OVxefdcaYAcogj7dLcnWDmS6LHT38ri2wAIeMi7M5z8,8026 +haddock/modules/topology/topoaa/cns/patch-types-cg.cns,sha256=T2hHsV-mTrX0BVQMLDmHubg-XVw-PHuuW2Kq4MNUNWY,2963 +haddock/modules/topology/topoaa/cns/prot_break.cns,sha256=DZyq8yDD3yfnL0gfWGCYv6hEMNcJ9tcrZV34V-2Mbdc,4843 +haddock/modules/topology/topoaa/defaults.yaml,sha256=GrnJC1BWbynRHEkWKojY_v4wrGS1VELd6PObqSUVZNU,8404 +haddock/prodrg/prodrg.param,sha256=5SPxuZsoiKP8DM6R7yaQXg4c8XcdJmS-JjIZ7nuU74I,81989 +haddock/prodrg/prodrg_aarch64-linux,sha256=RgYnIbN2U8t7TOK-6jJ3OeLKNU3KeIaGy_mly12hzoU,1919656 +haddock/prodrg/prodrg_arm64-darwin,sha256=UxDP5bmf2skSx2E49sq3Es0ScKP0_j8_ZJJ42Wa5h_0,737144 +haddock/prodrg/prodrg_x86_64-linux,sha256=d3oqH1qyjD1aS8sKRCzZpKu1_hgBGWacSOlvoLIK6V0,1904548 +haddock3-2026.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +haddock3-2026.3.0.dist-info/METADATA,sha256=QkWpLD2srYCZRXSuvqOXwwx9XWegsFyoXW6bN-cuRb0,10659 +haddock3-2026.3.0.dist-info/RECORD,, +haddock3-2026.3.0.dist-info/REQUESTED,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +haddock3-2026.3.0.dist-info/WHEEL,sha256=VjsRi47qtukBUrbjxzUfbq_AtWwISMuQJEz01zs7bcg,109 +haddock3-2026.3.0.dist-info/entry_points.txt,sha256=aT3o4F0PoYHex4eotd2i65SKvHu9co9u6kkrVTG8ViY,696 +haddock3-2026.3.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357 +haddock3-2026.3.0.dist-info/top_level.txt,sha256=26Fn1sNxrDBEuot8BU3pVoHZ-U-diSijnSp_gcVwNUs,8 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/REQUESTED b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/REQUESTED new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/WHEEL b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..219431183ab3a2c1d5f54995575a5615cfbb1eba --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (82.0.1) +Root-Is-Purelib: false +Tag: cp312-cp312-macosx_11_0_arm64 + diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/entry_points.txt b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/entry_points.txt new file mode 100644 index 0000000000000000000000000000000000000000..2d9531867162b45502da8be4d79007a6ef501b98 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/entry_points.txt @@ -0,0 +1,15 @@ +[console_scripts] +haddock-restraints = haddock.clis.wrapper_haddock_restraints:main +haddock3 = haddock.clis.cli:maincli +haddock3-analyse = haddock.clis.cli_analyse:maincli +haddock3-cfg = haddock.clis.cli_cfg:maincli +haddock3-clean = haddock.clis.cli_clean:maincli +haddock3-copy = haddock.clis.cli_cp:maincli +haddock3-dmn = haddock.clis.cli_dmn:maincli +haddock3-mpitask = haddock.clis.cli_mpi:maincli +haddock3-pp = haddock.clis.cli_pp:maincli +haddock3-re = haddock.clis.cli_re:maincli +haddock3-restraints = haddock.clis.cli_restraints:maincli +haddock3-score = haddock.clis.cli_score:maincli +haddock3-traceback = haddock.clis.cli_traceback:maincli +haddock3-unpack = haddock.clis.cli_unpack:maincli diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/licenses/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/licenses/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/licenses/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/licenses/LICENSE b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..261eeb9e9f8b2b4b0d119366dda99c6fd7d35c64 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/licenses/LICENSE @@ -0,0 +1,201 @@ + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/top_level.txt b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..9357ec944af586801ebcc2a967829c3776c1a0e4 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/haddock3-2026.3.0.dist-info/top_level.txt @@ -0,0 +1 @@ +haddock diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._INSTALLER b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._INSTALLER differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._METADATA b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._METADATA new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._METADATA differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._RECORD b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._RECORD new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._RECORD differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._WHEEL b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._WHEEL differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._licenses b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._licenses new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._licenses differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._top_level.txt b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/._top_level.txt differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/INSTALLER b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/INSTALLER new file mode 100644 index 0000000000000000000000000000000000000000..a1b589e38a32041e49332e5e81c2d363dc418d68 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/INSTALLER @@ -0,0 +1 @@ +pip diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/METADATA b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/METADATA new file mode 100644 index 0000000000000000000000000000000000000000..240daa57766d99d4769d51ffcf2736cf6b061190 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/METADATA @@ -0,0 +1,232 @@ +Metadata-Version: 2.4 +Name: jsonpickle +Version: 4.1.1 +Summary: jsonpickle encodes/decodes any Python object to/from JSON +Author: Theelx +Author-email: David Aguilar +License: BSD-3-Clause +Project-URL: Documentation, https://jsonpickle.readthedocs.io/ +Project-URL: Homepage, https://jsonpickle.readthedocs.io/ +Project-URL: Source, https://github.com/jsonpickle/jsonpickle +Classifier: Development Status :: 5 - Production/Stable +Classifier: Intended Audience :: Developers +Classifier: Programming Language :: Python :: 3 +Classifier: Programming Language :: Python :: 3 :: Only +Requires-Python: >=3.8 +Description-Content-Type: text/x-rst +License-File: LICENSE +Provides-Extra: cov +Requires-Dist: pytest-cov; extra == "cov" +Provides-Extra: dev +Requires-Dist: black; extra == "dev" +Requires-Dist: pyupgrade; extra == "dev" +Provides-Extra: testing +Requires-Dist: pytest!=8.1.*,>=6.0; extra == "testing" +Requires-Dist: pytest-benchmark; extra == "testing" +Requires-Dist: pytest-benchmark[histogram]; extra == "testing" +Requires-Dist: pytest-checkdocs>=1.2.3; extra == "testing" +Requires-Dist: pytest-enabler>=1.0.1; extra == "testing" +Requires-Dist: pytest-ruff>=0.2.1; extra == "testing" +Requires-Dist: bson; extra == "testing" +Requires-Dist: ecdsa; extra == "testing" +Requires-Dist: feedparser; extra == "testing" +Requires-Dist: gmpy2; extra == "testing" +Requires-Dist: numpy; extra == "testing" +Requires-Dist: pandas; extra == "testing" +Requires-Dist: pymongo; extra == "testing" +Requires-Dist: PyYAML; extra == "testing" +Requires-Dist: scikit-learn; extra == "testing" +Requires-Dist: scipy>=1.9.3; python_version > "3.10" and extra == "testing" +Requires-Dist: scipy; python_version <= "3.10" and extra == "testing" +Requires-Dist: simplejson; extra == "testing" +Requires-Dist: sqlalchemy; extra == "testing" +Requires-Dist: ujson; extra == "testing" +Requires-Dist: atheris~=2.3.0; python_version < "3.12" and extra == "testing" +Provides-Extra: docs +Requires-Dist: furo; extra == "docs" +Requires-Dist: rst.linker>=1.9; extra == "docs" +Requires-Dist: sphinx>=3.5; extra == "docs" +Provides-Extra: packaging +Requires-Dist: build; extra == "packaging" +Requires-Dist: setuptools>=61.2; extra == "packaging" +Requires-Dist: setuptools_scm[toml]>=6.0; extra == "packaging" +Requires-Dist: twine; extra == "packaging" +Dynamic: license-file + +.. image:: https://img.shields.io/pypi/v/jsonpickle.svg + :target: `PyPI link`_ + +.. image:: https://img.shields.io/pypi/pyversions/jsonpickle.svg + :target: `PyPI link`_ + +.. _PyPI link: https://pypi.org/project/jsonpickle + +.. image:: https://readthedocs.org/projects/jsonpickle/badge/?version=latest + :target: https://jsonpickle.readthedocs.io/en/latest/?badge=latest + +.. image:: https://github.com/jsonpickle/jsonpickle/actions/workflows/test.yml/badge.svg + :target: https://github.com/jsonpickle/jsonpickle/actions + :alt: Github Actions + +.. image:: https://img.shields.io/badge/License-BSD%203--Clause-blue.svg + :target: https://github.com/jsonpickle/jsonpickle/blob/main/LICENSE + :alt: BSD + + +jsonpickle +========== + +jsonpickle is a library for the two-way conversion of complex Python objects +and `JSON `_. jsonpickle builds upon existing JSON +encoders, such as simplejson, json, and ujson. + +.. warning:: + + jsonpickle can execute arbitrary Python code. + + Please see the Security section for more details. + + +For complete documentation, please visit the +`jsonpickle documentation `_. + +Bug reports and merge requests are encouraged at the +`jsonpickle repository on github `_. + +Usage +===== +The following is a very simple example of how one can use jsonpickle in their scripts/projects. Note the usage of jsonpickle.encode and decode, and how the data is written/encoded to a file and then read/decoded from the file. + +.. code-block:: python + + import jsonpickle + from dataclasses import dataclass + + @dataclass + class Example: + data: str + + + ex = Example("value1") + encoded_instance = jsonpickle.encode(ex) + assert encoded_instance == '{"py/object": "__main__.Example", "data": "value1"}' + + with open("example.json", "w+") as f: + f.write(encoded_instance) + + with open("example.json", "r+") as f: + written_instance = f.read() + decoded_instance = jsonpickle.decode(written_instance) + assert decoded_instance == ex + +For more examples, see the `examples directory on GitHub `_ for example scripts. These can be run on your local machine to see how jsonpickle works and behaves, and how to use it. Contributions from users regarding how they use jsonpickle are welcome! + + +Why jsonpickle? +=============== + +Data serialized with python's pickle (or cPickle or dill) is not easily readable outside of python. Using the json format, jsonpickle allows simple data types to be stored in a human-readable format, and more complex data types such as numpy arrays and pandas dataframes, to be machine-readable on any platform that supports json. E.g., unlike pickled data, jsonpickled data stored in an Amazon S3 bucket is indexible by Amazon's Athena. + +Security +======== + +jsonpickle should be treated the same as the +`Python stdlib pickle module `_ +from a security perspective. + +.. warning:: + + The jsonpickle module **is not secure**. Only unpickle data you trust. + + It is possible to construct malicious pickle data which will **execute + arbitrary code during unpickling**. Never unpickle data that could have come + from an untrusted source, or that could have been tampered with. + + Consider signing data with an HMAC if you need to ensure that it has not + been tampered with. + + Safer deserialization approaches, such as reading JSON directly, + may be more appropriate if you are processing untrusted data. + + +Install +======= + +Install from pip for the latest stable release: + +:: + + pip install jsonpickle + +Install from github for the latest changes: + +:: + + pip install git+https://github.com/jsonpickle/jsonpickle.git + + +Numpy/Pandas Support +==================== + +jsonpickle includes built-in numpy and pandas extensions. If you would +like to encode sklearn models, numpy arrays, pandas DataFrames, and other +numpy/pandas-based data, then you must enable the numpy and/or pandas +extensions by registering their handlers:: + + >>> import jsonpickle.ext.numpy as jsonpickle_numpy + >>> import jsonpickle.ext.pandas as jsonpickle_pandas + >>> jsonpickle_numpy.register_handlers() + >>> jsonpickle_pandas.register_handlers() + + +Development +=========== + +Use `make` to run the unit tests:: + + make test + +`pytest` is used to run unit tests internally. + +A `tox` target is provided to run tests using all installed and supported Python versions:: + + make tox + +`jsonpickle` itself has no dependencies beyond the Python stdlib. +`tox` is required for testing when using the `tox` test runner only. + +The testing requirements are specified in `setup.cfg`. +It is recommended to create a virtualenv and run tests from within the +virtualenv.:: + + python3 -mvenv env3 + source env3/bin/activate + pip install --editable '.[dev]' + make test + +You can also use a tool such as `vx `_ +to activate the virtualenv without polluting your shell environment:: + + python3 -mvenv env3 + vx env3 pip install --editable '.[dev]' + vx env3 make test + +If you can't use a venv, you can install the testing packages as follows:: + + pip install .[testing] + +`jsonpickle` supports multiple Python versions, so using a combination of +multiple virtualenvs and `tox` is useful in order to catch compatibility +issues when developing. + +GPG Signing +=========== + +Unfortunately, while versions of jsonpickle before 3.0.1 should still be signed, +GPG signing support was removed from PyPi +(https://blog.pypi.org/posts/2023-05-23-removing-pgp/) back in May 2023. + +License +======= + +Licensed under the BSD License. See the LICENSE file for more details. diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/RECORD b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/RECORD new file mode 100644 index 0000000000000000000000000000000000000000..488ea1b272b0f70d2b1e8f08c6a5255e2ae85ec0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/RECORD @@ -0,0 +1,38 @@ +jsonpickle-4.1.1.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 +jsonpickle-4.1.1.dist-info/METADATA,sha256=uj-M-_gfWF9DXSpxrv070t1RNM4HgGjGc-Hw3wZUmc8,8148 +jsonpickle-4.1.1.dist-info/RECORD,, +jsonpickle-4.1.1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91 +jsonpickle-4.1.1.dist-info/licenses/LICENSE,sha256=2k10Dnv-Hpd3uu2jz2U09Wjssquye4Dn4sL58oZNg50,1547 +jsonpickle-4.1.1.dist-info/top_level.txt,sha256=cdRDYlLc4XOT2KzzPurieMn-XW_3YxFzopwdeDqPFVs,11 +jsonpickle/__init__.py,sha256=Lfn7ceNeACvvkRQS48F_740_g5Xy7aTffuDvOyJ7z-M,3043 +jsonpickle/__pycache__/__init__.cpython-312.pyc,, +jsonpickle/__pycache__/backend.cpython-312.pyc,, +jsonpickle/__pycache__/compat.cpython-312.pyc,, +jsonpickle/__pycache__/errors.cpython-312.pyc,, +jsonpickle/__pycache__/handlers.cpython-312.pyc,, +jsonpickle/__pycache__/pickler.cpython-312.pyc,, +jsonpickle/__pycache__/tags.cpython-312.pyc,, +jsonpickle/__pycache__/tags_pd.cpython-312.pyc,, +jsonpickle/__pycache__/unpickler.cpython-312.pyc,, +jsonpickle/__pycache__/util.cpython-312.pyc,, +jsonpickle/__pycache__/version.cpython-312.pyc,, +jsonpickle/backend.py,sha256=0BImUq61LMYih-8510hNPQvtCgfNjIHGOTKuApzkyWg,9993 +jsonpickle/compat.py,sha256=jCIhbLad7wMstxeEOykPh-lRvM3fIkwITmHi0Rbi5PM,378 +jsonpickle/errors.py,sha256=lzadGFLtErTPH0CzAwxS2gbd61lqoOJE4f2_TSDa3WU,132 +jsonpickle/ext/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0 +jsonpickle/ext/__pycache__/__init__.cpython-312.pyc,, +jsonpickle/ext/__pycache__/gmpy.cpython-312.pyc,, +jsonpickle/ext/__pycache__/numpy.cpython-312.pyc,, +jsonpickle/ext/__pycache__/pandas.cpython-312.pyc,, +jsonpickle/ext/__pycache__/yaml.cpython-312.pyc,, +jsonpickle/ext/gmpy.py,sha256=BSpYNyawYVeGdNQoMNQcS67H-UhxoSVAOYXkwPH2YFc,558 +jsonpickle/ext/numpy.py,sha256=QTF9XhtuEzXJHVgswjA5TygGX34-hzj1WeZDrQtTxdc,14324 +jsonpickle/ext/pandas.py,sha256=uScdvatBroJYZia6Xerm8t2i5eGZpCphOpZtILNnpvs,15138 +jsonpickle/ext/yaml.py,sha256=jM5FPGefQ9UfLBcEYbm72ecUgRlkpp6a5GuQLRUQjks,429 +jsonpickle/handlers.py,sha256=zbWgmCXnO9M7FUYz6hzjqivcj0XxibEnyzK96i2u218,8275 +jsonpickle/pickler.py,sha256=Jpp1y9suO7qm1HdRkScTwGdHTtA_DLkRtXf_Id8vnkY,32227 +jsonpickle/tags.py,sha256=-c43S7GOsPVG6ABR_vitWFjAEHVCD9g-oNFy090FlRY,987 +jsonpickle/tags_pd.py,sha256=F6wFOUfSjp34e91wE8p25-37Pn4hH7z7dOC9DEYAQhI,8312 +jsonpickle/unpickler.py,sha256=jKB6xhlm4dLMuj0qzyZA_9gGXRdKPmzxDTcaED6LY5o,33361 +jsonpickle/util.py,sha256=3OFTrYRTEAqxXVjr2o15dtc9hcgnnZrMQtBXvZhFr7A,15933 +jsonpickle/version.py,sha256=hPwJiFI0c_zey19VKn513p9gJ65s5mMdYi1p0EowrFM,342 diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/WHEEL b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/WHEEL new file mode 100644 index 0000000000000000000000000000000000000000..e7fa31b6f3f78deb1022c1f7927f07d4d16da822 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/WHEEL @@ -0,0 +1,5 @@ +Wheel-Version: 1.0 +Generator: setuptools (80.9.0) +Root-Is-Purelib: true +Tag: py3-none-any + diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/licenses/._LICENSE b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/licenses/._LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/licenses/._LICENSE differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/licenses/LICENSE b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/licenses/LICENSE new file mode 100644 index 0000000000000000000000000000000000000000..2e0bab72e2107889340676307d1867cde58137b8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/licenses/LICENSE @@ -0,0 +1,28 @@ +Copyright (C) 2008 John Paulett (john -at- paulett.org) +Copyright (C) 2009-2021 David Aguilar (davvid -at- gmail.com) + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions are met: + +1. Redistributions of source code must retain the above copyright notice, +this list of conditions and the following disclaimer. + +2. Redistributions in binary form must reproduce the above copyright notice, +this list of conditions and the following disclaimer in the documentation +and/or other materials provided with the distribution. + +3. Neither the name of the copyright holder nor the names of its +contributors may be used to endorse or promote products derived from this +software without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS +IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR +CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, +EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, +PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; +OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, +WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR +OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, +EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/top_level.txt b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/top_level.txt new file mode 100644 index 0000000000000000000000000000000000000000..dc15bbdac6aaaacefcf34babb4ce41427d81ee7b --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle-4.1.1.dist-info/top_level.txt @@ -0,0 +1 @@ +jsonpickle diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._backend.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._backend.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._backend.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._compat.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._compat.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._compat.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._errors.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._errors.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._errors.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._ext b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._ext new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._ext differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._handlers.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._handlers.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._handlers.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._pickler.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._pickler.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._pickler.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._tags.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._tags.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._tags.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._tags_pd.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._tags_pd.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._tags_pd.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._unpickler.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._unpickler.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._unpickler.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._util.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._util.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._util.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._version.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._version.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/._version.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/__init__.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..8917c598a4da370f58e25d8ef0357c645d0d4e32 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/__init__.py @@ -0,0 +1,94 @@ +# Copyright (C) 2008 John Paulett (john -at- paulett.org) +# Copyright (C) 2009, 2011, 2013 David Aguilar (davvid -at- gmail.com) +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. + +"""Python library for serializing any arbitrary object graph into JSON. + +.. warning:: + + The jsonpickle module **is not secure**. Only unpickle data you trust. + + It is possible to construct malicious pickle data which will **execute + arbitrary code during unpickling**. Never unpickle data that could have come + from an untrusted source, or that could have been tampered with. + + Consider signing data with an HMAC if you need to ensure that it has not + been tampered with. + + Safer deserialization approaches, such as reading the raw JSON + directly, may be more appropriate if you are processing untrusted data. + +jsonpickle can take almost any Python object and turn the object into JSON. +Additionally, it can reconstitute the object back into Python. + +The object must be accessible globally via a module and must +inherit from object (AKA new-style classes). + +Create an object:: + + class Thing(object): + def __init__(self, name): + self.name = name + + obj = Thing('Awesome') + +Use jsonpickle to transform the object into a JSON string:: + + import jsonpickle + frozen = jsonpickle.encode(obj) + +Use jsonpickle to recreate a Python object from a JSON string:: + + thawed = jsonpickle.decode(frozen) + +The new object has the same type and data, but essentially is now a copy of +the original. + +.. code-block:: python + + assert obj.name == thawed.name + +If you will never need to load (regenerate the Python class from JSON), you can +pass in the keyword unpicklable=False to prevent extra information from being +added to JSON:: + + oneway = jsonpickle.encode(obj, unpicklable=False) + result = jsonpickle.decode(oneway) + assert obj.name == result['name'] == 'Awesome' + +.. note:: + + Please see the note in the :ref:`api-docs` when serializing dictionaries + that contain non-string dictionary keys. + +""" +# Export other names not in __all__ +from .backend import JSONBackend # noqa: F401 +from .backend import json +from .handlers import register # noqa: F401 +from .handlers import unregister # noqa: F401 +from .pickler import Pickler # noqa: F401 +from .pickler import encode +from .unpickler import Unpickler # noqa: F401 +from .unpickler import decode +from .version import __version__ # noqa: F401 + +__all__ = ('encode', 'decode') + +# register built-in handlers +__import__('jsonpickle.handlers', level=0) + +# Export specific JSONPluginMgr methods into the jsonpickle namespace +set_preferred_backend = json.set_preferred_backend +set_decoder_options = json.set_decoder_options +set_encoder_options = json.set_encoder_options +load_backend = json.load_backend +remove_backend = json.remove_backend +enable_fallthrough = json.enable_fallthrough + +# json.load(), loads(), dump(), dumps() compatibility +dumps = encode +loads = decode diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/backend.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/backend.py new file mode 100644 index 0000000000000000000000000000000000000000..a1dc6727d993e17b6dd7a0dfb95b071c3ac27230 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/backend.py @@ -0,0 +1,283 @@ +class JSONBackend: + """Manages encoding and decoding using various backends. + + It tries these modules in this order: + simplejson, json, ujson + + simplejson is a fast and popular backend and is tried first. + json comes with Python and is tried second. + + """ + + def _verify(self): + """Ensures that we've loaded at least one JSON backend.""" + if self._verified: + return + raise AssertionError('jsonpickle could not load any json modules') + + def encode(self, obj, indent=None, separators=None): + """ + Attempt to encode an object into JSON. + + This tries the loaded backends in order and passes along the last + exception if no backend is able to encode the object. + + """ + self._verify() + + if not self._fallthrough: + name = self._backend_names[0] + return self.backend_encode(name, obj, indent=indent, separators=separators) + + for idx, name in enumerate(self._backend_names): + try: + return self.backend_encode( + name, obj, indent=indent, separators=separators + ) + except Exception as e: + if idx == len(self._backend_names) - 1: + raise e + + # def dumps + dumps = encode + + def decode(self, string): + """ + Attempt to decode an object from a JSON string. + + This tries the loaded backends in order and passes along the last + exception if no backends are able to decode the string. + + """ + self._verify() + + if not self._fallthrough: + name = self._backend_names[0] + return self.backend_decode(name, string) + + for idx, name in enumerate(self._backend_names): + try: + return self.backend_decode(name, string) + except self._decoder_exceptions[name] as e: + if idx == len(self._backend_names) - 1: + raise e + else: + pass # and try a more forgiving encoder + + # def loads + loads = decode + + def __init__(self, fallthrough=True): + # Whether we should fallthrough to the next backend + self._fallthrough = fallthrough + # The names of backends that have been successfully imported + self._backend_names = [] + + # A dictionary mapping backend names to encode/decode functions + self._encoders = {} + self._decoders = {} + + # Options to pass to specific encoders + self._encoder_options = {} + + # Options to pass to specific decoders + self._decoder_options = {} + + # The exception class that is thrown when a decoding error occurs + self._decoder_exceptions = {} + + # Whether we've loaded any backends successfully + self._verified = False + + self.load_backend('simplejson') + self.load_backend('json') + self.load_backend('ujson') + # TODO: remove default registration of the YAML backend in v5.0.0. + self.load_backend( + 'yaml', dumps='dump', loads='safe_load', loads_exc='YAMLError' + ) + + # Defaults for various encoders + json_opts = ((), {'sort_keys': False}) + self._encoder_options = { + 'ujson': ((), {'sort_keys': False, 'escape_forward_slashes': False}), + 'json': json_opts, + 'simplejson': json_opts, + 'django.util.simplejson': json_opts, + } + + def enable_fallthrough(self, enable): + """ + Disable jsonpickle's fallthrough-on-error behavior + + By default, jsonpickle tries the next backend when decoding or + encoding using a backend fails. + + This can make it difficult to force jsonpickle to use a specific + backend, and catch errors, because the error will be suppressed and + may not be raised by the subsequent backend. + + Calling `enable_backend(False)` will make jsonpickle immediately + re-raise any exceptions raised by the backends. + + """ + self._fallthrough = enable + + def _store(self, dct, backend, obj, name): + try: + dct[backend] = getattr(obj, name) + except AttributeError: + self.remove_backend(backend) + return False + return True + + def load_backend(self, name, dumps='dumps', loads='loads', loads_exc=ValueError): + """Load a JSON backend by name. + + This method loads a backend and sets up references to that + backend's loads/dumps functions and exception classes. + + :param dumps: is the name of the backend's encode method. + The method should take an object and return a string. + Defaults to 'dumps'. + :param loads: names the backend's method for the reverse + operation -- returning a Python object from a string. + :param loads_exc: can be either the name of the exception class + used to denote decoding errors, or it can be a direct reference + to the appropriate exception class itself. If it is a name, + then the assumption is that an exception class of that name + can be found in the backend module's namespace. + :param load: names the backend's 'load' method. + :param dump: names the backend's 'dump' method. + :rtype bool: True on success, False if the backend could not be loaded. + + """ + try: + # Load the JSON backend + mod = __import__(name) + except ImportError: + return False + + # Handle submodules, e.g. django.utils.simplejson + try: + for attr in name.split('.')[1:]: + mod = getattr(mod, attr) + except AttributeError: + return False + + if not self._store(self._encoders, name, mod, dumps) or not self._store( + self._decoders, name, mod, loads + ): + return False + + if isinstance(loads_exc, str): + # This backend's decoder exception is part of the backend + if not self._store(self._decoder_exceptions, name, mod, loads_exc): + return False + else: + # simplejson uses ValueError + self._decoder_exceptions[name] = loads_exc + + # Setup the default args and kwargs for this encoder/decoder + self._encoder_options.setdefault(name, ([], {})) + self._decoder_options.setdefault(name, ([], {})) + + # Add this backend to the list of candidate backends + self._backend_names.append(name) + + # Indicate that we successfully loaded a JSON backend + self._verified = True + return True + + def remove_backend(self, name): + """Remove all entries for a particular backend.""" + self._encoders.pop(name, None) + self._decoders.pop(name, None) + self._decoder_exceptions.pop(name, None) + self._decoder_options.pop(name, None) + self._encoder_options.pop(name, None) + if name in self._backend_names: + self._backend_names.remove(name) + self._verified = bool(self._backend_names) + + def backend_encode(self, name, obj, indent=None, separators=None): + optargs, optkwargs = self._encoder_options.get(name, ([], {})) + encoder_kwargs = optkwargs.copy() + if indent is not None: + encoder_kwargs['indent'] = indent + if separators is not None: + encoder_kwargs['separators'] = separators + encoder_args = (obj,) + tuple(optargs) + return self._encoders[name](*encoder_args, **encoder_kwargs) + + def backend_decode(self, name, string): + optargs, optkwargs = self._decoder_options.get(name, ((), {})) + decoder_kwargs = optkwargs.copy() + return self._decoders[name](string, *optargs, **decoder_kwargs) + + def set_preferred_backend(self, name): + """ + Set the preferred json backend. + + If a preferred backend is set then jsonpickle tries to use it + before any other backend. + + For example:: + + set_preferred_backend('simplejson') + + If the backend is not one of the built-in jsonpickle backends + (json/simplejson) then you must load the backend + prior to calling set_preferred_backend. + + AssertionError is raised if the backend has not been loaded. + + """ + if name in self._backend_names: + self._backend_names.remove(name) + self._backend_names.insert(0, name) + else: + errmsg = 'The "%s" backend has not been loaded.' % name + raise AssertionError(errmsg) + + def set_encoder_options(self, name, *args, **kwargs): + """ + Associate encoder-specific options with an encoder. + + After calling set_encoder_options, any calls to jsonpickle's + encode method will pass the supplied args and kwargs along to + the appropriate backend's encode method. + + For example:: + + set_encoder_options('simplejson', sort_keys=True, indent=4) + + See the appropriate encoder's documentation for details about + the supported arguments and keyword arguments. + + WARNING: If you pass sort_keys=True, and the object to encode + contains ``__slots__``, and you set ``warn`` to True, + a TypeError will be raised! + """ + self._encoder_options[name] = (args, kwargs) + + def set_decoder_options(self, name, *args, **kwargs): + """ + Associate decoder-specific options with a decoder. + + After calling set_decoder_options, any calls to jsonpickle's + decode method will pass the supplied args and kwargs along to + the appropriate backend's decode method. + + For example:: + + set_decoder_options('simplejson', encoding='utf8', cls=JSONDecoder) + + See the appropriate decoder's documentation for details about + the supported arguments and keyword arguments. + + """ + self._decoder_options[name] = (args, kwargs) + + +json = JSONBackend() diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/compat.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/compat.py new file mode 100644 index 0000000000000000000000000000000000000000..c8ed87213135483099a2beb30863dfb850023d5e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/compat.py @@ -0,0 +1,18 @@ +"""jsonpickle.compat is a deprecated private module and will be removed in the future""" + +import queue # noqa +import sys +from collections.abc import Iterator as abc_iterator # noqa + +PY_MAJOR = sys.version_info[0] + +class_types = (type,) +iterator_types = (type(iter('')),) + +string_types = (str,) +numeric_types = (int, float) +ustr = str + + +def iterator(class_): + return class_ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/errors.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/errors.py new file mode 100644 index 0000000000000000000000000000000000000000..178b18df1313bc3c527972d53e949434d5691a15 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/errors.py @@ -0,0 +1,8 @@ +""" +Stores custom jsonpickle errors. +""" + + +class ClassNotFoundError(BaseException): + def __init__(*args, **kwargs): + pass diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._gmpy.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._gmpy.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._gmpy.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._numpy.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._numpy.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._numpy.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._pandas.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._pandas.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._pandas.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._yaml.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._yaml.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/._yaml.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/__init__.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/gmpy.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/gmpy.py new file mode 100644 index 0000000000000000000000000000000000000000..bc5e3018ea491c8ed9c168eaf53585efc9babb80 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/gmpy.py @@ -0,0 +1,27 @@ +try: + import gmpy2 as gmpy +except ImportError: + gmpy = None + +from ..handlers import BaseHandler, register, unregister + +__all__ = ['register_handlers', 'unregister_handlers'] + + +class GmpyMPZHandler(BaseHandler): + def flatten(self, obj, data): + data['int'] = int(obj) + return data + + def restore(self, data): + return gmpy.mpz(data['int']) + + +def register_handlers(): + if gmpy is not None: + register(gmpy.mpz, GmpyMPZHandler, base=True) + + +def unregister_handlers(): + if gmpy is not None: + unregister(gmpy.mpz) diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/numpy.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/numpy.py new file mode 100644 index 0000000000000000000000000000000000000000..2b037f73f5864cb5682fb2813d4a98a522857ae7 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/numpy.py @@ -0,0 +1,390 @@ +import ast +import json +import sys +import warnings +import zlib + +import numpy as np + +from ..handlers import BaseHandler, register, unregister +from ..util import b64decode, b64encode + +__all__ = ['register_handlers', 'unregister_handlers'] + +native_byteorder = '<' if sys.byteorder == 'little' else '>' + + +def get_byteorder(arr): + """translate equals sign to native order""" + byteorder = arr.dtype.byteorder + return native_byteorder if byteorder == '=' else byteorder + + +class NumpyBaseHandler(BaseHandler): + def flatten_dtype(self, dtype, data): + if hasattr(dtype, 'tostring'): + data['dtype'] = dtype.tostring() + else: + dtype = str(dtype) + prefix = '(numpy.record, ' + if dtype.startswith(prefix): + dtype = dtype[len(prefix) : -1] + data['dtype'] = dtype + + def restore_dtype(self, data): + dtype = data['dtype'] + if dtype.startswith(('{', '[')): + dtype = ast.literal_eval(dtype) + return np.dtype(dtype) + + +class NumpyDTypeHandler(NumpyBaseHandler): + def flatten(self, obj, data): + self.flatten_dtype(obj, data) + return data + + def restore(self, data): + return self.restore_dtype(data) + + +class NumpyGenericHandler(NumpyBaseHandler): + def flatten(self, obj, data): + self.flatten_dtype(obj.dtype.newbyteorder('N'), data) + data['value'] = self.context.flatten(obj.tolist(), reset=False) + return data + + def restore(self, data): + value = self.context.restore(data['value'], reset=False) + return self.restore_dtype(data).type(value) + + +class NumpyDatetimeHandler(NumpyGenericHandler): + """Extend NumpyGenericHandler to handle nanosecond-resolution datetime64""" + + def restore(self, data): + value = self.context.restore(data['value'], reset=False) + dtype = data['dtype'] + if dtype.endswith('[ns]'): + return self.restore_dtype(data).type(value, 'ns') + return self.restore_dtype(data).type(value) + + +class UnpickleableNumpyGenericHandler(NumpyGenericHandler): + """ + From issue #381, this is used for simplifying the output of numpy arrays + when unpicklable=False (the default is True). + """ + + def flatten(self, obj, data): + if not self.context.unpicklable: + return self.context.flatten(obj.tolist(), reset=False) + else: + return super(NumpyGenericHandler, self).flatten(obj, data) + + def restore(self, data): + raise NotImplementedError + + +class NumpyNDArrayHandler(NumpyBaseHandler): + """Stores arrays as text representation, without regard for views""" + + def flatten_flags(self, obj, data): + if obj.flags.writeable is False: + data['writeable'] = False + + def restore_flags(self, data, arr): + if not data.get('writeable', True): + arr.flags.writeable = False + + def flatten(self, obj, data): + self.flatten_dtype(obj.dtype.newbyteorder('N'), data) + self.flatten_flags(obj, data) + data['values'] = self.context.flatten(obj.tolist(), reset=False) + if 0 in obj.shape: + # add shape information explicitly as it cannot be + # inferred from an empty list + data['shape'] = obj.shape + return data + + def restore(self, data): + values = self.context.restore(data['values'], reset=False) + arr = np.array( + values, dtype=self.restore_dtype(data), order=data.get('order', 'C') + ) + shape = data.get('shape', None) + if shape is not None: + arr = arr.reshape(shape) + + self.restore_flags(data, arr) + return arr + + +class NumpyNDArrayHandlerBinary(NumpyNDArrayHandler): + """stores arrays with size greater than 'size_threshold' as + (optionally) compressed base64 + + Notes + ----- + This would be easier to implement using np.save/np.load, but + that would be less language-agnostic + """ + + def __init__(self, size_threshold=16, compression=zlib): + """ + :param size_threshold: nonnegative int or None + valid values for 'size_threshold' are all nonnegative + integers and None + if size_threshold is None, values are always stored as nested lists + :param compression: a compression module or None + valid values for 'compression' are {zlib, bz2, None} + if compression is None, no compression is applied + """ + self.size_threshold = size_threshold + self.compression = compression + + def flatten_byteorder(self, obj, data): + byteorder = obj.dtype.byteorder + if byteorder != '|': + data['byteorder'] = get_byteorder(obj) + + def restore_byteorder(self, data, arr): + byteorder = data.get('byteorder', None) + if byteorder: + arr.dtype = arr.dtype.newbyteorder(byteorder) + + def flatten(self, obj, data): + """encode numpy to json""" + if self.size_threshold is None or self.size_threshold >= obj.size: + # encode as text + data = super().flatten(obj, data) + else: + # encode as binary + if obj.dtype == object: + # There's a bug deep in the bowels of numpy that causes a + # segfault when round-tripping an ndarray of dtype object. + # E.g., the following will result in a segfault: + # import numpy as np + # arr = np.array([str(i) for i in range(3)], + # dtype=object) + # dtype = arr.dtype + # shape = arr.shape + # buf = arr.tobytes() + # del arr + # arr = np.ndarray(buffer=buf, dtype=dtype, + # shape=shape).copy() + # So, save as a binary-encoded list in this case + buf = json.dumps(obj.tolist()).encode() + elif hasattr(obj, 'tobytes'): + # numpy docstring is lacking as of 1.11.2, + # but this is the option we need + buf = obj.tobytes(order='a') + else: + # numpy < 1.9 compatibility + buf = obj.tostring(order='a') + if self.compression: + buf = self.compression.compress(buf) + data['values'] = b64encode(buf) + data['shape'] = obj.shape + self.flatten_dtype(obj.dtype.newbyteorder('N'), data) + self.flatten_byteorder(obj, data) + self.flatten_flags(obj, data) + + if not obj.flags.c_contiguous: + data['order'] = 'F' + + return data + + def restore(self, data): + """decode numpy from json""" + values = data['values'] + if isinstance(values, list): + # decode text representation + arr = super().restore(data) + elif isinstance(values, (int, float)): + # single-value array + arr = np.array([values], dtype=self.restore_dtype(data)) + else: + # decode binary representation + dtype = self.restore_dtype(data) + buf = b64decode(values) + if self.compression: + buf = self.compression.decompress(buf) + # See note above about segfault bug for numpy dtype object. Those + # are saved as a list to work around that. + if dtype == object: + values = json.loads(buf.decode()) + arr = np.array(values, dtype=dtype, order=data.get('order', 'C')) + shape = data.get('shape', None) + if shape is not None: + arr = arr.reshape(shape) + else: + arr = np.ndarray( + buffer=buf, + dtype=dtype, + shape=data.get('shape'), + order=data.get('order', 'C'), + ).copy() # make a copy, to force the result to own the data + self.restore_byteorder(data, arr) + self.restore_flags(data, arr) + + return arr + + +class NumpyNDArrayHandlerView(NumpyNDArrayHandlerBinary): + """Pickles references inside ndarrays, or array-views + + Notes + ----- + The current implementation has some restrictions. + + 'base' arrays, or arrays which are viewed by other arrays, + must be f-or-c-contiguous. + This is not such a large restriction in practice, because all + numpy array creation is c-contiguous by default. + Relaxing this restriction would be nice though; especially if + it can be done without bloating the design too much. + + Furthermore, ndarrays which are views of array-like objects + implementing __array_interface__, + but which are not themselves nd-arrays, are deepcopied with + a warning (by default), + as we cannot guarantee whatever custom logic such classes + implement is correctly reproduced. + """ + + def __init__(self, mode='warn', size_threshold=16, compression=zlib): + """ + :param mode: {'warn', 'raise', 'ignore'} + How to react when encountering array-like objects whose + references we cannot safely serialize + :param size_threshold: nonnegative int or None + valid values for 'size_threshold' are all nonnegative + integers and None + if size_threshold is None, values are always stored as nested lists + :param compression: a compression module or None + valid values for 'compression' are {zlib, bz2, None} + if compression is None, no compression is applied + """ + super().__init__(size_threshold, compression) + self.mode = mode + + def flatten(self, obj, data): + """encode numpy to json""" + base = obj.base + if base is None and obj.flags.forc: + # store by value + data = super().flatten(obj, data) + # ensure that views on arrays stored as text + # are interpreted correctly + if not obj.flags.c_contiguous: + data['order'] = 'F' + elif isinstance(base, np.ndarray) and base.flags.forc: + # store by reference + data['base'] = self.context.flatten(base, reset=False) + + offset = obj.ctypes.data - base.ctypes.data + if offset: + data['offset'] = offset + + if not obj.flags.c_contiguous: + data['strides'] = obj.strides + + data['shape'] = obj.shape + self.flatten_dtype(obj.dtype.newbyteorder('N'), data) + self.flatten_flags(obj, data) + + if get_byteorder(obj) != '|': + byteorder = 'S' if get_byteorder(obj) != get_byteorder(base) else None + if byteorder: + data['byteorder'] = byteorder + + if self.size_threshold is None or self.size_threshold >= obj.size: + # not used in restore since base is present, but + # include values for human-readability + super(NumpyNDArrayHandlerBinary, self).flatten(obj, data) + else: + # store a deepcopy or fail + if self.mode == 'warn': + msg = ( + "ndarray is defined by reference to an object " + "we do not know how to serialize. " + "A deep copy is serialized instead, breaking " + "memory aliasing." + ) + warnings.warn(msg) + elif self.mode == 'raise': + msg = ( + "ndarray is defined by reference to an object we do " + "not know how to serialize." + ) + raise ValueError(msg) + data = super().flatten(obj.copy(), data) + + return data + + def restore(self, data): + """decode numpy from json""" + base = data.get('base', None) + if base is None: + # decode array with owndata=True + arr = super().restore(data) + else: + # decode array view, which references the data of another array + base = self.context.restore(base, reset=False) + if not isinstance(base, np.ndarray): + # the object is probably a nested list + base = np.array(base) + assert ( + base.flags.forc + ), "Current implementation assumes base is C or F contiguous" + + arr = np.ndarray( + buffer=base.data, + dtype=self.restore_dtype(data).newbyteorder(data.get('byteorder', '|')), + shape=data.get('shape'), + offset=data.get('offset', 0), + strides=data.get('strides', None), + ) + + self.restore_flags(data, arr) + + return arr + + +def register_handlers( + ndarray_mode='warn', + ndarray_size_threshold=16, + ndarray_compression=zlib, +): + """Register handlers for numpy types + + :param ndarray_abc_xyz: Forward constructor arguments to NumpyNDArrayHandlerView. + Options with an 'ndarray_' prefix correspond to the same-named + NumpyNDArrayHandlerView constructor options, sans the 'ndarray_' prefix. + """ + ndarray_handler = NumpyNDArrayHandlerView( + mode=ndarray_mode, + size_threshold=ndarray_size_threshold, + compression=ndarray_compression, + ) + register(np.ndarray, ndarray_handler, base=True) + register(np.dtype, NumpyDTypeHandler, base=True) + register(np.generic, NumpyGenericHandler, base=True) + # Numpy 1.20 has custom dtypes that must be registered separately. + register(np.dtype(np.void).__class__, NumpyDTypeHandler, base=True) + register(np.dtype(np.float32).__class__, NumpyDTypeHandler, base=True) + register(np.dtype(np.int32).__class__, NumpyDTypeHandler, base=True) + register(np.dtype(np.datetime64).__class__, NumpyDTypeHandler, base=True) + register(np.datetime64, NumpyDatetimeHandler, base=True) + + +def unregister_handlers(): + """Remove numpy handlers from the handler registry""" + unregister(np.dtype) + unregister(np.generic) + unregister(np.ndarray) + # Numpy 1.20 dtypes + unregister(np.dtype(np.void).__class__) + unregister(np.dtype(np.float32).__class__) + unregister(np.dtype(np.int32).__class__) + unregister(np.dtype(np.datetime64).__class__) diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/pandas.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/pandas.py new file mode 100644 index 0000000000000000000000000000000000000000..d5040918b96628025e561454b3b877939e7f4a24 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/pandas.py @@ -0,0 +1,452 @@ +import warnings +import zlib +from io import StringIO + +import numpy as np +import pandas as pd + +from .. import decode, encode +from ..handlers import BaseHandler, register, unregister +from ..tags_pd import REVERSE_TYPE_MAP, TYPE_MAP +from ..util import b64decode, b64encode +from .numpy import register_handlers as register_numpy_handlers +from .numpy import unregister_handlers as unregister_numpy_handlers + +__all__ = ['register_handlers', 'unregister_handlers'] + + +def pd_encode(obj, **kwargs): + if isinstance(obj, np.generic): + # convert pandas/numpy scalar to native Python type + return obj.item() + return encode(obj, **kwargs) + + +def pd_decode(s, **kwargs): + return decode(s, **kwargs) + + +def rle_encode(types_list): + """ + Encodes a list of type codes using Run-Length Encoding (RLE). This allows for object columns in dataframes to contain items of different types without massively bloating the encoded representation. + """ + if not types_list: + return [] + + encoded = [] + current_type = types_list[0] + count = 1 + + for typ in types_list[1:]: + if typ == current_type: + count += 1 + else: + encoded.append([current_type, count]) + current_type = typ + count = 1 + encoded.append([current_type, count]) + + return encoded + + +def rle_decode(encoded_list): + """ + Decodes a Run-Length Encoded (RLE) list back into the original list of type codes. + """ + decoded = [] + for typ, count in encoded_list: + decoded.extend([typ] * count) + return decoded + + +class PandasProcessor: + def __init__(self, size_threshold=500, compression=zlib): + """ + :param size_threshold: nonnegative int or None + valid values for 'size_threshold' are all nonnegative + integers and None. If size_threshold is None, + dataframes are always stored as csv strings + :param compression: a compression module or None + valid values for 'compression' are {zlib, bz2, None} + if compression is None, no compression is applied + """ + self.size_threshold = size_threshold + self.compression = compression + + def flatten_pandas(self, buf, data, meta=None): + if self.size_threshold is not None and len(buf) > self.size_threshold: + if self.compression: + buf = self.compression.compress(buf.encode()) + data['comp'] = True + data['values'] = b64encode(buf) + data['txt'] = False + else: + data['values'] = buf + data['txt'] = True + + data['meta'] = meta + return data + + def restore_pandas(self, data): + if data.get('txt', True): + # It's just text... + buf = data['values'] + else: + buf = b64decode(data['values']) + if data.get('comp', False): + buf = self.compression.decompress(buf).decode() + meta = data.get('meta', {}) + return (buf, meta) + + +def make_read_csv_params(meta, context): + meta_dtypes = context.restore(meta.get('dtypes', {}), reset=False) + # The header is used to select the rows of the csv from which + # the columns names are retrieved + header = meta.get('header', [0]) + parse_dates = [] + converters = {} + timedeltas = [] + # this is only for pandas v2+ due to a backwards-incompatible change + parse_datetime_v2 = {} + dtype = {} + for k, v in meta_dtypes.items(): + if v.startswith('datetime'): + parse_dates.append(k) + parse_datetime_v2[k] = v + elif v.startswith('complex'): + converters[k] = complex + elif v.startswith('timedelta'): + timedeltas.append(k) + dtype[k] = 'object' + else: + dtype[k] = v + + return ( + dict( + dtype=dtype, header=header, parse_dates=parse_dates, converters=converters + ), + timedeltas, + parse_datetime_v2, + ) + + +class PandasDfHandler(BaseHandler): + pp = PandasProcessor() + + def flatten(self, obj, data): + pp = PandasProcessor() + # handle multiindex columns + if isinstance(obj.columns, pd.MultiIndex): + columns = [tuple(col) for col in obj.columns] + column_names = obj.columns.names + is_multicolumns = True + else: + columns = obj.columns.tolist() + column_names = obj.columns.name + is_multicolumns = False + + # handle multiindex index + if isinstance(obj.index, pd.MultiIndex): + index_values = [tuple(idx) for idx in obj.index.values] + index_names = obj.index.names + is_multiindex = True + else: + index_values = obj.index.tolist() + index_names = obj.index.name + is_multiindex = False + + data_columns = {} + type_codes = [] + for col in obj.columns: + col_data = obj[col] + dtype_name = col_data.dtype.name + + if dtype_name == "object": + # check if items are complex types + if col_data.apply( + lambda x: isinstance(x, (list, dict, set, tuple, np.ndarray)) + ).any(): + # if items are complex, erialize each item individually + serialized_values = col_data.apply(lambda x: encode(x)).tolist() + data_columns[col] = serialized_values + type_codes.append("py/jp") + else: + # treat it as regular object dtype + data_columns[col] = col_data.tolist() + type_codes.append(TYPE_MAP.get(dtype_name, "object")) + else: + # for other dtypes, store their values directly + data_columns[col] = col_data.tolist() + type_codes.append(TYPE_MAP.get(dtype_name, "object")) + + # store index data + index_encoded = encode(index_values, keys=True) + + rle_types = rle_encode(type_codes) + # prepare metadata + meta = { + "dtypes_rle": rle_types, + "index": index_encoded, + "index_names": index_names, + "columns": encode(columns, keys=True), + "column_names": column_names, + "is_multiindex": is_multiindex, + "is_multicolumns": is_multicolumns, + } + + # serialize data_columns with keys=True to allow for non-object keys + data_encoded = encode(data_columns, keys=True) + + # use PandasProcessor to flatten + data = pp.flatten_pandas(data_encoded, data, meta) + return data + + def restore(self, obj): + data_encoded, meta = self.pp.restore_pandas(obj) + try: + data_columns = decode(data_encoded, keys=True) + except Exception: + # this may be a specific type of jsondecode error for pre-v3.4 encoding schemes, but also might not be + warnings.warn( + ( + "jsonpickle versions at and above v3.4 have a different encoding scheme for pandas dataframes." + # stack level 6 is where the user called jsonpickle from + " If you're not decoding an object encoded in pre-v3.4 jsonpickle, please file a bug report on our GitHub!" + ), + stacklevel=6, + ) + return self.restore_v3_3(obj) + + # get type codes, un-RLE-ed + try: + rle_types = meta["dtypes_rle"] + except KeyError: + # was definitely encoded with pre-v3.4 scheme, but warn anyway + warnings.warn( + ( + "jsonpickle versions at and above v3.4 have a different encoding scheme for pandas dataframes." + " Please update your jsonpickle and re-encode these objects!" + ), + stacklevel=6, + ) + return self.restore_v3_3(obj) + type_codes = rle_decode(rle_types) + + # handle multicolumns + columns_decoded = decode(meta["columns"], keys=True) + if meta.get("is_multicolumns", False): + columns = pd.MultiIndex.from_tuples( + columns_decoded, names=meta.get("column_names") + ) + else: + columns = columns_decoded + + # progressively reconstruct dataframe as a dict + df_data = {} + dtypes = {} + for col, type_code in zip(columns, type_codes): + col_data = data_columns[col] + if type_code == "py/jp": + # deserialize each item in the column + col_values = [decode(item) for item in col_data] + df_data[col] = col_values + else: + df_data[col] = col_data + # used later to get correct dtypes + dtype_str = REVERSE_TYPE_MAP.get(type_code, "object") + dtypes[col] = dtype_str + + # turn dict into df + df = pd.DataFrame(df_data) + df.columns = columns + + # apply dtypes + for col in df.columns: + dtype_str = dtypes.get(col, "object") + try: + dtype = np.dtype(dtype_str) + df[col] = df[col].astype(dtype) + except Exception: + msg = ( + f"jsonpickle was unable to properly deserialize " + f"the column {col} into its inferred dtype. " + f"Please file a bugreport on the jsonpickle GitHub! " + ) + warnings.warn(msg) + + # decode and set the index + index_values = decode(meta["index"], keys=True) + if meta.get("is_multiindex", False): + index = pd.MultiIndex.from_tuples( + index_values, names=meta.get("index_names") + ) + else: + index = pd.Index(index_values, name=meta.get("index_names")) + df.index = index + + # restore column names for easy readability + if "column_names" in meta: + if meta.get("is_multicolumns", False): + df.columns.names = meta.get("column_names") + else: + df.columns.name = meta.get("column_names") + + return df + + def restore_v3_3(self, data): + csv, meta = self.pp.restore_pandas(data) + params, timedeltas, parse_datetime_v2 = make_read_csv_params(meta, self.context) + # None makes it compatible with objects serialized before + # column_levels_names has been introduced. + column_level_names = meta.get("column_level_names", None) + df = ( + pd.read_csv(StringIO(csv), **params) + if data["values"].strip() + else pd.DataFrame() + ) + for col in timedeltas: + df[col] = pd.to_timedelta(df[col]) + df = df.astype(parse_datetime_v2) + + df.set_index(decode(meta["index"]), inplace=True) + # restore the column level(s) name(s) + if column_level_names: + df.columns.names = column_level_names + return df + + +class PandasSeriesHandler(BaseHandler): + pp = PandasProcessor() + + def flatten(self, obj, data): + """Flatten the index and values for reconstruction""" + data['name'] = obj.name + # This relies on the numpy handlers for the inner guts. + data['index'] = self.context.flatten(obj.index, reset=False) + data['values'] = self.context.flatten(obj.values, reset=False) + return data + + def restore(self, data): + """Restore the flattened data""" + name = data['name'] + index = self.context.restore(data['index'], reset=False) + values = self.context.restore(data['values'], reset=False) + return pd.Series(values, index=index, name=name) + + +class PandasIndexHandler(BaseHandler): + pp = PandasProcessor() + index_constructor = pd.Index + + def name_bundler(self, obj): + return {'name': obj.name} + + def flatten(self, obj, data): + name_bundle = self.name_bundler(obj) + meta = dict(dtype=str(obj.dtype), **name_bundle) + buf = encode(obj.tolist()) + data = self.pp.flatten_pandas(buf, data, meta) + return data + + def restore(self, data): + buf, meta = self.pp.restore_pandas(data) + dtype = meta.get('dtype', None) + name_bundle = { + 'name': (tuple if v is not None else lambda x: x)(v) + for k, v in meta.items() + if k in {'name', 'names'} + } + idx = self.index_constructor(decode(buf), dtype=dtype, **name_bundle) + return idx + + +class PandasPeriodIndexHandler(PandasIndexHandler): + index_constructor = pd.PeriodIndex + + +class PandasMultiIndexHandler(PandasIndexHandler): + def name_bundler(self, obj): + return {'names': obj.names} + + +class PandasTimestampHandler(BaseHandler): + pp = PandasProcessor() + + def flatten(self, obj, data): + meta = {'isoformat': obj.isoformat()} + buf = '' + data = self.pp.flatten_pandas(buf, data, meta) + return data + + def restore(self, data): + _, meta = self.pp.restore_pandas(data) + isoformat = meta['isoformat'] + obj = pd.Timestamp(isoformat) + return obj + + +class PandasPeriodHandler(BaseHandler): + pp = PandasProcessor() + + def flatten(self, obj, data): + meta = { + 'start_time': encode(obj.start_time), + 'freqstr': obj.freqstr, + } + buf = '' + data = self.pp.flatten_pandas(buf, data, meta) + return data + + def restore(self, data): + _, meta = self.pp.restore_pandas(data) + start_time = decode(meta['start_time']) + freqstr = meta['freqstr'] + obj = pd.Period(start_time, freqstr) + return obj + + +class PandasIntervalHandler(BaseHandler): + pp = PandasProcessor() + + def flatten(self, obj, data): + meta = { + 'left': encode(obj.left), + 'right': encode(obj.right), + 'closed': obj.closed, + } + buf = '' + data = self.pp.flatten_pandas(buf, data, meta) + return data + + def restore(self, data): + _, meta = self.pp.restore_pandas(data) + left = decode(meta['left']) + right = decode(meta['right']) + closed = str(meta['closed']) + obj = pd.Interval(left, right, closed=closed) + return obj + + +def register_handlers(): + register_numpy_handlers() + register(pd.DataFrame, PandasDfHandler, base=True) + register(pd.Series, PandasSeriesHandler, base=True) + register(pd.Index, PandasIndexHandler, base=True) + register(pd.PeriodIndex, PandasPeriodIndexHandler, base=True) + register(pd.MultiIndex, PandasMultiIndexHandler, base=True) + register(pd.Timestamp, PandasTimestampHandler, base=True) + register(pd.Period, PandasPeriodHandler, base=True) + register(pd.Interval, PandasIntervalHandler, base=True) + + +def unregister_handlers(): + unregister_numpy_handlers() + unregister(pd.DataFrame) + unregister(pd.Series) + unregister(pd.Index) + unregister(pd.PeriodIndex) + unregister(pd.MultiIndex) + unregister(pd.Timestamp) + unregister(pd.Period) + unregister(pd.Interval) diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/yaml.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/yaml.py new file mode 100644 index 0000000000000000000000000000000000000000..78c57eab232cffd818b39b9312526c794788155c --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/ext/yaml.py @@ -0,0 +1,15 @@ +"""YAML extension for jsonpickle + +The YAML extension module connects jsonpickle to the PyYAML `yaml` module. +""" + +from ..backend import json as jsonpickle_backend + + +def register(backend=None): + """Register the yaml module with jsonpickle's JSONBackend""" + if backend is None: + backend = jsonpickle_backend + return backend.load_backend( + 'yaml', dumps='dump', loads='safe_load', loads_exc='YAMLError' + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/handlers.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/handlers.py new file mode 100644 index 0000000000000000000000000000000000000000..b6bdb815599282b6f1b94c810f5adfdfe5301e5a --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/handlers.py @@ -0,0 +1,291 @@ +""" +Custom handlers may be created to handle other objects. Each custom handler +must derive from :class:`jsonpickle.handlers.BaseHandler` and +implement ``flatten`` and ``restore``. + +A handler can be bound to other types by calling +:func:`jsonpickle.handlers.register`. + +""" + +import array +import copy +import datetime +import io +import queue +import re +import threading +import uuid + +from . import util + + +class Registry: + def __init__(self): + self._handlers = {} + self._base_handlers = {} + + def get(self, cls_or_name, default=None): + """ + :param cls_or_name: the type or its fully qualified name + :param default: default value, if a matching handler is not found + + Looks up a handler by type reference or its fully + qualified name. If a direct match + is not found, the search is performed over all + handlers registered with base=True. + """ + handler = self._handlers.get(cls_or_name) + # attempt to find a base class + if handler is None and util.is_type(cls_or_name): + for cls, base_handler in self._base_handlers.items(): + if issubclass(cls_or_name, cls): + return base_handler + return default if handler is None else handler + + def register(self, cls, handler=None, base=False): + """Register the a custom handler for a class + + :param cls: The custom object class to handle + :param handler: The custom handler class (if + None, a decorator wrapper is returned) + :param base: Indicates whether the handler should + be registered for all subclasses + + This function can be also used as a decorator + by omitting the `handler` argument:: + + @jsonpickle.handlers.register(Foo, base=True) + class FooHandler(jsonpickle.handlers.BaseHandler): + pass + + """ + if handler is None: + + def _register(handler_cls): + self.register(cls, handler=handler_cls, base=base) + return handler_cls + + return _register + if not util.is_type(cls): + raise TypeError(f'{cls!r} is not a class/type') + # store both the name and the actual type for the ugly cases like + # _sre.SRE_Pattern that cannot be loaded back directly + self._handlers[util.importable_name(cls)] = self._handlers[cls] = handler + if base: + # only store the actual type for subclass checking + self._base_handlers[cls] = handler + + def unregister(self, cls): + self._handlers.pop(cls, None) + self._handlers.pop(util.importable_name(cls), None) + self._base_handlers.pop(cls, None) + + +registry = Registry() +register = registry.register +unregister = registry.unregister +get = registry.get + + +class BaseHandler: + def __init__(self, context): + """ + Initialize a new handler to handle a registered type. + + :Parameters: + - `context`: reference to pickler/unpickler + + """ + self.context = context + + def flatten(self, obj, data): + """ + Flatten `obj` into a json-friendly form and write result to `data`. + + :param object obj: The object to be serialized. + :param dict data: A partially filled dictionary which will contain the + json-friendly representation of `obj` once this method has + finished. + """ + raise NotImplementedError('You must implement flatten() in %s' % self.__class__) + + def restore(self, obj): + """ + Restore an object of the registered type from the json-friendly + representation `obj` and return it. + """ + raise NotImplementedError('You must implement restore() in %s' % self.__class__) + + @classmethod + def handles(self, cls): + """ + Register this handler for the given class. Suitable as a decorator, + e.g.:: + + @MyCustomHandler.handles + class MyCustomClass: + def __reduce__(self): + ... + """ + registry.register(cls, self) + return cls + + def __call__(self, context): + """This permits registering either Handler instances or classes + + :Parameters: + - `context`: reference to pickler/unpickler + """ + self.context = context + return self + + +class ArrayHandler(BaseHandler): + """Flatten and restore array.array objects""" + + def flatten(self, obj, data): + data['typecode'] = obj.typecode + data['values'] = self.context.flatten(obj.tolist(), reset=False) + return data + + def restore(self, data): + typecode = data['typecode'] + values = self.context.restore(data['values'], reset=False) + if typecode == 'c': + values = [bytes(x) for x in values] + return array.array(typecode, values) + + +ArrayHandler.handles(array.array) + + +class DatetimeHandler(BaseHandler): + """Custom handler for datetime objects + + Datetime objects use __reduce__, and they generate binary strings encoding + the payload. This handler encodes that payload to reconstruct the + object. + + """ + + def flatten(self, obj, data): + pickler = self.context + if not pickler.unpicklable: + if hasattr(obj, 'isoformat'): + result = obj.isoformat() + else: + result = str(obj) + return result + cls, args = obj.__reduce__() + flatten = pickler.flatten + payload = util.b64encode(args[0]) + args = [payload] + [flatten(i, reset=False) for i in args[1:]] + data['__reduce__'] = (flatten(cls, reset=False), args) + return data + + def restore(self, data): + cls, args = data['__reduce__'] + unpickler = self.context + restore = unpickler.restore + cls = restore(cls, reset=False) + value = util.b64decode(args[0]) + params = (value,) + tuple([restore(i, reset=False) for i in args[1:]]) + return cls.__new__(cls, *params) + + +DatetimeHandler.handles(datetime.datetime) +DatetimeHandler.handles(datetime.date) +DatetimeHandler.handles(datetime.time) + + +class RegexHandler(BaseHandler): + """Flatten _sre.SRE_Pattern (compiled regex) objects""" + + def flatten(self, obj, data): + data['pattern'] = obj.pattern + return data + + def restore(self, data): + return re.compile(data['pattern']) + + +RegexHandler.handles(type(re.compile(''))) + + +class QueueHandler(BaseHandler): + """Opaquely serializes Queue objects + + Queues contains mutex and condition variables which cannot be serialized. + Construct a new Queue instance when restoring. + + """ + + def flatten(self, obj, data): + return data + + def restore(self, data): + return queue.Queue() + + +QueueHandler.handles(queue.Queue) + + +class CloneFactory: + """Serialization proxy for collections.defaultdict's default_factory""" + + def __init__(self, exemplar): + self.exemplar = exemplar + + def __call__(self, clone=copy.copy): + """Create new instances by making copies of the provided exemplar""" + return clone(self.exemplar) + + def __repr__(self): + return f'' + + +class UUIDHandler(BaseHandler): + """Serialize uuid.UUID objects""" + + def flatten(self, obj, data): + data['hex'] = obj.hex + return data + + def restore(self, data): + return uuid.UUID(data['hex']) + + +UUIDHandler.handles(uuid.UUID) + + +class LockHandler(BaseHandler): + """Serialize threading.Lock objects""" + + def flatten(self, obj, data): + data['locked'] = obj.locked() + return data + + def restore(self, data): + lock = threading.Lock() + if data.get('locked', False): + lock.acquire() + return lock + + +_lock = threading.Lock() +LockHandler.handles(_lock.__class__) + + +class TextIOHandler(BaseHandler): + """Serialize file descriptors as None because we cannot roundtrip""" + + def flatten(self, obj, data): + return None + + def restore(self, data): + """Restore should never get called because flatten() returns None""" + raise AssertionError('Restoring IO.TextIOHandler is not supported') + + +TextIOHandler.handles(io.TextIOWrapper) diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/pickler.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/pickler.py new file mode 100644 index 0000000000000000000000000000000000000000..cad514213ad5d30c91be47ac8058cbb2d2a3e852 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/pickler.py @@ -0,0 +1,870 @@ +# Copyright (C) 2008 John Paulett (john -at- paulett.org) +# Copyright (C) 2009-2024 David Aguilar (davvid -at- gmail.com) +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. +import decimal +import inspect +import itertools +import sys +import types +import warnings +from itertools import chain, islice + +from . import handlers, tags, util +from .backend import json + + +def encode( + value, + unpicklable=True, + make_refs=True, + keys=False, + max_depth=None, + reset=True, + backend=None, + warn=False, + context=None, + max_iter=None, + use_decimal=False, + numeric_keys=False, + use_base85=False, + fail_safe=None, + indent=None, + separators=None, + include_properties=False, + handle_readonly=False, +): + """Return a JSON formatted representation of value, a Python object. + + :param unpicklable: If set to ``False`` then the output will not contain the + information necessary to turn the JSON data back into Python objects, + but a simpler JSON stream is produced. It's recommended to set this + parameter to ``False`` when your code does not rely on two objects + having the same ``id()`` value, and when it is sufficient for those two + objects to be equal by ``==``, such as when serializing sklearn + instances. If you experience (de)serialization being incorrect when you + use numpy, pandas, or sklearn handlers, this should be set to ``False``. + If you want the output to not include the dtype for numpy arrays, add:: + + jsonpickle.register( + numpy.generic, UnpicklableNumpyGenericHandler, base=True + ) + + before your pickling code. + :param make_refs: If set to False jsonpickle's referencing support is + disabled. Objects that are id()-identical won't be preserved across + encode()/decode(), but the resulting JSON stream will be conceptually + simpler. jsonpickle detects cyclical objects and will break the cycle + by calling repr() instead of recursing when make_refs is set False. + :param keys: If set to True then jsonpickle will encode non-string + dictionary keys instead of coercing them into strings via `repr()`. + This is typically what you want if you need to support Integer or + objects as dictionary keys. + :param max_depth: If set to a non-negative integer then jsonpickle will + not recurse deeper than 'max_depth' steps into the object. Anything + deeper than 'max_depth' is represented using a Python repr() of the + object. + :param reset: Custom pickle handlers that use the `Pickler.flatten` method or + `jsonpickle.encode` function must call `encode` with `reset=False` + in order to retain object references during pickling. + This flag is not typically used outside of a custom handler or + `__getstate__` implementation. + :param backend: If set to an instance of jsonpickle.backend.JSONBackend, + jsonpickle will use that backend for deserialization. + :param warn: If set to True then jsonpickle will warn when it + returns None for an object which it cannot pickle + (e.g. file descriptors). + :param context: Supply a pre-built Pickler or Unpickler object to the + `jsonpickle.encode` and `jsonpickle.decode` machinery instead + of creating a new instance. The `context` represents the currently + active Pickler and Unpickler objects when custom handlers are + invoked by jsonpickle. + :param max_iter: If set to a non-negative integer then jsonpickle will + consume at most `max_iter` items when pickling iterators. + :param use_decimal: If set to True jsonpickle will allow Decimal + instances to pass-through, with the assumption that the simplejson + backend will be used in `use_decimal` mode. In order to use this mode + you will need to configure simplejson:: + + jsonpickle.set_encoder_options('simplejson', + use_decimal=True, sort_keys=True) + jsonpickle.set_decoder_options('simplejson', + use_decimal=True) + jsonpickle.set_preferred_backend('simplejson') + + NOTE: A side-effect of the above settings is that float values will be + converted to Decimal when converting to json. + :param numeric_keys: Only use this option if the backend supports integer + dict keys natively. This flag tells jsonpickle to leave numeric keys + as-is rather than conforming them to json-friendly strings. + Using ``keys=True`` is the typical solution for integer keys, so only + use this if you have a specific use case where you want to allow the + backend to handle serialization of numeric dict keys. + :param use_base85: + If possible, use base85 to encode binary data. Base85 bloats binary data + by 1/4 as opposed to base64, which expands it by 1/3. This argument is + ignored on Python 2 because it doesn't support it. + :param fail_safe: If set to a function exceptions are ignored when pickling + and if a exception happens the function is called and the return value + is used as the value for the object that caused the error + :param indent: When `indent` is a non-negative integer, then JSON array + elements and object members will be pretty-printed with that indent + level. An indent level of 0 will only insert newlines. ``None`` is + the most compact representation. Since the default item separator is + ``(', ', ': ')``, the output might include trailing whitespace when + ``indent`` is specified. You can use ``separators=(',', ': ')`` to + avoid this. This value is passed directly to the active JSON backend + library and not used by jsonpickle directly. + :param separators: + If ``separators`` is an ``(item_separator, dict_separator)`` tuple + then it will be used instead of the default ``(', ', ': ')`` + separators. ``(',', ':')`` is the most compact JSON representation. + This value is passed directly to the active JSON backend library and + not used by jsonpickle directly. + :param include_properties: + Include the names and values of class properties in the generated json. + Properties are unpickled properly regardless of this setting, this is + meant to be used if processing the json outside of Python. Certain types + such as sets will not pickle due to not having a native-json equivalent. + Defaults to ``False``. + :param handle_readonly: + Handle objects with readonly methods, such as Django's SafeString. This + basically prevents jsonpickle from raising an exception for such objects. + You MUST set ``handle_readonly=True`` for the decoding if you encode with + this flag set to ``True``. + + >>> encode('my string') == '"my string"' + True + >>> encode(36) == '36' + True + >>> encode({'foo': True}) == '{"foo": true}' + True + >>> encode({'foo': [1, 2, [3, 4]]}, max_depth=1) + '{"foo": "[1, 2, [3, 4]]"}' + + """ + backend = backend or json + context = context or Pickler( + unpicklable=unpicklable, + make_refs=make_refs, + keys=keys, + backend=backend, + max_depth=max_depth, + warn=warn, + max_iter=max_iter, + numeric_keys=numeric_keys, + use_decimal=use_decimal, + use_base85=use_base85, + fail_safe=fail_safe, + include_properties=include_properties, + handle_readonly=handle_readonly, + original_object=value, + ) + return backend.encode( + context.flatten(value, reset=reset), indent=indent, separators=separators + ) + + +def _in_cycle(obj, objs, max_reached, make_refs): + """Detect cyclic structures that would lead to infinite recursion""" + return ( + (max_reached or (not make_refs and id(obj) in objs)) + and not util.is_primitive(obj) + and not util.is_enum(obj) + ) + + +def _mktyperef(obj): + """Return a typeref dictionary + + >>> _mktyperef(AssertionError) == {'py/type': 'builtins.AssertionError'} + True + + """ + return {tags.TYPE: util.importable_name(obj)} + + +def _wrap_string_slot(string): + """Converts __slots__ = 'a' into __slots__ = ('a',)""" + if isinstance(string, str): + return (string,) + return string + + +class Pickler: + def __init__( + self, + unpicklable=True, + make_refs=True, + max_depth=None, + backend=None, + keys=False, + warn=False, + max_iter=None, + numeric_keys=False, + use_decimal=False, + use_base85=False, + fail_safe=None, + include_properties=False, + handle_readonly=False, + original_object=None, + ): + self.unpicklable = unpicklable + self.make_refs = make_refs + self.backend = backend or json + self.keys = keys + self.warn = warn + self.numeric_keys = numeric_keys + self.use_base85 = use_base85 + # The current recursion depth + self._depth = -1 + # The maximal recursion depth + self._max_depth = max_depth + # Maps id(obj) to reference IDs + self._objs = {} + # Avoids garbage collection + self._seen = [] + # maximum amount of items to take from a pickled iterator + self._max_iter = max_iter + # Whether to allow decimals to pass-through + self._use_decimal = use_decimal + # A cache of objects that have already been flattened. + self._flattened = {} + # Used for util.is_readonly, see +483 + self.handle_readonly = handle_readonly + + if self.use_base85: + self._bytes_tag = tags.B85 + self._bytes_encoder = util.b85encode + else: + self._bytes_tag = tags.B64 + self._bytes_encoder = util.b64encode + + # ignore exceptions + self.fail_safe = fail_safe + self.include_properties = include_properties + + self._original_object = original_object + + def _determine_sort_keys(self): + for _, options in getattr(self.backend, '_encoder_options', {}).values(): + if options.get('sort_keys', False): + # the user has set one of the backends to sort keys + return True + return False + + def _sort_attrs(self, obj): + if hasattr(obj, '__slots__') and self.warn: + # Slots are read-only by default, the only way + # to sort keys is to do it in a subclass + # and that would require calling the init function + # of the parent again. That could cause issues + # so we refuse to handle it. + raise TypeError( + 'Objects with __slots__ cannot have their keys reliably sorted by ' + 'jsonpickle! Please sort the keys in the __slots__ definition instead.' + ) + # Somehow some classes don't have slots or dict + elif hasattr(obj, '__dict__'): + try: + obj.__dict__ = dict(sorted(obj.__dict__.items())) + except (TypeError, AttributeError): + # Can't set attributes of builtin/extension type + pass + return obj + + def reset(self): + self._objs = {} + self._depth = -1 + self._seen = [] + self._flattened = {} + + def _push(self): + """Steps down one level in the namespace.""" + self._depth += 1 + + def _pop(self, value): + """Step up one level in the namespace and return the value. + If we're at the root, reset the pickler's state. + """ + self._depth -= 1 + if self._depth == -1: + self.reset() + return value + + def _log_ref(self, obj): + """ + Log a reference to an in-memory object. + Return True if this object is new and was assigned + a new ID. Otherwise return False. + """ + objid = id(obj) + is_new = objid not in self._objs + if is_new: + new_id = len(self._objs) + self._objs[objid] = new_id + return is_new + + def _mkref(self, obj): + """ + Log a reference to an in-memory object, and return + if that object should be considered newly logged. + """ + is_new = self._log_ref(obj) + # Pretend the object is new + pretend_new = not self.unpicklable or not self.make_refs + return pretend_new or is_new + + def _getref(self, obj): + """Return a "py/id" entry for the specified object""" + return {tags.ID: self._objs.get(id(obj))} + + def _flatten(self, obj): + """Flatten an object and its guts into a json-safe representation""" + if self.unpicklable and self.make_refs: + result = self._flatten_impl(obj) + else: + try: + result = self._flattened[id(obj)] + except KeyError: + result = self._flattened[id(obj)] = self._flatten_impl(obj) + return result + + def flatten(self, obj, reset=True): + """Takes an object and returns a JSON-safe representation of it. + + Simply returns any of the basic builtin datatypes + + >>> p = Pickler() + >>> p.flatten('hello world') == 'hello world' + True + >>> p.flatten(49) + 49 + >>> p.flatten(350.0) + 350.0 + >>> p.flatten(True) + True + >>> p.flatten(False) + False + >>> r = p.flatten(None) + >>> r is None + True + >>> p.flatten(False) + False + >>> p.flatten([1, 2, 3, 4]) + [1, 2, 3, 4] + >>> p.flatten((1,2,))[tags.TUPLE] + [1, 2] + >>> p.flatten({'key': 'value'}) == {'key': 'value'} + True + """ + if reset: + self.reset() + if self._determine_sort_keys(): + obj = self._sort_attrs(obj) + return self._flatten(obj) + + def _flatten_bytestring(self, obj): + return {self._bytes_tag: self._bytes_encoder(obj)} + + def _flatten_impl(self, obj): + ######################################### + # if obj is nonrecursive return immediately + # for performance reasons we don't want to do recursive checks + if type(obj) is bytes: + return self._flatten_bytestring(obj) + + # Decimal is a primitive when use_decimal is True + if type(obj) in (str, bool, int, float, type(None)) or ( + self._use_decimal and isinstance(obj, decimal.Decimal) + ): + return obj + ######################################### + + self._push() + return self._pop(self._flatten_obj(obj)) + + def _max_reached(self): + return self._depth == self._max_depth + + def _pickle_warning(self, obj): + if self.warn: + msg = 'jsonpickle cannot pickle %r: replaced with None' % obj + warnings.warn(msg) + + def _flatten_obj(self, obj): + self._seen.append(obj) + + max_reached = self._max_reached() + + try: + in_cycle = _in_cycle(obj, self._objs, max_reached, self.make_refs) + if in_cycle: + # break the cycle + flatten_func = repr + else: + flatten_func = self._get_flattener(obj) + + if flatten_func is None: + self._pickle_warning(obj) + return None + + return flatten_func(obj) + + except (KeyboardInterrupt, SystemExit) as e: + raise e + except Exception as e: + if self.fail_safe is None: + raise e + else: + return self.fail_safe(e) + + def _list_recurse(self, obj): + return [self._flatten(v) for v in obj] + + def _flatten_function(self, obj): + if self.unpicklable: + data = {tags.FUNCTION: util.importable_name(obj)} + else: + data = None + + return data + + def _getstate(self, obj, data): + state = self._flatten(obj) + if self.unpicklable: + data[tags.STATE] = state + else: + data = state + return data + + def _flatten_key_value_pair(self, k, v, data): + """Flatten a key/value pair into the passed-in dictionary.""" + if not util.is_picklable(k, v): + return data + # TODO: use inspect.getmembers_static on 3.11+ because it avoids dynamic + # attribute lookups + if ( + self.handle_readonly + and k in {attr for attr, val in inspect.getmembers(self._original_object)} + and util.is_readonly(self._original_object, k, v) + ): + return data + + if k is None: + k = 'null' # for compatibility with common json encoders + + if self.numeric_keys and isinstance(k, (int, float)): + pass + elif not isinstance(k, str): + try: + k = repr(k) + except Exception: + k = str(k) + + data[k] = self._flatten(v) + return data + + def _flatten_obj_attrs(self, obj, attrs, data): + flatten = self._flatten_key_value_pair + ok = False + for k in attrs: + try: + if not k.startswith('__'): + value = getattr(obj, k) + else: + value = getattr(obj, f"_{obj.__class__.__name__}{k}") + flatten(k, value, data) + except AttributeError: + # The attribute may have been deleted + continue + ok = True + return ok + + def _flatten_properties(self, obj, data, allslots=None): + if allslots is None: + # setting a list as a default argument can lead to some weird errors + allslots = [] + + # convert to set in case there are a lot of slots + allslots_set = set(itertools.chain.from_iterable(allslots)) + + # i don't like lambdas + def valid_property(x): + return not x[0].startswith('__') and x[0] not in allslots_set + + properties = [ + x[0] for x in inspect.getmembers(obj.__class__) if valid_property(x) + ] + + properties_dict = {} + for p_name in properties: + p_val = getattr(obj, p_name) + if util.is_not_class(p_val): + properties_dict[p_name] = p_val + else: + properties_dict[p_name] = self._flatten(p_val) + + data[tags.PROPERTY] = properties_dict + + return data + + def _flatten_newstyle_with_slots(self, obj, data): + """Return a json-friendly dict for new-style objects with __slots__.""" + allslots = [ + _wrap_string_slot(getattr(cls, '__slots__', tuple())) + for cls in obj.__class__.mro() + ] + + # add properties to the attribute list + if self.include_properties: + data = self._flatten_properties(obj, data, allslots) + + if not self._flatten_obj_attrs(obj, chain(*allslots), data): + attrs = [ + x for x in dir(obj) if not x.startswith('__') and not x.endswith('__') + ] + self._flatten_obj_attrs(obj, attrs, data) + + return data + + def _flatten_obj_instance(self, obj): + """Recursively flatten an instance and return a json-friendly dict""" + data = {} + has_class = hasattr(obj, '__class__') + has_dict = hasattr(obj, '__dict__') + has_slots = not has_dict and hasattr(obj, '__slots__') + has_getnewargs = util.has_method(obj, '__getnewargs__') + has_getnewargs_ex = util.has_method(obj, '__getnewargs_ex__') + has_getinitargs = util.has_method(obj, '__getinitargs__') + has_reduce, has_reduce_ex = util.has_reduce(obj) + exclude = set(getattr(obj, '_jsonpickle_exclude', ())) + + # Support objects with __getstate__(); this ensures that + # both __setstate__() and __getstate__() are implemented + has_own_getstate = hasattr(type(obj), '__getstate__') and type( + obj + ).__getstate__ is not getattr(object, '__getstate__', None) + # not using has_method since __getstate__() is handled separately below + # Note: on Python 3.11+, all objects have __getstate__. + + if has_class: + cls = obj.__class__ + else: + cls = type(obj) + + # Check for a custom handler + class_name = util.importable_name(cls) + handler = handlers.get(cls, handlers.get(class_name)) + if handler is not None: + if self.unpicklable: + data[tags.OBJECT] = class_name + result = handler(self).flatten(obj, data) + if result is None: + self._pickle_warning(obj) + return result + + reduce_val = None + + if self.include_properties: + data = self._flatten_properties(obj, data) + + if self.unpicklable: + if has_reduce and not has_reduce_ex: + try: + reduce_val = obj.__reduce__() + except TypeError: + # A lot of builtin types have a reduce which + # just raises a TypeError + # we ignore those + pass + + # test for a reduce implementation, and redirect before + # doing anything else if that is what reduce requests + elif has_reduce_ex: + try: + # we're implementing protocol 2 + reduce_val = obj.__reduce_ex__(2) + except TypeError: + # A lot of builtin types have a reduce which + # just raises a TypeError + # we ignore those + pass + + if reduce_val and isinstance(reduce_val, str): + try: + varpath = iter(reduce_val.split('.')) + # curmod will be transformed by the + # loop into the value to pickle + curmod = sys.modules[next(varpath)] + for modname in varpath: + curmod = getattr(curmod, modname) + # replace obj with value retrieved + return self._flatten(curmod) + except KeyError: + # well, we can't do anything with that, so we ignore it + pass + + elif reduce_val: + # at this point, reduce_val should be some kind of iterable + # pad out to len 5 + rv_as_list = list(reduce_val) + insufficiency = 5 - len(rv_as_list) + if insufficiency: + rv_as_list += [None] * insufficiency + + if getattr(rv_as_list[0], '__name__', '') == '__newobj__': + rv_as_list[0] = tags.NEWOBJ + + f, args, state, listitems, dictitems = rv_as_list + + # check that getstate/setstate is sane + if not ( + state + and has_own_getstate + and not hasattr(obj, '__setstate__') + and not isinstance(obj, dict) + ): + # turn iterators to iterables for convenient serialization + if rv_as_list[3]: + rv_as_list[3] = tuple(rv_as_list[3]) + + if rv_as_list[4]: + rv_as_list[4] = tuple(rv_as_list[4]) + + reduce_args = list(map(self._flatten, rv_as_list)) + last_index = len(reduce_args) - 1 + while last_index >= 2 and reduce_args[last_index] is None: + last_index -= 1 + data[tags.REDUCE] = reduce_args[: last_index + 1] + + return data + + if has_class and not isinstance(obj, types.ModuleType): + if self.unpicklable: + data[tags.OBJECT] = class_name + + if has_getnewargs_ex: + data[tags.NEWARGSEX] = [ + self._flatten(arg) for arg in obj.__getnewargs_ex__() + ] + + if has_getnewargs and not has_getnewargs_ex: + data[tags.NEWARGS] = self._flatten(obj.__getnewargs__()) + + if has_getinitargs: + data[tags.INITARGS] = self._flatten(obj.__getinitargs__()) + + if has_own_getstate: + try: + state = obj.__getstate__() + except TypeError: + # Has getstate but it cannot be called, e.g. file descriptors + # in Python3 + self._pickle_warning(obj) + return None + else: + if state: + return self._getstate(state, data) + + if isinstance(obj, types.ModuleType): + if self.unpicklable: + data[tags.MODULE] = '{name}/{name}'.format(name=obj.__name__) + else: + data = str(obj) + return data + + if util.is_dictionary_subclass(obj): + self._flatten_dict_obj(obj, data, exclude=exclude) + return data + + if util.is_sequence_subclass(obj): + return self._flatten_sequence_obj(obj, data) + + if util.is_iterator(obj): + # force list in python 3 + data[tags.ITERATOR] = list(map(self._flatten, islice(obj, self._max_iter))) + return data + + if has_dict: + # Support objects that subclasses list and set + if util.is_sequence_subclass(obj): + return self._flatten_sequence_obj(obj, data) + + # hack for zope persistent objects; this unghostifies the object + getattr(obj, '_', None) + return self._flatten_dict_obj(obj.__dict__, data, exclude=exclude) + + if has_slots: + return self._flatten_newstyle_with_slots(obj, data) + + # catchall return for data created above without a return + # (e.g. __getnewargs__ is not supposed to be the end of the story) + if data: + return data + + self._pickle_warning(obj) + return None + + def _ref_obj_instance(self, obj): + """Reference an existing object or flatten if new""" + if self.unpicklable: + if self._mkref(obj): + # We've never seen this object so return its + # json representation. + return self._flatten_obj_instance(obj) + # We've seen this object before so place an object + # reference tag in the data. This avoids infinite recursion + # when processing cyclical objects. + return self._getref(obj) + else: + max_reached = self._max_reached() + in_cycle = _in_cycle(obj, self._objs, max_reached, False) + if in_cycle: + # A circular becomes None. + return None + + self._mkref(obj) + return self._flatten_obj_instance(obj) + + def _escape_key(self, k): + return tags.JSON_KEY + encode( + k, + reset=False, + keys=True, + context=self, + backend=self.backend, + make_refs=self.make_refs, + ) + + def _flatten_non_string_key_value_pair(self, k, v, data): + """Flatten only non-string key/value pairs""" + if not util.is_picklable(k, v): + return data + if self.keys and not isinstance(k, str): + k = self._escape_key(k) + data[k] = self._flatten(v) + return data + + def _flatten_string_key_value_pair(self, k, v, data): + """Flatten string key/value pairs only.""" + if not util.is_picklable(k, v): + return data + if self.keys: + if not isinstance(k, str): + return data + elif k.startswith(tags.JSON_KEY): + k = self._escape_key(k) + else: + if k is None: + k = 'null' # for compatibility with common json encoders + + if self.numeric_keys and isinstance(k, (int, float)): + pass + elif not isinstance(k, str): + try: + k = repr(k) + except Exception: + k = str(k) + + data[k] = self._flatten(v) + return data + + def _flatten_dict_obj(self, obj, data=None, exclude=()): + """Recursively call flatten() and return json-friendly dict""" + if data is None: + data = obj.__class__() + + # If we allow non-string keys then we have to do a two-phase + # encoding to ensure that the reference IDs are deterministic. + if self.keys: + # Phase 1: serialize regular objects, ignore fancy keys. + flatten = self._flatten_string_key_value_pair + for k, v in util.items(obj, exclude=exclude): + flatten(k, v, data) + + # Phase 2: serialize non-string keys. + flatten = self._flatten_non_string_key_value_pair + for k, v in util.items(obj, exclude=exclude): + flatten(k, v, data) + else: + # If we have string keys only then we only need a single pass. + flatten = self._flatten_key_value_pair + for k, v in util.items(obj, exclude=exclude): + flatten(k, v, data) + + # the collections.defaultdict protocol + if hasattr(obj, 'default_factory') and callable(obj.default_factory): + factory = obj.default_factory + if util.is_type(factory): + # Reference the class/type + value = _mktyperef(factory) + else: + # The factory is not a type and could reference e.g. functions + # or even the object instance itself, which creates a cycle. + if self._mkref(factory): + # We've never seen this object before so pickle it in-place. + # Create an instance from the factory and assume that the + # resulting instance is a suitable exemplar. + value = self._flatten_obj_instance(handlers.CloneFactory(factory())) + else: + # We've seen this object before. + # Break the cycle by emitting a reference. + value = self._getref(factory) + data['default_factory'] = value + + # Sub-classes of dict + if hasattr(obj, '__dict__') and self.unpicklable and obj != obj.__dict__: + if self._mkref(obj.__dict__): + dict_data = {} + self._flatten_dict_obj(obj.__dict__, dict_data, exclude=exclude) + data['__dict__'] = dict_data + else: + data['__dict__'] = self._getref(obj.__dict__) + + return data + + def _get_flattener(self, obj): + if type(obj) in (list, dict): + if self._mkref(obj): + return ( + self._list_recurse if type(obj) is list else self._flatten_dict_obj + ) + else: + return self._getref + + # We handle tuples and sets by encoding them in a "(tuple|set)dict" + elif type(obj) in (tuple, set): + if not self.unpicklable: + return self._list_recurse + return lambda obj: { + tags.TUPLE if type(obj) is tuple else tags.SET: [ + self._flatten(v) for v in obj + ] + } + + elif util.is_module_function(obj): + return self._flatten_function + + elif util.is_object(obj): + return self._ref_obj_instance + + elif util.is_type(obj): + return _mktyperef + + # instance methods, lambdas, old style classes... + self._pickle_warning(obj) + return None + + def _flatten_sequence_obj(self, obj, data): + """Return a json-friendly dict for a sequence subclass.""" + if hasattr(obj, '__dict__'): + self._flatten_dict_obj(obj.__dict__, data) + value = [self._flatten(v) for v in obj] + if self.unpicklable: + data[tags.SEQ] = value + else: + return value + return data diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/tags.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/tags.py new file mode 100644 index 0000000000000000000000000000000000000000..d6b346fb88ade61ab88d7fbd1d8a251ff11e30bd --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/tags.py @@ -0,0 +1,54 @@ +"""The jsonpickle.tags module provides the custom tags +used for pickling and unpickling Python objects. + +These tags are keys into the flattened dictionaries +created by the Pickler class. The Unpickler uses +these custom key names to identify dictionaries +that need to be specially handled. +""" + +BYTES = 'py/bytes' +B64 = 'py/b64' +B85 = 'py/b85' +FUNCTION = 'py/function' +ID = 'py/id' +INITARGS = 'py/initargs' +ITERATOR = 'py/iterator' +JSON_KEY = 'json://' +MODULE = 'py/mod' +NEWARGS = 'py/newargs' +NEWARGSEX = 'py/newargsex' +NEWOBJ = 'py/newobj' +OBJECT = 'py/object' +PROPERTY = 'py/property' +REDUCE = 'py/reduce' +REF = 'py/ref' +REPR = 'py/repr' +SEQ = 'py/seq' +SET = 'py/set' +STATE = 'py/state' +TUPLE = 'py/tuple' +TYPE = 'py/type' + +# All reserved tag names +RESERVED = { + BYTES, + FUNCTION, + ID, + INITARGS, + ITERATOR, + MODULE, + NEWARGS, + NEWARGSEX, + NEWOBJ, + OBJECT, + PROPERTY, + REDUCE, + REF, + REPR, + SEQ, + SET, + STATE, + TUPLE, + TYPE, +} diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/tags_pd.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/tags_pd.py new file mode 100644 index 0000000000000000000000000000000000000000..6d86c842c42ef68b73a1e928e3ad031450f16212 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/tags_pd.py @@ -0,0 +1,235 @@ +""" +This file exists to automatically generate tags for numpy/pandas extensions. Because numpy/pandas follow a (relatively) rapid release schedule, updating types for new versions as bug reports come in could be infeasible, so we auto-generate them. Unfortunately, this file can't go into the ext folder because then the imports would break. +""" + +import re + +import numpy as np +import pandas as pd +from pandas.api.extensions import ExtensionDtype + + +def split_letters_numbers_brackets(s): + """ + Split the string into letters, numbers, and brackets (with their content). + This is a helper function for getting the smallest unique substring, for determining tags. + """ + # extract brackets and their content + brackets_match = re.search(r"\[.*?\]", s) + if brackets_match: + brackets_part = brackets_match.group() + s_clean = s.replace(brackets_part, "") + else: + brackets_part = "" + s_clean = s + + # find where the trailing digits start + index = len(s_clean) + while index > 0 and s_clean[index - 1].isdigit(): + index -= 1 + letters_part = s_clean[:index] + numbers_part = s_clean[index:] + return letters_part, numbers_part, brackets_part + + +def get_smallest_unique_substrings(strings, prefix="np"): + used_substrings = set() + used_letters_parts = set() + result = {} + + for s in strings: + if not isinstance(s, str): + s2 = s.__name__ + else: + s2 = s + letters_part, numbers_part, brackets_part = split_letters_numbers_brackets(s2) + letters_part = letters_part.lower() + unique_substring_found = False + + # handle the weird datetime64[...] and timedelta64[...] cases + if letters_part == "datetime" and numbers_part == "64" and brackets_part: + substr = "d64" + brackets_part + if substr not in used_substrings: + result[s] = substr + used_substrings.add(substr) + unique_substring_found = True + elif letters_part == "timedelta" and numbers_part == "64" and brackets_part: + substr = "t64" + brackets_part + if substr not in used_substrings: + result[s] = substr + used_substrings.add(substr) + unique_substring_found = True + else: + if letters_part in used_letters_parts: + # letters have been seen before, so use letters + numbers_part + brackets_part + if numbers_part or brackets_part: + # try first letter + numbers_part + brackets_part + substr = letters_part[0] + if numbers_part: + substr += numbers_part + if brackets_part: + substr += brackets_part + if substr not in used_substrings: + result[s] = substr + used_substrings.add(substr) + unique_substring_found = True + else: + # try letters_part + numbers_part + brackets_part + substr = letters_part + if numbers_part: + substr += numbers_part + if brackets_part: + substr += brackets_part + if substr not in used_substrings: + result[s] = substr + used_substrings.add(substr) + unique_substring_found = True + else: + # find a unique substring of just letters_part + for length in range(1, len(letters_part) + 1): + substr = letters_part[:length] + if substr not in used_substrings: + result[s] = substr + used_substrings.add(substr) + unique_substring_found = True + break + else: + # assign the smallest substring of letters_part + for length in range(1, len(letters_part) + 1): + substr = letters_part[:length] + if substr not in used_substrings: + result[s] = substr + used_substrings.add(substr) + unique_substring_found = True + break + used_letters_parts.add(letters_part) + + # last resort: assign the entire string + if not unique_substring_found: + result[s] = s + used_substrings.add(s) + + for key in result: + result[key] = f"{prefix}/" + result[key] + + return result + + +def all_subclasses(cls): + # use a set to avoid adding duplicates + subclasses = set() + for subclass in cls.__subclasses__(): + subclasses.add(subclass) + subclasses.update(all_subclasses(subclass)) + return list(subclasses) + + +def get_all_numpy_dtype_strings(): + dtypes = [] + + # sctypeDict is the dict of all possible numpy dtypes + some invalid dtypes too + for dtype in np.sctypeDict.values(): + try: + dtype_obj = np.dtype(dtype) + dtypes.append(dtype_obj.name.lower()) + except TypeError: + continue + + try: + char_codes = np._typing._char_codes + # datetime64 and timedelta64 are special, they have multiple variants + # python internally compiles and caches regex like this to speed it up + dt_variants = list( + dict.fromkeys( + [ + "datetime64[" + re.search(r"\[(.*?)\]", var).group(1) + "]" + for var in char_codes._DT64Codes.__args__ + if re.search(r"\[(.*?)\]", var) + ] + ) + ) + td_variants = list( + dict.fromkeys( + [ + "timedelta64[" + re.search(r"\[(.*?)\]", var).group(1) + "]" + for var in char_codes._TD64Codes.__args__ + if re.search(r"\[(.*?)\]", var) + ] + ) + ) + except AttributeError: + # AttributeError happens on numpy <1.25 because _typing isn't exposed to users + dt_variants = [ + 'datetime64[Y]', + 'datetime64[M]', + 'datetime64[W]', + 'datetime64[D]', + 'datetime64[h]', + 'datetime64[m]', + 'datetime64[s]', + 'datetime64[ms]', + 'datetime64[us]', + 'datetime64[ns]', + 'datetime64[ps]', + 'datetime64[fs]', + 'datetime64[as]', + ] + td_variants = [ + 'timedelta64[Y]', + 'timedelta64[M]', + 'timedelta64[W]', + 'timedelta64[D]', + 'timedelta64[h]', + 'timedelta64[m]', + 'timedelta64[s]', + 'timedelta64[ms]', + 'timedelta64[us]', + 'timedelta64[ns]', + 'timedelta64[ps]', + 'timedelta64[fs]', + 'timedelta64[as]', + ] + + dtypes += dt_variants + td_variants + + return list(dict.fromkeys(dtypes)) + + +def get_all_pandas_dtype_strings(): + dtypes = [] + + # get all pandas dtypes since it doesnt have a built-in api + extension_dtypes = all_subclasses(ExtensionDtype) + + for dtype_cls in extension_dtypes: + # some ExtensionDtype subclasses might not have a name attribute + if hasattr(dtype_cls, "name"): + try: + dtype_name = dtype_cls.name + dtypes.append(dtype_name.lower()) + except Exception: + continue + + # use the class object for things that np.dtype can't reconstruct + dtypes.extend([pd.Timestamp, pd.Timedelta, pd.Period, pd.Interval]) + + return list(dict.fromkeys(dtypes)) + + +np_dtypes = list( + dict.fromkeys( + [dtype for dtype in get_all_numpy_dtype_strings() if isinstance(dtype, str)] + ) +) + +pd_dtypes = list( + dict.fromkeys( + [dtype for dtype in get_all_pandas_dtype_strings() if isinstance(dtype, str)] + ) +) + + +TYPE_MAP = get_smallest_unique_substrings(np_dtypes, prefix="np") +TYPE_MAP.update(get_smallest_unique_substrings(pd_dtypes, prefix="pd")) + +REVERSE_TYPE_MAP = {v: k for k, v in TYPE_MAP.items()} diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/unpickler.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/unpickler.py new file mode 100644 index 0000000000000000000000000000000000000000..1d07da7df5c1fa80bfc1122c9c52d71e42480ef9 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/unpickler.py @@ -0,0 +1,984 @@ +# Copyright (C) 2008 John Paulett (john -at- paulett.org) +# Copyright (C) 2009-2024 David Aguilar (davvid -at- gmail.com) +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. +import dataclasses +import sys +import warnings + +from . import errors, handlers, tags, util +from .backend import json + + +def decode( + string, + backend=None, + context=None, + keys=False, + reset=True, + safe=True, + classes=None, + v1_decode=False, + on_missing='ignore', + handle_readonly=False, +): + """Convert a JSON string into a Python object. + + :param backend: If set to an instance of jsonpickle.backend.JSONBackend, jsonpickle + will use that backend for deserialization. + + :param context: Supply a pre-built Pickler or Unpickler object to the + `jsonpickle.encode` and `jsonpickle.decode` machinery instead + of creating a new instance. The `context` represents the currently + active Pickler and Unpickler objects when custom handlers are + invoked by jsonpickle. + + :param keys: If set to True then jsonpickle will decode non-string dictionary keys + into python objects via the jsonpickle protocol. + + :param reset: Custom pickle handlers that use the `Pickler.flatten` method or + `jsonpickle.encode` function must call `encode` with `reset=False` + in order to retain object references during pickling. + This flag is not typically used outside of a custom handler or + `__getstate__` implementation. + + :param safe: If set to ``False``, use of ``eval()`` for backwards-compatible (pre-0.7.0) + deserialization of repr-serialized objects is enabled. Defaults to ``True``. + The default value was ``False`` in jsonpickle v3 and changed to ``True`` in jsonpickle v4. + + .. warning:: + + ``eval()`` is used when set to ``False`` and is not secure against + malicious inputs. You should avoid setting ``safe=False``. + + :param classes: If set to a single class, or a sequence (list, set, tuple) of + classes, then the classes will be made available when constructing objects. + If set to a dictionary of class names to class objects, the class object + will be provided to jsonpickle to deserialize the class name into. + This can be used to give jsonpickle access to local classes that are not + available through the global module import scope, and the dict method can + be used to deserialize encoded objects into a new class. + + :param v1_decode: If set to True it enables you to decode objects serialized in + jsonpickle v1. Please do not attempt to re-encode the objects in the v1 format! + Version 2's format fixes issue #255, and allows dictionary identity to be + preserved through an encode/decode cycle. + + :param on_missing: If set to 'error', it will raise an error if the class it's + decoding is not found. If set to 'warn', it will warn you in said case. + If set to a non-awaitable function, it will call said callback function + with the class name (a string) as the only parameter. Strings passed to + `on_missing` are lowercased automatically. + + :param handle_readonly: If set to True, the Unpickler will handle objects encoded + with 'handle_readonly' properly. Do not set this flag for objects not encoded + with 'handle_readonly' set to True. + + + >>> decode('"my string"') == 'my string' + True + >>> decode('36') + 36 + """ + + if isinstance(on_missing, str): + on_missing = on_missing.lower() + elif not util.is_function(on_missing): + warnings.warn( + "Unpickler.on_missing must be a string or a function! It will be ignored!" + ) + + backend = backend or json + context = context or Unpickler( + keys=keys, + backend=backend, + safe=safe, + v1_decode=v1_decode, + on_missing=on_missing, + handle_readonly=handle_readonly, + ) + data = backend.decode(string) + return context.restore(data, reset=reset, classes=classes) + + +def _safe_hasattr(obj, attr): + """Workaround unreliable hasattr() availability on sqlalchemy objects""" + try: + object.__getattribute__(obj, attr) + return True + except AttributeError: + return False + + +def _is_json_key(key): + """Has this key a special object that has been encoded to JSON?""" + return isinstance(key, str) and key.startswith(tags.JSON_KEY) + + +class _Proxy: + """Proxies are dummy objects that are later replaced by real instances + + The `restore()` function has to solve a tricky problem when pickling + objects with cyclical references -- the parent instance does not yet + exist. + + The problem is that `__getnewargs__()`, `__getstate__()`, custom handlers, + and cyclical objects graphs are allowed to reference the yet-to-be-created + object via the referencing machinery. + + In other words, objects are allowed to depend on themselves for + construction! + + We solve this problem by placing dummy Proxy objects into the referencing + machinery so that we can construct the child objects before constructing + the parent. Objects are initially created with Proxy attribute values + instead of real references. + + We collect all objects that contain references to proxies and run + a final sweep over them to swap in the real instance. This is done + at the very end of the top-level `restore()`. + + The `instance` attribute below is replaced with the real instance + after `__new__()` has been used to construct the object and is used + when swapping proxies with real instances. + + """ + + def __init__(self): + self.instance = None + + def get(self): + return self.instance + + def reset(self, instance): + self.instance = instance + + +class _IDProxy(_Proxy): + def __init__(self, objs, index): + self._index = index + self._objs = objs + + def get(self): + try: + return self._objs[self._index] + except IndexError: + return None + + +def _obj_setattr(obj, attr, proxy): + """Use setattr to update a proxy entry""" + setattr(obj, attr, proxy.get()) + + +def _obj_setvalue(obj, idx, proxy): + """Use obj[key] assignments to update a proxy entry""" + obj[idx] = proxy.get() + + +def loadclass(module_and_name, classes=None): + """Loads the module and returns the class. + + >>> cls = loadclass('datetime.datetime') + >>> cls.__name__ + 'datetime' + + >>> loadclass('does.not.exist') + + >>> loadclass('builtins.int')() + 0 + + """ + # Check if the class exists in a caller-provided scope + if classes: + try: + return classes[module_and_name] + except KeyError: + # maybe they didn't provide a fully qualified path + try: + return classes[module_and_name.rsplit('.', 1)[-1]] + except KeyError: + pass + # Otherwise, load classes from globally-accessible imports + names = module_and_name.split('.') + # First assume that everything up to the last dot is the module name, + # then try other splits to handle classes that are defined within + # classes + for up_to in range(len(names) - 1, 0, -1): + module = util.untranslate_module_name('.'.join(names[:up_to])) + try: + __import__(module) + obj = sys.modules[module] + for class_name in names[up_to:]: + obj = getattr(obj, class_name) + return obj + except (AttributeError, ImportError, ValueError): + continue + # NoneType is a special case and can not be imported/created + if module_and_name == "builtins.NoneType": + return type(None) + return None + + +def has_tag(obj, tag): + """Helper class that tests to see if the obj is a dictionary + and contains a particular key/tag. + + >>> obj = {'test': 1} + >>> has_tag(obj, 'test') + True + >>> has_tag(obj, 'fail') + False + + >>> has_tag(42, 'fail') + False + + """ + return type(obj) is dict and tag in obj + + +def getargs(obj, classes=None): + """Return arguments suitable for __new__()""" + # Let saved newargs take precedence over everything + if has_tag(obj, tags.NEWARGSEX): + raise ValueError('__newargs_ex__ returns both args and kwargs') + + if has_tag(obj, tags.NEWARGS): + return obj[tags.NEWARGS] + + if has_tag(obj, tags.INITARGS): + return obj[tags.INITARGS] + + try: + seq_list = obj[tags.SEQ] + obj_dict = obj[tags.OBJECT] + except KeyError: + return [] + typeref = loadclass(obj_dict, classes=classes) + if not typeref: + return [] + if hasattr(typeref, '_fields'): + if len(typeref._fields) == len(seq_list): + return seq_list + return [] + + +class _trivialclassic: + """ + A trivial class that can be instantiated with no args + """ + + +def make_blank_classic(cls): + """ + Implement the mandated strategy for dealing with classic classes + which cannot be instantiated without __getinitargs__ because they + take parameters + """ + instance = _trivialclassic() + instance.__class__ = cls + return instance + + +def loadrepr(reprstr): + """Returns an instance of the object from the object's repr() string. + It involves the dynamic specification of code. + + .. warning:: + + This function is unsafe and uses `eval()`. + + >>> obj = loadrepr('datetime/datetime.datetime.now()') + >>> obj.__class__.__name__ + 'datetime' + + """ + module, evalstr = reprstr.split('/') + mylocals = locals() + localname = module + if '.' in localname: + localname = module.split('.', 1)[0] + mylocals[localname] = __import__(module) + return eval(evalstr, mylocals) + + +def _loadmodule(module_str): + """Returns a reference to a module. + + >>> fn = _loadmodule('datetime/datetime.datetime.fromtimestamp') + >>> fn.__name__ + 'fromtimestamp' + + """ + module, identifier = module_str.split('/') + try: + result = __import__(module) + except ImportError: + return None + identifier_parts = identifier.split('.') + first_identifier = identifier_parts[0] + if first_identifier != module and not module.startswith(f'{first_identifier}.'): + return None + for name in identifier_parts[1:]: + try: + result = getattr(result, name) + except AttributeError: + return None + return result + + +def has_tag_dict(obj, tag): + """Helper class that tests to see if the obj is a dictionary + and contains a particular key/tag. + + >>> obj = {'test': 1} + >>> has_tag(obj, 'test') + True + >>> has_tag(obj, 'fail') + False + + >>> has_tag(42, 'fail') + False + + """ + return tag in obj + + +def _passthrough(value): + """A function that returns its input as-is""" + return value + + +class Unpickler: + def __init__( + self, + backend=None, + keys=False, + safe=True, + v1_decode=False, + on_missing='ignore', + handle_readonly=False, + ): + self.backend = backend or json + self.keys = keys + self.safe = safe + self.v1_decode = v1_decode + self.on_missing = on_missing + self.handle_readonly = handle_readonly + + self.reset() + + def reset(self): + """Resets the object's internal state.""" + # Map reference names to object instances + self._namedict = {} + + # The stack of names traversed for child objects + self._namestack = [] + + # Map of objects to their index in the _objs list + self._obj_to_idx = {} + self._objs = [] + self._proxies = [] + + # Extra local classes not accessible globally + self._classes = {} + + def _swap_proxies(self): + """Replace proxies with their corresponding instances""" + for obj, attr, proxy, method in self._proxies: + method(obj, attr, proxy) + self._proxies = [] + + def _restore(self, obj, _passthrough=_passthrough): + # if obj isn't in these types, neither it nor nothing in it can have a tag + # don't change the tuple of types to a set, it won't work with isinstance + if not isinstance(obj, (str, list, dict, set, tuple)): + restore = _passthrough + else: + restore = self._restore_tags(obj) + return restore(obj) + + def restore(self, obj, reset=True, classes=None): + """Restores a flattened object to its original python state. + + Simply returns any of the basic builtin types + + >>> u = Unpickler() + >>> u.restore('hello world') == 'hello world' + True + >>> u.restore({'key': 'value'}) == {'key': 'value'} + True + + """ + if reset: + self.reset() + if classes: + self.register_classes(classes) + value = self._restore(obj) + if reset: + self._swap_proxies() + return value + + def register_classes(self, classes): + """Register one or more classes + + :param classes: sequence of classes or a single class to register + + """ + if isinstance(classes, (list, tuple, set)): + for cls in classes: + self.register_classes(cls) + elif isinstance(classes, dict): + self._classes.update( + ( + cls if isinstance(cls, str) else util.importable_name(cls), + handler, + ) + for cls, handler in classes.items() + ) + else: + self._classes[util.importable_name(classes)] = classes + + def _restore_base64(self, obj): + try: + return util.b64decode(obj[tags.B64].encode('utf-8')) + except (AttributeError, UnicodeEncodeError): + return b'' + + def _restore_base85(self, obj): + try: + return util.b85decode(obj[tags.B85].encode('utf-8')) + except (AttributeError, UnicodeEncodeError): + return b'' + + def _refname(self): + """Calculates the name of the current location in the JSON stack. + + This is called as jsonpickle traverses the object structure to + create references to previously-traversed objects. This allows + cyclical data structures such as doubly-linked lists. + jsonpickle ensures that duplicate python references to the same + object results in only a single JSON object definition and + special reference tags to represent each reference. + + >>> u = Unpickler() + >>> u._namestack = [] + >>> u._refname() == '/' + True + >>> u._namestack = ['a'] + >>> u._refname() == '/a' + True + >>> u._namestack = ['a', 'b'] + >>> u._refname() == '/a/b' + True + + """ + return '/' + '/'.join(self._namestack) + + def _mkref(self, obj): + obj_id = id(obj) + try: + _ = self._obj_to_idx[obj_id] + except KeyError: + self._obj_to_idx[obj_id] = len(self._objs) + self._objs.append(obj) + # Backwards compatibility: old versions of jsonpickle + # produced "py/ref" references. + self._namedict[self._refname()] = obj + return obj + + def _restore_list(self, obj): + parent = [] + self._mkref(parent) + children = [self._restore(v) for v in obj] + parent.extend(children) + method = _obj_setvalue + proxies = [ + (parent, idx, value, method) + for idx, value in enumerate(parent) + if isinstance(value, _Proxy) + ] + self._proxies.extend(proxies) + return parent + + def _restore_iterator(self, obj): + try: + return iter(self._restore_list(obj[tags.ITERATOR])) + except TypeError: + return iter([]) + + def _swapref(self, proxy, instance): + proxy_id = id(proxy) + instance_id = id(instance) + + instance_index = self._obj_to_idx[proxy_id] + self._obj_to_idx[instance_id] = instance_index + del self._obj_to_idx[proxy_id] + + self._objs[instance_index] = instance + self._namedict[self._refname()] = instance + + def _restore_reduce(self, obj): + """ + Supports restoring with all elements of __reduce__ as per pep 307. + Assumes that iterator items (the last two) are represented as lists + as per pickler implementation. + """ + proxy = _Proxy() + self._mkref(proxy) + try: + reduce_val = list(map(self._restore, obj[tags.REDUCE])) + except TypeError: + result = [] + proxy.reset(result) + self._swapref(proxy, result) + return result + if len(reduce_val) < 5: + reduce_val.extend([None] * (5 - len(reduce_val))) + f, args, state, listitems, dictitems = reduce_val + + if f == tags.NEWOBJ or getattr(f, '__name__', '') == '__newobj__': + # mandated special case + cls = args[0] + if not isinstance(cls, type): + cls = self._restore(cls) + stage1 = cls.__new__(cls, *args[1:]) + else: + if not callable(f): + result = [] + proxy.reset(result) + self._swapref(proxy, result) + return result + stage1 = f(*args) + + if state: + try: + stage1.__setstate__(state) + except AttributeError: + # it's fine - we'll try the prescribed default methods + try: + # we can't do a straight update here because we + # need object identity of the state dict to be + # preserved so that _swap_proxies works out + for k, v in stage1.__dict__.items(): + state.setdefault(k, v) + stage1.__dict__ = state + except AttributeError: + # next prescribed default + try: + for k, v in state.items(): + setattr(stage1, k, v) + except Exception: + dict_state, slots_state = state + if dict_state: + stage1.__dict__.update(dict_state) + if slots_state: + for k, v in slots_state.items(): + setattr(stage1, k, v) + + if listitems: + # should be lists if not None + try: + stage1.extend(listitems) + except AttributeError: + for x in listitems: + stage1.append(x) + + if dictitems: + for k, v in dictitems: + stage1.__setitem__(k, v) + + proxy.reset(stage1) + self._swapref(proxy, stage1) + return stage1 + + def _restore_id(self, obj): + try: + idx = obj[tags.ID] + return self._objs[idx] + except IndexError: + return _IDProxy(self._objs, idx) + except TypeError: + return None + + def _restore_type(self, obj): + typeref = loadclass(obj[tags.TYPE], classes=self._classes) + if typeref is None: + return obj + return typeref + + def _restore_module(self, obj): + obj = _loadmodule(obj[tags.MODULE]) + return self._mkref(obj) + + def _restore_repr_safe(self, obj): + obj = _loadmodule(obj[tags.REPR]) + return self._mkref(obj) + + def _restore_repr(self, obj): + obj = loadrepr(obj[tags.REPR]) + return self._mkref(obj) + + def _loadfactory(self, obj): + try: + default_factory = obj['default_factory'] + except KeyError: + return None + del obj['default_factory'] + return self._restore(default_factory) + + def _process_missing(self, class_name): + # most common case comes first + if self.on_missing == 'ignore': + pass + elif self.on_missing == 'warn': + warnings.warn('Unpickler._restore_object could not find %s!' % class_name) + elif self.on_missing == 'error': + raise errors.ClassNotFoundError( + 'Unpickler.restore_object could not find %s!' % class_name + ) + elif util.is_function(self.on_missing): + self.on_missing(class_name) + + def _restore_pickled_key(self, key): + """Restore a possibly pickled key""" + if _is_json_key(key): + key = decode( + key[len(tags.JSON_KEY) :], + backend=self.backend, + context=self, + keys=True, + reset=False, + ) + return key + + def _restore_key_fn(self, _passthrough=_passthrough): + """Return a callable that restores keys + + This function is responsible for restoring non-string keys + when we are decoding with `keys=True`. + + """ + # This function is called before entering a tight loop + # where the returned function will be called. + # We return a specific function after checking self.keys + # instead of doing so in the body of the function to + # avoid conditional branching inside a tight loop. + if self.keys: + restore_key = self._restore_pickled_key + else: + restore_key = _passthrough + return restore_key + + def _restore_from_dict( + self, obj, instance, ignorereserved=True, restore_dict_items=True + ): + restore_key = self._restore_key_fn() + method = _obj_setattr + deferred = {} + + for k, v in util.items(obj): + # ignore the reserved attribute + if ignorereserved and k in tags.RESERVED: + continue + if isinstance(k, (int, float)): + str_k = k.__str__() + else: + str_k = k + self._namestack.append(str_k) + if restore_dict_items: + k = restore_key(k) + # step into the namespace + value = self._restore(v) + else: + value = v + if util.is_noncomplex(instance) or util.is_dictionary_subclass(instance): + try: + if k == '__dict__': + setattr(instance, k, value) + else: + instance[k] = value + except TypeError: + # Immutable object, must be constructed in one shot + if k != '__dict__': + deferred[k] = value + self._namestack.pop() + continue + else: + if not k.startswith('__'): + try: + setattr(instance, k, value) + except KeyError: + # certain numpy objects require us to prepend a _ to the var + # this should go in the np handler but I think this could be + # useful for other code + setattr(instance, f'_{k}', value) + except dataclasses.FrozenInstanceError: + # issue #240 + # i think this is the only way to set frozen dataclass attrs + object.__setattr__(instance, k, value) + except AttributeError as e: + # some objects raise this for read-only attributes (#422) (#478) + if ( + hasattr(instance, '__slots__') + and not len(instance.__slots__) + # we have to handle this separately because of +483 + and issubclass(instance.__class__, (int, str)) + and self.handle_readonly + ): + continue + raise e + else: + setattr(instance, f'_{instance.__class__.__name__}{k}', value) + + # This instance has an instance variable named `k` that is + # currently a proxy and must be replaced + if isinstance(value, _Proxy): + self._proxies.append((instance, k, value, method)) + + # step out + self._namestack.pop() + + if deferred: + # SQLAlchemy Immutable mappings must be constructed in one shot + instance = instance.__class__(deferred) + + return instance + + def _restore_state(self, obj, instance): + state = self._restore(obj[tags.STATE]) + has_slots = ( + isinstance(state, tuple) and len(state) == 2 and isinstance(state[1], dict) + ) + has_slots_and_dict = has_slots and isinstance(state[0], dict) + if hasattr(instance, '__setstate__'): + instance.__setstate__(state) + elif isinstance(state, dict): + # implements described default handling + # of state for object with instance dict + # and no slots + instance = self._restore_from_dict( + state, instance, ignorereserved=False, restore_dict_items=False + ) + elif has_slots: + instance = self._restore_from_dict( + state[1], instance, ignorereserved=False, restore_dict_items=False + ) + if has_slots_and_dict: + instance = self._restore_from_dict( + state[0], instance, ignorereserved=False, restore_dict_items=False + ) + elif not hasattr(instance, '__getnewargs__') and not hasattr( + instance, '__getnewargs_ex__' + ): + # __setstate__ is not implemented so that means that the best + # we can do is return the result of __getstate__() rather than + # return an empty shell of an object. + # However, if there were newargs, it's not an empty shell + instance = state + return instance + + def _restore_object_instance_variables(self, obj, instance): + instance = self._restore_from_dict(obj, instance) + + # Handle list and set subclasses + if has_tag(obj, tags.SEQ): + if hasattr(instance, 'append'): + for v in obj[tags.SEQ]: + instance.append(self._restore(v)) + elif hasattr(instance, 'add'): + for v in obj[tags.SEQ]: + instance.add(self._restore(v)) + + if has_tag(obj, tags.STATE): + instance = self._restore_state(obj, instance) + + return instance + + def _restore_object_instance(self, obj, cls, class_name=''): + # This is a placeholder proxy object which allows child objects to + # reference the parent object before it has been instantiated. + proxy = _Proxy() + self._mkref(proxy) + + # An object can install itself as its own factory, so load the factory + # after the instance is available for referencing. + factory = self._loadfactory(obj) + + if has_tag(obj, tags.NEWARGSEX): + args, kwargs = obj[tags.NEWARGSEX] + else: + args = getargs(obj, classes=self._classes) + kwargs = {} + if args: + args = self._restore(args) + if kwargs: + kwargs = self._restore(kwargs) + + is_oldstyle = not (isinstance(cls, type) or getattr(cls, '__meta__', None)) + try: + if not is_oldstyle and hasattr(cls, '__new__'): + # new style classes + if factory: + instance = cls.__new__(cls, factory, *args, **kwargs) + instance.default_factory = factory + else: + instance = cls.__new__(cls, *args, **kwargs) + else: + instance = object.__new__(cls) + except TypeError: # old-style classes + is_oldstyle = True + + if is_oldstyle: + try: + instance = cls(*args) + except TypeError: # fail gracefully + try: + instance = make_blank_classic(cls) + except Exception: # fail gracefully + self._process_missing(class_name) + return self._mkref(obj) + + proxy.reset(instance) + self._swapref(proxy, instance) + + if isinstance(instance, tuple): + return instance + + instance = self._restore_object_instance_variables(obj, instance) + + if _safe_hasattr(instance, 'default_factory') and isinstance( + instance.default_factory, _Proxy + ): + instance.default_factory = instance.default_factory.get() + + return instance + + def _restore_object(self, obj): + class_name = obj[tags.OBJECT] + cls = loadclass(class_name, classes=self._classes) + handler = handlers.get(cls, handlers.get(class_name)) + if handler is not None: # custom handler + proxy = _Proxy() + self._mkref(proxy) + instance = handler(self).restore(obj) + proxy.reset(instance) + self._swapref(proxy, instance) + return instance + + if cls is None: + self._process_missing(class_name) + return self._mkref(obj) + + return self._restore_object_instance(obj, cls, class_name) + + def _restore_function(self, obj): + return loadclass(obj[tags.FUNCTION], classes=self._classes) + + def _restore_set(self, obj): + try: + return {self._restore(v) for v in obj[tags.SET]} + except TypeError: + return set() + + def _restore_dict(self, obj): + data = {} + if not self.v1_decode: + self._mkref(data) + + # If we are decoding dicts that can have non-string keys then we + # need to do a two-phase decode where the non-string keys are + # processed last. This ensures a deterministic order when + # assigning object IDs for references. + if self.keys: + # Phase 1: regular non-special keys. + for k, v in util.items(obj): + if _is_json_key(k): + continue + if isinstance(k, (int, float)): + str_k = k.__str__() + else: + str_k = k + self._namestack.append(str_k) + data[k] = self._restore(v) + + self._namestack.pop() + + # Phase 2: object keys only. + for k, v in util.items(obj): + if not _is_json_key(k): + continue + self._namestack.append(k) + + k = self._restore_pickled_key(k) + data[k] = result = self._restore(v) + # k is currently a proxy and must be replaced + if isinstance(result, _Proxy): + self._proxies.append((data, k, result, _obj_setvalue)) + + self._namestack.pop() + else: + # No special keys, thus we don't need to restore the keys either. + for k, v in util.items(obj): + if isinstance(k, (int, float)): + str_k = k.__str__() + else: + str_k = k + self._namestack.append(str_k) + data[k] = result = self._restore(v) + if isinstance(result, _Proxy): + self._proxies.append((data, k, result, _obj_setvalue)) + self._namestack.pop() + return data + + def _restore_tuple(self, obj): + try: + return tuple(self._restore(v) for v in obj[tags.TUPLE]) + except TypeError: + return () + + def _restore_tags(self, obj, _passthrough=_passthrough): + """Return the restoration function for the specified object""" + try: + if not tags.RESERVED <= set(obj) and type(obj) not in (list, dict): + return _passthrough + except TypeError: + pass + if type(obj) is dict: + if tags.TUPLE in obj: + restore = self._restore_tuple + elif tags.SET in obj: + restore = self._restore_set + elif tags.B64 in obj: + restore = self._restore_base64 + elif tags.B85 in obj: + restore = self._restore_base85 + elif tags.ID in obj: + restore = self._restore_id + elif tags.ITERATOR in obj: + restore = self._restore_iterator + elif tags.OBJECT in obj: + restore = self._restore_object + elif tags.TYPE in obj: + restore = self._restore_type + elif tags.REDUCE in obj: + restore = self._restore_reduce + elif tags.FUNCTION in obj: + restore = self._restore_function + elif tags.MODULE in obj: + restore = self._restore_module + elif tags.REPR in obj: + if self.safe: + restore = self._restore_repr_safe + else: + restore = self._restore_repr + else: + restore = self._restore_dict + elif type(obj) is list: + restore = self._restore_list + else: + restore = _passthrough + return restore diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/util.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/util.py new file mode 100644 index 0000000000000000000000000000000000000000..d5ab49e065c7644f9f8bee8b615ec100c1672a35 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/util.py @@ -0,0 +1,629 @@ +# Copyright (C) 2008 John Paulett (john -at- paulett.org) +# Copyright (C) 2009-2018 David Aguilar (davvid -at- gmail.com) +# All rights reserved. +# +# This software is licensed as described in the file COPYING, which +# you should have received as part of this distribution. + +"""Helper functions for pickling and unpickling. Most functions assist in +determining the type of an object. +""" +import base64 +import binascii +import collections +import inspect +import io +import operator +import sys +import time +import types +import warnings +from collections.abc import Iterator as abc_iterator + +from . import tags + +_ITERATOR_TYPE = type(iter('')) +SEQUENCES = (list, set, tuple) +SEQUENCES_SET = {list, set, tuple} +PRIMITIVES = {str, bool, int, float, type(None)} +FUNCTION_TYPES = { + types.FunctionType, + types.MethodType, + types.LambdaType, + types.BuiltinFunctionType, + types.BuiltinMethodType, +} +NON_REDUCIBLE_TYPES = ( + { + list, + dict, + set, + tuple, + object, + bytes, + } + | PRIMITIVES + | FUNCTION_TYPES +) +NON_CLASS_TYPES = { + list, + dict, + set, + tuple, + bytes, +} | PRIMITIVES + + +def is_type(obj): + """Returns True is obj is a reference to a type. + + >>> is_type(1) + False + + >>> is_type(object) + True + + >>> class Klass: pass + >>> is_type(Klass) + True + """ + # use "isinstance" and not "is" to allow for metaclasses + return isinstance(obj, type) + + +def has_method(obj, name): + # false if attribute doesn't exist + if not hasattr(obj, name): + return False + func = getattr(obj, name) + + # builtin descriptors like __getnewargs__ + if isinstance(func, types.BuiltinMethodType): + return True + + # note that FunctionType has a different meaning in py2/py3 + if not isinstance(func, (types.MethodType, types.FunctionType)): + return False + + # need to go through __dict__'s since in py3 + # methods are essentially descriptors + + # __class__ for old-style classes + base_type = obj if is_type(obj) else obj.__class__ + original = None + # there is no .mro() for old-style classes + for subtype in inspect.getmro(base_type): + original = vars(subtype).get(name) + if original is not None: + break + + # name not found in the mro + if original is None: + return False + + # static methods are always fine + if isinstance(original, staticmethod): + return True + + # at this point, the method has to be an instancemthod or a classmethod + if not hasattr(func, '__self__'): + return False + bound_to = getattr(func, '__self__') + + # class methods + if isinstance(original, classmethod): + return issubclass(base_type, bound_to) + + # bound methods + return isinstance(obj, type(bound_to)) + + +def is_object(obj): + """Returns True is obj is a reference to an object instance. + + >>> is_object(1) + True + + >>> is_object(object()) + True + + >>> is_object(lambda x: 1) + False + """ + return isinstance(obj, object) and not isinstance( + obj, (type, types.FunctionType, types.BuiltinFunctionType) + ) + + +def is_not_class(obj): + """Determines if the object is not a class or a class instance. + Used for serializing properties. + """ + return type(obj) in NON_CLASS_TYPES + + +def is_primitive(obj): + """Helper method to see if the object is a basic data type. Unicode strings, + integers, longs, floats, booleans, and None are considered primitive + and will return True when passed into *is_primitive()* + + >>> is_primitive(3) + True + >>> is_primitive([4,4]) + False + """ + return type(obj) in PRIMITIVES + + +def is_enum(obj): + """Is the object an enum?""" + return 'enum' in sys.modules and isinstance(obj, sys.modules['enum'].Enum) + + +def is_dictionary(obj): + """Helper method for testing if the object is a dictionary. + + >>> is_dictionary({'key':'value'}) + True + + """ + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return type(obj) is dict + + +def is_sequence(obj): + """Helper method to see if the object is a sequence (list, set, or tuple). + + >>> is_sequence([4]) + True + + """ + return type(obj) in SEQUENCES_SET + + +def is_list(obj): + """Helper method to see if the object is a Python list. + + >>> is_list([4]) + True + """ + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return type(obj) is list + + +def is_set(obj): + """Helper method to see if the object is a Python set. + + >>> is_set(set()) + True + """ + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return type(obj) is set + + +def is_bytes(obj): + """Helper method to see if the object is a bytestring. + + >>> is_bytes(b'foo') + True + """ + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return type(obj) is bytes + + +def is_unicode(obj): + """DEPRECATED: Helper method to see if the object is a unicode string""" + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return type(obj) is str + + +def is_tuple(obj): + """Helper method to see if the object is a Python tuple. + + >>> is_tuple((1,)) + True + """ + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return type(obj) is tuple + + +def is_dictionary_subclass(obj): + """Returns True if *obj* is a subclass of the dict type. *obj* must be + a subclass and not the actual builtin dict. + + >>> class Temp(dict): pass + >>> is_dictionary_subclass(Temp()) + True + """ + # TODO: add UserDict + return ( + hasattr(obj, '__class__') + and issubclass(obj.__class__, dict) + and type(obj) is not dict + ) + + +def is_sequence_subclass(obj): + """Returns True if *obj* is a subclass of list, set or tuple. + + *obj* must be a subclass and not the actual builtin, such + as list, set, tuple, etc.. + + >>> class Temp(list): pass + >>> is_sequence_subclass(Temp()) + True + """ + return ( + hasattr(obj, '__class__') + and issubclass(obj.__class__, SEQUENCES) + and not is_sequence(obj) + ) + + +def is_noncomplex(obj): + """Returns True if *obj* is a special (weird) class, that is more complex + than primitive data types, but is not a full object. Including: + + * :class:`~time.struct_time` + """ + if type(obj) is time.struct_time: + return True + return False + + +def is_function(obj): + """Returns true if passed a function + + >>> is_function(lambda x: 1) + True + + >>> is_function(locals) + True + + >>> def method(): pass + >>> is_function(method) + True + + >>> is_function(1) + False + """ + return type(obj) in FUNCTION_TYPES + + +def is_module_function(obj): + """Return True if `obj` is a module-global function + + >>> import os + >>> is_module_function(os.path.exists) + True + + >>> is_module_function(lambda: None) + False + + """ + + return ( + hasattr(obj, '__class__') + and isinstance(obj, (types.FunctionType, types.BuiltinFunctionType)) + and hasattr(obj, '__module__') + and hasattr(obj, '__name__') + and obj.__name__ != '' + ) or is_cython_function(obj) + + +def is_module(obj): + """Returns True if passed a module + + >>> import os + >>> is_module(os) + True + + """ + warnings.warn( + "This function will be removed in the next release of jsonpickle, 5.0.0! Please migrate now.", + DeprecationWarning, + ) + return isinstance(obj, types.ModuleType) + + +def is_picklable(name, value): + """Return True if an object can be pickled + + >>> import os + >>> is_picklable('os', os) + True + + >>> def foo(): pass + >>> is_picklable('foo', foo) + True + + >>> is_picklable('foo', lambda: None) + False + + """ + if name in tags.RESERVED: + return False + return is_module_function(value) or not is_function(value) + + +def is_installed(module): + """Tests to see if ``module`` is available on the sys.path + + >>> is_installed('sys') + True + >>> is_installed('hopefullythisisnotarealmodule') + False + + """ + try: + __import__(module) + return True + except ImportError: + return False + + +def is_list_like(obj): + return hasattr(obj, '__getitem__') and hasattr(obj, 'append') + + +def is_iterator(obj): + return isinstance(obj, abc_iterator) and not isinstance(obj, io.IOBase) + + +def is_collections(obj): + try: + return type(obj).__module__ == 'collections' + except Exception: + return False + + +def is_reducible_sequence_subclass(obj): + return hasattr(obj, '__class__') and issubclass(obj.__class__, SEQUENCES) + + +def is_reducible(obj): + """ + Returns false if of a type which have special casing, + and should not have their __reduce__ methods used + """ + # defaultdicts may contain functions which we cannot serialise + if is_collections(obj) and not isinstance(obj, collections.defaultdict): + return True + if ( + type(obj) in NON_REDUCIBLE_TYPES + or obj is object + or is_dictionary_subclass(obj) + or isinstance(obj, types.ModuleType) + or is_reducible_sequence_subclass(obj) + or is_list_like(obj) + or isinstance(getattr(obj, '__slots__', None), _ITERATOR_TYPE) + or (is_type(obj) and obj.__module__ == 'datetime') + ): + return False + return True + + +def is_cython_function(obj): + """Returns true if the object is a reference to a Cython function""" + return ( + callable(obj) + and hasattr(obj, '__repr__') + and repr(obj).startswith('>> class Example(object): + ... pass + + >>> ex = Example() + >>> importable_name(ex.__class__) == 'jsonpickle.util.Example' + True + >>> importable_name(type(25)) == 'builtins.int' + True + >>> importable_name(None.__class__) == 'builtins.NoneType' + True + >>> importable_name(False.__class__) == 'builtins.bool' + True + >>> importable_name(AttributeError) == 'builtins.AttributeError' + True + + """ + # Use the fully-qualified name if available (Python >= 3.3) + name = getattr(cls, '__qualname__', cls.__name__) + module = translate_module_name(cls.__module__) + if not module: + if hasattr(cls, '__self__'): + if hasattr(cls.__self__, '__module__'): + module = cls.__self__.__module__ + else: + module = cls.__self__.__class__.__module__ + return f'{module}.{name}' + + +def b64encode(data): + """ + Encode binary data to ascii text in base64. Data must be bytes. + """ + return base64.b64encode(data).decode('ascii') + + +def b64decode(payload): + """ + Decode payload - must be ascii text. + """ + try: + return base64.b64decode(payload) + except (TypeError, binascii.Error): + return b'' + + +def b85encode(data): + """ + Encode binary data to ascii text in base85. Data must be bytes. + """ + return base64.b85encode(data).decode('ascii') + + +def b85decode(payload): + """ + Decode payload - must be ascii text. + """ + try: + return base64.b85decode(payload) + except (TypeError, ValueError): + return b'' + + +def itemgetter(obj, getter=operator.itemgetter(0)): + return str(getter(obj)) + + +def items(obj, exclude=()): + """ + This can't be easily replaced by dict.items() because this has the exclude parameter. + Keep it for now. + """ + for k, v in obj.items(): + if k in exclude: + continue + yield k, v diff --git a/.venv_haddock/lib/python3.12/site-packages/jsonpickle/version.py b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/version.py new file mode 100644 index 0000000000000000000000000000000000000000..e1420cf12132a4b7b52e8d740049b7106248456f --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/jsonpickle/version.py @@ -0,0 +1,16 @@ +try: + from importlib import metadata +except (ImportError, OSError): + metadata = None + + +def _get_version(): + default_version = '0.0.0-alpha' + try: + version = metadata.version('jsonpickle') + except (AttributeError, ImportError, OSError): + version = default_version + return version + + +__version__ = _get_version() diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/narwhals/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__arrow b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__arrow new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__arrow differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__compliant b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__compliant new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__compliant differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__constants.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__constants.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__constants.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__dask b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__dask new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__dask differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__duckdb b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__duckdb new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__duckdb differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__duration.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__duration.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__duration.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__enum.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__enum.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__enum.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__exceptions.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__exceptions.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__expression_parsing.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__expression_parsing.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__expression_parsing.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__ibis b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__ibis new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__ibis differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__interchange b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__interchange new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__interchange differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__namespace.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__namespace.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__namespace.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__native.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__native.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__native.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__pandas_like b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__pandas_like new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__pandas_like differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__polars b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__polars new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__polars differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__spark_like b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__spark_like new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__spark_like differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__sql b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__sql new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__sql differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__translate.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__translate.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__translate.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__typing.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__typing.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__typing.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__typing_compat.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__typing_compat.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__typing_compat.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/.__utils.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/.__utils.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._compliant.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._compliant.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._compliant.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._dataframe.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._dataframe.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._dataframe.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._dependencies.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._dependencies.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._dependencies.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._dtypes.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._dtypes.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._dtypes.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._exceptions.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._exceptions.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._exceptions.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_cat.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_cat.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_cat.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_dt.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_dt.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_dt.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_list.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_list.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_list.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_name.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_name.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_name.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_str.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_str.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_str.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_struct.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_struct.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._expr_struct.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._functions.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._functions.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._functions.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._group_by.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._group_by.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._group_by.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._plugins.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._plugins.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._plugins.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._py.typed b/.venv_haddock/lib/python3.12/site-packages/narwhals/._py.typed new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._py.typed differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._schema.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._schema.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._schema.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._selectors.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._selectors.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._selectors.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._series.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_cat.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_cat.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_cat.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_dt.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_dt.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_dt.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_list.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_list.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_list.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_str.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_str.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_str.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_struct.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_struct.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._series_struct.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._sql.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._sql.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._sql.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._stable b/.venv_haddock/lib/python3.12/site-packages/narwhals/._stable new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._stable differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._testing b/.venv_haddock/lib/python3.12/site-packages/narwhals/._testing new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._testing differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._this.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._this.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._this.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._translate.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._translate.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._translate.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._typing.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._typing.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._typing.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/._utils.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/._utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/._utils.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/__init__.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..c945febe0249a6f15ba2b1d74ffe6558f8c6c7db --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/__init__.py @@ -0,0 +1,195 @@ +from __future__ import annotations + +import typing as _t + +from narwhals import dependencies, dtypes, exceptions, selectors +from narwhals._utils import ( + Implementation, + generate_temporary_column_name, + is_ordered_categorical, + maybe_align_index, + maybe_convert_dtypes, + maybe_get_index, + maybe_reset_index, + maybe_set_index, +) +from narwhals.dataframe import DataFrame, LazyFrame +from narwhals.dtypes import ( + Array, + Binary, + Boolean, + Categorical, + Date, + Datetime, + Decimal, + Duration, + Enum, + Field, + Float32, + Float64, + Int8, + Int16, + Int32, + Int64, + Int128, + List, + Object, + String, + Struct, + Time, + UInt8, + UInt16, + UInt32, + UInt64, + UInt128, + Unknown, +) +from narwhals.expr import Expr +from narwhals.functions import ( + all_ as all, + all_horizontal, + any_horizontal, + coalesce, + col, + concat, + concat_str, + corr, + exclude, + format, + from_arrow, + from_dict, + from_dicts, + from_numpy, + len_ as len, + lit, + max, + max_horizontal, + mean, + mean_horizontal, + median, + min, + min_horizontal, + new_series, + nth, + read_csv, + read_parquet, + scan_csv, + scan_parquet, + show_versions, + sum, + sum_horizontal, + when, +) +from narwhals.schema import Schema +from narwhals.series import Series +from narwhals.translate import ( + from_native, + get_native_namespace, + narwhalify, + to_native, + to_py_scalar, +) + +__version__: str + +__all__ = [ + "Array", + "Binary", + "Boolean", + "Categorical", + "DataFrame", + "Date", + "Datetime", + "Decimal", + "Duration", + "Enum", + "Expr", + "Field", + "Float32", + "Float64", + "Implementation", + "Int8", + "Int16", + "Int32", + "Int64", + "Int128", + "LazyFrame", + "List", + "Object", + "Schema", + "Series", + "String", + "Struct", + "Time", + "UInt8", + "UInt16", + "UInt32", + "UInt64", + "UInt128", + "Unknown", + "all", + "all_horizontal", + "any_horizontal", + "coalesce", + "col", + "concat", + "concat_str", + "corr", + "dependencies", + "dtypes", + "exceptions", + "exclude", + "format", + "from_arrow", + "from_dict", + "from_dicts", + "from_native", + "from_numpy", + "generate_temporary_column_name", + "get_native_namespace", + "is_ordered_categorical", + "len", + "lit", + "max", + "max_horizontal", + "maybe_align_index", + "maybe_convert_dtypes", + "maybe_get_index", + "maybe_reset_index", + "maybe_set_index", + "mean", + "mean_horizontal", + "median", + "min", + "min_horizontal", + "narwhalify", + "new_series", + "nth", + "read_csv", + "read_parquet", + "scan_csv", + "scan_parquet", + "selectors", + "show_versions", + "sum", + "sum_horizontal", + "to_native", + "to_py_scalar", + "when", +] + + +if not _t.TYPE_CHECKING: + + def __getattr__(name: str) -> _t.Any: + if name == "__version__": + global __version__ # noqa: PLW0603 + + from importlib import metadata + + __version__ = metadata.version(__name__) + return __version__ + msg = f"module {__name__!r} has no attribute {name!r}" + raise AttributeError(msg) +else: # pragma: no cover + ... diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/.___init__.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/.___init__.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/.___init__.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/.___pycache__ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/.___pycache__ new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/.___pycache__ differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._dataframe.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._dataframe.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._dataframe.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._expr.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._expr.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._expr.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._group_by.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._group_by.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._group_by.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._namespace.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._namespace.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._namespace.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._selectors.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._selectors.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._selectors.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_cat.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_cat.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_cat.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_dt.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_dt.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_dt.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_list.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_list.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_list.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_str.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_str.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_str.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_struct.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_struct.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._series_struct.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._typing.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._typing.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._typing.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._utils.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._utils.py new file mode 100644 index 0000000000000000000000000000000000000000..ee537d225f1b1eed0d0f4ed0b171fdc63ca71d82 Binary files /dev/null and b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/._utils.py differ diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/__init__.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/__init__.py new file mode 100644 index 0000000000000000000000000000000000000000..e69de29bb2d1d6434b8b29ae775ad8c2e48c5391 diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/dataframe.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/dataframe.py new file mode 100644 index 0000000000000000000000000000000000000000..0d6564154113a8c061b2bc5db49571f77022ca4e --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/dataframe.py @@ -0,0 +1,835 @@ +from __future__ import annotations + +from collections.abc import Collection, Iterator, Mapping, Sequence +from typing import TYPE_CHECKING, Any, Literal, cast, overload + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.series import ArrowSeries +from narwhals._arrow.utils import ( + arange, + concat_tables, + narwhals_to_native_dtype, + native_to_narwhals_dtype, + repeat, +) +from narwhals._compliant import EagerDataFrame +from narwhals._utils import ( + Implementation, + Version, + check_column_names_are_unique, + convert_str_slice_to_int_slice, + generate_temporary_column_name, + not_implemented, + parse_columns_to_drop, + scale_bytes, + supports_arrow_c_stream, + zip_strict, +) +from narwhals.dependencies import is_numpy_array_1d +from narwhals.exceptions import ShapeError + +if TYPE_CHECKING: + from collections.abc import Iterable + from io import BytesIO + from pathlib import Path + from types import ModuleType + + import pandas as pd + import polars as pl + from typing_extensions import Self, TypeAlias, TypeIs + + from narwhals._arrow.expr import ArrowExpr + from narwhals._arrow.group_by import ArrowGroupBy + from narwhals._arrow.namespace import ArrowNamespace + from narwhals._arrow.typing import ( # type: ignore[attr-defined] + ChunkedArrayAny, + Order, + ) + from narwhals._compliant.typing import CompliantDataFrameAny, CompliantLazyFrameAny + from narwhals._spark_like.utils import SparkSession + from narwhals._translate import IntoArrowTable + from narwhals._typing import _EagerAllowedImpl, _LazyAllowedImpl + from narwhals._utils import Version, _LimitedContext + from narwhals.dtypes import DType + from narwhals.typing import ( + IntoSchema, + JoinStrategy, + SizedMultiIndexSelector, + SizedMultiNameSelector, + SizeUnit, + UniqueKeepStrategy, + _1DArray, + _2DArray, + _SliceIndex, + _SliceName, + ) + + JoinType: TypeAlias = Literal[ + "left semi", + "right semi", + "left anti", + "right anti", + "inner", + "left outer", + "right outer", + "full outer", + ] + + +class ArrowDataFrame( + EagerDataFrame["ArrowSeries", "ArrowExpr", "pa.Table", "ChunkedArrayAny"] +): + _implementation = Implementation.PYARROW + + def __init__( + self, + native_dataframe: pa.Table, + *, + version: Version, + validate_column_names: bool, + validate_backend_version: bool = False, + ) -> None: + if validate_column_names: + check_column_names_are_unique(native_dataframe.column_names) + if validate_backend_version: + self._validate_backend_version() + self._native_frame = native_dataframe + self._version = version + + @classmethod + def from_arrow(cls, data: IntoArrowTable, /, *, context: _LimitedContext) -> Self: + backend_version = context._implementation._backend_version() + if cls._is_native(data): + native = data + elif backend_version >= (14,) or isinstance(data, Collection): + native = pa.table(data) + elif supports_arrow_c_stream(data): # pragma: no cover + msg = f"'pyarrow>=14.0.0' is required for `from_arrow` for object of type {type(data).__name__!r}." + raise ModuleNotFoundError(msg) + else: # pragma: no cover + msg = f"`from_arrow` is not supported for object of type {type(data).__name__!r}." + raise TypeError(msg) + return cls.from_native(native, context=context) + + @classmethod + def from_dict( + cls, + data: Mapping[str, Any], + /, + *, + context: _LimitedContext, + schema: IntoSchema | Mapping[str, DType | None] | None, + ) -> Self: + if not schema and not data: + return cls.from_native(pa.table({}), context=context) + if not schema: + return cls.from_native(pa.table(data), context=context) # type: ignore[arg-type] + if not any(dtype is None for dtype in schema.values()): + from narwhals.schema import Schema + + pa_schema = Schema(cast("IntoSchema", schema)).to_arrow() + if pa_schema and not data: + native = pa_schema.empty_table() + else: + native = pa.Table.from_pydict(data, schema=pa_schema) + return cls.from_native(native, context=context) + if context._implementation._backend_version() < (14,): + msg = "Passing `None` dtype in `from_dict` requires PyArrow>=14" + raise NotImplementedError(msg) + res = pa.table( + { + name: pa.chunked_array( # type: ignore[misc] + [data[name] if data else []], + type=narwhals_to_native_dtype(nw_dtype, version=context._version) + if nw_dtype is not None + else None, + ) + for name, nw_dtype in schema.items() + } + ) + return cls.from_native(pa.table(res), context=context) + + @classmethod + def from_dicts( + cls, + data: Sequence[Mapping[str, Any]], + /, + *, + context: _LimitedContext, + schema: IntoSchema | Mapping[str, DType | None] | None, + ) -> Self: + from narwhals.schema import Schema + + if schema and any(dtype is None for dtype in schema.values()): + msg = "`from_dicts` with `schema` where any dtype is `None` is not supported for PyArrow." + raise NotImplementedError(msg) + pa_schema = ( + Schema(cast("IntoSchema", schema)).to_arrow() + if schema is not None + else schema + ) + if pa_schema and not data: + native = pa_schema.empty_table() + else: + native = pa.Table.from_pylist(data, schema=pa_schema) + return cls.from_native(native, context=context) + + @staticmethod + def _is_native(obj: pa.Table | Any) -> TypeIs[pa.Table]: + return isinstance(obj, pa.Table) + + @classmethod + def from_native(cls, data: pa.Table, /, *, context: _LimitedContext) -> Self: + return cls(data, version=context._version, validate_column_names=True) + + @classmethod + def from_numpy( + cls, + data: _2DArray, + /, + *, + context: _LimitedContext, + schema: IntoSchema | Sequence[str] | None, + ) -> Self: + from narwhals.schema import Schema + + arrays = [pa.array(val) for val in data.T] + if isinstance(schema, (Mapping, Schema)): + native = pa.Table.from_arrays(arrays, schema=Schema(schema).to_arrow()) + else: + native = pa.Table.from_arrays(arrays, cls._numpy_column_names(data, schema)) + return cls.from_native(native, context=context) + + def __narwhals_namespace__(self) -> ArrowNamespace: + from narwhals._arrow.namespace import ArrowNamespace + + return ArrowNamespace(version=self._version) + + def __native_namespace__(self) -> ModuleType: + if self._implementation is Implementation.PYARROW: + return self._implementation.to_native_namespace() + + msg = f"Expected pyarrow, got: {type(self._implementation)}" # pragma: no cover + raise AssertionError(msg) + + def __narwhals_dataframe__(self) -> Self: + return self + + def __narwhals_lazyframe__(self) -> Self: + return self + + def _with_version(self, version: Version) -> Self: + return self.__class__(self.native, version=version, validate_column_names=False) + + def _with_native(self, df: pa.Table, *, validate_column_names: bool = True) -> Self: + return self.__class__( + df, version=self._version, validate_column_names=validate_column_names + ) + + @property + def shape(self) -> tuple[int, int]: + return self.native.shape + + def __len__(self) -> int: + return len(self.native) + + def row(self, index: int) -> tuple[Any, ...]: + return tuple(self.native.take([index]).to_pylist()[0].values()) + + @overload + def rows(self, *, named: Literal[True]) -> list[dict[str, Any]]: ... + + @overload + def rows(self, *, named: Literal[False]) -> list[tuple[Any, ...]]: ... + + @overload + def rows(self, *, named: bool) -> list[tuple[Any, ...]] | list[dict[str, Any]]: ... + + def rows(self, *, named: bool) -> list[tuple[Any, ...]] | list[dict[str, Any]]: + if not named: + return list(self.iter_rows(named=False, buffer_size=512)) # type: ignore[return-value] + return self.native.to_pylist() + + def iter_columns(self) -> Iterator[ArrowSeries]: + for name, series in zip_strict(self.columns, self.native.itercolumns()): + yield ArrowSeries.from_native(series, context=self, name=name) + + _iter_columns = iter_columns + + def iter_rows( + self, *, named: bool, buffer_size: int + ) -> Iterator[tuple[Any, ...]] | Iterator[dict[str, Any]]: + df = self.native + num_rows = df.num_rows + + if not named: + for i in range(0, num_rows, buffer_size): + rows = df[i : i + buffer_size].to_pydict().values() + yield from zip_strict(*rows) + else: + for i in range(0, num_rows, buffer_size): + yield from df[i : i + buffer_size].to_pylist() + + def get_column(self, name: str) -> ArrowSeries: + if not isinstance(name, str): + msg = f"Expected str, got: {type(name)}" + raise TypeError(msg) + return ArrowSeries.from_native(self.native[name], context=self, name=name) + + def __array__(self, dtype: Any, *, copy: bool | None) -> _2DArray: + return self.native.__array__(dtype, copy=copy) + + def _gather(self, rows: SizedMultiIndexSelector[ChunkedArrayAny]) -> Self: + if len(rows) == 0: + return self._with_native(self.native.slice(0, 0)) + if self._backend_version < (18,) and isinstance(rows, tuple): + rows = list(rows) + return self._with_native(self.native.take(rows)) + + def _gather_slice(self, rows: _SliceIndex | range) -> Self: + start = rows.start or 0 + stop = rows.stop if rows.stop is not None else len(self.native) + if start < 0: + start = len(self.native) + start + if stop < 0: + stop = len(self.native) + stop + if rows.step is not None and rows.step != 1: + msg = "Slicing with step is not supported on PyArrow tables" + raise NotImplementedError(msg) + return self._with_native(self.native.slice(start, stop - start)) + + def _select_slice_name(self, columns: _SliceName) -> Self: + start, stop, step = convert_str_slice_to_int_slice(columns, self.columns) + return self._with_native(self.native.select(self.columns[start:stop:step])) + + def _select_slice_index(self, columns: _SliceIndex | range) -> Self: + return self._with_native( + self.native.select(self.columns[columns.start : columns.stop : columns.step]) + ) + + def _select_multi_index( + self, columns: SizedMultiIndexSelector[ChunkedArrayAny] + ) -> Self: + selector: Sequence[int] + if isinstance(columns, pa.ChunkedArray): + # TODO @dangotbanned: Fix upstream with `pa.ChunkedArray.to_pylist(self) -> list[Any]:` + selector = cast("Sequence[int]", columns.to_pylist()) + # TODO @dangotbanned: Fix upstream, it is actually much narrower + # **Doesn't accept `ndarray`** + elif is_numpy_array_1d(columns): + selector = columns.tolist() + else: + selector = columns + return self._with_native(self.native.select(selector)) + + def _select_multi_name( + self, columns: SizedMultiNameSelector[ChunkedArrayAny] + ) -> Self: + selector: Sequence[str] | _1DArray + if isinstance(columns, pa.ChunkedArray): + # TODO @dangotbanned: Fix upstream with `pa.ChunkedArray.to_pylist(self) -> list[Any]:` + selector = cast("Sequence[str]", columns.to_pylist()) + else: + selector = columns + # NOTE: Fixed in https://github.com/zen-xu/pyarrow-stubs/pull/221 + return self._with_native(self.native.select(selector)) # pyright: ignore[reportArgumentType] + + @property + def schema(self) -> dict[str, DType]: + return { + field.name: native_to_narwhals_dtype(field.type, self._version) + for field in self.native.schema + } + + def collect_schema(self) -> dict[str, DType]: + return self.schema + + def estimated_size(self, unit: SizeUnit) -> int | float: + sz = self.native.nbytes + return scale_bytes(sz, unit) + + explode = not_implemented() + + @property + def columns(self) -> list[str]: + return self.native.column_names + + def simple_select(self, *column_names: str) -> Self: + return self._with_native( + self.native.select(list(column_names)), validate_column_names=False + ) + + def select(self, *exprs: ArrowExpr) -> Self: + new_series = self._evaluate_exprs(*exprs) + if not new_series: + # return empty dataframe, like Polars does + return self._with_native( + self.native.__class__.from_arrays([]), validate_column_names=False + ) + names = [s.name for s in new_series] + align = new_series[0]._align_full_broadcast + reshaped = align(*new_series) + df = pa.Table.from_arrays([s.native for s in reshaped], names=names) + return self._with_native(df, validate_column_names=True) + + def _extract_comparand(self, other: ArrowSeries) -> ChunkedArrayAny: + length = len(self) + if not other._broadcast: + if (len_other := len(other)) != length: + msg = f"Expected object of length {length}, got: {len_other}." + raise ShapeError(msg) + return other.native + + value = other.native[0] + return pa.chunked_array([pa.repeat(value, length)]) + + def with_columns(self, *exprs: ArrowExpr) -> Self: + # NOTE: We use a faux-mutable variable and repeatedly "overwrite" (native_frame) + # All `pyarrow` data is immutable, so this is fine + native_frame = self.native + new_columns = self._evaluate_exprs(*exprs) + columns = self.columns + + for col_value in new_columns: + col_name = col_value.name + column = self._extract_comparand(col_value) + native_frame = ( + native_frame.set_column(columns.index(col_name), col_name, column=column) + if col_name in columns + else native_frame.append_column(col_name, column=column) + ) + + return self._with_native(native_frame, validate_column_names=False) + + def group_by( + self, keys: Sequence[str] | Sequence[ArrowExpr], *, drop_null_keys: bool + ) -> ArrowGroupBy: + from narwhals._arrow.group_by import ArrowGroupBy + + return ArrowGroupBy(self, keys, drop_null_keys=drop_null_keys) + + def join( + self, + other: Self, + *, + how: JoinStrategy, + left_on: Sequence[str] | None, + right_on: Sequence[str] | None, + suffix: str, + ) -> Self: + how_to_join_map: dict[str, JoinType] = { + "anti": "left anti", + "semi": "left semi", + "inner": "inner", + "left": "left outer", + "full": "full outer", + } + + if how == "cross": + plx = self.__narwhals_namespace__() + key_token = generate_temporary_column_name( + n_bytes=8, columns=[*self.columns, *other.columns] + ) + + return self._with_native( + self.with_columns(plx.lit(0, None).alias(key_token).broadcast()) + .native.join( + other.with_columns( + plx.lit(0, None).alias(key_token).broadcast() + ).native, + keys=key_token, + right_keys=key_token, + join_type="inner", + right_suffix=suffix, + ) + .drop([key_token]) + ) + + coalesce_keys = how != "full" # polars full join does not coalesce keys + return self._with_native( + self.native.join( + other.native, + keys=left_on or [], # type: ignore[arg-type] + right_keys=right_on, # type: ignore[arg-type] + join_type=how_to_join_map[how], + right_suffix=suffix, + coalesce_keys=coalesce_keys, + ) + ) + + join_asof = not_implemented() + + def drop(self, columns: Sequence[str], *, strict: bool) -> Self: + to_drop = parse_columns_to_drop(self, columns, strict=strict) + return self._with_native(self.native.drop(to_drop), validate_column_names=False) + + def drop_nulls(self, subset: Sequence[str] | None) -> Self: + if subset is None: + return self._with_native(self.native.drop_null(), validate_column_names=False) + plx = self.__narwhals_namespace__() + mask = ~plx.any_horizontal(plx.col(*subset).is_null(), ignore_nulls=True) + return self.filter(mask) + + def sort(self, *by: str, descending: bool | Sequence[bool], nulls_last: bool) -> Self: + if isinstance(descending, bool): + order: Order = "descending" if descending else "ascending" + sorting: list[tuple[str, Order]] = [(key, order) for key in by] + else: + sorting = [ + (key, "descending" if is_descending else "ascending") + for key, is_descending in zip_strict(by, descending) + ] + + null_placement = "at_end" if nulls_last else "at_start" + + return self._with_native( + self.native.sort_by(sorting, null_placement=null_placement), + validate_column_names=False, + ) + + def top_k(self, k: int, *, by: Iterable[str], reverse: bool | Sequence[bool]) -> Self: + if isinstance(reverse, bool): + order: Order = "ascending" if reverse else "descending" + sorting: list[tuple[str, Order]] = [(key, order) for key in by] + else: + sorting = [ + (key, "ascending" if is_ascending else "descending") + for key, is_ascending in zip_strict(by, reverse) + ] + return self._with_native( + self.native.take(pc.select_k_unstable(self.native, k, sorting)), # type: ignore[call-overload] + validate_column_names=False, + ) + + def to_pandas(self) -> pd.DataFrame: + return self.native.to_pandas() + + def to_polars(self) -> pl.DataFrame: + import polars as pl # ignore-banned-import + + return pl.from_arrow(self.native) # type: ignore[return-value] + + def to_numpy(self, dtype: Any = None, *, copy: bool | None = None) -> _2DArray: + import numpy as np # ignore-banned-import + + arr: Any = np.column_stack([col.to_numpy() for col in self.native.columns]) + return arr + + @overload + def to_dict(self, *, as_series: Literal[True]) -> dict[str, ArrowSeries]: ... + + @overload + def to_dict(self, *, as_series: Literal[False]) -> dict[str, list[Any]]: ... + + def to_dict( + self, *, as_series: bool + ) -> dict[str, ArrowSeries] | dict[str, list[Any]]: + it = self.iter_columns() + if as_series: + return {ser.name: ser for ser in it} + return {ser.name: ser.to_list() for ser in it} + + def with_row_index(self, name: str, order_by: Sequence[str] | None) -> Self: + plx = self.__narwhals_namespace__() + data = arange(0, len(self), 1) + if order_by is None: + row_index = plx._expr._from_series( + plx._series.from_iterable(data, context=self, name=name) + ) + return self.select(row_index, plx.all()) + indices = pc.sort_indices(self.native, [(by, "ascending") for by in order_by]) + if self._backend_version < (20,): + new_col = data.take(pc.sort_indices(indices)) + else: + new_col = pc.scatter(data, indices.cast(pa.int64())) # type: ignore[attr-defined] + return self._with_native(self.native.add_column(0, name, new_col)) + + def filter(self, predicate: ArrowExpr) -> Self: + mask_native = self._evaluate_single_output_expr(predicate).native + return self._with_native( + self.native.filter(mask_native), validate_column_names=False + ) + + def head(self, n: int) -> Self: + df = self.native + if n >= 0: + return self._with_native(df.slice(0, n), validate_column_names=False) + num_rows = df.num_rows + return self._with_native( + df.slice(0, max(0, num_rows + n)), validate_column_names=False + ) + + def tail(self, n: int) -> Self: + df = self.native + if n >= 0: + num_rows = df.num_rows + return self._with_native( + df.slice(max(0, num_rows - n)), validate_column_names=False + ) + return self._with_native(df.slice(abs(n)), validate_column_names=False) + + def lazy( + self, + backend: _LazyAllowedImpl | None = None, + *, + session: SparkSession | None = None, + ) -> CompliantLazyFrameAny: + if backend is None: + return self + if backend is Implementation.DUCKDB: + import duckdb # ignore-banned-import + + from narwhals._duckdb.dataframe import DuckDBLazyFrame + + _df = self.native + return DuckDBLazyFrame( + duckdb.table("_df"), validate_backend_version=True, version=self._version + ) + if backend is Implementation.POLARS: + import polars as pl # ignore-banned-import + + from narwhals._polars.dataframe import PolarsLazyFrame + + return PolarsLazyFrame( + cast("pl.DataFrame", pl.from_arrow(self.native)).lazy(), + validate_backend_version=True, + version=self._version, + ) + if backend is Implementation.DASK: + import dask.dataframe as dd # ignore-banned-import + + from narwhals._dask.dataframe import DaskLazyFrame + + return DaskLazyFrame( + dd.from_pandas(self.native.to_pandas()), + validate_backend_version=True, + version=self._version, + ) + if backend is Implementation.IBIS: + import ibis # ignore-banned-import + + from narwhals._ibis.dataframe import IbisLazyFrame + + return IbisLazyFrame( + ibis.memtable(self.native, columns=self.columns), + validate_backend_version=True, + version=self._version, + ) + + if backend.is_spark_like(): + from narwhals._spark_like.dataframe import SparkLikeLazyFrame + + if session is None: + msg = "Spark like backends require `session` to be not None." + raise ValueError(msg) + + return SparkLikeLazyFrame._from_compliant_dataframe( + self, session=session, implementation=backend, version=self._version + ) + + raise AssertionError # pragma: no cover + + def collect( + self, backend: _EagerAllowedImpl | None, **kwargs: Any + ) -> CompliantDataFrameAny: + if backend is Implementation.PYARROW or backend is None: + from narwhals._arrow.dataframe import ArrowDataFrame + + return ArrowDataFrame( + self.native, version=self._version, validate_column_names=False + ) + + if backend is Implementation.PANDAS: + from narwhals._pandas_like.dataframe import PandasLikeDataFrame + + return PandasLikeDataFrame( + self.native.to_pandas(), + implementation=Implementation.PANDAS, + validate_backend_version=True, + version=self._version, + validate_column_names=False, + ) + + if backend is Implementation.POLARS: + import polars as pl # ignore-banned-import + + from narwhals._polars.dataframe import PolarsDataFrame + + return PolarsDataFrame( + cast("pl.DataFrame", pl.from_arrow(self.native)), + validate_backend_version=True, + version=self._version, + ) + + msg = f"Unsupported `backend` value: {backend}" # pragma: no cover + raise AssertionError(msg) # pragma: no cover + + def clone(self) -> Self: + return self._with_native(self.native, validate_column_names=False) + + def item(self, row: int | None, column: int | str | None) -> Any: + from narwhals._arrow.series import maybe_extract_py_scalar + + if row is None and column is None: + if (shape := self.shape) != (1, 1): + msg = ( + 'can only call `.item()` without "row" or "column" values if the ' + f"DataFrame has a single element; shape={shape!r}" + ) + raise ValueError(msg) + return maybe_extract_py_scalar(self.native[0][0], return_py_scalar=True) + + if row is None or column is None: + msg = "cannot call `.item()` with only one of `row` or `column`" + raise ValueError(msg) + + _col = self.columns.index(column) if isinstance(column, str) else column + return maybe_extract_py_scalar(self.native[_col][row], return_py_scalar=True) + + def rename(self, mapping: Mapping[str, str]) -> Self: + names: dict[str, str] | list[str] + if self._backend_version >= (17,): + names = cast("dict[str, str]", mapping) + else: # pragma: no cover + names = [mapping.get(c, c) for c in self.columns] + return self._with_native(self.native.rename_columns(names)) + + def write_parquet(self, file: str | Path | BytesIO) -> None: + import pyarrow.parquet as pp + + pp.write_table(self.native, file) + + @overload + def write_csv(self, file: None) -> str: ... + + @overload + def write_csv(self, file: str | Path | BytesIO) -> None: ... + + def write_csv(self, file: str | Path | BytesIO | None) -> str | None: + import pyarrow.csv as pa_csv + + if file is None: + csv_buffer = pa.BufferOutputStream() + pa_csv.write_csv(self.native, csv_buffer) + return csv_buffer.getvalue().to_pybytes().decode() + pa_csv.write_csv(self.native, file) + return None + + def is_unique(self) -> ArrowSeries: + import numpy as np # ignore-banned-import + + col_token = generate_temporary_column_name(n_bytes=8, columns=self.columns) + row_index = pa.array(np.arange(len(self))) + keep_idx = ( + self.native.append_column(col_token, row_index) + .group_by(self.columns) + .aggregate([(col_token, "min"), (col_token, "max")]) + ) + native = pa.chunked_array( + pc.and_( + pc.is_in(row_index, keep_idx[f"{col_token}_min"]), + pc.is_in(row_index, keep_idx[f"{col_token}_max"]), + ) + ) + return ArrowSeries.from_native(native, context=self) + + def unique( + self, + subset: Sequence[str] | None, + *, + keep: UniqueKeepStrategy, + maintain_order: bool | None = None, + order_by: Sequence[str] | None, + ) -> Self: + # The param `maintain_order` is only here for compatibility with the Polars API + # and has no effect on the output. + import numpy as np # ignore-banned-import + + if subset and (error := self._check_columns_exist(subset)): + raise error + subset = list(subset or self.columns) + + if keep in {"any", "first", "last"}: + from narwhals._arrow.group_by import ArrowGroupBy + + agg_func = ArrowGroupBy._REMAP_UNIQUE[keep] + col_token = generate_temporary_column_name(n_bytes=8, columns=self.columns) + if order_by and maintain_order: + idx_token = generate_temporary_column_name( + n_bytes=8, columns=[*self.columns, col_token] + ) + df = ( + self.with_row_index(idx_token, order_by=None) + .sort(*order_by, nulls_last=False, descending=False) + .unique(subset=subset, keep=keep, maintain_order=False, order_by=None) + ) + return df.sort(idx_token, descending=False, nulls_last=False).drop( + [idx_token], strict=False + ) + if order_by: + native = self.sort(*order_by, nulls_last=False, descending=False).native + else: + native = self.native + keep_idx_native = ( + native.append_column(col_token, pa.array(np.arange(len(self)))) + .group_by(subset) + .aggregate([(col_token, agg_func)]) + .column(f"{col_token}_{agg_func}") + ) + return self._with_native( + native.take(keep_idx_native), validate_column_names=False + ) + + keep_idx = self.simple_select(*subset).is_unique() + plx = self.__narwhals_namespace__() + return self.filter(plx._expr._from_series(keep_idx)) + + def gather_every(self, n: int, offset: int) -> Self: + return self._with_native(self.native[offset::n], validate_column_names=False) + + def to_arrow(self) -> pa.Table: + return self.native + + def sample( + self, + n: int | None, + *, + fraction: float | None, + with_replacement: bool, + seed: int | None, + ) -> Self: + import numpy as np # ignore-banned-import + + num_rows = len(self) + if n is None and fraction is not None: + n = int(num_rows * fraction) + rng = np.random.default_rng(seed=seed) + idx = np.arange(num_rows) + mask = rng.choice(idx, size=n, replace=with_replacement) + return self._with_native(self.native.take(mask), validate_column_names=False) + + def unpivot( + self, + on: Sequence[str] | None, + index: Sequence[str] | None, + variable_name: str, + value_name: str, + ) -> Self: + # TODO(Unassigned): Even with promote_options="permissive", pyarrow does not + # upcast numeric to non-numeric (e.g. string) datatypes + n = len(self) + index = [] if index is None else list(index) + on_ = (c for c in self.columns if c not in index) if on is None else iter(on) + index_cols = self.native.select(index) + column = self.native.column + tables = ( + index_cols.append_column(variable_name, repeat(name, n)).append_column( + value_name, column(name) + ) + for name in on_ + ) + return self._with_native(concat_tables(tables, "permissive")) + + pivot = not_implemented() diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/expr.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/expr.py new file mode 100644 index 0000000000000000000000000000000000000000..f93fc285c1e2d43f1c075ec6b8956a1133dd8e30 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/expr.py @@ -0,0 +1,239 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, cast + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.series import ArrowSeries +from narwhals._compliant import EagerExpr +from narwhals._expression_parsing import evaluate_nodes, evaluate_output_names_and_aliases +from narwhals._utils import ( + Implementation, + generate_temporary_column_name, + not_implemented, +) +from narwhals.functions import col as nw_col + +if TYPE_CHECKING: + from collections.abc import Sequence + + from typing_extensions import Self + + from narwhals._arrow.dataframe import ArrowDataFrame + from narwhals._arrow.namespace import ArrowNamespace + from narwhals._compliant.typing import AliasNames, EvalNames, EvalSeries + from narwhals._utils import Version, _LimitedContext + + +class ArrowExpr(EagerExpr["ArrowDataFrame", ArrowSeries]): + _implementation: Implementation = Implementation.PYARROW + + def __init__( + self, + call: EvalSeries[ArrowDataFrame, ArrowSeries], + *, + evaluate_output_names: EvalNames[ArrowDataFrame], + alias_output_names: AliasNames | None, + version: Version, + implementation: Implementation = Implementation.PYARROW, + ) -> None: + self._call = call + self._evaluate_output_names = evaluate_output_names + self._alias_output_names = alias_output_names + self._version = version + + @classmethod + def from_column_names( + cls: type[Self], + evaluate_column_names: EvalNames[ArrowDataFrame], + /, + *, + context: _LimitedContext, + ) -> Self: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + try: + return [ + ArrowSeries( + df.native[column_name], name=column_name, version=df._version + ) + for column_name in evaluate_column_names(df) + ] + except KeyError as e: + if error := df._check_columns_exist(evaluate_column_names(df)): + raise error from e + raise + + return cls( + func, + evaluate_output_names=evaluate_column_names, + alias_output_names=None, + version=context._version, + ) + + @classmethod + def from_column_indices(cls, *column_indices: int, context: _LimitedContext) -> Self: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + tbl = df.native + cols = df.columns + return [ + ArrowSeries.from_native(tbl[i], name=cols[i], context=df) + for i in column_indices + ] + + return cls( + func, + evaluate_output_names=cls._eval_names_indices(column_indices), + alias_output_names=None, + version=context._version, + ) + + def __narwhals_namespace__(self) -> ArrowNamespace: + from narwhals._arrow.namespace import ArrowNamespace + + return ArrowNamespace(version=self._version) + + def _reuse_series_extra_kwargs( + self, *, returns_scalar: bool = False + ) -> dict[str, Any]: + return {"_return_py_scalar": False} if returns_scalar else {} + + def _over_without_partition_by(self, order_by: Sequence[str]) -> Self: + # e.g. `nw.col('a').cum_sum().order_by(key)` + # which we can always easily support, as it doesn't require grouping. + assert order_by # noqa: S101 + meta = self._metadata + + def func(df: ArrowDataFrame) -> Sequence[ArrowSeries]: + token = generate_temporary_column_name(8, df.columns) + df = df.with_row_index(token, order_by=None).sort( + *order_by, descending=False, nulls_last=False + ) + results = self(df.drop([token], strict=True)) + if meta is not None and meta.is_scalar_like: + # We need to broadcast the results to the original size, since + # `over` is a length-preserving operation. + size = len(df) + return [s._with_native(pa.repeat(s.item(), size)) for s in results] + + # TODO(marco): is there a way to do this efficiently without + # doing 2 sorts? Here we're sorting the dataframe and then + # again calling `sort_indices`. `ArrowSeries.scatter` would also sort. + sorting_indices = pc.sort_indices(df.get_column(token).native) + return [s._with_native(s.native.take(sorting_indices)) for s in results] + + return self.__class__( + func, + evaluate_output_names=self._evaluate_output_names, + alias_output_names=self._alias_output_names, + version=self._version, + ) + + def over(self, partition_by: Sequence[str], order_by: Sequence[str]) -> Self: + if not partition_by: + assert order_by # noqa: S101 + return self._over_without_partition_by(order_by) + + # We have something like prev.leaf().over(...) (e.g. `nw.col('a').sum().over('b')`), where: + # - `prev` must be elementwise (in the example: `nw.col('a')`) + # - `leaf` must be an aggregation (in the example: `sum`) + # + # We first evaluate `prev` as-is, and then evaluate `leaf().over(...)`` by doing a `group_by`. + meta = self._metadata + if partition_by and ( + not meta.current_node.kind.is_scalar_like + or (meta.prev is not None and not meta.prev.is_elementwise) + ): + msg = ( + "Only elementary aggregations are supported for `.over` in PyArrow backend " + "when `partition_by` is specified.\n\n" + "Please see: " + "https://narwhals-dev.github.io/narwhals/concepts/improve_group_by_operation/" + ) + raise NotImplementedError(msg) + + nodes = list(reversed(list(self._metadata.iter_nodes_reversed()))) + + def func(df: ArrowDataFrame) -> Sequence[ArrowSeries]: # noqa: PLR0914 + plx = self.__narwhals_namespace__() + if meta.prev is not None: + df = df.with_columns(cast("ArrowExpr", evaluate_nodes(nodes[:-1], plx))) + _, aliases = evaluate_output_names_and_aliases(self, df, []) + leaf_ce = cast( + "ArrowExpr", + nw_col(*aliases)._append_node(nodes[-1])._to_compliant_expr(plx), + ) + else: + _, aliases = evaluate_output_names_and_aliases(self, df, []) + leaf_ce = self + if order_by: + df = df.sort(*order_by, descending=False, nulls_last=False) + + if overlap := set(aliases).intersection(partition_by): + # E.g. `df.select(nw.all().sum().over('a'))`. This is well-defined, + # we just don't support it yet. + msg = ( + f"Column names {overlap} appear in both expression output names and in `over` keys.\n" + "This is not yet supported." + ) + raise NotImplementedError(msg) + + partition_tbl = df.simple_select(*partition_by) + has_nulls = [ca.null_count > 0 for ca in partition_tbl.native.columns] + if not any(has_nulls): + tmp = df.group_by(partition_by, drop_null_keys=False).agg(leaf_ce) + tmp = partition_tbl.join( + tmp, + how="left", + left_on=partition_by, + right_on=partition_by, + suffix="_right", + ) + return [tmp.get_column(alias) for alias in aliases] + + tbl_native, current_cols = df.native, df.columns + plx = self.__narwhals_namespace__() + + group_keys: list[str] = [] + encoded_cols: list[ArrowExpr] = [] + for col_name, has_null in zip(partition_tbl.columns, has_nulls): + if not has_null: + group_keys.append(col_name) + else: + tmp_name = generate_temporary_column_name(8, current_cols) + + group_keys.append(tmp_name) + current_cols.append(tmp_name) + + indices = plx._series.from_native( + ( + tbl_native.column(col_name) + .dictionary_encode("encode") + .combine_chunks() + .indices # type: ignore[attr-defined] + ), + context=plx, + name=tmp_name, + ) + + encoded_cols.append(plx._expr._from_series(indices)) + + tbl_encoded = df.with_columns(*encoded_cols) + windowed = tbl_encoded.group_by(group_keys, drop_null_keys=False).agg(leaf_ce) + ret = tbl_encoded.simple_select(*group_keys).join( + windowed, + left_on=group_keys, + right_on=group_keys, + how="inner", + suffix="_right", + ) + return [ret.get_column(alias) for alias in aliases] + + return self.__class__( + func, + evaluate_output_names=self._evaluate_output_names, + alias_output_names=self._alias_output_names, + version=self._version, + ) + + ewm_mean = not_implemented() diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/group_by.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/group_by.py new file mode 100644 index 0000000000000000000000000000000000000000..8c4e65346dd2079c9cae6ee145ed3cc2d7f499c0 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/group_by.py @@ -0,0 +1,218 @@ +from __future__ import annotations + +import collections +from typing import TYPE_CHECKING, Any, ClassVar + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.utils import ( + BACKEND_VERSION, + cast_to_comparable_string_types, + extract_py_scalar, +) +from narwhals._compliant import EagerGroupBy +from narwhals._expression_parsing import evaluate_output_names_and_aliases +from narwhals._utils import generate_temporary_column_name, requires + +if TYPE_CHECKING: + from collections.abc import Iterator, Mapping, Sequence + + from narwhals._arrow.dataframe import ArrowDataFrame + from narwhals._arrow.expr import ArrowExpr + from narwhals._arrow.typing import ( # type: ignore[attr-defined] + AggregateOptions, + Aggregation, + Incomplete, + ) + from narwhals._compliant.typing import NarwhalsAggregation + from narwhals.typing import UniqueKeepStrategy + + +class ArrowGroupBy(EagerGroupBy["ArrowDataFrame", "ArrowExpr", "Aggregation"]): + _REMAP_AGGS: ClassVar[Mapping[NarwhalsAggregation, Aggregation]] = { + "sum": "sum", + "mean": "mean", + "median": "approximate_median", + "max": "max", + "min": "min", + "std": "stddev", + "var": "variance", + "len": "count", + "n_unique": "count_distinct", + "count": "count", + "all": "all", + "any": "any", + "first": "first", + "last": "last", + "any_value": "first", + } + _REMAP_UNIQUE: ClassVar[Mapping[UniqueKeepStrategy, Aggregation]] = { + "any": "min", + "first": "min", + "last": "max", + } + _OPTION_COUNT_ALL: ClassVar[frozenset[NarwhalsAggregation]] = frozenset( + ("len", "n_unique") + ) + _OPTION_COUNT_VALID: ClassVar[frozenset[NarwhalsAggregation]] = frozenset(("count",)) + _OPTION_ORDERED: ClassVar[frozenset[NarwhalsAggregation]] = frozenset( + ("first", "last", "any_value") + ) + _OPTION_VARIANCE: ClassVar[frozenset[NarwhalsAggregation]] = frozenset(("std", "var")) + _OPTION_SCALAR: ClassVar[frozenset[NarwhalsAggregation]] = frozenset( + ("any", "all", "sum") + ) + + def __init__( + self, + df: ArrowDataFrame, + keys: Sequence[ArrowExpr] | Sequence[str], + /, + *, + drop_null_keys: bool, + ) -> None: + self._df = df + frame, self._keys, self._output_key_names = self._parse_keys(df, keys=keys) + self._compliant_frame = frame.drop_nulls(self._keys) if drop_null_keys else frame + self._drop_null_keys = drop_null_keys + + def _configure_agg( + self, expr: ArrowExpr, / + ) -> tuple[Aggregation, AggregateOptions | None]: + option: AggregateOptions | None = None + function_name = self._leaf_name(expr) + kwargs = self._kwargs(expr) + if function_name in self._OPTION_VARIANCE: + ddof = kwargs["ddof"] + option = pc.VarianceOptions(ddof=ddof) + elif function_name in self._OPTION_COUNT_ALL: + option = pc.CountOptions(mode="all") + elif function_name in self._OPTION_COUNT_VALID: + option = pc.CountOptions(mode="only_valid") + elif function_name in self._OPTION_SCALAR: + option = pc.ScalarAggregateOptions(min_count=0) + elif function_name in self._OPTION_ORDERED: + ignore_nulls = kwargs.get("ignore_nulls", False) + option = pc.ScalarAggregateOptions(skip_nulls=ignore_nulls) + return self._remap_expr_name(function_name), option + + def _configure_grouped(self, *exprs: ArrowExpr) -> pa.TableGroupBy: + order_by = () + use_threads = True + for expr in exprs: + md = next(expr._metadata.op_nodes_reversed()) + if md.name not in self._OPTION_ORDERED: + continue + # [pyarrow-36709]: https://github.com/apache/arrow/issues/36709 + use_threads = False + if _current_order_by := md.kwargs.get("order_by", ()): + if order_by and _current_order_by != order_by: + msg = f"Only one `order_by` can be specified in `group_by`. Found both {order_by} and {_current_order_by}." + raise NotImplementedError(msg) + order_by = _current_order_by + if not use_threads and BACKEND_VERSION < (14,): # pragma: no cover + msg = ( + f"Using `first/last` in a `group_by().agg(...)` context is only available in 'pyarrow>=14.0.0', " + f"found version {requires._unparse_version(BACKEND_VERSION)!r}.\n\n" + f"See https://github.com/apache/arrow/issues/36709" + ) + raise NotImplementedError(msg) + if order_by: + return pa.TableGroupBy( + self.compliant.sort(*order_by, descending=False, nulls_last=False).native, + self._keys, + use_threads=use_threads, + ) + if not use_threads: + return pa.TableGroupBy(self.compliant.native, self._keys, use_threads=False) + # TODO(unassigned): combine with `return` above once PyArrow 15 is the minimum. + return pa.TableGroupBy(self.compliant.native, self._keys) + + def agg(self, *exprs: ArrowExpr) -> ArrowDataFrame: + self._ensure_all_simple(exprs) + grouped = self._configure_grouped(*exprs) + + aggs: list[tuple[str, Aggregation, AggregateOptions | None]] = [] + expected_pyarrow_column_names: list[str] = self._keys.copy() + new_column_names: list[str] = self._keys.copy() + exclude = (*self._keys, *self._output_key_names) + + for expr in exprs: + output_names, aliases = evaluate_output_names_and_aliases( + expr, self.compliant, exclude + ) + md = expr._metadata + op_nodes_reversed = list(md.op_nodes_reversed()) + if len(op_nodes_reversed) == 1: + # e.g. `agg(nw.len())` + if op_nodes_reversed[0].name != "len": # pragma: no cover + msg = "Safety assertion failed, please report a bug to https://github.com/narwhals-dev/narwhals/issues" + raise AssertionError(msg) + + new_column_names.append(aliases[0]) + expected_pyarrow_column_names.append(f"{self._keys[0]}_count") + aggs.append((self._keys[0], "count", pc.CountOptions(mode="all"))) + continue + + function_name, option = self._configure_agg(expr) + new_column_names.extend(aliases) + expected_pyarrow_column_names.extend( + [f"{output_name}_{function_name}" for output_name in output_names] + ) + aggs.extend( + [(output_name, function_name, option) for output_name in output_names] + ) + + result_simple = grouped.aggregate(aggs) + + # Rename columns, being very careful + expected_old_names_indices: dict[str, list[int]] = collections.defaultdict(list) + for idx, item in enumerate(expected_pyarrow_column_names): + expected_old_names_indices[item].append(idx) + if not ( + set(result_simple.column_names) == set(expected_pyarrow_column_names) + and len(result_simple.column_names) == len(expected_pyarrow_column_names) + ): # pragma: no cover + msg = ( + f"Safety assertion failed, expected {expected_pyarrow_column_names} " + f"got {result_simple.column_names}, " + "please report a bug at https://github.com/narwhals-dev/narwhals/issues" + ) + raise AssertionError(msg) + index_map: list[int] = [ + expected_old_names_indices[item].pop(0) for item in result_simple.column_names + ] + new_column_names = [new_column_names[i] for i in index_map] + result_simple = result_simple.rename_columns(new_column_names) + return self.compliant._with_native(result_simple).rename( + dict(zip(self._keys, self._output_key_names)) + ) + + def __iter__(self) -> Iterator[tuple[Any, ArrowDataFrame]]: + col_token = generate_temporary_column_name( + n_bytes=8, columns=self.compliant.columns + ) + null_token: str = "__null_token_value__" # noqa: S105 + + table = self.compliant.native + it, separator_scalar = cast_to_comparable_string_types( + *(table[key] for key in self._keys), separator="" + ) + # NOTE: stubs indicate `separator` must also be a `ChunkedArray` + # Reality: `str` is fine + concat_str: Incomplete = pc.binary_join_element_wise + key_values = concat_str( + *it, separator_scalar, null_handling="replace", null_replacement=null_token + ) + table = table.add_column(i=0, field_=col_token, column=key_values) + + for v in pc.unique(key_values): + t = self.compliant._with_native( + table.filter(pc.equal(table[col_token], v)).drop([col_token]) + ) + row = t.simple_select(*self._keys).row(0) + yield ( + tuple(extract_py_scalar(el) for el in row), + t.simple_select(*self._df.columns), + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/namespace.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/namespace.py new file mode 100644 index 0000000000000000000000000000000000000000..6f560e1ed09a296c903d6a6b1554d48e5877f830 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/namespace.py @@ -0,0 +1,289 @@ +from __future__ import annotations + +import operator +from functools import reduce +from itertools import chain +from typing import TYPE_CHECKING, Literal + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.dataframe import ArrowDataFrame +from narwhals._arrow.expr import ArrowExpr +from narwhals._arrow.selectors import ArrowSelectorNamespace +from narwhals._arrow.series import ArrowSeries +from narwhals._arrow.utils import cast_to_comparable_string_types +from narwhals._compliant import EagerNamespace +from narwhals._expression_parsing import ( + combine_alias_output_names, + combine_evaluate_output_names, +) +from narwhals._utils import Implementation + +if TYPE_CHECKING: + from collections.abc import Iterator, Sequence + + from narwhals._arrow.typing import ChunkedArrayAny, Incomplete, ScalarAny + from narwhals._utils import Version + from narwhals.typing import CorrelationMethod, IntoDType, PythonLiteral + + +class ArrowNamespace( + EagerNamespace[ArrowDataFrame, ArrowSeries, ArrowExpr, pa.Table, "ChunkedArrayAny"] +): + _implementation = Implementation.PYARROW + + @property + def _dataframe(self) -> type[ArrowDataFrame]: + return ArrowDataFrame + + @property + def _expr(self) -> type[ArrowExpr]: + return ArrowExpr + + @property + def _series(self) -> type[ArrowSeries]: + return ArrowSeries + + def __init__(self, *, version: Version) -> None: + self._version = version + + def extract_native( + self, *series: ArrowSeries + ) -> Iterator[ChunkedArrayAny | ScalarAny]: + return (s.native[0] if s._broadcast else s.native for s in series) + + def len(self) -> ArrowExpr: + # coverage bug? this is definitely hit + return self._expr( # pragma: no cover + lambda df: [ + ArrowSeries.from_iterable([len(df.native)], name="len", context=self) + ], + evaluate_output_names=lambda _df: ["len"], + alias_output_names=None, + version=self._version, + ) + + def lit(self, value: PythonLiteral, dtype: IntoDType | None) -> ArrowExpr: + def _lit_arrow_series(_: ArrowDataFrame) -> ArrowSeries: + arrow_series = ArrowSeries.from_iterable( + data=[value], name="literal", context=self + ) + if dtype: + return arrow_series.cast(dtype) + return arrow_series + + return self._expr( + lambda df: [_lit_arrow_series(df)], + evaluate_output_names=lambda _df: ["literal"], + alias_output_names=None, + version=self._version, + ) + + def all_horizontal(self, *exprs: ArrowExpr, ignore_nulls: bool) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + series: Iterator[ArrowSeries] = chain.from_iterable(e(df) for e in exprs) + if ignore_nulls: + series = (s.fill_null(True, None, None) for s in series) + return [reduce(operator.and_, series)] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def any_horizontal(self, *exprs: ArrowExpr, ignore_nulls: bool) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + series: Iterator[ArrowSeries] = chain.from_iterable(e(df) for e in exprs) + if ignore_nulls: + series = (s.fill_null(False, None, None) for s in series) + return [reduce(operator.or_, series)] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def sum_horizontal(self, *exprs: ArrowExpr) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + it = chain.from_iterable(expr(df) for expr in exprs) + series = (s.fill_null(0, strategy=None, limit=None) for s in it) + return [reduce(operator.add, series)] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def mean_horizontal(self, *exprs: ArrowExpr) -> ArrowExpr: + int_64 = self._version.dtypes.Int64() + + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + expr_results = tuple(chain.from_iterable(expr(df) for expr in exprs)) + series = [s.fill_null(0, strategy=None, limit=None) for s in expr_results] + non_na = [1 - s.is_null().cast(int_64) for s in expr_results] + return [reduce(operator.add, series) / reduce(operator.add, non_na)] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def min_horizontal(self, *exprs: ArrowExpr) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + init_series, *series = tuple(chain.from_iterable(expr(df) for expr in exprs)) + native_series = reduce( + pc.min_element_wise, [s.native for s in series], init_series.native + ) + return [ + ArrowSeries(native_series, name=init_series.name, version=self._version) + ] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def max_horizontal(self, *exprs: ArrowExpr) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + init_series, *series = tuple(chain.from_iterable(expr(df) for expr in exprs)) + native_series = reduce( + pc.max_element_wise, [s.native for s in series], init_series.native + ) + return [ + ArrowSeries(native_series, name=init_series.name, version=self._version) + ] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def _concat_diagonal(self, dfs: Sequence[pa.Table], /) -> pa.Table: + if self._backend_version >= (14,): + return pa.concat_tables(dfs, promote_options="default") + return pa.concat_tables(dfs, promote=True) # pragma: no cover + + def _concat_horizontal(self, dfs: Sequence[pa.Table], /) -> pa.Table: + names = list(chain.from_iterable(df.column_names for df in dfs)) + arrays = tuple(chain.from_iterable(df.itercolumns() for df in dfs)) + return pa.Table.from_arrays(arrays, names=names) + + def _concat_vertical(self, dfs: Sequence[pa.Table], /) -> pa.Table: + cols_0 = dfs[0].column_names + for i, df in enumerate(dfs[1:], start=1): + if (cols_current := df.column_names) != cols_0: + msg = ( + "unable to vstack, column names don't match:\n" + f" - dataframe 0: {cols_0}\n" + f" - dataframe {i}: {cols_current}\n" + ) + raise TypeError(msg) + return pa.concat_tables(dfs) + + @property + def selectors(self) -> ArrowSelectorNamespace: + return ArrowSelectorNamespace.from_namespace(self) + + def concat_str( + self, *exprs: ArrowExpr, separator: str, ignore_nulls: bool + ) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + series = list(chain.from_iterable(expr(df) for expr in exprs)) + name = series[0].name + null_handling: Literal["skip", "emit_null"] = ( + "skip" if ignore_nulls else "emit_null" + ) + it, separator_scalar = cast_to_comparable_string_types( + *self.extract_native(*series), separator=separator + ) + # NOTE: stubs indicate `separator` must also be a `ChunkedArray` + # Reality: `str` is fine + concat_str: Incomplete = pc.binary_join_element_wise + compliant = self._series( + concat_str(*it, separator_scalar, null_handling=null_handling), + name=name, + version=self._version, + ) + return [compliant] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def coalesce(self, *exprs: ArrowExpr) -> ArrowExpr: + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + align = self._series._align_full_broadcast + init_series, *series = align(*chain.from_iterable(expr(df) for expr in exprs)) + return [ + ArrowSeries( + pc.coalesce(init_series.native, *(s.native for s in series)), + name=init_series.name, + version=self._version, + ) + ] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(*exprs), + alias_output_names=combine_alias_output_names(*exprs), + context=self, + ) + + def _if_then_else( + self, + when: ChunkedArrayAny, + then: ChunkedArrayAny, + otherwise: ChunkedArrayAny | None = None, + ) -> ChunkedArrayAny: + otherwise = pa.nulls(len(when), then.type) if otherwise is None else otherwise + return pc.if_else(when.fill_null(pa.scalar(False)), then, otherwise) + + def corr(self, a: ArrowExpr, b: ArrowExpr, *, method: CorrelationMethod) -> ArrowExpr: + if method != "pearson": + msg = "Only 'pearson' correlation is supported for Pyarrow." + raise NotImplementedError(msg) + + def func(df: ArrowDataFrame) -> list[ArrowSeries]: + a_series = df._evaluate_single_output_expr(a) + arr1 = a_series.native + arr2 = df._evaluate_single_output_expr(b).native + mean1 = pc.mean(arr1) + mean2 = pc.mean(arr2) + + dev1 = pc.subtract(arr1, mean1) + dev2 = pc.subtract(arr2, mean2) + + covariance = pc.mean(pc.multiply(dev1, dev2)) + + std1 = pc.stddev(arr1) + std2 = pc.stddev(arr2) + + correlation = pc.divide(covariance, pc.multiply(std1, std2)) + return [ + ArrowSeries.from_iterable( + data=[correlation], name=a_series.name, context=self + ) + ] + + return self._expr._from_callable( + func=func, + evaluate_output_names=combine_evaluate_output_names(a, b), + alias_output_names=combine_alias_output_names(a, b), + context=self, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/selectors.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/selectors.py new file mode 100644 index 0000000000000000000000000000000000000000..62bb0140834d4e6910c1e9307651f9eda7b30df1 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/selectors.py @@ -0,0 +1,26 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +from narwhals._arrow.expr import ArrowExpr +from narwhals._compliant import CompliantSelector, EagerSelectorNamespace + +if TYPE_CHECKING: + from narwhals._arrow.dataframe import ArrowDataFrame # noqa: F401 + from narwhals._arrow.series import ArrowSeries # noqa: F401 + + +class ArrowSelectorNamespace(EagerSelectorNamespace["ArrowDataFrame", "ArrowSeries"]): + @property + def _selector(self) -> type[ArrowSelector]: + return ArrowSelector + + +class ArrowSelector(CompliantSelector["ArrowDataFrame", "ArrowSeries"], ArrowExpr): # type: ignore[misc] + def _to_expr(self) -> ArrowExpr: + return ArrowExpr( + self._call, + evaluate_output_names=self._evaluate_output_names, + alias_output_names=self._alias_output_names, + version=self._version, + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series.py new file mode 100644 index 0000000000000000000000000000000000000000..650217bd3dc2ba42cb7ce17a31054434993c5e72 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series.py @@ -0,0 +1,1199 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Callable, Literal, cast, overload + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.series_cat import ArrowSeriesCatNamespace +from narwhals._arrow.series_dt import ArrowSeriesDateTimeNamespace +from narwhals._arrow.series_list import ArrowSeriesListNamespace +from narwhals._arrow.series_str import ArrowSeriesStringNamespace +from narwhals._arrow.series_struct import ArrowSeriesStructNamespace +from narwhals._arrow.utils import ( + arange, + cast_for_truediv, + chunked_array, + extract_native, + floordiv_compat, + is_array_or_scalar, + lit, + narwhals_to_native_dtype, + native_to_narwhals_dtype, + nulls_like, + pad_series, + zeros, +) +from narwhals._compliant import EagerSeries, EagerSeriesHist +from narwhals._typing_compat import assert_never +from narwhals._utils import ( + Implementation, + generate_temporary_column_name, + is_list_of, + no_default, + not_implemented, +) +from narwhals.dependencies import is_numpy_array_1d +from narwhals.exceptions import InvalidOperationError, ShapeError + +if TYPE_CHECKING: + from collections.abc import Iterable, Iterator, Sequence + from types import ModuleType + + import pandas as pd + import polars as pl + from typing_extensions import Self, TypeAlias, TypeIs + + from narwhals._arrow.dataframe import ArrowDataFrame + from narwhals._arrow.namespace import ArrowNamespace + from narwhals._arrow.typing import ( # type: ignore[attr-defined] + ArrayAny, + ArrayOrChunkedArray, + ArrayOrScalar, + ChunkedArrayAny, + Incomplete, + NullPlacement, + Order, + ScalarAny, + TieBreaker, + _AsPyType, + _BasicDataType, + ) + from narwhals._compliant.series import HistData + from narwhals._typing import NoDefault + from narwhals._utils import Version, _LimitedContext + from narwhals.dtypes import DType + from narwhals.typing import ( + ClosedInterval, + FillNullStrategy, + Into1DArray, + IntoDType, + ModeKeepStrategy, + NonNestedLiteral, + PythonLiteral, + RankMethod, + RollingInterpolationMethod, + SizedMultiIndexSelector, + _1DArray, + _2DArray, + _SliceIndex, + ) + + ArrowHistData: TypeAlias = ( + "HistData[ChunkedArrayAny, list[ScalarAny] | pa.Int64Array | list[float]]" + ) + + +# TODO @dangotbanned: move into `_arrow.utils` +# Lots of modules are importing inline +@overload +def maybe_extract_py_scalar( + value: pa.Scalar[_BasicDataType[_AsPyType]], + return_py_scalar: bool, # noqa: FBT001 +) -> _AsPyType: ... + + +@overload +def maybe_extract_py_scalar( + value: pa.Scalar[pa.StructType], + return_py_scalar: bool, # noqa: FBT001 +) -> list[dict[str, Any]]: ... + + +@overload +def maybe_extract_py_scalar( + value: pa.Scalar[pa.ListType[_BasicDataType[_AsPyType]]], + return_py_scalar: bool, # noqa: FBT001 +) -> list[_AsPyType]: ... + + +@overload +def maybe_extract_py_scalar( + value: pa.Scalar[Any] | Any, + return_py_scalar: bool, # noqa: FBT001 +) -> Any: ... + + +def maybe_extract_py_scalar(value: Any, return_py_scalar: bool) -> Any: # noqa: FBT001 + if TYPE_CHECKING: + return value.as_py() + if return_py_scalar: + return getattr(value, "as_py", lambda: value)() + return value + + +class ArrowSeries(EagerSeries["ChunkedArrayAny"]): + _implementation = Implementation.PYARROW + + def __init__( + self, native_series: ChunkedArrayAny, *, name: str, version: Version + ) -> None: + self._name = name + self._native_series: ChunkedArrayAny = native_series + self._version = version + self._broadcast = False + + @property + def native(self) -> ChunkedArrayAny: + return self._native_series + + def _with_version(self, version: Version) -> Self: + return self.__class__(self.native, name=self._name, version=version) + + def _with_native( + self, series: ArrayOrScalar, *, preserve_broadcast: bool = False + ) -> Self: + result = self.from_native(chunked_array(series), name=self.name, context=self) + if preserve_broadcast: + result._broadcast = self._broadcast + return result + + def _with_binary(self, op: Callable[..., ArrayOrScalar], other: Any) -> Self: + ser, other_native = extract_native(self, other) + preserve_broadcast = self._broadcast and getattr(other, "_broadcast", True) + return self._with_native( + op(ser, other_native), preserve_broadcast=preserve_broadcast + ).alias(self.name) + + def _with_binary_right(self, op: Callable[..., ArrayOrScalar], other: Any) -> Self: + return self._with_binary(lambda x, y: op(y, x), other).alias(self.name) + + @classmethod + def from_iterable( + cls, + data: Iterable[Any], + *, + context: _LimitedContext, + name: str = "", + dtype: IntoDType | None = None, + ) -> Self: + version = context._version + if dtype is not None: + dtype_pa: pa.DataType | None = narwhals_to_native_dtype(dtype, version) + if is_array_or_scalar(data): + data = data.cast(dtype_pa) + dtype_pa = None + native = data if cls._is_native(data) else chunked_array([data], dtype_pa) + else: + native = chunked_array([data]) + return cls.from_native(native, context=context, name=name) + + def _from_scalar(self, value: Any) -> Self: + if hasattr(value, "as_py"): + value = value.as_py() + return super()._from_scalar(value) + + @staticmethod + def _is_native(obj: ChunkedArrayAny | Any) -> TypeIs[ChunkedArrayAny]: + return isinstance(obj, pa.ChunkedArray) + + @classmethod + def from_native( + cls, data: ChunkedArrayAny, /, *, context: _LimitedContext, name: str = "" + ) -> Self: + return cls(data, version=context._version, name=name) + + @classmethod + def from_numpy(cls, data: Into1DArray, /, *, context: _LimitedContext) -> Self: + return cls.from_iterable( + data if is_numpy_array_1d(data) else [data], context=context + ) + + @classmethod + def _align_full_broadcast(cls, *series: Self) -> Sequence[Self]: + lengths = [len(s) for s in series] + target_length = max( + length for length, s in zip(lengths, series) if not s._broadcast + ) + fast_path = all(_len == target_length for _len in lengths) + if fast_path: + return series + reshaped = [] + for s in series: + if s._broadcast: + compliant = s._with_native(pa.repeat(s.native[0], target_length)) + elif (actual_len := len(s)) != target_length: + msg = f"Expected object of length {target_length}, got {actual_len}." + raise ShapeError(msg) + else: + compliant = s + reshaped.append(compliant) + return reshaped + + def __narwhals_namespace__(self) -> ArrowNamespace: + from narwhals._arrow.namespace import ArrowNamespace + + return ArrowNamespace(version=self._version) + + def __eq__(self, other: object) -> Self: # type: ignore[override] + return self._with_binary(pc.equal, other) + + def __ne__(self, other: object) -> Self: # type: ignore[override] + return self._with_binary(pc.not_equal, other) + + def __ge__(self, other: Any) -> Self: + return self._with_binary(pc.greater_equal, other) + + def __gt__(self, other: Any) -> Self: + return self._with_binary(pc.greater, other) + + def __le__(self, other: Any) -> Self: + return self._with_binary(pc.less_equal, other) + + def __lt__(self, other: Any) -> Self: + return self._with_binary(pc.less, other) + + def __and__(self, other: Any) -> Self: + return self._with_binary(pc.and_kleene, other) + + def __rand__(self, other: Any) -> Self: + return self._with_binary_right(pc.and_kleene, other) + + def __or__(self, other: Any) -> Self: + return self._with_binary_right(pc.or_kleene, other) + + def __ror__(self, other: Any) -> Self: + return self._with_binary_right(pc.or_kleene, other) + + def __add__(self, other: Any) -> Self: + return self._with_binary(pc.add, other) + + def __radd__(self, other: Any) -> Self: + return self._with_binary_right(pc.add, other) + + def __sub__(self, other: Any) -> Self: + return self._with_binary(pc.subtract, other) + + def __rsub__(self, other: Any) -> Self: + return self._with_binary_right(pc.subtract, other) + + def __mul__(self, other: Any) -> Self: + return self._with_binary(pc.multiply, other) + + def __rmul__(self, other: Any) -> Self: + return self._with_binary_right(pc.multiply, other) + + def __pow__(self, other: Any) -> Self: + return self._with_binary(pc.power, other) + + def __rpow__(self, other: Any) -> Self: + return self._with_binary_right(pc.power, other) + + def __floordiv__(self, other: Any) -> Self: + return self._with_binary(floordiv_compat, other) + + def __rfloordiv__(self, other: Any) -> Self: + return self._with_binary_right(floordiv_compat, other) + + def __truediv__(self, other: Any) -> Self: + return self._with_binary(lambda x, y: pc.divide(*cast_for_truediv(x, y)), other) + + def __rtruediv__(self, other: Any) -> Self: + return self._with_binary_right( + lambda x, y: pc.divide(*cast_for_truediv(x, y)), other + ) + + def __mod__(self, other: Any) -> Self: + preserve_broadcast = self._broadcast and getattr(other, "_broadcast", True) + floor_div = (self // other).native + ser, other = extract_native(self, other) + res = pc.subtract(ser, pc.multiply(floor_div, other)) + return self._with_native(res, preserve_broadcast=preserve_broadcast) + + def __rmod__(self, other: Any) -> Self: + preserve_broadcast = self._broadcast and getattr(other, "_broadcast", True) + floor_div = (other // self).native + ser, other = extract_native(self, other) + res = pc.subtract(other, pc.multiply(floor_div, ser)) + return self._with_native(res, preserve_broadcast=preserve_broadcast) + + def __invert__(self) -> Self: + return self._with_native(pc.invert(self.native), preserve_broadcast=True) + + @property + def _type(self) -> pa.DataType: + return self.native.type + + def len(self, *, _return_py_scalar: bool = True) -> int: + return maybe_extract_py_scalar(len(self.native), _return_py_scalar) + + def filter(self, predicate: ArrowSeries | list[bool | None]) -> Self: + other_native: Any + if not is_list_of(predicate, bool): + _, other_native = extract_native(self, predicate) + else: + other_native = predicate + return self._with_native(self.native.filter(other_native)) + + def first(self, *, _return_py_scalar: bool = True) -> PythonLiteral: + result = self.native[0] if len(self.native) else None + return maybe_extract_py_scalar(result, _return_py_scalar) + + def last(self, *, _return_py_scalar: bool = True) -> PythonLiteral: + ca = self.native + result = ca[height - 1] if (height := len(ca)) else None + return maybe_extract_py_scalar(result, _return_py_scalar) + + def mean(self, *, _return_py_scalar: bool = True) -> float: + return maybe_extract_py_scalar(pc.mean(self.native), _return_py_scalar) + + def median(self, *, _return_py_scalar: bool = True) -> float: + if not self.dtype.is_numeric(): + msg = "`median` operation not supported for non-numeric input type." + raise InvalidOperationError(msg) + + return maybe_extract_py_scalar( + pc.approximate_median(self.native), _return_py_scalar + ) + + def min(self, *, _return_py_scalar: bool = True) -> Any: + return maybe_extract_py_scalar(pc.min(self.native), _return_py_scalar) + + def max(self, *, _return_py_scalar: bool = True) -> Any: + return maybe_extract_py_scalar(pc.max(self.native), _return_py_scalar) + + def arg_min(self, *, _return_py_scalar: bool = True) -> int: + index_min = pc.index(self.native, pc.min(self.native)) + return maybe_extract_py_scalar(index_min, _return_py_scalar) + + def arg_max(self, *, _return_py_scalar: bool = True) -> int: + index_max = pc.index(self.native, pc.max(self.native)) + return maybe_extract_py_scalar(index_max, _return_py_scalar) + + def sum(self, *, _return_py_scalar: bool = True) -> float: + return maybe_extract_py_scalar( + pc.sum(self.native, min_count=0), _return_py_scalar + ) + + def drop_nulls(self) -> Self: + return self._with_native(self.native.drop_null()) + + def shift(self, n: int) -> Self: + if n > 0: + arrays = [nulls_like(n, self), *self.native[:-n].chunks] + elif n < 0: + arrays = [*self.native[-n:].chunks, nulls_like(-n, self)] + else: + return self._with_native(self.native) + return self._with_native(pa.concat_arrays(arrays)) + + def std(self, *, ddof: int, _return_py_scalar: bool = True) -> float: + return maybe_extract_py_scalar( + pc.stddev(self.native, ddof=ddof), _return_py_scalar + ) + + def var(self, *, ddof: int, _return_py_scalar: bool = True) -> float: + return maybe_extract_py_scalar( + pc.variance(self.native, ddof=ddof), _return_py_scalar + ) + + def skew(self, *, _return_py_scalar: bool = True) -> float | None: + ser_not_null = self.native.drop_null() + if len(ser_not_null) == 0: + return None + if len(ser_not_null) == 1: + return float("nan") + if len(ser_not_null) == 2: + return 0.0 + m = pc.subtract(ser_not_null, pc.mean(ser_not_null)) + m2 = pc.mean(pc.power(m, lit(2))) + m3 = pc.mean(pc.power(m, lit(3))) + biased_population_skewness = pc.divide(m3, pc.power(m2, lit(1.5))) + return maybe_extract_py_scalar(biased_population_skewness, _return_py_scalar) + + def kurtosis(self, *, _return_py_scalar: bool = True) -> float | None: + ser_not_null = self.native.drop_null() + if len(ser_not_null) == 0: + return None + if len(ser_not_null) == 1: + return float("nan") + m = pc.subtract(ser_not_null, pc.mean(ser_not_null)) + m2 = pc.mean(pc.power(m, lit(2))) + m4 = pc.mean(pc.power(m, lit(4))) + k = pc.subtract(pc.divide(m4, pc.power(m2, lit(2))), lit(3)) + return maybe_extract_py_scalar(k, _return_py_scalar) + + def count(self, *, _return_py_scalar: bool = True) -> int: + return maybe_extract_py_scalar(pc.count(self.native), _return_py_scalar) + + def n_unique(self, *, _return_py_scalar: bool = True) -> int: + return maybe_extract_py_scalar( + pc.count(self.native.unique(), mode="all"), _return_py_scalar + ) + + def __native_namespace__(self) -> ModuleType: + if self._implementation is Implementation.PYARROW: + return self._implementation.to_native_namespace() + + msg = f"Expected pyarrow, got: {type(self._implementation)}" # pragma: no cover + raise AssertionError(msg) + + @property + def name(self) -> str: + return self._name + + def _gather(self, rows: SizedMultiIndexSelector[ChunkedArrayAny]) -> Self: + if len(rows) == 0: + return self._with_native(self.native.slice(0, 0)) + if self._backend_version < (18,) and isinstance(rows, tuple): + rows = list(rows) + return self._with_native(self.native.take(rows)) + + def _gather_slice(self, rows: _SliceIndex | range) -> Self: + start = rows.start or 0 + stop = rows.stop if rows.stop is not None else len(self.native) + if start < 0: + start = len(self.native) + start + if stop < 0: + stop = len(self.native) + stop + if rows.step is not None and rows.step != 1: + msg = "Slicing with step is not supported on PyArrow tables" + raise NotImplementedError(msg) + return self._with_native(self.native.slice(start, stop - start)) + + def scatter(self, indices: Self, values: Self) -> Self: + mask = pc.is_in(arange(start=0, end=len(self), step=1), indices.native) + sorted_indices = pc.sort_indices(indices.native) + replacements = values.native.take(sorted_indices).combine_chunks() + return self._with_native(pc.replace_with_mask(self.native, mask, replacements)) + + def to_list(self) -> list[Any]: + return self.native.to_pylist() + + def __array__(self, dtype: Any = None, *, copy: bool | None = None) -> _1DArray: + return self.native.__array__(dtype=dtype, copy=copy) + + def to_numpy(self, dtype: Any = None, *, copy: bool | None = None) -> _1DArray: + return self.native.to_numpy() + + def alias(self, name: str) -> Self: + ret = self.__class__(self.native, name=name, version=self._version) + ret._broadcast = self._broadcast + return ret + + @property + def dtype(self) -> DType: + return native_to_narwhals_dtype(self.native.type, self._version) + + def abs(self) -> Self: + return self._with_native(pc.abs(self.native)) + + def cum_sum(self, *, reverse: bool) -> Self: + cum_sum = pc.cumulative_sum + result = ( + cum_sum(self.native, skip_nulls=True) + if not reverse + else cum_sum(self.native[::-1], skip_nulls=True)[::-1] + ) + return self._with_native(result) + + def round(self, decimals: int) -> Self: + return self._with_native( + pc.round(self.native, decimals, round_mode="half_towards_infinity") + ) + + def floor(self) -> Self: + return self._with_native(pc.floor(self.native)) + + def ceil(self) -> Self: + return self._with_native(pc.ceil(self.native)) + + def diff(self) -> Self: + return self._with_native(pc.pairwise_diff(self.native.combine_chunks())) + + def any(self, *, _return_py_scalar: bool = True) -> bool: + return maybe_extract_py_scalar( + pc.any(self.native, min_count=0), _return_py_scalar + ) + + def all(self, *, _return_py_scalar: bool = True) -> bool: + return maybe_extract_py_scalar( + pc.all(self.native, min_count=0), _return_py_scalar + ) + + def is_between( + self, lower_bound: Any, upper_bound: Any, closed: ClosedInterval + ) -> Self: + _, lower_bound = extract_native(self, lower_bound) + _, upper_bound = extract_native(self, upper_bound) + if closed == "left": + ge = pc.greater_equal(self.native, lower_bound) + lt = pc.less(self.native, upper_bound) + res = pc.and_kleene(ge, lt) + elif closed == "right": + gt = pc.greater(self.native, lower_bound) + le = pc.less_equal(self.native, upper_bound) + res = pc.and_kleene(gt, le) + elif closed == "none": + gt = pc.greater(self.native, lower_bound) + lt = pc.less(self.native, upper_bound) + res = pc.and_kleene(gt, lt) + elif closed == "both": + ge = pc.greater_equal(self.native, lower_bound) + le = pc.less_equal(self.native, upper_bound) + res = pc.and_kleene(ge, le) + else: + assert_never(closed) + return self._with_native(res) + + def is_null(self) -> Self: + return self._with_native(self.native.is_null(), preserve_broadcast=True) + + def is_nan(self) -> Self: + return self._with_native(pc.is_nan(self.native), preserve_broadcast=True) + + def cast(self, dtype: IntoDType) -> Self: + data_type = narwhals_to_native_dtype(dtype, self._version) + return self._with_native(pc.cast(self.native, data_type), preserve_broadcast=True) + + def null_count(self, *, _return_py_scalar: bool = True) -> int: + return maybe_extract_py_scalar(self.native.null_count, _return_py_scalar) + + def head(self, n: int) -> Self: + if n >= 0: + return self._with_native(self.native.slice(0, n)) + num_rows = len(self) + return self._with_native(self.native.slice(0, max(0, num_rows + n))) + + def tail(self, n: int) -> Self: + if n >= 0: + num_rows = len(self) + return self._with_native(self.native.slice(max(0, num_rows - n))) + return self._with_native(self.native.slice(abs(n))) + + def is_in(self, other: Any) -> Self: + if self._is_native(other): + value_set: ArrayOrChunkedArray = other + else: + value_set = pa.array(other) + return self._with_native(pc.is_in(self.native, value_set=value_set)) + + def arg_true(self) -> Self: + import numpy as np # ignore-banned-import + + res = np.flatnonzero(self.native) + return self.from_iterable(res, name=self.name, context=self) + + def item(self, index: int | None = None) -> Any: + if index is None: + if len(self) != 1: + msg = ( + "can only call '.item()' if the Series is of length 1," + f" or an explicit index is provided (Series is of length {len(self)})" + ) + raise ValueError(msg) + return maybe_extract_py_scalar(self.native[0], return_py_scalar=True) + return maybe_extract_py_scalar(self.native[index], return_py_scalar=True) + + def value_counts( + self, *, sort: bool, parallel: bool, name: str | None, normalize: bool + ) -> ArrowDataFrame: + """Parallel is unused, exists for compatibility.""" + from narwhals._arrow.dataframe import ArrowDataFrame + + index_name_ = "index" if self._name is None else self._name + value_name_ = name or ("proportion" if normalize else "count") + + val_counts = pc.value_counts(self.native) + values = val_counts.field("values") + counts = cast("ChunkedArrayAny", val_counts.field("counts")) + + if normalize: + arrays = [values, pc.divide(*cast_for_truediv(counts, pc.sum(counts)))] + else: + arrays = [values, counts] + + val_count = pa.Table.from_arrays(arrays, names=[index_name_, value_name_]) + + if sort: + val_count = val_count.sort_by([(value_name_, "descending")]) + + return ArrowDataFrame( + val_count, version=self._version, validate_column_names=True + ) + + def zip_with(self, mask: Self, other: Self) -> Self: + cond = mask.native.combine_chunks() + return self._with_native(pc.if_else(cond, self.native, other.native)) + + def sample( + self, + n: int | None, + *, + fraction: float | None, + with_replacement: bool, + seed: int | None, + ) -> Self: + import numpy as np # ignore-banned-import + + num_rows = len(self) + if n is None and fraction is not None: + n = int(num_rows * fraction) + + rng = np.random.default_rng(seed=seed) + idx = np.arange(num_rows) + mask = rng.choice(idx, size=n, replace=with_replacement) + return self._with_native(self.native.take(mask)) + + def fill_nan(self, value: float | None) -> Self: + result = pc.if_else(pc.is_nan(self.native), value, self.native) + return self._with_native(result, preserve_broadcast=True) + + def fill_null( + self, + value: Self | NonNestedLiteral, + strategy: FillNullStrategy | None, + limit: int | None, + ) -> Self: + def fill_null_forward_limit(arr: ChunkedArrayAny, limit: int) -> ArrayAny: + # this algorithm first finds the indices of the valid values to fill all the null value positions + # then it calculates the distance of each new index and the original index + # if the distance is equal to or less than the limit and the original value is null, it is replaced + sentinel = lit(-1) + is_not_null = pc.is_valid(arr) + index = arange(0, len(arr), 1) + index_not_null = pc.cumulative_max(pc.if_else(is_not_null, index, sentinel)) + # NOTE: The correction here is for nulls at either end of the array + # They should be preserved when the `strategy` would need an out-of-bounds index + not_oob = pc.not_equal(index_not_null, sentinel) + index_not_null = pc.if_else(not_oob, index_not_null, None) + beyond_limit = pc.greater(pc.subtract(index, index_not_null), lit(limit)) + return pc.if_else( + pc.or_(is_not_null, beyond_limit), arr, arr.take(index_not_null) + ) + + native = self.native + if value is not None: + _, native_value = extract_native(self, value) + series: ArrayOrScalar = pc.fill_null(native, native_value) + elif limit is None: + series = ( + pc.fill_null_forward(native) + if strategy == "forward" + else pc.fill_null_backward(native) + ) + else: + series = ( + fill_null_forward_limit(native, limit) + if strategy == "forward" + else fill_null_forward_limit(native[::-1], limit)[::-1] + ) + return self._with_native(series, preserve_broadcast=True) + + def to_frame(self) -> ArrowDataFrame: + from narwhals._arrow.dataframe import ArrowDataFrame + + df = pa.Table.from_arrays([self.native], names=[self.name]) + return ArrowDataFrame(df, version=self._version, validate_column_names=False) + + def to_pandas(self) -> pd.Series[Any]: + import pandas as pd # ignore-banned-import() + + return pd.Series(self.native, name=self.name) + + def to_polars(self) -> pl.Series: + import polars as pl # ignore-banned-import + + return cast("pl.Series", pl.from_arrow(self.native)) + + def is_unique(self) -> ArrowSeries: + return self.to_frame().is_unique().alias(self.name) + + def is_first_distinct(self) -> Self: + import numpy as np # ignore-banned-import + + row_number = pa.array(np.arange(len(self))) + col_token = generate_temporary_column_name(n_bytes=8, columns=[self.name]) + first_distinct_index = ( + pa.Table.from_arrays([self.native], names=[self.name]) + .append_column(col_token, row_number) + .group_by(self.name) + .aggregate([(col_token, "min")]) + .column(f"{col_token}_min") + ) + + return self._with_native(pc.is_in(row_number, first_distinct_index)) + + def is_last_distinct(self) -> Self: + import numpy as np # ignore-banned-import + + row_number = pa.array(np.arange(len(self))) + col_token = generate_temporary_column_name(n_bytes=8, columns=[self.name]) + last_distinct_index = ( + pa.Table.from_arrays([self.native], names=[self.name]) + .append_column(col_token, row_number) + .group_by(self.name) + .aggregate([(col_token, "max")]) + .column(f"{col_token}_max") + ) + + return self._with_native(pc.is_in(row_number, last_distinct_index)) + + def is_sorted(self, *, descending: bool) -> bool: + if not isinstance(descending, bool): + msg = f"argument 'descending' should be boolean, found {type(descending)}" + raise TypeError(msg) + if descending: + result = pc.all(pc.greater_equal(self.native[:-1], self.native[1:])) + else: + result = pc.all(pc.less_equal(self.native[:-1], self.native[1:])) + return maybe_extract_py_scalar(result, return_py_scalar=True) + + def unique(self, *, maintain_order: bool = True) -> Self: + # TODO(marco): `pc.unique` seems to always maintain order, is that guaranteed? + return self._with_native(self.native.unique()) + + def replace_strict( + self, + default: Any | NoDefault, + old: Sequence[Any], + new: Sequence[Any], + *, + return_dtype: IntoDType | None, + ) -> Self: + # https://stackoverflow.com/a/79111029/4451315 + idxs = pc.index_in(self.native, pa.array(old)) + # Tracks which values were found in the mapping (even if mapped to None) + was_matched = pc.is_valid(idxs) + result_native = pc.take(pa.array(new), idxs) + if return_dtype is not None: + result_native = result_native.cast( + narwhals_to_native_dtype(return_dtype, self._version) + ) + result = self._with_native(result_native) + if default is no_default: + # Check that all non-null input values were matched + # (result may have more nulls if mapping contains {value: None}) + unmatched_mask = pc.and_(pc.is_valid(self.native), pc.invert(was_matched)) + if maybe_extract_py_scalar( + pc.any(unmatched_mask, min_count=0), return_py_scalar=True + ): + unmatched_values = ( + self.filter(self._with_native(unmatched_mask)) + .unique(maintain_order=False) + .to_list() + ) + msg = ( + "replace_strict did not replace all non-null values.\n\n" + f"The following did not get replaced: {unmatched_values}" + ) + raise InvalidOperationError(msg) + else: + result_native, default = extract_native(result, default) + # Only fill with default where the value wasn't matched (not where result is null due to mapping) + # If was_matched, keep result.native; otherwise use default + result = self._with_native(pc.if_else(was_matched, result.native, default)) + return result + + def sort(self, *, descending: bool, nulls_last: bool) -> Self: + order: Order = "descending" if descending else "ascending" + null_placement: NullPlacement = "at_end" if nulls_last else "at_start" + sorted_indices = pc.array_sort_indices( + self.native, order=order, null_placement=null_placement + ) + return self._with_native(self.native.take(sorted_indices)) + + def to_dummies(self, *, separator: str, drop_first: bool) -> ArrowDataFrame: + import numpy as np # ignore-banned-import + + from narwhals._arrow.dataframe import ArrowDataFrame + + name = self._name + # NOTE: stub is missing attributes (https://arrow.apache.org/docs/python/generated/pyarrow.DictionaryArray.html) + da: Incomplete = self.native.combine_chunks().dictionary_encode("encode") + + columns: _2DArray = np.zeros((len(da.dictionary), len(da)), np.int8) + columns[da.indices, np.arange(len(da))] = 1 + null_col_pa, null_col_pl = f"{name}{separator}None", f"{name}{separator}null" + cols = [ + {null_col_pa: null_col_pl}.get( + f"{name}{separator}{v}", f"{name}{separator}{v}" + ) + for v in da.dictionary + ] + + output_order = ( + [ + null_col_pl, + *sorted([c for c in cols if c != null_col_pl])[int(drop_first) :], + ] + if null_col_pl in cols + else sorted(cols)[int(drop_first) :] + ) + return ArrowDataFrame( + pa.Table.from_arrays(columns, names=cols), + version=self._version, + validate_column_names=True, + ).simple_select(*output_order) + + def quantile( + self, + quantile: float, + interpolation: RollingInterpolationMethod, + *, + _return_py_scalar: bool = True, + ) -> float: + return maybe_extract_py_scalar( + pc.quantile(self.native, q=quantile, interpolation=interpolation)[0], + _return_py_scalar, + ) + + def gather_every(self, n: int, offset: int = 0) -> Self: + return self._with_native(self.native[offset::n]) + + def clip(self, lower_bound: Self, upper_bound: Self) -> Self: + _, lower = extract_native(self, lower_bound) + _, upper = extract_native(self, upper_bound) + return self._with_native( + pc.max_element_wise(pc.min_element_wise(self.native, upper), lower) + ) + + def clip_lower(self, lower_bound: Self) -> Self: + _, lower = extract_native(self, lower_bound) + return self._with_native(pc.max_element_wise(self.native, lower)) + + def clip_upper(self, upper_bound: Self) -> Self: + _, upper = extract_native(self, upper_bound) + return self._with_native(pc.min_element_wise(self.native, upper)) + + def to_arrow(self) -> ArrayAny: + return self.native.combine_chunks() + + def mode(self, *, keep: ModeKeepStrategy) -> ArrowSeries: + plx = self.__narwhals_namespace__() + col_token = generate_temporary_column_name(n_bytes=8, columns=[self.name]) + counts = self.value_counts( + name=col_token, normalize=False, sort=False, parallel=False + ) + result = counts.filter( + plx.col(col_token) == plx.col(col_token).max().broadcast() + ).get_column(self.name) + return result.head(1) if keep == "any" else result + + def is_finite(self) -> Self: + return self._with_native(pc.is_finite(self.native)) + + def cum_count(self, *, reverse: bool) -> Self: + dtypes = self._version.dtypes + return (~self.is_null()).cast(dtypes.UInt32()).cum_sum(reverse=reverse) + + def cum_min(self, *, reverse: bool) -> Self: + result = ( + pc.cumulative_min(self.native, skip_nulls=True) + if not reverse + else pc.cumulative_min(self.native[::-1], skip_nulls=True)[::-1] + ) + return self._with_native(result) + + def cum_max(self, *, reverse: bool) -> Self: + result = ( + pc.cumulative_max(self.native, skip_nulls=True) + if not reverse + else pc.cumulative_max(self.native[::-1], skip_nulls=True)[::-1] + ) + return self._with_native(result) + + def cum_prod(self, *, reverse: bool) -> Self: + result = ( + pc.cumulative_prod(self.native, skip_nulls=True) + if not reverse + else pc.cumulative_prod(self.native[::-1], skip_nulls=True)[::-1] + ) + return self._with_native(result) + + def rolling_sum(self, window_size: int, *, min_samples: int, center: bool) -> Self: + min_samples = min_samples if min_samples is not None else window_size + padded_series, offset = pad_series(self, window_size=window_size, center=center) + + cum_sum = padded_series.cum_sum(reverse=False).fill_null( + value=None, strategy="forward", limit=None + ) + rolling_sum = ( + cum_sum + - cum_sum.shift(window_size).fill_null(value=0, strategy=None, limit=None) + if window_size != 0 + else cum_sum + ) + + valid_count = padded_series.cum_count(reverse=False) + count_in_window = valid_count - valid_count.shift(window_size).fill_null( + value=0, strategy=None, limit=None + ) + + result = self._with_native( + pc.if_else((count_in_window >= min_samples).native, rolling_sum.native, None) + ) + return result._gather_slice(slice(offset, None)) + + def rolling_mean(self, window_size: int, *, min_samples: int, center: bool) -> Self: + min_samples = min_samples if min_samples is not None else window_size + padded_series, offset = pad_series(self, window_size=window_size, center=center) + + cum_sum = padded_series.cum_sum(reverse=False).fill_null( + value=None, strategy="forward", limit=None + ) + rolling_sum = ( + cum_sum + - cum_sum.shift(window_size).fill_null(value=0, strategy=None, limit=None) + if window_size != 0 + else cum_sum + ) + + valid_count = padded_series.cum_count(reverse=False) + count_in_window = valid_count - valid_count.shift(window_size).fill_null( + value=0, strategy=None, limit=None + ) + + result = ( + self._with_native( + pc.if_else( + (count_in_window >= min_samples).native, rolling_sum.native, None + ) + ) + / count_in_window + ) + return result._gather_slice(slice(offset, None)) + + def rolling_var( + self, window_size: int, *, min_samples: int, center: bool, ddof: int + ) -> Self: + min_samples = min_samples if min_samples is not None else window_size + padded_series, offset = pad_series(self, window_size=window_size, center=center) + + cum_sum = padded_series.cum_sum(reverse=False).fill_null( + value=None, strategy="forward", limit=None + ) + rolling_sum = ( + cum_sum + - cum_sum.shift(window_size).fill_null(value=0, strategy=None, limit=None) + if window_size != 0 + else cum_sum + ) + + cum_sum_sq = ( + pow(padded_series, 2) + .cum_sum(reverse=False) + .fill_null(value=None, strategy="forward", limit=None) + ) + rolling_sum_sq = ( + cum_sum_sq + - cum_sum_sq.shift(window_size).fill_null(value=0, strategy=None, limit=None) + if window_size != 0 + else cum_sum_sq + ) + + valid_count = padded_series.cum_count(reverse=False) + count_in_window = valid_count - valid_count.shift(window_size).fill_null( + value=0, strategy=None, limit=None + ) + + result = self._with_native( + pc.if_else( + (count_in_window >= min_samples).native, + (rolling_sum_sq - (rolling_sum**2 / count_in_window)).native, + None, + ) + ) / self._with_native(pc.max_element_wise((count_in_window - ddof).native, 0)) + + return result._gather_slice(slice(offset, None, None)) + + def rolling_std( + self, window_size: int, *, min_samples: int, center: bool, ddof: int + ) -> Self: + return ( + self.rolling_var( + window_size=window_size, min_samples=min_samples, center=center, ddof=ddof + ) + ** 0.5 + ) + + def rank(self, method: RankMethod, *, descending: bool) -> Self: + if method == "average": + msg = ( + "`rank` with `method='average' is not supported for pyarrow backend. " + "The available methods are {'min', 'max', 'dense', 'ordinal'}." + ) + raise ValueError(msg) + + sort_keys: Order = "descending" if descending else "ascending" + tiebreaker: TieBreaker = "first" if method == "ordinal" else method + + native_series: ArrayOrChunkedArray + if self._backend_version < (14, 0, 0): # pragma: no cover + native_series = self.native.combine_chunks() + else: + native_series = self.native + + null_mask = pc.is_null(native_series) + + rank = pc.rank(native_series, sort_keys=sort_keys, tiebreaker=tiebreaker) + + result = pc.if_else(null_mask, lit(None, rank.type), rank) + return self._with_native(result) + + def hist_from_bins( + self, bins: list[float], *, include_breakpoint: bool + ) -> ArrowDataFrame: + return ( + _ArrowHist.from_series(self, include_breakpoint=include_breakpoint) + .with_bins(bins) + .to_frame() + ) + + def hist_from_bin_count( + self, bin_count: int, *, include_breakpoint: bool + ) -> ArrowDataFrame: + return ( + _ArrowHist.from_series(self, include_breakpoint=include_breakpoint) + .with_bin_count(bin_count) + .to_frame() + ) + + def __iter__(self) -> Iterator[Any]: + for x in self.native: + yield maybe_extract_py_scalar(x, return_py_scalar=True) + + def __contains__(self, other: Any) -> bool: + from pyarrow import ( + ArrowInvalid, # ignore-banned-imports + ArrowNotImplementedError, # ignore-banned-imports + ArrowTypeError, # ignore-banned-imports + ) + + try: + other_ = lit(other) if other is not None else lit(None, type=self._type) + return maybe_extract_py_scalar( + pc.is_in(other_, self.native), return_py_scalar=True + ) + except (ArrowInvalid, ArrowNotImplementedError, ArrowTypeError) as exc: + msg = f"Unable to compare other of type {type(other)} with series of type {self.dtype}." + raise InvalidOperationError(msg) from exc + + def log(self, base: float) -> Self: + return self._with_native(pc.logb(self.native, lit(base))) + + def exp(self) -> Self: + return self._with_native(pc.exp(self.native)) + + def sqrt(self) -> Self: + return self._with_native(pc.sqrt(self.native)) + + def sin(self) -> Self: + return self._with_native(pc.sin(self.native)) + + def cos(self) -> Self: + return self._with_native(pc.cos(self.native)) + + def any_value( + self, *, ignore_nulls: bool, _return_py_scalar: bool = True + ) -> PythonLiteral: + return self.drop_nulls().first() if ignore_nulls else self.first() + + @property + def dt(self) -> ArrowSeriesDateTimeNamespace: + return ArrowSeriesDateTimeNamespace(self) + + @property + def cat(self) -> ArrowSeriesCatNamespace: + return ArrowSeriesCatNamespace(self) + + @property + def str(self) -> ArrowSeriesStringNamespace: + return ArrowSeriesStringNamespace(self) + + @property + def list(self) -> ArrowSeriesListNamespace: + return ArrowSeriesListNamespace(self) + + @property + def struct(self) -> ArrowSeriesStructNamespace: + return ArrowSeriesStructNamespace(self) + + ewm_mean = not_implemented() + + +class _ArrowHist( + EagerSeriesHist["ChunkedArrayAny", "list[ScalarAny] | pa.Int64Array | list[float]"] +): + _series: ArrowSeries + + def to_frame(self) -> ArrowDataFrame: + # NOTE: Constructor typing is too strict for `TypedDict` + table: Incomplete = pa.Table.from_pydict + from_native = self._series.__narwhals_namespace__()._dataframe.from_native + return from_native(table(self._data), context=self._series) + + # NOTE: *Could* be handled at narwhals-level + def is_empty_series(self) -> bool: + # NOTE: `ChunkedArray.combine_chunks` returns the concrete array type + # Stubs say `Array[pa.BooleanScalar]`, which is missing properties + # https://github.com/zen-xu/pyarrow-stubs/blob/6bedee748bc74feb8513b24bf43d64b24c7fddc8/pyarrow-stubs/__lib_pxi/array.pyi#L2395-L2399 + is_null = self.native.is_null(nan_is_null=True) + arr = cast("pa.BooleanArray", is_null.combine_chunks()) + return arr.false_count == 0 + + # NOTE: *Could* be handled at narwhals-level, **iff** we add `nw.repeat`, `nw.linear_space` + # See https://github.com/narwhals-dev/narwhals/pull/2839#discussion_r2215630696 + def series_empty(self, arg: int | list[float], /) -> ArrowHistData: + count = self._zeros(arg) + if self._breakpoint: + return {"breakpoint": self._calculate_breakpoint(arg), "count": count} + return {"count": count} + + def _zeros(self, arg: int | list[float], /) -> pa.Int64Array: + return zeros(arg) if isinstance(arg, int) else zeros(len(arg) - 1) + + def _linear_space( + self, + start: float, + end: float, + num_samples: int, + *, + closed: Literal["both", "none"] = "both", + ) -> _1DArray: + from numpy import linspace # ignore-banned-import + + return linspace(start=start, stop=end, num=num_samples, endpoint=closed == "both") + + def _calculate_bins(self, bin_count: int) -> _1DArray: + """Prepare bins for histogram calculation from bin_count.""" + d = pc.min_max(self.native) + lower, upper = d["min"].as_py(), d["max"].as_py() + if lower == upper: + lower -= 0.5 + upper += 0.5 + return self._linear_space(lower, upper, bin_count + 1) + + def _calculate_hist(self, bins: list[float] | _1DArray) -> ArrowHistData: + ser = self.native + # NOTE: `mypy` refuses to resolve `ndarray.__getitem__` + # Previously annotated as `list[float]`, but + # - wasn't accurate to how we implemented it + # - `pa.scalar` overloads fail to match on `float | np.float64` (but runtime is fine) + bins = cast("list[float]", bins) + # Handle single bin case + if len(bins) == 2: + is_between_bins = pc.and_( + pc.greater_equal(ser, lit(bins[0])), pc.less_equal(ser, lit(bins[1])) + ) + count = pc.sum(is_between_bins.cast(pa.uint8())) + if self._breakpoint: + return {"breakpoint": [bins[-1]], "count": [count]} + return {"count": [count]} + + # Handle multiple bins + import numpy as np # ignore-banned-import + + bin_indices = np.searchsorted(bins, ser, side="left") + # lowest bin is inclusive + bin_indices = pc.if_else(pc.equal(ser, lit(bins[0])), 1, bin_indices) + + # Align unique categories and counts appropriately + obs_cats, obs_counts = np.unique(bin_indices, return_counts=True) + obj_cats = np.arange(1, len(bins)) + counts = np.zeros_like(obj_cats) + counts[np.isin(obj_cats, obs_cats)] = obs_counts[np.isin(obs_cats, obj_cats)] + + if self._breakpoint: + return {"breakpoint": bins[1:], "count": counts} + return {"count": counts} diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_cat.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_cat.py new file mode 100644 index 0000000000000000000000000000000000000000..23a08bf483dec071f602928f5f81fb9e4a23b929 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_cat.py @@ -0,0 +1,19 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +import pyarrow as pa + +from narwhals._arrow.utils import ArrowSeriesNamespace +from narwhals._compliant.any_namespace import CatNamespace + +if TYPE_CHECKING: + from narwhals._arrow.series import ArrowSeries + from narwhals._arrow.typing import Incomplete + + +class ArrowSeriesCatNamespace(ArrowSeriesNamespace, CatNamespace["ArrowSeries"]): + def get_categories(self) -> ArrowSeries: + # NOTE: Should be `list[pa.DictionaryArray]`, but `DictionaryArray` has no attributes + chunks: Incomplete = self.native.chunks + return self.with_native(pa.concat_arrays(x.dictionary for x in chunks).unique()) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_dt.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_dt.py new file mode 100644 index 0000000000000000000000000000000000000000..6f29767f14874f572a900da8e63477c004f48eb8 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_dt.py @@ -0,0 +1,229 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING, Any, Callable, ClassVar, cast + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.utils import UNITS_DICT, ArrowSeriesNamespace, floordiv_compat, lit +from narwhals._compliant.any_namespace import DateTimeNamespace +from narwhals._constants import ( + MS_PER_MINUTE, + MS_PER_SECOND, + NS_PER_MICROSECOND, + NS_PER_MILLISECOND, + NS_PER_MINUTE, + NS_PER_SECOND, + SECONDS_PER_DAY, + SECONDS_PER_MINUTE, + US_PER_MINUTE, + US_PER_SECOND, +) +from narwhals._duration import Interval + +if TYPE_CHECKING: + from collections.abc import Mapping + + from typing_extensions import TypeAlias + + from narwhals._arrow.series import ArrowSeries + from narwhals._arrow.typing import ChunkedArrayAny, ScalarAny + from narwhals.dtypes import Datetime + from narwhals.typing import TimeUnit + + UnitCurrent: TypeAlias = TimeUnit + UnitTarget: TypeAlias = TimeUnit + BinOpBroadcast: TypeAlias = Callable[[ChunkedArrayAny, ScalarAny], ChunkedArrayAny] + IntoRhs: TypeAlias = int + + +class ArrowSeriesDateTimeNamespace( + ArrowSeriesNamespace, DateTimeNamespace["ArrowSeries"] +): + _TIMESTAMP_DATE_FACTOR: ClassVar[Mapping[TimeUnit, int]] = { + "ns": NS_PER_SECOND, + "us": US_PER_SECOND, + "ms": MS_PER_SECOND, + "s": 1, + } + _TIMESTAMP_DATETIME_OP_FACTOR: ClassVar[ + Mapping[tuple[UnitCurrent, UnitTarget], tuple[BinOpBroadcast, IntoRhs]] + ] = { + ("ns", "us"): (floordiv_compat, 1_000), + ("ns", "ms"): (floordiv_compat, 1_000_000), + ("us", "ns"): (pc.multiply, NS_PER_MICROSECOND), + ("us", "ms"): (floordiv_compat, 1_000), + ("ms", "ns"): (pc.multiply, NS_PER_MILLISECOND), + ("ms", "us"): (pc.multiply, 1_000), + ("s", "ns"): (pc.multiply, NS_PER_SECOND), + ("s", "us"): (pc.multiply, US_PER_SECOND), + ("s", "ms"): (pc.multiply, MS_PER_SECOND), + } + + @property + def unit(self) -> TimeUnit: # NOTE: Unsafe (native). + return cast("pa.TimestampType[TimeUnit, Any]", self.native.type).unit + + @property + def time_zone(self) -> str | None: # NOTE: Unsafe (narwhals). + return cast("Datetime", self.compliant.dtype).time_zone + + def to_string(self, format: str) -> ArrowSeries: + # PyArrow differs from other libraries in that %S also prints out + # the fractional part of the second...:'( + # https://arrow.apache.org/docs/python/generated/pyarrow.compute.strftime.html + format = format.replace("%S.%f", "%S").replace("%S%.f", "%S") + return self.with_native(pc.strftime(self.native, format)) + + def replace_time_zone(self, time_zone: str | None) -> ArrowSeries: + if time_zone is not None: + result = pc.assume_timezone(pc.local_timestamp(self.native), time_zone) + else: + result = pc.local_timestamp(self.native) + return self.with_native(result) + + def convert_time_zone(self, time_zone: str) -> ArrowSeries: + ser = self.replace_time_zone("UTC") if self.time_zone is None else self.compliant + return self.with_native(ser.native.cast(pa.timestamp(self.unit, time_zone))) + + def timestamp(self, time_unit: TimeUnit) -> ArrowSeries: + ser = self.compliant + dtypes = ser._version.dtypes + if isinstance(ser.dtype, dtypes.Datetime): + current = ser.dtype.time_unit + s_cast = self.native.cast(pa.int64()) + if current == time_unit: + result = s_cast + elif item := self._TIMESTAMP_DATETIME_OP_FACTOR.get((current, time_unit)): + fn, factor = item + result = fn(s_cast, lit(factor)) + else: # pragma: no cover + msg = f"unexpected time unit {current}, please report an issue at https://github.com/narwhals-dev/narwhals" + raise AssertionError(msg) + return self.with_native(result) + if isinstance(ser.dtype, dtypes.Date): + time_s = pc.multiply(self.native.cast(pa.int32()), lit(SECONDS_PER_DAY)) + factor = self._TIMESTAMP_DATE_FACTOR[time_unit] + return self.with_native(pc.multiply(time_s, lit(factor))) + msg = "Input should be either of Date or Datetime type" + raise TypeError(msg) + + def date(self) -> ArrowSeries: + return self.with_native(self.native.cast(pa.date32())) + + def year(self) -> ArrowSeries: + return self.with_native(pc.year(self.native)) + + def month(self) -> ArrowSeries: + return self.with_native(pc.month(self.native)) + + def day(self) -> ArrowSeries: + return self.with_native(pc.day(self.native)) + + def hour(self) -> ArrowSeries: + return self.with_native(pc.hour(self.native)) + + def minute(self) -> ArrowSeries: + return self.with_native(pc.minute(self.native)) + + def second(self) -> ArrowSeries: + return self.with_native(pc.second(self.native)) + + def millisecond(self) -> ArrowSeries: + return self.with_native(pc.millisecond(self.native)) + + def microsecond(self) -> ArrowSeries: + arr = self.native + result = pc.add(pc.multiply(pc.millisecond(arr), lit(1000)), pc.microsecond(arr)) + return self.with_native(result) + + def nanosecond(self) -> ArrowSeries: + result = pc.add( + pc.multiply(self.microsecond().native, lit(1000)), pc.nanosecond(self.native) + ) + return self.with_native(result) + + def ordinal_day(self) -> ArrowSeries: + return self.with_native(pc.day_of_year(self.native)) + + def weekday(self) -> ArrowSeries: + return self.with_native(pc.day_of_week(self.native, count_from_zero=False)) + + def total_minutes(self) -> ArrowSeries: + unit_to_minutes_factor = { + "s": SECONDS_PER_MINUTE, + "ms": MS_PER_MINUTE, + "us": US_PER_MINUTE, + "ns": NS_PER_MINUTE, + } + factor = lit(unit_to_minutes_factor[self.unit], type=pa.int64()) + return self.with_native(pc.divide(self.native, factor).cast(pa.int64())) + + def total_seconds(self) -> ArrowSeries: + unit_to_seconds_factor = { + "s": 1, + "ms": MS_PER_SECOND, + "us": US_PER_SECOND, + "ns": NS_PER_SECOND, + } + factor = lit(unit_to_seconds_factor[self.unit], type=pa.int64()) + return self.with_native(pc.divide(self.native, factor).cast(pa.int64())) + + def total_milliseconds(self) -> ArrowSeries: + unit_to_milli_factor = { + "s": 1e3, # seconds + "ms": 1, # milli + "us": 1e3, # micro + "ns": 1e6, # nano + } + factor = lit(unit_to_milli_factor[self.unit], type=pa.int64()) + if self.unit == "s": + return self.with_native(pc.multiply(self.native, factor).cast(pa.int64())) + return self.with_native(pc.divide(self.native, factor).cast(pa.int64())) + + def total_microseconds(self) -> ArrowSeries: + unit_to_micro_factor = { + "s": 1e6, # seconds + "ms": 1e3, # milli + "us": 1, # micro + "ns": 1e3, # nano + } + factor = lit(unit_to_micro_factor[self.unit], type=pa.int64()) + if self.unit in {"s", "ms"}: + return self.with_native(pc.multiply(self.native, factor).cast(pa.int64())) + return self.with_native(pc.divide(self.native, factor).cast(pa.int64())) + + def total_nanoseconds(self) -> ArrowSeries: + unit_to_nano_factor = { + "s": NS_PER_SECOND, + "ms": NS_PER_MILLISECOND, + "us": NS_PER_MICROSECOND, + "ns": 1, + } + factor = lit(unit_to_nano_factor[self.unit], type=pa.int64()) + return self.with_native(pc.multiply(self.native, factor).cast(pa.int64())) + + def truncate(self, every: str) -> ArrowSeries: + interval = Interval.parse(every) + return self.with_native( + pc.floor_temporal(self.native, interval.multiple, UNITS_DICT[interval.unit]) + ) + + def offset_by(self, by: str) -> ArrowSeries: + interval = Interval.parse_no_constraints(by) + native = self.native + if interval.unit in {"y", "q", "mo"}: + msg = f"Offsetting by {interval.unit} is not yet supported for pyarrow." + raise NotImplementedError(msg) + dtype = self.compliant.dtype + datetime_dtype = self.version.dtypes.Datetime + if interval.unit == "d" and isinstance(dtype, datetime_dtype) and dtype.time_zone: + offset: pa.DurationScalar[Any] = lit(interval.to_timedelta()) + native_naive = pc.local_timestamp(native) + result = pc.assume_timezone(pc.add(native_naive, offset), dtype.time_zone) + return self.with_native(result) + if interval.unit == "ns": # pragma: no cover + offset = lit(interval.multiple, pa.duration("ns")) # type: ignore[assignment] + else: + offset = lit(interval.to_timedelta()) + return self.with_native(pc.add(native, offset)) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_list.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_list.py new file mode 100644 index 0000000000000000000000000000000000000000..d86415065449556141852ac6d30c1ee26d3b3338 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_list.py @@ -0,0 +1,44 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.utils import ArrowSeriesNamespace, list_agg, list_sort +from narwhals._compliant.any_namespace import ListNamespace +from narwhals._utils import not_implemented + +if TYPE_CHECKING: + from narwhals._arrow.series import ArrowSeries + + +class ArrowSeriesListNamespace(ArrowSeriesNamespace, ListNamespace["ArrowSeries"]): + def len(self) -> ArrowSeries: + return self.with_native(pc.list_value_length(self.native).cast(pa.uint32())) + + def get(self, index: int) -> ArrowSeries: + return self.with_native(pc.list_element(self.native, index)) + + def min(self) -> ArrowSeries: + return self.with_native(list_agg(self.native, "min")) + + def max(self) -> ArrowSeries: + return self.with_native(list_agg(self.native, "max")) + + def mean(self) -> ArrowSeries: + return self.with_native(list_agg(self.native, "mean")) + + def median(self) -> ArrowSeries: + return self.with_native(list_agg(self.native, "approximate_median")) + + def sum(self) -> ArrowSeries: + return self.with_native(list_agg(self.native, "sum")) + + def sort(self, *, descending: bool, nulls_last: bool) -> ArrowSeries: + return self.with_native( + list_sort(self.native, descending=descending, nulls_last=nulls_last) + ) + + unique = not_implemented() + contains = not_implemented() diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_str.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_str.py new file mode 100644 index 0000000000000000000000000000000000000000..762be63d55b41e6ba902e7dcd3eca5f669f08c61 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_str.py @@ -0,0 +1,136 @@ +from __future__ import annotations + +import string +from typing import TYPE_CHECKING + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._arrow.utils import ( + ArrowSeriesNamespace, + extract_native, + lit, + parse_datetime_format, +) +from narwhals._compliant.any_namespace import StringNamespace + +if TYPE_CHECKING: + from narwhals._arrow.series import ArrowSeries + from narwhals._arrow.typing import Incomplete + + +class ArrowSeriesStringNamespace(ArrowSeriesNamespace, StringNamespace["ArrowSeries"]): + def len_chars(self) -> ArrowSeries: + return self.with_native(pc.utf8_length(self.native)) + + def replace( + self, value: ArrowSeries, pattern: str, *, literal: bool, n: int + ) -> ArrowSeries: + fn = pc.replace_substring if literal else pc.replace_substring_regex + _, value_native = extract_native(self.compliant, value) + if not isinstance(value_native, pa.StringScalar): + msg = "PyArrow backed `.str.replace` only supports str replacement values" + raise TypeError(msg) + arr = fn( + self.native, pattern, replacement=value_native.as_py(), max_replacements=n + ) + return self.with_native(arr) + + def replace_all( + self, value: ArrowSeries, pattern: str, *, literal: bool + ) -> ArrowSeries: + return self.replace(value, pattern, literal=literal, n=-1) + + def strip_chars(self, characters: str | None) -> ArrowSeries: + return self.with_native( + pc.utf8_trim(self.native, characters or string.whitespace) + ) + + def starts_with(self, prefix: str) -> ArrowSeries: + return self.with_native(pc.equal(self.slice(0, len(prefix)).native, lit(prefix))) + + def ends_with(self, suffix: str) -> ArrowSeries: + return self.with_native( + pc.equal(self.slice(-len(suffix), None).native, lit(suffix)) + ) + + def contains(self, pattern: ArrowSeries, *, literal: bool) -> ArrowSeries: + _, pattern_native = extract_native(self.compliant, pattern) + if not isinstance(pattern_native, pa.StringScalar): + msg = "`.str.contains` only supports str pattern values for pyarrow backend" + raise TypeError(msg) + fn = pc.match_substring if literal else pc.match_substring_regex + return self.with_native(fn(self.native, pattern_native.as_py())) + + def slice(self, offset: int, length: int | None) -> ArrowSeries: + stop = offset + length if length is not None else None + return self.with_native( + pc.utf8_slice_codeunits(self.native, start=offset, stop=stop) + ) + + def split(self, by: str) -> ArrowSeries: + split_series = pc.split_pattern(self.native, by) # type: ignore[call-overload] + return self.with_native(split_series) + + def to_datetime(self, format: str | None) -> ArrowSeries: + format = parse_datetime_format(self.native) if format is None else format + timestamp_array = pc.strptime(self.native, format=format, unit="us") + return self.with_native(timestamp_array) + + def to_date(self, format: str | None) -> ArrowSeries: + return self.to_datetime(format=format).dt.date() + + def to_uppercase(self) -> ArrowSeries: + return self.with_native(pc.utf8_upper(self.native)) + + def to_lowercase(self) -> ArrowSeries: + return self.with_native(pc.utf8_lower(self.native)) + + def to_titlecase(self) -> ArrowSeries: + return self.with_native(pc.utf8_title(self.native)) + + def zfill(self, width: int) -> ArrowSeries: + binary_join: Incomplete = pc.binary_join_element_wise + native = self.native + hyphen, plus = lit("-"), lit("+") + first_char, remaining_chars = ( + self.slice(0, 1).native, + self.slice(1, None).native, + ) + + # Conditions + less_than_width = pc.less(pc.utf8_length(native), lit(width)) + starts_with_hyphen = pc.equal(first_char, hyphen) + starts_with_plus = pc.equal(first_char, plus) + + conditions = pc.make_struct( + pc.and_(starts_with_hyphen, less_than_width), + pc.and_(starts_with_plus, less_than_width), + less_than_width, + ) + + # Cases + padded_remaining_chars = pc.utf8_lpad(remaining_chars, width - 1, padding="0") + + result = pc.case_when( + conditions, + binary_join( + pa.repeat(hyphen, len(native)), padded_remaining_chars, "" + ), # starts with hyphen and less than width + binary_join( + pa.repeat(plus, len(native)), padded_remaining_chars, "" + ), # starts with plus and less than width + pc.utf8_lpad(native, width=width, padding="0"), # less than width + native, + ) + return self.with_native(result) + + def pad_start(self, length: int, fill_char: str) -> ArrowSeries: + return self.with_native( + pc.utf8_lpad(self.native, width=length, padding=fill_char) + ) + + def pad_end(self, length: int, fill_char: str) -> ArrowSeries: + return self.with_native( + pc.utf8_rpad(self.native, width=length, padding=fill_char) + ) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_struct.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_struct.py new file mode 100644 index 0000000000000000000000000000000000000000..906725ba7b9a3745abcb09d5cf8509cfa4917449 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/series_struct.py @@ -0,0 +1,16 @@ +from __future__ import annotations + +from typing import TYPE_CHECKING + +import pyarrow.compute as pc + +from narwhals._arrow.utils import ArrowSeriesNamespace +from narwhals._compliant.any_namespace import StructNamespace + +if TYPE_CHECKING: + from narwhals._arrow.series import ArrowSeries + + +class ArrowSeriesStructNamespace(ArrowSeriesNamespace, StructNamespace["ArrowSeries"]): + def field(self, name: str) -> ArrowSeries: + return self.with_native(pc.struct_field(self.native, name)).alias(name) diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/typing.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/typing.py new file mode 100644 index 0000000000000000000000000000000000000000..8180663f1f0c4d2a551b1ae6737e6388b9c26717 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/typing.py @@ -0,0 +1,73 @@ +from __future__ import annotations # pragma: no cover + +from typing import ( + TYPE_CHECKING, # pragma: no cover + Any, # pragma: no cover + TypeVar, # pragma: no cover +) + +if TYPE_CHECKING: + import sys + from typing import Generic, Literal + + if sys.version_info >= (3, 10): + from typing import TypeAlias + else: + from typing_extensions import TypeAlias + + import pyarrow as pa + from pyarrow.__lib_pxi.table import ( + AggregateOptions, # noqa: F401 + Aggregation, # noqa: F401 + ) + from pyarrow._stubs_typing import ( # pyright: ignore[reportMissingModuleSource] # pyright: ignore[reportMissingModuleSource] # pyright: ignore[reportMissingModuleSource] + Indices, # noqa: F401 + Mask, # noqa: F401 + Order, # noqa: F401 + ) + + from narwhals._arrow.expr import ArrowExpr + from narwhals._arrow.series import ArrowSeries + + IntoArrowExpr: TypeAlias = "ArrowExpr | ArrowSeries" + TieBreaker: TypeAlias = Literal["min", "max", "first", "dense"] + NullPlacement: TypeAlias = Literal["at_start", "at_end"] + NativeIntervalUnit: TypeAlias = Literal[ + "year", + "quarter", + "month", + "week", + "day", + "hour", + "minute", + "second", + "millisecond", + "microsecond", + "nanosecond", + ] + PromoteOptions: TypeAlias = Literal["none", "default", "permissive"] + + ChunkedArrayAny: TypeAlias = pa.ChunkedArray[Any] + ArrayAny: TypeAlias = pa.Array[Any] + ArrayOrChunkedArray: TypeAlias = "ArrayAny | ChunkedArrayAny" + ScalarAny: TypeAlias = pa.Scalar[Any] + ArrayOrScalar: TypeAlias = "ArrayOrChunkedArray | ScalarAny" + ArrayOrScalarT1 = TypeVar("ArrayOrScalarT1", ArrayAny, ChunkedArrayAny, ScalarAny) + ArrayOrScalarT2 = TypeVar("ArrayOrScalarT2", ArrayAny, ChunkedArrayAny, ScalarAny) + _AsPyType = TypeVar("_AsPyType") + + class _BasicDataType(pa.DataType, Generic[_AsPyType]): ... + + +Incomplete: TypeAlias = Any # pragma: no cover +""" +Marker for working code that fails on the stubs. + +Common issues: +- Annotated for `Array`, but not `ChunkedArray` +- Relies on typing information that the stubs don't provide statically +- Missing attributes +- Incorrect return types +- Inconsistent use of generic/concrete types +- `_clone_signature` used on signatures that are not identical +""" diff --git a/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/utils.py b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/utils.py new file mode 100644 index 0000000000000000000000000000000000000000..5a678b5bf4647127f4d4c773d994ad39d7e86bb6 --- /dev/null +++ b/.venv_haddock/lib/python3.12/site-packages/narwhals/_arrow/utils.py @@ -0,0 +1,568 @@ +from __future__ import annotations + +from functools import lru_cache +from typing import TYPE_CHECKING, Any, cast + +import pyarrow as pa +import pyarrow.compute as pc + +from narwhals._compliant import EagerSeriesNamespace +from narwhals._utils import Implementation, Version, isinstance_or_issubclass + +if TYPE_CHECKING: + from collections.abc import Iterable, Iterator, Mapping + from typing import Literal + + from typing_extensions import TypeAlias, TypeIs + + from narwhals._arrow.series import ArrowSeries + from narwhals._arrow.typing import ( + ArrayAny, + ArrayOrScalar, + ArrayOrScalarT1, + ArrayOrScalarT2, + ChunkedArrayAny, + Incomplete, + NativeIntervalUnit, + PromoteOptions, + ScalarAny, + ) + from narwhals._duration import IntervalUnit + from narwhals.dtypes import DType + from narwhals.typing import IntoDType, PythonLiteral + + # NOTE: stubs don't allow for `ChunkedArray[StructArray]` + # Intended to represent the `.chunks` property storing `list[pa.StructArray]` + ChunkedArrayStructArray: TypeAlias = ChunkedArrayAny + + def is_timestamp(t: Any) -> TypeIs[pa.TimestampType[Any, Any]]: ... + def is_duration(t: Any) -> TypeIs[pa.DurationType[Any]]: ... + def is_list(t: Any) -> TypeIs[pa.ListType[Any]]: ... + def is_large_list(t: Any) -> TypeIs[pa.LargeListType[Any]]: ... + def is_fixed_size_list(t: Any) -> TypeIs[pa.FixedSizeListType[Any, Any]]: ... + def is_dictionary(t: Any) -> TypeIs[pa.DictionaryType[Any, Any, Any]]: ... + def extract_regex( + strings: ChunkedArrayAny, + /, + pattern: str, + *, + options: Any = None, + memory_pool: Any = None, + ) -> ChunkedArrayStructArray: ... +else: + from pyarrow.compute import extract_regex + from pyarrow.types import ( + is_dictionary, # noqa: F401 + is_duration, + is_fixed_size_list, + is_large_list, + is_list, + is_timestamp, + ) + +BACKEND_VERSION = Implementation.PYARROW._backend_version() +"""Static backend version for `pyarrow`.""" + +UNITS_DICT: Mapping[IntervalUnit, NativeIntervalUnit] = { + "y": "year", + "q": "quarter", + "mo": "month", + "d": "day", + "h": "hour", + "m": "minute", + "s": "second", + "ms": "millisecond", + "us": "microsecond", + "ns": "nanosecond", +} + +lit = pa.scalar +"""Alias for `pyarrow.scalar`.""" + + +def extract_py_scalar(value: Any, /) -> Any: + from narwhals._arrow.series import maybe_extract_py_scalar + + return maybe_extract_py_scalar(value, return_py_scalar=True) + + +def is_array_or_scalar(obj: Any) -> TypeIs[ArrayOrScalar]: + """Return True for any base `pyarrow` container.""" + return isinstance(obj, (pa.ChunkedArray, pa.Array, pa.Scalar)) + + +def chunked_array( + arr: ArrayOrScalar | list[Iterable[Any]], dtype: pa.DataType | None = None, / +) -> ChunkedArrayAny: + if isinstance(arr, pa.ChunkedArray): + return arr + if isinstance(arr, list): + return pa.chunked_array(arr, dtype) + return pa.chunked_array([arr], dtype) + + +def nulls_like(n: int, series: ArrowSeries) -> ArrayAny: + """Create a strongly-typed Array instance with all elements null. + + Uses the type of `series`, without upseting `mypy`. + """ + return pa.nulls(n, series.native.type) + + +def repeat( + value: PythonLiteral | ScalarAny, n: int, /, dtype: pa.DataType | None = None +) -> ArrayAny: + """Create an Array instance whose slots are the given scalar. + + *Optionally*, casting to `dtype` **before** repeating `n` times. + """ + lit_: Incomplete = lit + return pa.repeat(lit_(value, type=dtype), n) + + +def zeros(n: int, /) -> pa.Int64Array: + return pa.repeat(0, n) + + +def native_to_narwhals_dtype(dtype: pa.DataType, version: Version) -> DType: + if isinstance(dtype, pa.ExtensionType): + return version.dtypes.Unknown() + return native_non_extension_to_narwhals_dtype(dtype, version) + + +@lru_cache(maxsize=16) +def native_non_extension_to_narwhals_dtype(dtype: pa.DataType, version: Version) -> DType: # noqa: C901, PLR0912 + dtypes = version.dtypes + if pa.types.is_int64(dtype): + return dtypes.Int64() + if pa.types.is_int32(dtype): + return dtypes.Int32() + if pa.types.is_int16(dtype): + return dtypes.Int16() + if pa.types.is_int8(dtype): + return dtypes.Int8() + if pa.types.is_uint64(dtype): + return dtypes.UInt64() + if pa.types.is_uint32(dtype): + return dtypes.UInt32() + if pa.types.is_uint16(dtype): + return dtypes.UInt16() + if pa.types.is_uint8(dtype): + return dtypes.UInt8() + if pa.types.is_boolean(dtype): + return dtypes.Boolean() + if pa.types.is_float64(dtype): + return dtypes.Float64() + if pa.types.is_float32(dtype): + return dtypes.Float32() + # bug in coverage? it shows `31->exit` (where `31` is currently the line number of + # the next line), even though both when the if condition is true and false are covered + if ( # pragma: no cover + pa.types.is_string(dtype) + or pa.types.is_large_string(dtype) + or getattr(pa.types, "is_string_view", lambda _: False)(dtype) + ): + return dtypes.String() + if pa.types.is_date32(dtype): + return dtypes.Date() + if is_timestamp(dtype): + return dtypes.Datetime(time_unit=dtype.unit, time_zone=dtype.tz) + if is_duration(dtype): + return dtypes.Duration(time_unit=dtype.unit) + if pa.types.is_dictionary(dtype): + return dtypes.Categorical() + if pa.types.is_struct(dtype): + return dtypes.Struct( + [ + dtypes.Field( + dtype.field(i).name, + native_to_narwhals_dtype(dtype.field(i).type, version), + ) + for i in range(dtype.num_fields) + ] + ) + if is_list(dtype) or is_large_list(dtype): + return dtypes.List(native_to_narwhals_dtype(dtype.value_type, version)) + if is_fixed_size_list(dtype): + return dtypes.Array( + native_to_narwhals_dtype(dtype.value_type, version), dtype.list_size + ) + if pa.types.is_decimal128(dtype): + return dtypes.Decimal(precision=dtype.precision, scale=dtype.scale) + if pa.types.is_time32(dtype) or pa.types.is_time64(dtype): + return dtypes.Time() + if pa.types.is_binary(dtype): + return dtypes.Binary() + return dtypes.Unknown() # pragma: no cover + + +dtypes = Version.MAIN.dtypes +NW_TO_PA_DTYPES: Mapping[type[DType], pa.DataType] = { + dtypes.Float64: pa.float64(), + dtypes.Float32: pa.float32(), + dtypes.Binary: pa.binary(), + dtypes.String: pa.string(), + dtypes.Boolean: pa.bool_(), + dtypes.Categorical: pa.dictionary(pa.uint32(), pa.string()), + dtypes.Date: pa.date32(), + dtypes.Time: pa.time64("ns"), + dtypes.Int8: pa.int8(), + dtypes.Int16: pa.int16(), + dtypes.Int32: pa.int32(), + dtypes.Int64: pa.int64(), + dtypes.UInt8: pa.uint8(), + dtypes.UInt16: pa.uint16(), + dtypes.UInt32: pa.uint32(), + dtypes.UInt64: pa.uint64(), +} +UNSUPPORTED_DTYPES = (dtypes.Object,) + + +def narwhals_to_native_dtype(dtype: IntoDType, version: Version) -> pa.DataType: + dtypes = version.dtypes + base_type = dtype.base_type() + if pa_type := NW_TO_PA_DTYPES.get(base_type): + return pa_type + if isinstance_or_issubclass(dtype, dtypes.Datetime): + unit = dtype.time_unit + return pa.timestamp(unit, tz) if (tz := dtype.time_zone) else pa.timestamp(unit) + if isinstance_or_issubclass(dtype, dtypes.Duration): + return pa.duration(dtype.time_unit) + if isinstance_or_issubclass(dtype, dtypes.List): + return pa.list_(value_type=narwhals_to_native_dtype(dtype.inner, version=version)) + if isinstance_or_issubclass(dtype, dtypes.Struct): + return pa.struct( + [ + (field.name, narwhals_to_native_dtype(field.dtype, version=version)) + for field in dtype.fields + ] + ) + if isinstance_or_issubclass(dtype, dtypes.Array): + inner = narwhals_to_native_dtype(dtype.inner, version=version) + list_size = dtype.size + return pa.list_(inner, list_size=list_size) + if isinstance_or_issubclass(dtype, dtypes.Decimal): + return pa.decimal128(precision=dtype.precision, scale=dtype.scale) + if issubclass(base_type, UNSUPPORTED_DTYPES): + msg = f"Converting to {base_type.__name__} dtype is not supported for PyArrow." + raise NotImplementedError(msg) + msg = f"Unknown dtype: {dtype}" # pragma: no cover + raise AssertionError(msg) + + +def extract_native( + lhs: ArrowSeries, rhs: ArrowSeries | PythonLiteral | ScalarAny +) -> tuple[ChunkedArrayAny, ChunkedArrayAny | ScalarAny]: + """Extract native objects in binary operation. + + If the comparison isn't supported, return `NotImplemented` so that the + "right-hand-side" operation (e.g. `__radd__`) can be tried. + + If one of the two sides has a `_broadcast` flag, then extract the scalar + underneath it so that PyArrow can do its own broadcasting. + """ + from narwhals._arrow.series import ArrowSeries + + if rhs is None: # pragma: no cover + return lhs.native, lit(None, type=lhs._type) + + if isinstance(rhs, ArrowSeries): + if lhs._broadcast and not rhs._broadcast: + return lhs.native[0], rhs.native + if rhs._broadcast: + return lhs.native, rhs.native[0] + return lhs.native, rhs.native + + if isinstance(rhs, list): + msg = "Expected Series or scalar, got list." + raise TypeError(msg) + + return lhs.native, rhs if isinstance(rhs, pa.Scalar) else lit(rhs) + + +def floordiv_compat(left: ArrayOrScalar, right: ArrayOrScalar, /) -> Any: + # The following lines are adapted from pandas' pyarrow implementation. + # Ref: https://github.com/pandas-dev/pandas/blob/262fcfbffcee5c3116e86a951d8b693f90411e68/pandas/core/arrays/arrow/array.py#L124-L154 + # We modify it to add `safe_mask` so as to align with Polars' behaviour when dividing by zero. + safe_mask = pc.not_equal(right, lit(0, type=right.type)) + safe_right = pc.if_else(safe_mask, right, lit(1, type=right.type)) # Dummy value + non_safe_result = lit(None, type=left.type) + + if pa.types.is_integer(left.type) and pa.types.is_integer(right.type): + divided = pc.if_else( + safe_mask, pc.divide_checked(left, safe_right), non_safe_result + ) + # TODO @dangotbanned: Use a `TypeVar` in guards + # Narrowing to a `Union` isn't interacting well with the rest of the stubs + # https://github.com/zen-xu/pyarrow-stubs/pull/215 + if pa.types.is_signed_integer(divided.type): + div_type = cast("pa._lib.Int64Type", divided.type) + has_remainder = pc.not_equal(pc.multiply(divided, right), left) + has_one_negative_operand = pc.less( + pc.bit_wise_xor(left, right), lit(0, div_type) + ) + result = pc.if_else( + pc.and_(has_remainder, has_one_negative_operand), + pc.subtract(divided, lit(1, div_type)), + divided, + ) + else: + result = divided # pragma: no cover + result = result.cast(left.type) + else: + divided = pc.if_else(safe_mask, pc.divide(left, safe_right), non_safe_result) + result = pc.floor(divided) + return result + + +def cast_for_truediv( + arrow_array: ArrayOrScalarT1, pa_object: ArrayOrScalarT2 +) -> tuple[ArrayOrScalarT1, ArrayOrScalarT2]: + # Lifted from: + # https://github.com/pandas-dev/pandas/blob/262fcfbffcee5c3116e86a951d8b693f90411e68/pandas/core/arrays/arrow/array.py#L108-L122 + # Ensure int / int -> float mirroring Python/Numpy behavior + # as pc.divide_checked(int, int) -> int + if pa.types.is_integer(arrow_array.type) and pa.types.is_integer(pa_object.type): + # GH: 56645. # noqa: ERA001 + # https://github.com/apache/arrow/issues/35563 + return arrow_array.cast(pa.float64(), safe=False), pa_object.cast( + pa.float64(), safe=False + ) + + return arrow_array, pa_object + + +# Regex for date, time, separator and timezone components +DATE_RE = r"(?P\d{1,4}[-/.]\d{1,2}[-/.]\d{1,4}|\d{8})" +SEP_RE = r"(?P\s|T)" +TIME_RE = r"(?P