Upload folder using huggingface_hub
Browse filesThis view is limited to 50 files because it contains too many changes. See raw diff
- .gitattributes +3 -35
- .gitignore +45 -0
- .ms_upload_cache +1 -0
- LICENSE +201 -0
- README.md +375 -0
- conf/config.json +11 -0
- configuration.json +14 -0
- model/CombinatorialAssembler/AF2trans/AF2trans.cc +134 -0
- model/CombinatorialAssembler/BB.cc +178 -0
- model/CombinatorialAssembler/BB.h +106 -0
- model/CombinatorialAssembler/BBContainer.cc +132 -0
- model/CombinatorialAssembler/BBContainer.h +43 -0
- model/CombinatorialAssembler/BBGrid.cc +51 -0
- model/CombinatorialAssembler/BBGrid.h +25 -0
- model/CombinatorialAssembler/BestK.cc +82 -0
- model/CombinatorialAssembler/BestK.h +63 -0
- model/CombinatorialAssembler/BestKContainer.h +50 -0
- model/CombinatorialAssembler/BitId.h +48 -0
- model/CombinatorialAssembler/ComplexDistanceConstraint.cc +189 -0
- model/CombinatorialAssembler/ComplexDistanceConstraint.h +63 -0
- model/CombinatorialAssembler/DOCK.conf +21 -0
- model/CombinatorialAssembler/FoldStep.h +34 -0
- model/CombinatorialAssembler/HierarchicalFold.cc +730 -0
- model/CombinatorialAssembler/HierarchicalFold.h +86 -0
- model/CombinatorialAssembler/MainCombDock.cc +140 -0
- model/CombinatorialAssembler/Makefile +42 -0
- model/CombinatorialAssembler/SuperBB.cc +315 -0
- model/CombinatorialAssembler/SuperBB.h +91 -0
- model/CombinatorialAssembler/TransformationAndScore.cc +11 -0
- model/CombinatorialAssembler/TransformationAndScore.h +64 -0
- model/CombinatorialAssembler/chem_params.txt +412 -0
- model/CombinatorialAssembler/libs_DockingLib/ChemAtom.cc +69 -0
- model/CombinatorialAssembler/libs_DockingLib/ChemAtom.h +156 -0
- model/CombinatorialAssembler/libs_DockingLib/ChemLib.cc +121 -0
- model/CombinatorialAssembler/libs_DockingLib/ChemLib.h +127 -0
- model/CombinatorialAssembler/libs_DockingLib/ChemMolecule.cc +309 -0
- model/CombinatorialAssembler/libs_DockingLib/ChemMolecule.h +132 -0
- model/CombinatorialAssembler/libs_DockingLib/Common.cc +41 -0
- model/CombinatorialAssembler/libs_DockingLib/Common.h +21 -0
- model/CombinatorialAssembler/libs_DockingLib/CrossLink.cc +140 -0
- model/CombinatorialAssembler/libs_DockingLib/CrossLink.h +69 -0
- model/CombinatorialAssembler/libs_DockingLib/DistanceRestraint.cc +40 -0
- model/CombinatorialAssembler/libs_DockingLib/DistanceRestraint.h +189 -0
- model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc +22 -0
- model/CombinatorialAssembler/libs_DockingLib/DotSphere.h +18 -0
- model/CombinatorialAssembler/libs_DockingLib/EnergyAtom.h +21 -0
- model/CombinatorialAssembler/libs_DockingLib/GeomScore.cc +423 -0
- model/CombinatorialAssembler/libs_DockingLib/GeomScore.h +129 -0
- model/CombinatorialAssembler/libs_DockingLib/MolIntersection.h +116 -0
- model/CombinatorialAssembler/libs_DockingLib/MultiResolution.h +279 -0
.gitattributes
CHANGED
|
@@ -1,35 +1,3 @@
|
|
| 1 |
-
*.
|
| 2 |
-
*.
|
| 3 |
-
|
| 4 |
-
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
-
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
-
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
-
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
-
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
-
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
-
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
-
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
-
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
-
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
-
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
-
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
-
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
-
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
-
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
-
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
-
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
-
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
-
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
-
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
-
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
-
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
-
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
-
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
-
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
-
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
-
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
-
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 1 |
+
weight/**/*.npz filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
weight/**/*.tar filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
scripts/paper_resources/extras/top1_benchmark_1_2_pdbs.zip filter=lfs diff=lfs merge=lfs -text
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.gitignore
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Prerequisites
|
| 2 |
+
*.d
|
| 3 |
+
|
| 4 |
+
# Python caches
|
| 5 |
+
__pycache__/
|
| 6 |
+
*.py[cod]
|
| 7 |
+
|
| 8 |
+
# Compiled Object files
|
| 9 |
+
*.slo
|
| 10 |
+
*.lo
|
| 11 |
+
*.o
|
| 12 |
+
*.obj
|
| 13 |
+
|
| 14 |
+
# Precompiled Headers
|
| 15 |
+
*.gch
|
| 16 |
+
*.pch
|
| 17 |
+
|
| 18 |
+
# Compiled Dynamic libraries
|
| 19 |
+
*.so
|
| 20 |
+
*.dylib
|
| 21 |
+
*.dll
|
| 22 |
+
|
| 23 |
+
# Fortran module files
|
| 24 |
+
*.mod
|
| 25 |
+
*.smod
|
| 26 |
+
|
| 27 |
+
# Compiled Static libraries
|
| 28 |
+
*.lai
|
| 29 |
+
*.la
|
| 30 |
+
*.a
|
| 31 |
+
*.lib
|
| 32 |
+
|
| 33 |
+
# Executables
|
| 34 |
+
*.exe
|
| 35 |
+
*.out
|
| 36 |
+
*.app
|
| 37 |
+
|
| 38 |
+
# Other
|
| 39 |
+
.DS_Store
|
| 40 |
+
model/CombinatorialAssembler/.vscode/*
|
| 41 |
+
*/.idea/*
|
| 42 |
+
scripts/paper_resources/figures/output
|
| 43 |
+
|
| 44 |
+
# Runtime outputs
|
| 45 |
+
output/
|
.ms_upload_cache
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"version": 3, "repo_id": "OneScience/CombFold", "files": {".gitignore|1787795579.0|477": {"hash": "79fe2df87fdfa764102ce75153ce260598b7958ef9f2cb8f9da2ba7db9b79104", "size": 477, "status": "c"}, "conf/config.json|1787795221.0|272": {"hash": "b1eb917a4b127436c1477b0d72cc2c8570548d16ee460309f5defebe92507536", "size": 272, "status": "c"}, "model/CombinatorialAssembler/AF2trans/AF2trans.cc|1785404936.0|4915": {"hash": "01b00782b600c60022c53ccecf8619285fc71f7d31e09ea1386b83a39fc29331", "size": 4915, "status": "c"}, ".gitattributes|1787795481.0|104": {"hash": "afb36dd7bd41d9dea1da8c9b1140f3231fcda3c5c2105df14396f271dc968a1b", "size": 104, "status": "c"}, "configuration.json|1787795222.0|386": {"hash": "66b1e8a9ad8538718120d2d58dd0f996d35c44210115171e31aeb5e889229b50", "size": 386, "status": "c"}, "model/CombinatorialAssembler/BB.cc|1785404936.0|7052": {"hash": "28e9ae9bf638f6c760473b4e3c924cf0097d718d3f9f0602b30b91b722a84eca", "size": 7052, "status": "c"}, "LICENSE|1785404936.0|11558": {"hash": "1eb85fc97224598dad1852b5d6483bbcf0aa8608790dcc657a5a2a761ae9c8c6", "size": 11558, "status": "c"}, "README.md|1787799250.0|10797": {"hash": "ea97d92e93d0f5bed4746d58c72adc25d45ddea4f6a9d9eeb7824da7a0b41579", "size": 10797, "status": "c"}, "model/CombinatorialAssembler/BB.h|1785404936.0|3642": {"hash": "15472c251ac3508668890a80007d087dfff569462ae82dd4c840d5569a005401", "size": 3642, "status": "c"}, "model/CombinatorialAssembler/BBGrid.cc|1785404936.0|2228": {"hash": "3e81da02c2db357e3dbc50e5837494c496ce2939353ae2556871c91c67036b5b", "size": 2228, "status": "c"}, "model/CombinatorialAssembler/BestKContainer.h|1785404936.0|1416": {"hash": "bfd1b7059a40f89ca00f8ccb7c152319143af0cab3a3767cc619b4182a917906", "size": 1416, "status": "c"}, "model/CombinatorialAssembler/BBContainer.cc|1785404936.0|5297": {"hash": "7ffbf29d0e7afc40edf0d096cfc170f9ea948734992c3c51cf2ebf412b9086ab", "size": 5297, "status": "c"}, "model/CombinatorialAssembler/BestK.cc|1785404936.0|2452": {"hash": "5243ac22205eb9a5b9ff56d71741ca9685c37a16727057fbe4f85b745a72ed4b", "size": 2452, "status": "c"}, "model/CombinatorialAssembler/BestK.h|1785404936.0|1865": {"hash": "de607f197d313cc9566409d416e346b5c025e14736f8aa96c0db63693a499d47", "size": 1865, "status": "c"}, "model/CombinatorialAssembler/BBGrid.h|1785404936.0|521": {"hash": "a978ac48c215dd77910fe2d7bc87e63651d26d46ad5085267b1a228d3d7f4461", "size": 521, "status": "c"}, "model/CombinatorialAssembler/BBContainer.h|1785404936.0|1226": {"hash": "f31bf57c1c9e1c46e8c4b9dec175ed755072fd28cde644c9f6abf3207feaceba", "size": 1226, "status": "c"}, "model/CombinatorialAssembler/BitId.h|1785404936.0|1160": {"hash": "a275633352df81c05ffa9b57c4aec15f65048917d9c77995dcf42d358c7364f3", "size": 1160, "status": "c"}, "model/CombinatorialAssembler/ComplexDistanceConstraint.cc|1785404936.0|9692": {"hash": "9cacc0d10c532e4602c1e2c11166d6a9f2017d9506bf38f39b00a9e987afea07", "size": 9692, "status": "c"}, "model/CombinatorialAssembler/DOCK.conf|1785404936.0|441": {"hash": "bafa54cbfd67ba9dfab039890e4582836718797fa48464bb6d3863f50c674600", "size": 441, "status": "c"}, "model/CombinatorialAssembler/HierarchicalFold.h|1785404936.0|3680": {"hash": "c4f92601d9ede3f2c70ebbf4d92ee900cca6161d8567cf731a57bfc4d2ee15ef", "size": 3680, "status": "c"}, "model/CombinatorialAssembler/ComplexDistanceConstraint.h|1785404936.0|2349": {"hash": "4227d984a46096694832aa582d2809999a4a90425baabcbe071627ab18afb48f", "size": 2349, "status": "c"}, "model/CombinatorialAssembler/HierarchicalFold.cc|1785404936.0|34499": {"hash": "26c0b622d3028025ff362e99dbc45868a7314d200874a7bc4478dc7e2f1a9057", "size": 34499, "status": "c"}, "model/CombinatorialAssembler/FoldStep.h|1785404936.0|1192": {"hash": "7c18a2f6b08defbfa35d49615ee533387fc4e5557f11234add6d002e23b57748", "size": 1192, "status": "c"}, "model/CombinatorialAssembler/MainCombDock.cc|1785404936.0|5743": {"hash": "0f377d48e0405d172a56bcde0321877449d943f7ef030fcbfd4f9ad714a36814", "size": 5743, "status": "c"}, "model/CombinatorialAssembler/Makefile|1785404936.0|1714": {"hash": "61eb4ec6e5b000787f704bc5f0426e7073d31f2af2fe66ca78762f989e072182", "size": 1714, "status": "c"}, "model/CombinatorialAssembler/SuperBB.cc|1785404936.0|12116": {"hash": "68f970a26c6bb121b6faff32ba8224b7880269f55650665b9015c3047aea7262", "size": 12116, "status": "c"}, "model/CombinatorialAssembler/TransformationAndScore.cc|1785404936.0|411": {"hash": "c625cb13d70a7fd49c4d80539d1816025e0f3f759cb587866cc2e9c275cf8c0a", "size": 411, "status": "c"}, "model/CombinatorialAssembler/SuperBB.h|1785404936.0|2994": {"hash": "e72e752b8a3561ededfcbabf9d27c045e3944df7ea77a6e2026dba93c5ba9669", "size": 2994, "status": "c"}, "model/CombinatorialAssembler/chem_params.txt|1785404936.0|10712": {"hash": "e380e22ddb17f94bd0a62f8848039e973585fb95e98b47541cdca8daaeaf3e6e", "size": 10712, "status": "c"}, "model/CombinatorialAssembler/TransformationAndScore.h|1785404936.0|1865": {"hash": "39ab9de2b36d7d408c359d6f7b9d4e83c58b48107bf625e097cc0793f68c7d4b", "size": 1865, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ChemAtom.h|1785404936.0|3955": {"hash": "e2772818037fcef65a46f5964478dfef9c42fcd1ffa9ccaa7143ad16f176cb62", "size": 3955, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ChemAtom.cc|1785404936.0|2039": {"hash": "99a852c6fde6d4fd1371c895dfc39e70de731c0daf507a8fa1c880e7c1545c50", "size": 2039, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ChemLib.cc|1785404936.0|3956": {"hash": "c024cbca027d55c8d9067999dc89ced567d82af7d471bce87831dc79ba3b601c", "size": 3956, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ChemLib.h|1785404936.0|2921": {"hash": "a62d90ed08d343914390d9134f2fbc0a3ddb399f79bc0d75d87afe68072c49df", "size": 2921, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ChemMolecule.h|1785404936.0|4074": {"hash": "8a79db5835a90b6441906455df40dacfe0c93e997dd332ae4825392b46ed925d", "size": 4074, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ChemMolecule.cc|1785404936.0|10581": {"hash": "855f8cc68274309d29cd4c7893c3b7265f7df8e1b1f5037d73e5e381df45711a", "size": 10581, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/Common.h|1785404936.0|599": {"hash": "deae8fe2ed93eb8fa57bb5acaad3a29a906bad423992e0822c8f76c3c7f0b852", "size": 599, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/Common.cc|1785404936.0|1643": {"hash": "aa7b4371b28fd74571814a4cd59c32f5800503829e731ad05223820da862821d", "size": 1643, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/CrossLink.h|1785404936.0|2355": {"hash": "b7c71e0bd9564f53e03b0d95d95de8c1b15033986b2fc8c8e9532a17f741da6f", "size": 2355, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/CrossLink.cc|1785404936.0|4415": {"hash": "4234e0d5533031e4d4b15576ccd08c2661212f59e7d1156e1930362a92870ba1", "size": 4415, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/DistanceRestraint.cc|1785404936.0|1303": {"hash": "01aa5d0d74797b28cbbed0fdede7ef4305e058aa5fd621a4c5b9ff8fdce798b7", "size": 1303, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/DistanceRestraint.h|1785404936.0|6678": {"hash": "df9318e1c187154559b94276ce116db05776238214af5d73f1c69152318ea54b", "size": 6678, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/DotSphere.h|1785404936.0|328": {"hash": "a50848a6a17fb3afa0dba1b6f68a82699eaa6da5195f6b191c8ffb26ab35189e", "size": 328, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc|1785404936.0|598": {"hash": "d534a919e1bb579b6447f63a408f6a9854cf261533870829ca2101b48326e4cd", "size": 598, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/GeomScore.cc|1785404936.0|14695": {"hash": "3a3c410d73a11a6352c7e32ab919ee2b23718ee6decf6ecbf9dc933fa5f7a402", "size": 14695, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/EnergyAtom.h|1785404936.0|478": {"hash": "69579f8cdbbbd5ceefa1110f3c1f1f5a7879c1beb93fd1389cda7f7c9f50ded2", "size": 478, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/GeomScore.h|1785404936.0|4103": {"hash": "220161b194949ba5c89f889c4bfa02a83cb6ed4f61b434375df07065efab8788", "size": 4103, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/MolIntersection.h|1785404936.0|4287": {"hash": "5bc18c8d8c5102a7da5374c9aca5ac1ed4028be84b053a14a7fffaecac433f36", "size": 4287, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/ResidueIndexedMolecule.h|1785404936.0|6482": {"hash": "5edb3ef5057e3e2568cf174f84c6e84cda4ffb3047c11d0e2302e9b9471931d9", "size": 6482, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/MultiResolution.h|1785404936.0|9437": {"hash": "956734373c0816a3fcf5394bfceeb3d4c194e0d65b6d536270e18dc442d023d6", "size": 9437, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/SASurface.cc|1785404936.0|2793": {"hash": "f9d6de546150da78b9d0a387147fb032d139526edab744677b3a9982d20a8b84", "size": 2793, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/prGrid.h|1785404936.0|12048": {"hash": "fdafb00a5c2852b5111c192bbe04390338ede7fd4a0aa504615ea244306b6c0c", "size": 12048, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/SASurface.h|1785404936.0|768": {"hash": "21cdf9e890d5efd339332b7d8f7c1ae76feb64d419b87e848e632d92ddfff1ce", "size": 768, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/connolly_surface.cc|1785404936.0|39444": {"hash": "f7be0bb0d48cf1b58af73d1d18014ab92dce3896895d3ab8155aced8b80798bb", "size": 39444, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/prGrid.cc|1785404936.0|7203": {"hash": "1b3d635257b6c8b2218ca6600084056af192d0230a396c330221d693ee336dae", "size": 7203, "status": "c"}, "model/CombinatorialAssembler/libs_DockingLib/connolly_surface.h|1785404936.0|617": {"hash": "9ffd1083c7efae2ad2da438eb66d121ef44e750fa2b84c7111c4357ea2527479", "size": 617, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/AminoAcid.h|1785404936.0|9244": {"hash": "a0f68756fdac61fd07dd60f8d1434b36f0a94f3940798be7d2b429407278407b", "size": 9244, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Atom.cc|1785404936.0|15625": {"hash": "50ab0a6336e1f9568664aa84d87e6aaf39e9f2aff6aefc2cea45068329bd8f54", "size": 15625, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Atom.h|1785404936.0|11440": {"hash": "d8d30e15e9e0e7a8b803c43a91d69b6a4938758b5cc99dd5facdd9be825cfb29", "size": 11440, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/CIF.cc|1785404936.0|4630": {"hash": "f04e64d5a4441b2d2e95733119ce80684e2f142b3ba93c92663c0f49267e5882", "size": 4630, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/CIF.h|1785404936.0|5519": {"hash": "de3d716d6040f14a1010bfb6eced26533287cf78d19f5df53510eec27080349e", "size": 5519, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/DebugStream.cc|1785404936.0|2984": {"hash": "7f3bc633dce9ba8153612ecfa63f82ea02dc6654f12dc57e07badd92f690e409", "size": 2984, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/DebugStream.h|1785404936.0|7509": {"hash": "e1e565a9293a8087068a84a350d5be869b6fa3396ea2c820c9dbcf04f15aba8a", "size": 7509, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/GeomHash.h|1785404936.0|16509": {"hash": "eb86e2be59aa2548a748d42f19d881298cc5055127ec458e0563b3bbd99d3439", "size": 16509, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/HashLink.h|1785404936.0|22422": {"hash": "4e49a735c530f1dac390ec9af805b6c27e2378d75dd7a1d3fb00972d13b9af52", "size": 22422, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Logger.cc|1785404936.0|1262": {"hash": "2a3ea75ca4a2d5fb0297c238d612c8cd629088da28a7ed19e40189196e11252c", "size": 1262, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/HashResult.h|1785404936.0|12685": {"hash": "f76829e14e95f2fae0630e8fc3740c41756e31cef09da1bde2be8ee93ee004e5", "size": 12685, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Interface.cc|1785404936.0|6599": {"hash": "c8ae817355c4d69fc562cec1dc14125ce56ab67769443b39142bf1fa3d3097a8", "size": 6599, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Interface.h|1785404936.0|5941": {"hash": "c016c641ff4cf36f4657135c41963e82ea55cb81d8bcc4fc965ab55d836fa316", "size": 5941, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Logger.h|1785404936.0|4399": {"hash": "495818c4fb7ab28c5d4be3657f21fbb1acabceae70ffe32a054d3f046ec07201", "size": 4399, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Matrix3.cc|1785404936.0|5161": {"hash": "bf0b39b49b76d8371c9296965e68e287225001a36e06fb896d95f331e800d6c9", "size": 5161, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Match.cc|1785404936.0|5275": {"hash": "8d4ceb4241994f18df8128e772bc9b9e7cde7f309f942a4a195046f8fa8c213c", "size": 5275, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Match.h|1785404936.0|23112": {"hash": "65a25fecdabaf3017b73299bbcce1c61fa5796af31f0f894eafb82fc83a4c3a5", "size": 23112, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Matrix3.h|1785404936.0|11377": {"hash": "49d1e4f4781391d7800b0a8e654f8b9029d7eb8f669b2a251ef753601bec54d0", "size": 11377, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/MoleculeGrid.h|1785404936.0|9421": {"hash": "2232d1bfdf185c4bad24524e448919e87d5eb1930395555e80dbfd4bc38b9609", "size": 9421, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Molecule.h|1785404936.0|19691": {"hash": "4c5ad089d37a47d5b5244cf34d08d7f055d5cae503d83926a0e5ed115190dd2e", "size": 19691, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/MoleculeGrid.cc|1785404936.0|9050": {"hash": "da0b198503bbde4a4a903934a78820f4bdd6d64060b5563960f7d22990806876", "size": 9050, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/PDB.h|1785404936.0|14746": {"hash": "7181f60d2fa21a9f9a48c5aff0c2df610f67013d36c1a58f6e6027ee2ea83f05", "size": 14746, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/PDB.cc|1785404936.0|7253": {"hash": "44a129413c9fbcbfcf64a3e4146ecca8c172c93658991639b866b32a05475cca", "size": 7253, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Parameters.h|1785404936.0|9370": {"hash": "1a2d9036e035936dbecea92a3389efa1f80ee80fe1e555793a3a45e346e3a909", "size": 9370, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Parameters.cc|1785404936.0|9041": {"hash": "3eb32595137c559b92a6205033bf79b8e48cb83dabe91ba0dbae6553cd6fd508", "size": 9041, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Particle.cc|1785404936.0|1067": {"hash": "5e08a8f71522cdd7ca99f2b9c9574b5e309430abee017e73712c7ddc36bd49a0", "size": 1067, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Particle.h|1785404936.0|3416": {"hash": "5c43f835fb6196795e233e689565de38875db69c05f0502c712a5145ba1b5b01", "size": 3416, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/RigidTrans3.cc|1785404936.0|1098": {"hash": "e997abfdfc045ecc4f9064d15c4725ca60a8ebb3a7747eb1b7adcbd6d8546cdd", "size": 1098, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/RigidTrans3.h|1785404936.0|8030": {"hash": "3afc08665f85b8c2acc66c4a6a50e56396165d92ea3dc000ddf233829f2bca06", "size": 8030, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Rotation3.cc|1785404936.0|8931": {"hash": "3ce036fb21103c65b2775682687fa240eea51549f9c71e6f3059524625170394", "size": 8931, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Rotation3.h|1785404936.0|6246": {"hash": "d95db5838043ec6990389d656548f5b5fc26582e6ecd5a80dff08057383f67e1", "size": 6246, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Shou.cc|1785404936.0|2561": {"hash": "e2501e3b44bb92f2a5bf442aaa9afc86e30a16741166f4ec715fb7c6eb248c84", "size": 2561, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Shou.h|1785404936.0|2910": {"hash": "d1eb8909fdadc62c22f3ae2b95210e976f9ce3ebdd54640010b178078c10566d", "size": 2910, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Surface.cc|1785404936.0|4681": {"hash": "40f9be6f52bda357399826b685d9bd0f86446ea804c69f72ff85b17e09e12a75", "size": 4681, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Timer.cc|1785404936.0|1656": {"hash": "4005e43031b7c354da51be57f64a929f5455a12166083785841128db33ed9f2c", "size": 1656, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Surface.h|1785404936.0|2017": {"hash": "78b1d38aa344a8cbb7b01b711c66c43ab79999ae956453e74c96667093ef888c", "size": 2017, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/SurfacePoint.h|1785404936.0|4842": {"hash": "d9b104c739bed9c3a39b15c6f0266965253d5c9117da00bf99ab2c3d0496a0be", "size": 4842, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/SurfacePoint.cc|1785404936.0|5032": {"hash": "ae9e11ca05157595ab2828525aca67bab06bb7d694d3e59102a19921ed7355b0", "size": 5032, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Vector3.cc|1785404936.0|67": {"hash": "fa039a00ee76a228ecf337cdceb73da8718b8a333cd3514f0ca248f2453efda2", "size": 67, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Timer.h|1785404936.0|3552": {"hash": "a2403cde838f4461b68c867c1698e2e46ad3359bb30de6de78510e2f18c65cab", "size": 3552, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/Vector3.h|1785404936.0|8989": {"hash": "76f866d3e6f40309a29d23f90463c1b456ac830f58b08432d09eb9da0b8f7c35", "size": 8989, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/macros.h|1785404936.0|1534": {"hash": "8b85bfd1f59fc54675709725cffaf06fb3a73e8e99795b44fc09990278338526", "size": 1534, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/numerics.h|1785404936.0|527": {"hash": "3a27aa7327a92d3fe649c59ed144d16eb2f944003229e4e749fa13f10bc3940b", "size": 527, "status": "c"}, "model/README.md|1787795226.0|451": {"hash": "c0934e5ec35e2c013f57be172f73d2070d38d45753032fdb4d4cf0ac11a03286", "size": 451, "status": "c"}, "model/CombinatorialAssembler/libs_gamb/numerics.cc|1785404936.0|5104": {"hash": "1e80f501c92aa02481aac78c5fb47f6006cb09ea6e9965581d70208329ae7d5b", "size": 5104, "status": "c"}, "requirements.txt|1787797232.0|1226": {"hash": "5275f02a8e47fd8f151d362443701511eaa982b582e99e82c9d8615875d0d692", "size": 1226, "status": "c"}, "scripts/automatic_pipeline/configurable.py|1787795219.0|6248": {"hash": "bad03a08e43407a3c8a96aadd8f9755a2ed33a280af3d4da0f097b58313cd694", "size": 6248, "status": "c"}, "scripts/CombFold_Crosslinks.ipynb|1787795530.0|87704": {"hash": "522805d37591b75a41d4c0dda24ff45e78b74b7d02529ae038caeaa1ec935923", "size": 87704, "status": "c"}, "scripts/CombFold.ipynb|1787795529.0|83256": {"hash": "49ff2b96194cf745c98fb24ccbe2c2d5bd47c39e91ee8c4286b67559164328d9", "size": 83256, "status": "c"}, "scripts/automatic_pipeline/libs/get_alphafold_jobs.py|1785404936.0|6219": {"hash": "6b8decb7e9742465c90fa66c91bffc8ebca50671bf479b6a08ee47bcf83e51a9", "size": 6219, "status": "c"}, "scripts/automatic_pipeline/libs/prepare_complex.py|1785404936.0|6358": {"hash": "d8f4d4bb50b5379467f0cb5f00af466b403b2298012a822ffea323cf0f4580df", "size": 6358, "status": "c"}, "scripts/automatic_pipeline/libs/run_assembly.py|1785404936.0|9795": {"hash": "de4bb55efc32624d27f5304cab566fee6897085de701d0a3067b9a26fe345fe1", "size": 9795, "status": "c"}, "scripts/automatic_pipeline/libs/run_alphafold_jobs.py|1785404936.0|1085": {"hash": "5a39812d99710dde43ec2c5fb61b61975087755af59ce126fcfda32bd83a9246", "size": 1085, "status": "c"}, "scripts/automatic_pipeline/libs/parse_alphafold_jobs.py|1785404936.0|8140": {"hash": "fee0c9fd59d004caa6c3d7576eab8bb70471f0b051c76c60bf4ec55bc08905d7", "size": 8140, "status": "c"}, "scripts/automatic_pipeline/libs/utils_classes.py|1785404936.0|3969": {"hash": "67d44305646e3871e40786419eba6c4a6419240055b4e2571a30714e7c70e14b", "size": 3969, "status": "c"}, "scripts/automatic_pipeline/run_on_job.py|1785404936.0|4329": {"hash": "2b5443c174c6c9c5b10ec0134ffe15856c0704d70c67809d4706ba410fdbeef1", "size": 4329, "status": "c"}, "scripts/automatic_pipeline/libs/utils_pdb.py|1785404936.0|6607": {"hash": "388fe9147914b45f30c78da8011addcd0d71dd18be280649fbf3d021e916e649", "size": 6607, "status": "c"}, "scripts/example/example_xlinks/crosslinks.txt|1785404936.0|316": {"hash": "501fabd831244bd592f8179cd155edb826bc93e5955bdd3dfbfe64d95a0c7c2d", "size": 316, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_A_rank_002.pdb|1785404936.0|494132": {"hash": "928b643dd795978dce3ac4fb75ceae2c27a77674454aa71f112a62c1910330f8", "size": 494132, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_A_rank_001.pdb|1785404936.0|494132": {"hash": "f464c2bd640bf0de1375856bf9046c2002941ea925a3d206f5976b26fae08f25", "size": 494132, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_C_rank_001.pdb|1785404936.0|870512": {"hash": "1f9496e7f6db143bec394743f7dd2a382b44a0d86df0b26a59cc79e28286a841", "size": 870512, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_T_rank_001.pdb|1785404936.0|557026": {"hash": "f7e5dda3c64e00c8a6af45b5a6f67cad3d9f79055a4c0a29d1176c852b4616ed", "size": 557026, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_b_rank_001.pdb|1785404936.0|356536": {"hash": "95640758894c24f710a5180944ca1f4db0c8e84ef3a86ab0edf315ab5e2226ef", "size": 356536, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_T_rank_002.pdb|1785404936.0|557026": {"hash": "ec8fbdccaa8fa0b18d0ace929e63535dfca2f850d37cecb566d64deab5b1402d", "size": 557026, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_C_rank_002.pdb|1785404936.0|870512": {"hash": "4598afe3c6fe0df5e163ff92a8604f0e2ed8195cdd638dbbfe6c77f0e47b5011", "size": 870512, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_2_b_rank_002.pdb|1785404936.0|356536": {"hash": "0857d7336d7a60be25b54ce07c3bbe507af4af8dacc6e82d6a4202e0f1d09580", "size": 356536, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_A_C_rank_001.pdb|1785404936.0|745298": {"hash": "2e0e39b04df4a1f455e6fc34c89e766d5112c5d846f176c6f370f5e6a2077a04", "size": 745298, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_A_b_rank_001.pdb|1785404936.0|231322": {"hash": "016a3f611709e2d4731c667c290eea119535855f27122652c6551b7559c251e1", "size": 231322, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_A_b_rank_002.pdb|1785404936.0|231322": {"hash": "958ab20e774d72c9fee31131cbb837160da2af91fae84a58c5f087076ddab4aa", "size": 231322, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_A_C_rank_002.pdb|1785404936.0|745298": {"hash": "48da90800e408e2bd6340b8f88c0a88afa74254ef7b78656dd2f9044d852dd41", "size": 745298, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_A_T_rank_001.pdb|1785404936.0|431812": {"hash": "e37fcbb08a3299730bed2bb354bd2a9c18288ba1d778d27e6aafee59fa921786", "size": 431812, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_A_T_rank_002.pdb|1785404936.0|431812": {"hash": "eed841b2fb417d74b3ebebaeecd33d14fda4fe6ccf46de511d88ecfa273a83a9", "size": 431812, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_C_T_rank_001.pdb|1785404936.0|808192": {"hash": "a6035e1a8a23d8dc49c8a314c26b838b417a75a807b80509f6976a2099b6d12f", "size": 808192, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_C_T_rank_002.pdb|1785404936.0|808192": {"hash": "0b70f9f57eef0d261ed1f942b5e096ed5c09c277accad44b1a0cdebd145933f5", "size": 808192, "status": "c"}, "scripts/example/example_xlinks/subunits.json|1785404936.0|2654": {"hash": "3bd8d02064ca41aa245aac75f85dbf565a4b9a71f57e8e670c088de01c3aec34", "size": 2654, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_T_b_rank_001.pdb|1785404936.0|294216": {"hash": "43f3d6463d1a84e39bff97c3b51758b6538df35c4bbf946da99f6cb7bf9001f1", "size": 294216, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_T_b_rank_002.pdb|1785404936.0|294216": {"hash": "ee1c98ccd9104bf07cc2926cf0ca48e6502a3c94b4b1f16bbe8f1988c34f1bbf", "size": 294216, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_C_b_rank_001.pdb|1785404936.0|607702": {"hash": "680235ded1c071aac63c965950b56957ceed282b04f0cb826683887d4dca3990", "size": 607702, "status": "c"}, "scripts/example/example_xlinks/pdbs/AFM_C_b_rank_002.pdb|1785404936.0|607702": {"hash": "c94c9fa1551ebe3a18d6811caaabf406dcf0d0855488a1b04f9bdbb5b86f3a39", "size": 607702, "status": "c"}, "scripts/example/pdbs/AFM_A0_A0_A0_unrelaxed_rank_1_model_3.pdb|1785404936.0|968256": {"hash": "4f0eeee05d105b6a1e492c7611f9984b386248f22a75872966688ed0d3dcef13", "size": 968256, "status": "c"}, "scripts/example/pdbs/AFM_A0_A0_A0_unrelaxed_rank_2_model_1.pdb|1785404936.0|968256": {"hash": "a09a04acfc10e191b79175b0046256db2d3e730babbf2d7c6d565c454babca8c", "size": 968256, "status": "c"}, "scripts/example/pdbs/AFM_A0_A0_unrelaxed_rank_1_model_1.pdb|1785404936.0|645586": {"hash": "c470fd17aa53063c1fbad947b5cd2f43d864ca3a8250477ff7cd640cd32b5969", "size": 645586, "status": "c"}, "scripts/example/pdbs/AFM_A0_A0_unrelaxed_rank_2_model_4.pdb|1785404936.0|645586": {"hash": "5402896c70a8fab799645a0ec63b81880863745851348ab66714f5e544a567f2", "size": 645586, "status": "c"}, "scripts/example/pdbs/AFM_A0_G0_unrelaxed_rank_1_model_2.pdb|1785404936.0|737426": {"hash": "c881427e15b125d0905bb2ffa4476df686cce7e425911be1c7b3155390bdba89", "size": 737426, "status": "c"}, "scripts/example/pdbs/AFM_A0_A0_G0_unrelaxed_rank_2_model_3.pdb|1785404936.0|1060096": {"hash": "ecf6fbcdc015a300de15e30b02eb9d13041e22ce30b1f55ec53db73261f19f22", "size": 1060096, "status": "c"}, "scripts/example/pdbs/AFM_A0_A0_G0_unrelaxed_rank_1_model_1.pdb|1785404936.0|1060096": {"hash": "7d7f157325cc66d1db6573c138d4cc2bd6ee6e3fe39e671da6dc9562ef2fe75c", "size": 1060096, "status": "c"}, "scripts/example/pdbs/AFM_A0_G0_unrelaxed_rank_2_model_3.pdb|1785404936.0|737426": {"hash": "9bbbdd7e8b3aa2e8848fd55b1542528b1dbb4ed6ff5abc124fc02b9a493c34b8", "size": 737426, "status": "c"}, "scripts/example/pdbs/AFM_G0_G0_unrelaxed_rank_1_model_4.pdb|1785404936.0|829266": {"hash": "2995afff7485536781cb2a0bca06fb5c17a2a8a0dc587c2b6d57ec47fa98d3e6", "size": 829266, "status": "c"}, "scripts/example/expected_assembled/output_clustered_0.pdb|1785404936.0|4423100": {"hash": "ca9d08cfd8f72e20445aa8416f0ae61fb2c507c3117d131c3cc04d838b7d21f9", "size": 4423100, "status": "c"}, "scripts/example/subunits.json|1785404936.0|1536": {"hash": "282496d8fad0d518c093baaad89e3c4f8134923a8fe6225995ee49336e0baf78", "size": 1536, "status": "c"}, "scripts/inference.py|1787795417.0|2503": {"hash": "201fd4f253f3512d2731456c914fa9278903f1f9262fde8e439dddaa6e4b182d", "size": 2503, "status": "c"}, "scripts/libs/prepare_complex.py|1785404936.0|6358": {"hash": "d8f4d4bb50b5379467f0cb5f00af466b403b2298012a822ffea323cf0f4580df", "size": 6358, "status": "c"}, "scripts/libs/utils_classes.py|1785404936.0|2933": {"hash": "9a98729996d1b7f94668ef8d595f49460f3b6808ee5c2e08d40d9afdede3b7b8", "size": 2933, "status": "c"}, "scripts/libs/utils_pdb.py|1785404936.0|6588": {"hash": "840d0ca5eaf5de1cb1cd46d66c4c265169b1879bb336e4d3745a718530ff3796", "size": 6588, "status": "c"}, "scripts/paper_resources/analysis_scripts/build_crosslinks_benchmark.py|1785404936.0|9142": {"hash": "edb23fe44cff1aaeff477611d1327a9bf0956ba35b2f5c948b20d30452074882", "size": 9142, "status": "c"}, "scripts/paper_resources/analysis_scripts/calc_all_dockqs.py|1785404936.0|6071": {"hash": "8d8edf19fdbc9b2a4c4abfe9a041fb9441d3d5b5ada4f258097020b248095163", "size": 6071, "status": "c"}, "scripts/paper_resources/analysis_scripts/calc_ics_benchmark.py|1785404936.0|10120": {"hash": "ab1465248d9be97b746023016c1f9b9474dedf36d6a2e549d76a2838c161c07b", "size": 10120, "status": "c"}, "scripts/example/pdbs/AFM_G0_G0_unrelaxed_rank_2_model_5.pdb|1785404936.0|829266": {"hash": "e3f1020242213cd162ceab8d12b7993b1ca5580c560dae55c6e4d2ba1748f351", "size": 829266, "status": "c"}, "scripts/paper_resources/analysis_scripts/relax_pdbs.py|1785404936.0|3631": {"hash": "00e372b54e0a6e323b41dbb5fa51e1236e4a607ffc1be22397bd4586d83b692e", "size": 3631, "status": "c"}, "scripts/paper_resources/analysis_scripts/get_all_pae_scores.py|1785404936.0|2136": {"hash": "fe8712e772727f081db4a7cffd5e2cc371f6fa57ab12f80eb1d7eb386ef55287", "size": 2136, "status": "c"}, "scripts/paper_resources/analysis_scripts/rmsd_pairs_scores.py|1785404936.0|4435": {"hash": "2c745b46d5fc952239c504c76e9c296ead68e0be340391ea5ff6b0880372cca9", "size": 4435, "status": "c"}, "scripts/paper_resources/datasets/benchmark1.csv|1785404936.0|210": {"hash": "728de21a160e7730e7dad6610b9c33bc96dbae70303c972a389f85e66f52294b", "size": 210, "status": "c"}, "scripts/paper_resources/analysis_scripts/run_haddock.py|1785404936.0|3313": {"hash": "b110a148dd3030aad5aadcd2354319d2146eb6105d2cd871e0f1ae446e1e07e4", "size": 3313, "status": "c"}, "scripts/paper_resources/datasets/benchmark2.csv|1785404936.0|150": {"hash": "56e45668a1a6c2544fc8d3dd041f1001e2554a17357f56781ac8f0bb78c7dc32", "size": 150, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7ARC_xlinks.txt|1785404936.0|2883": {"hash": "5fd0988c625fc32430fc8fd98a1f6fb67add05d3e34a9e77cd7485d936a55cf6", "size": 2883, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7OBA_xlinks.txt|1785404936.0|1980": {"hash": "612053ad0bfaf31b70ace29cf02af604c6df544389156728e1e2db8de0cef631", "size": 1980, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7E8T_xlinks.txt|1785404936.0|1920": {"hash": "e31b6ae6e3973ee053b118077f7f57e1a4f6be23818e37a43e73faac394045db", "size": 1920, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7OZN_xlinks.txt|1785404936.0|2120": {"hash": "fee7311d9732a22473c63d454b24ebdc43ecab0822fefdee5dd562a7e5e8c1a4", "size": 2120, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7P2Y_xlinks.txt|1785404936.0|974": {"hash": "80094e99332a290dd496c32efb9d2ab2e5696c6303f4c0632014ba9c1f309930", "size": 974, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7PKN_xlinks.txt|1785404936.0|1710": {"hash": "70fbd3edef53f9d95fc227577846c13fd56340cd93320147adc161b77caf9ce0", "size": 1710, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7QRU_xlinks.txt|1785404936.0|336": {"hash": "cffa10a0ed695cc5956ca2fdd8f8117728e5d4b2f33c5f45880aa730bd5c4ca3", "size": 336, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7QVE_xlinks.txt|1785404936.0|2023": {"hash": "5f0a19ae379f8fa4b2968c01587c0ee31650c7b1e429c4e1ec6e8d7afc517bd5", "size": 2023, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7T2R_xlinks.txt|1785404936.0|753": {"hash": "3642fcc9af73871e14ccb7f55f0fabf98f2dee5e9689df1d35090cdd0fd07903", "size": 753, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7T3B_xlinks.txt|1785404936.0|994": {"hash": "e7e2acffd805ca1abae2dfa2351163031fe28d49ce2685b4c16923b5154d46f9", "size": 994, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7WFF_xlinks.txt|1785404936.0|1732": {"hash": "bd2a14b3f7373c0114545589a74c54640a92aa0eadd9e030eb40ad8716f9e87d", "size": 1732, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7USE_xlinks.txt|1785404936.0|756": {"hash": "609ccb1d6e12a8f871cb8a82143b47dc7a259c204fb06a7de2e7627761706b9d", "size": 756, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7UIC_xlinks.txt|1785404936.0|842": {"hash": "a9d417b6aabbd087ddf7662f2e635d1349c74e30686757ba5663cfb1dfbe77ee", "size": 842, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7XHO_xlinks.txt|1785404936.0|3031": {"hash": "e0417617e3c3c05cc89366e3db0841bf93a929e24922d7e4d8841fbbbc04f4d7", "size": 3031, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/7ZKQ_xlinks.txt|1785404936.0|316": {"hash": "501fabd831244bd592f8179cd155edb826bc93e5955bdd3dfbfe64d95a0c7c2d", "size": 316, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8A3T_xlinks.txt|1785404936.0|4773": {"hash": "6dcd6fc6e88043763485698caaa4ab7e3521ee86ced70a60741948b2de1f3ceb", "size": 4773, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8A5O_xlinks.txt|1785404936.0|730": {"hash": "75465198187afdb3b1f688e836fb0a14200c3062607850769ab94458a0b0d918", "size": 730, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8ADL_xlinks.txt|1785404936.0|2423": {"hash": "c68797d27a31afdc513a8a92f699cff24e42d44d6fbd133d172a520f2beeb26c", "size": 2423, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8ADN_xlinks.txt|1785404936.0|4428": {"hash": "1acfca9aa300aab5a265d8e41483d80a7c5469773e0cf6721e1c47d3f3294ce4", "size": 4428, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8BEL_xlinks.txt|1785404936.0|336": {"hash": "3d43cbce5a5798866c662326e5e7ec2fb36122a4cd3341df51b9e1d4dd56b777", "size": 336, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8CTE_xlinks.txt|1785404936.0|942": {"hash": "cc79270cbb18af14e42c7a62e6bea1d20ee85e19a3c7741fc15acefc77bf81a2", "size": 942, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8E9G_xlinks.txt|1785404936.0|532": {"hash": "71378589014f893e307d813984ec925328b6f553244b054f33fb449251079154", "size": 532, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8FEE_xlinks.txt|1785404936.0|629": {"hash": "e4daec0d341b87534d24ad24822666f4cba1e5f671943fb398c1b82bb3676529", "size": 629, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8F5O_xlinks.txt|1785404936.0|850": {"hash": "adabd2c3c5e3a19b6291960d3dc64044a93b60c729dcad0797423778ea5c42f5", "size": 850, "status": "c"}, "scripts/paper_resources/datasets/benchmark2_simulated_xlinks/8HIL_xlinks.txt|1785404936.0|1492": {"hash": "a587a0852d0e5484157a3f4fc2eb57cab62fce814dcfe90b38f44de31fcac814", "size": 1492, "status": "c"}, "scripts/paper_resources/datasets/benchmark3.csv|1785404936.0|1050": {"hash": "a39fe86de8d76b01aaba4515c12b4c666025d18259882c18709ce1f65fa747f6", "size": 1050, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/H1111.json|1785404936.0|1842": {"hash": "8770077200f507df5b52d3e72fc6463adbe07836461198e8514b611bde805111", "size": 1842, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/H1114.json|1785404936.0|1729": {"hash": "0646924d57f579de9d916b85d75c3e73d3ae6baa26262bf8492730f3ad363827", "size": 1729, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/H1137.json|1785404936.0|4376": {"hash": "b7896e9e3cba67b5832e77ceab7c0511bf754780c9d938143f1840316dcec1b9", "size": 4376, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/T1115.json|1785404936.0|614": {"hash": "9b739275f18ea8f6c14e5acb08da172abffdebe3ccb5a764c673bf91683dd2c2", "size": 614, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/T1165.json|1785404936.0|3695": {"hash": "12c43a6c4c818f887cc127505656886f4ad3a76dad3009697d8fa79b429efc66", "size": 3695, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/T1169.json|1785404936.0|3607": {"hash": "7782ff01ad332b69d77147a0a23f9b9f4a877cd33b4420a456099d0a8d14f930", "size": 3607, "status": "c"}, "scripts/paper_resources/datasets/casp15_subunits_by_iupred/T1192.json|1785404936.0|444": {"hash": "229abbae2a68e006843e029d7db557e6ed3496e33a5c4572a8ecd5a420be66c9", "size": 444, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX3198.json|1785404936.0|1858": {"hash": "c262d54554646248aabdec98d2ad7bba1d7331ac3cc1747a3178171d4eb38813", "size": 1858, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX3197.json|1785404936.0|1852": {"hash": "b0f898c644d70b2f447d585c7ffe987e0184216db0882d64bcb1f99544b35fd1", "size": 1852, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX3266.json|1785404936.0|6333": {"hash": "2f7bdc078cf7cd42ea37e24ca553532506eab172149149ea6d6b98cccd4449cd", "size": 6333, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX3963.json|1785404936.0|2415": {"hash": "e843372b884a06f3a99bdbe0971ee39245e01a56587de7b2aac40a86b1e2a7aa", "size": 2415, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX3267.json|1785404936.0|6370": {"hash": "228ada0c9f1db2ba391518e1c3678aeb782321106d8289c844585355bc0f8cc1", "size": 6370, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX444.json|1785404936.0|3267": {"hash": "2d460305f7e33efa7875dd93418ecec40c779b652bfc5901f94f59a9f39bc11f", "size": 3267, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX980.json|1785404936.0|6825": {"hash": "f1e6fe0331562fe793ae8b05c6e5625e416038ec405029be7f7bfafc8adeb0af", "size": 6825, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/10090CPX986.json|1785404936.0|7102": {"hash": "fac21cfe6cf3b5eb748d8f422e60276a3c5016e0594b00face1a0c270587231c", "size": 7102, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX124.json|1785404936.0|4773": {"hash": "6f4339a49e78db92b2b215d502e2dda53cf86ab8246ec553ebd1c1fc7cb8031a", "size": 4773, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX1039.json|1785404936.0|4738": {"hash": "5df8bd3f33d9e73a970c653d6135da791e213b4ae483fea8042d5e7446f87019", "size": 4738, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX1275.json|1785404936.0|3381": {"hash": "7f472e862f384e08aa8970a1426268eeda782f4eec9656f4039e2205dc2fa92c", "size": 3381, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX1882.json|1785404936.0|3844": {"hash": "64a9eda01a4672634bb59c3d0b388befd59a591a37d1551bb000cf0e122eecdc", "size": 3844, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX1901.json|1785404936.0|3340": {"hash": "3d6e1c6b73fc96a988dda2042184ef46503c0b1bdebda916fd83415bf7e6f8be", "size": 3340, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX1616.json|1785404936.0|2417": {"hash": "8dfa4cf648f13f0717e55f85ed02c09698cbf8cc54c90485343dc2090dbc2bb5", "size": 2417, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/559292CPX1869.json|1785404936.0|6774": {"hash": "aa1cdf85b4c8ec2313ef9edeb635716b9e398c5fbff1d20b60885bd3bac93518", "size": 6774, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX1949.json|1785404936.0|4858": {"hash": "c00e12a7c0d83196e87b3153c197b337ce56059473fc4d2a19ce847ceb8e94ae", "size": 4858, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX3072.json|1785404936.0|1855": {"hash": "613edef9b02d6ef6e995ec5f8e9582e8e433e923ebdb4dc942f7eadf4de6d0a5", "size": 1855, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX3263.json|1785404936.0|6361": {"hash": "acf933d1df3b901b6328e7c2165f71e6720bd4eb1b8795b75db793deaced9fa2", "size": 6361, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX3073.json|1785404936.0|1849": {"hash": "f1844d8355d44c7ce04c918711984c8ad02c652d1125e5e449eb5c49e0400543", "size": 1849, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX3232.json|1785404936.0|6323": {"hash": "f1a3ba241593632084348c547d530e7101a0b6fa7325db0ab7f21894aa9ee8db", "size": 6323, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX3905.json|1785404936.0|2410": {"hash": "d70eab3f8ab17a48a0d77a38fdbf41466cb25d62a48b40a2e7648448af8cd3a4", "size": 2410, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX7142.json|1785404936.0|2814": {"hash": "4ca742168ad8a68ec249ac65de4f589513c6bfb42eca65f8936883ae158b78f1", "size": 2814, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX434.json|1785404936.0|3269": {"hash": "c78296590fb93ebd05baf92a19f62442209b232829d01716778b25ea341bdbd8", "size": 3269, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX6199.json|1785404936.0|7573": {"hash": "65f1684025010172ae61842f8c95f906b8c108c2fe5c7be5e656f109d9627390", "size": 7573, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX6213.json|1785404936.0|7006": {"hash": "b9576ce4e2889d81d728a98645d92c1f647a10b344628c4ced7603ff8e9efc84", "size": 7006, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX6212.json|1785404936.0|6304": {"hash": "6bc1d5eba3c2ef216867d61556fe5a8eca235ad7758aba96b8adf9fad826cdcb", "size": 6304, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX979.json|1785404936.0|6863": {"hash": "38b361fa72cb899ab0f9ca6efddbbee6122346e15a173c464f2652c8c1cc86b7", "size": 6863, "status": "c"}, "scripts/paper_resources/extras/benchmark2_extra_coverage.csv|1785404936.0|849": {"hash": "bce6ebd238ed6b51c08cc6644942fd0deb3503c35528427f041e6b75362f2434", "size": 849, "status": "c"}, "scripts/paper_resources/datasets/complex_portal/9606CPX985.json|1785404936.0|7105": {"hash": "1841c98c7eb5f5ea92a9be262db4ac071c9fda5a457eee0d7b312a596db3692b", "size": 7105, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/AFMv2_results.json|1785404936.0|16078": {"hash": "d58e4275e473dcd4058118fbf2c7bbf469481955fc07866a1edf49a22c7aa488", "size": 16078, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/combfold_results.json|1785404936.0|36661": {"hash": "6561e563d5b7a7bf803978e6bbf16d56441a4e261a202a3f58de5161a11b10fb", "size": 36661, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6F0K.json|1785404936.0|3736": {"hash": "06738259eec8c9a122400df70582ee52e9e2de19b03f83e1e6bfdca8b01f9974", "size": 3736, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6K15.json|1785404936.0|9386": {"hash": "edd55c06392aa1e50a97c95eaf0c53ece514f310cf6e6ab5ca5e0bfb45ecce25", "size": 9386, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6I3M.json|1785404936.0|4954": {"hash": "0999b29391ae4b8ab801137608b6b1e8b5f02a07a2cbc175b4c9ced52d136822", "size": 4954, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6QLF.json|1785404936.0|3678": {"hash": "a13a70cebd4fac6acfcb134381f68d55d418f73035f8172a702ac547898f1c92", "size": 3678, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pairs_validation.json|1785404936.0|1692661": {"hash": "54cf953f2607cff88d7b0ab0e68f0e0521ab808fdd083927c19fe16c035815b1", "size": 1692661, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6RDB.json|1785404936.0|3213": {"hash": "ad630916d4a55accd6e8e0ccc8c640d6c5820da05685af66cbf8c66f53690677", "size": 3213, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6RD7.json|1785404936.0|3298": {"hash": "15569fe6aa6ffccb667beed521d6fd923f1108377cd63cae717e071a6ac30fe9", "size": 3298, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6RIC.json|1785404936.0|5637": {"hash": "8796f4ebeab55da1b9c97f6306ae7aaac054092ef15928de2dd142fd29f5f9a2", "size": 5637, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6SWY.json|1785404936.0|3980": {"hash": "6c9ef75e4b7ae4e86a168c9f6ad0183dfeb2ed1bd32913f4d2bd3881aa5cbbf8", "size": 3980, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6SZ9.json|1785404936.0|2593": {"hash": "9c2856cad86c640aec0d448b30a584d17b77ab47fdb82dfc3cee3c6844d3abc5", "size": 2593, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6TDX.json|1785404936.0|1636": {"hash": "99dd5edac5926d57da0f59b9ff46defdbc8743b6bac16b7f258eba2dfe31244b", "size": 1636, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6TMI.json|1785404936.0|2756": {"hash": "c75fc7bc09991e77c72ad4ccacd32007e972815ede035488dd4789c5caaeae32", "size": 2756, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6VQC.json|1785404936.0|4394": {"hash": "dbe6ce82f1160b4d915f11baedc87b78960ba072f5c7bfeca9f590077be8e478", "size": 4394, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6YBD.json|1785404936.0|9561": {"hash": "e427ae087f0b9ef853093d4e8068a6c15488fc8f100bf978a0c4ea0b5f92b6a9", "size": 9561, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6YY0.json|1785404936.0|3605": {"hash": "db3ef72671de4b61f6d2e517495d1ca8d32a101d7a67a3eb7d6fe5e75b2ead73", "size": 3605, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6Z16.json|1785404936.0|2987": {"hash": "329b1ddc05d4f28659c1a5b8e47edfc3d00656c7a2f8a2211872426324026dca", "size": 2987, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/6ZBB.json|1785404936.0|2588": {"hash": "f032fedd0e7f40713a50e32dca1f62adfcea521513e78729ac8baf99d3cb4490", "size": 2588, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7A6H.json|1785404936.0|8619": {"hash": "a664d1352a2676546e14c14f2354b7454f38336d59dc9e41f1753c4e5296036c", "size": 8619, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7AQW.json|1785404936.0|4054": {"hash": "885b3c3dd1e5895b6b3d9ed79d42ed4f175b379cb3031bb9a7b818a10094fd01", "size": 4054, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7ARC.json|1785404936.0|6175": {"hash": "2d3fa82782c287708e66df5ecae8b0d072db2d0ba34069be1db745fcd94527a1", "size": 6175, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7BKD.json|1785404936.0|3271": {"hash": "24d2beb7ca9684d6daa32c74c631421cd39c765e980669d3762f41edfd03407a", "size": 3271, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7CGP.json|1785404936.0|2101": {"hash": "0ad8369e8a1d85c25d5dbdda78bef41e50cffa0d409bc2ec2188982c373d1d61", "size": 2101, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7CK6.json|1785404936.0|1438": {"hash": "594e42166dba12f783fd04c54236a73ee39d1356c494692ac07f5177c8e3979d", "size": 1438, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7D3U.json|1785404936.0|2836": {"hash": "787d6139d2ed9cc4e1ce7b7d45c1bb2824a71e1b5494538556cca7d60f5adcd3", "size": 2836, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7EGF.json|1785404936.0|6202": {"hash": "fefb578853b1ff797ba89284f00d4fea3de9c08f19d51fe2ae15272316453b62", "size": 6202, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7JG5.json|1785404936.0|4337": {"hash": "2c89a9cb3ec008b8973cfa8ab96e8490279b1468ecd6e8721c632b099eca92ba", "size": 4337, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7K01.json|1785404936.0|4622": {"hash": "7e40c26260481ddbba48bc01d0a25a023aa4deda5f4111fb5e9e3e36630ba7bf", "size": 4622, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7K36.json|1785404936.0|3419": {"hash": "5e3c765e12b6f42d1df92af731df4048f0a86e9316ed05d9f23eca6e2c4629a3", "size": 3419, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7LIV.json|1785404936.0|3108": {"hash": "1365f373ccd44d5dfc1221daf23523e1c4363bb373166eb6fd42d94e60cc9b63", "size": 3108, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7NYR.json|1785404936.0|6688": {"hash": "44047aca81a9d278b8bf27570dc53a6e441b7966aa2c470e000326d3e246b9ea", "size": 6688, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7PKN.json|1785404936.0|5118": {"hash": "e23c09a4c0d48aad6e9768386c29e8ebe9ae54f5aecc885c2b76542e5ac2ca5c", "size": 5118, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7RJA.json|1785404936.0|3483": {"hash": "620465dc01a8c27ef1977ee9a86ee8c68b5484d67ab84d8fea7948cbe7d41271", "size": 3483, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7T2R.json|1785404936.0|2857": {"hash": "56e5b18958f7605efb76b575dbfad3d2a472ba995aa60f551d622fe9c1b2dfa8", "size": 2857, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7USE.json|1785404936.0|4290": {"hash": "83245a6a70d4dee696ad78cb98779176f56d33fbc5d37dfcc4c64bf4321d5e03", "size": 4290, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7WFF.json|1785404936.0|7393": {"hash": "663c34c1b6146966b25298d8fc1cfd5cabdd3c6ba1d1ffea850d98db3cbb50e2", "size": 7393, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/pdb_infos/7Z15.json|1785404936.0|2405": {"hash": "56ce87e4f051c5e083445c296209f4f945b4d81211cec5ca39ad38c866334bd0", "size": 2405, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/runtimes/duration_simple.json|1785404936.0|5541": {"hash": "48589b04068e157a620169d1e6046a1ac3711269f1280927f3781773c9289018", "size": 5541, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/runtimes/duration_combfold.json|1785404936.0|220614": {"hash": "067fe1dd96f36b1d269bf3a6d8d46211128a3a60e8361c0a0d19d50b7df6ed3d", "size": 220614, "status": "c"}, "scripts/paper_resources/figures/data/benchmark1/runtimes/runtime_summary.csv|1785404936.0|3312": {"hash": "403f4e5027bc13258569fd5f6b33bbfabefbd656d699f3d573eceac4126697ce", "size": 3312, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/AFMv3_results.json|1785404936.0|7752": {"hash": "34315c13a97eef97c9b6c29a5b607005932cc97b3dd8f27e211d493d67e38cfb", "size": 7752, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/clashscores.csv|1785404936.0|398": {"hash": "2111b0c36715a97ebe68a064543e674b898d186944caa2c0321aa39da48b5ff3", "size": 398, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/alphalink_results.json|1785404936.0|76": {"hash": "caf5e2df54eaadd0a197f47b209490e8d7945f524f1cae1c6b879f0952b84b6b", "size": 76, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/combfold_results.json|1785404936.0|67256": {"hash": "98f67806ae23b2356c971c96a1a4db10c8b238f2a7f7518aa749dc07a6e4c37c", "size": 67256, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/combfold_xlinks_results.json|1785404936.0|51803": {"hash": "c66fdc642fbdc9a1f208baf08d46a509c6614b9a064f4c8e44423d94278a9405", "size": 51803, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/haddock_results.json|1785404936.0|5638": {"hash": "321dbd4bc0095a59c51135fc1e654476e03f6fa8059a90cb4733ffe6e6cd802a", "size": 5638, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/iptm_validate.json|1785404936.0|190983": {"hash": "10b4af787406f20d55e82232a7a89ed275227c3c8300d88f7138bde43e31ddad", "size": 190983, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pae_data/top1_used_pae_scores.json|1785404936.0|2653": {"hash": "7699ca10c708eefebefe1c4692c45204d439d7504911794049e074119fdea48e", "size": 2653, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pae_data/all_pae_scores.json|1785404936.0|562657": {"hash": "a29c96611c2fcc49b11b9bb511f74752ca933ef83f8c55b7b63beebe785c3a1f", "size": 562657, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pae_data/used_pae_scores.json|1785404936.0|70981": {"hash": "b7fe4ecf164e1cf360439cf89872eefaf3a1daa9c8cc7afd05399cea3ca80aa9", "size": 70981, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7ARC.json|1785404936.0|5872": {"hash": "6850919d5c6bc1b9599fd5d574c6aa58743f9f936e56b221e892d92f3cc94c6d", "size": 5872, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pairs_validation.json|1785404936.0|686404": {"hash": "b09db2dba78393b4d7f5143cc8eaac7a6581682fade6ed84739b6ab0d5d77710", "size": 686404, "status": "c"}, "scripts/paper_resources/extras/top1_benchmark_1_2_pdbs.zip|1785404936.0|36678137": {"hash": "97cd405c075a7aecb869b6915ae97e499a384605e35218897260107caab53740", "size": 36678137, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7E8T.json|1785404936.0|5957": {"hash": "af86623ce30bd932b6ba1cfc301a7f8dbcf8d46032b187065a24089b60b06268", "size": 5957, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7OBA.json|1785404936.0|7673": {"hash": "3f759d9567826c9ee6480336881902b48e8c8eb3a89f1fe9ba466743363ec3ce", "size": 7673, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7OZN.json|1785404936.0|6308": {"hash": "2d989a437761256d15e997532ec68a32042befafc91300b3f79c5037eb03618d", "size": 6308, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7P2Y.json|1785404936.0|3243": {"hash": "5eb28a93d6001eba6e6e800db66f9ffc3d27bb402c60c4b378a7fa3476e2652c", "size": 3243, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7PKN.json|1785404936.0|4909": {"hash": "f4d122ee0318c3e9a22440adac9b13cf9a1d0f8835e28a52128cdaf59448ba69", "size": 4909, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7QRU.json|1785404936.0|2791": {"hash": "03c947a334a1f4561062330a42ea5bdeba9fabefcdb6f9d5112afcdcdbf2ee9b", "size": 2791, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7QVE.json|1785404936.0|5247": {"hash": "c8f77bcd3de08a4294b74099c174d8f0c0373e27d28051c7b4f6e913369de393", "size": 5247, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7T2R.json|1785404936.0|2762": {"hash": "2bd004e859ea547848b94ccfe38b2a9cbaff7a65af426a9e0e38e1f1d83a9946", "size": 2762, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7T3B.json|1785404936.0|5067": {"hash": "c1e44751223d8f7b70f95c98fce642c057a4cdf51aba5edbd87808340d50e841", "size": 5067, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7UIC.json|1785404936.0|5820": {"hash": "a274cfa46d9f408b650750f4513b63bdba0df0751dafad8bc1b837edbe545d07", "size": 5820, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7USE.json|1785404936.0|4156": {"hash": "ab5be4fcbb26183acbfe0f1ebb887ba341360bb3442edad678df1375a3d113ef", "size": 4156, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7WFF.json|1785404936.0|7070": {"hash": "f7a705ee883ebe7be015cd7317c422a5a1b8be8ab78096d541cddd91ab66f85c", "size": 7070, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7XHO.json|1785404936.0|7332": {"hash": "f50a0b9ab290d793dce06f4de1f31bbcf9daad802573ff1398861ef5a9829e56", "size": 7332, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/7ZKQ.json|1785404936.0|2654": {"hash": "3bd8d02064ca41aa245aac75f85dbf565a4b9a71f57e8e670c088de01c3aec34", "size": 2654, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8A3T.json|1785404936.0|11571": {"hash": "820560eb21264956e888674364cd52b3c59b1b4732a618d2cd630e4f3330a7e7", "size": 11571, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8A5O.json|1785404936.0|3080": {"hash": "c9267d48da48e6ea34b93dc8237c7390794d7cf86bfca7eaaf0fd39f97f6ecd9", "size": 3080, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8ADL.json|1785404936.0|8783": {"hash": "2a2dce910fe6a2a163a62ce230c3e032bd718eb77db1d01d0e623e66a5024a57", "size": 8783, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8ADN.json|1785404936.0|5332": {"hash": "fa76076338dfb6ee7cc3b27b761588b6a35d4464472fb98ac49fa31c4db8ef35", "size": 5332, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8BEL.json|1785404936.0|2169": {"hash": "c982c57e5531671d28b0a6332cf39afc54157c79acf9bd8855e11c606d4b6948", "size": 2169, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8CTE.json|1785404936.0|5655": {"hash": "56dd23b172e70659556622f7950498d1c782ddedad19952e24090c465a41d151", "size": 5655, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8FEE.json|1785404936.0|5034": {"hash": "853f90679cbb7f1c45b96fe569b591ec299781594e1420ef1a8fba7426fc6486", "size": 5034, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8E9G.json|1785404936.0|7021": {"hash": "7997f7bd596b8dabc594d1b8dd2065158887a3fa043ff21b29bf69d40a2c6f2e", "size": 7021, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8F5O.json|1785404936.0|8546": {"hash": "5196469d6e45219f904a3e6c96a3f651462e6b2372373d4fd288c3064bc73a48", "size": 8546, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/pdb_infos/8HIL.json|1785404936.0|5718": {"hash": "96536d9a50fe3103aefdff8a7ef468ecdd3252d9bd701434cd6eb6f218f1d039", "size": 5718, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/prodigy_results.json|1785404936.0|12086": {"hash": "0ffffe1641131eab0eb900807db9836fd4e79923a61c579da1b110ad96253702", "size": 12086, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/rmsd_validate.json|1785404936.0|1221394": {"hash": "00098a10975e0c807d0009ac7241c9f85581f1a6be7a0e466deee9a4a00b209e", "size": 1221394, "status": "c"}, "scripts/paper_resources/figures/data/benchmark2/rosetta_results.json|1785404936.0|2513": {"hash": "f9e58833676da1958ccf82377d70a908c64b1de456a4e5965a4669d79125d188", "size": 2513, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/AFM_v2_all_trimer_mmscores.csv|1785404936.0|4401": {"hash": "1c393c8594aaa63ee35e27cb4b2cd2f128f80fac3a1befe053dae288549e5435", "size": 4401, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/FD_all_trimer_mmscores.csv|1785404936.0|4524": {"hash": "6eeadd19aa144fc75428c44aaa6759d930e0e9568faf733989226211c82af50b", "size": 4524, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/combfold_results.json|1785404936.0|252822": {"hash": "d63c52bdea87e9c050a57be3e306f33f3330b5c45e2b6223972c1104488af76c", "size": 252822, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1A8R.json|1785404936.0|471": {"hash": "63715881b917e0fe9977b94c5bccec5c174c5616b7653abee152a85b37027dcb", "size": 471, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1AVO.json|1785404936.0|624": {"hash": "5f52585450ce96c9ceec843c13091f4e51a8f55d4ef2ec81bdd388e090da8a63", "size": 624, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1BCF.json|1785404936.0|576": {"hash": "32c5748b657509cfb1802f16d31e8801121595548764472c0855d7b8173c8a4a", "size": 576, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1BHC.json|1785404936.0|307": {"hash": "ac16fa0d1534a0e193b7214aeadd3a47a44f9ef2f2619bc8adc7108bfd3bffc2", "size": 307, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1D0I.json|1785404936.0|430": {"hash": "f2cd5bc944f1941324231509edceb5d5007177a64e47b4cb85430f753ac78aae", "size": 430, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1DPS.json|1785404936.0|441": {"hash": "0896554e3ef4a6b7f79de061b174279ebf089546ab21ffbb1bc6ccc1e812309b", "size": 441, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1DW9.json|1785404936.0|406": {"hash": "6592ba2fc953db353a7b84f94ab7326b6f29fd4037ca929a9cd8c72b1020ed6c", "size": 406, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1F1H.json|1785404936.0|742": {"hash": "8d6fd10f61125d4ebf6c8442126b1bc6b2acb60e1cc8ec137798c41d24156432", "size": 742, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1G0U.json|1785404936.0|5370": {"hash": "405152da10a9fd87510fc2b7b32c64ad4c174c7ac75b7965aaf1962c8652d51b", "size": 5370, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1G63.json|1785404936.0|455": {"hash": "f5d50173682292a969091fd87f675bf3a16c9cab655f41aa6a75d202ebca561a", "size": 455, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pairs_validation.json|1785404936.0|18321249": {"hash": "0a4ab340b8e0a0ce11f116f4a46f1c38826fc8ed0c7b75456d57250328d6dc57", "size": 18321249, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1GH0.json|1785404936.0|735": {"hash": "559aee150b34e1dfc2626a95fcda781ae48f894d9d67080be5e4cd7bde7a9ad7", "size": 735, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1H2I.json|1785404936.0|471": {"hash": "a04156e3d1e137c59cee849c2c910323a165365ee38c463cae10780abd5de9dc", "size": 471, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1HKX.json|1785404936.0|445": {"hash": "11f62435b9e23da7eb211babaf9196a64a0d398db5733e2f5143438138c82ea4", "size": 445, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1I50.json|1785404936.0|5709": {"hash": "c18b26704eb478e2f3e687ec036c4d2fb5b39f0d6a3847cca2ee5b90b3f80040", "size": 5709, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1IJG.json|1785404936.0|583": {"hash": "e2950844d1c5d028ab89fb8789ac507a52df1bb9af617d054d682dc4c903d50b", "size": 583, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1IRU.json|1785404936.0|5344": {"hash": "7329e03801db231183b2bbf22e14b86ec654f72c394a940d5e1605180501e30a", "size": 5344, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1IS7.json|1785404936.0|810": {"hash": "d270822b59d93e5ffd629789fc0de26aa9bd376fff8ff1d59a23b76dec1c668e", "size": 810, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1IWA.json|1785404936.0|1080": {"hash": "c19323ebc0b2974d7afcf814e7d52f63d7d4d6bf830795d37c4b709a7c2804d7", "size": 1080, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1JYM.json|1785404936.0|433": {"hash": "8c93e1cef5fbcc91c0d182841071d3cff1b92fc386536904aa464095fe15333a", "size": 433, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1KB9.json|1785404936.0|3709": {"hash": "ef7731df348aefdd5d5680eba9b57a68e66fa23e73e9692551283352a48ec3cc", "size": 3709, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1KP8.json|1785404936.0|845": {"hash": "ae509cbb9261d6f5c75c4c47a05f13a85b51886eb003d0055820c8958dc7b2ee", "size": 845, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1KYO.json|1785404936.0|4092": {"hash": "f40a719b8f6a81863f79545a4f928ee35498526c4a1973f8a2a562737b568058", "size": 4092, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1L0L.json|1785404936.0|3693": {"hash": "b28ef072fab1aefd4f7feaa26e598369e1824e7baa6996a8b9cee9da7e2884ed", "size": 3693, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1L6W.json|1785404936.0|470": {"hash": "de4f8185bc52955e82d4a88a0c3c5feb996fe672aee4ed9f973d3b2cd82083ca", "size": 470, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1M3U.json|1785404936.0|514": {"hash": "cc1594a0e3f5c554138f1938154e2d44acfab34a4c96f5b9f319b7f56ccf090e", "size": 514, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1M5Q.json|1785404936.0|428": {"hash": "c768094334afd77c59b2095600e275d1288c3ae9114b7cc1fd48b5e7411af9d1", "size": 428, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1MFR.json|1785404936.0|594": {"hash": "c553226a62a8044381604a6696154ade2ff7c8e8aec77ba9100a1d991ab114a3", "size": 594, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1N8J.json|1785404936.0|436": {"hash": "32920c5c693398c41b318b689042398184bd5e04a867db8172e44d72a103a796", "size": 436, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1NGK.json|1785404936.0|402": {"hash": "a0805b4ab67b040835986f745752f46b563c62de2e43efa122e47fb4ee793ae6", "size": 402, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1NLX.json|1785404936.0|409": {"hash": "f337da48539ac8758766a6da65207ae5b2a6a22e8df4c383fb9edbc5e2bd27bf", "size": 409, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1PCQ.json|1785404936.0|1129": {"hash": "8fbc6431d8bf58501271906c06862c73f08b75f51f0a370a5020b6fda1907105", "size": 1129, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1Q5Q.json|1785404936.0|919": {"hash": "23fb6de28eaddba4b134191a317ebbaaca5918847eb4e44f1136a6c2b8b4f5aa", "size": 919, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1Q95.json|1785404936.0|864": {"hash": "64055eb8a72e8797ecc542a89d1c4e394ed2d64a244578e9c94ad413505785a0", "size": 864, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1QAW.json|1785404936.0|335": {"hash": "77547178948939ba2fef8c70b26f21c3b480879c86bd80426b6b2f2efc84d372", "size": 335, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1RBL.json|1785404936.0|1025": {"hash": "72cd4c984259baa28583ab9a54fde165fa82bf8390068af0b975aac732910538", "size": 1025, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1RVV.json|1785404936.0|644": {"hash": "fd6c83cf90356276a8b71fa1d5ab9172e7fe5e7424f3cd230767889b3b0edf29", "size": 644, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1S3Q.json|1785404936.0|591": {"hash": "d69965d7d61ad53ac8aba15ce072f779d5014033f7052ee5acd7414da93e329c", "size": 591, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1TH7.json|1785404936.0|378": {"hash": "c95e71e790647e0fc638470323a2cabf0cce480e342d78e938451ae7635ee986", "size": 378, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1TR0.json|1785404936.0|382": {"hash": "466567fc79e99c779bec0e633b5fc368d503a69c244de5f9f61e222a004e5cac", "size": 382, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1TYF.json|1785404936.0|491": {"hash": "f4e801ce60345ff19249d0791ee31762f0ff03d59928f5494604e52fce338662", "size": 491, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1VDM.json|1785404936.0|427": {"hash": "680e5b7697e214f8220630b3dd7f70bc67b7dd1c5cdb3366e3e006bec0d24c6c", "size": 427, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1VF7.json|1785404936.0|655": {"hash": "77b8d64bfe0166ff648e80627c48eef473e6d986194f42a8c9e8474f4eb54f50", "size": 655, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1X0P.json|1785404936.0|393": {"hash": "38ef80abc19574bc84dc34199ed8ab51e3777ed7205ed0f8ad9e8e85e22836bd", "size": 393, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1X0R.json|1785404936.0|499": {"hash": "2bd8a4e8c5bff58bc72137a4e48d0a5fbc9b4bbbbfee3579cad3dd8f501b1dda", "size": 499, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1X9F.json|1785404936.0|1244": {"hash": "9007d9708166d45f5a19758f3310a1d951a5cdbc8ac0ad44a29f26af3fb54e41", "size": 1244, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1YKK.json|1785404936.0|983": {"hash": "6466e11d71a79df8602e46e9438d968a6a81bcac822c843b28f0674b53f21fe7", "size": 983, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/1Z6O.json|1785404936.0|948": {"hash": "c58455e153b634c261a2635baec26d9b78b94d5258f9ba84336618f63af0c33e", "size": 948, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2A3W.json|1785404936.0|454": {"hash": "1c92e3c6558e0877bfff20315ca89801ad1a84ead1ee377fcd0a23960faecbe8", "size": 454, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2BL2.json|1785404936.0|406": {"hash": "8c3bd3afe72f882109496d7b90b0dd7199cd7d6002f40c3c4515aca3fa0c5937", "size": 406, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2BX9.json|1785404936.0|326": {"hash": "3538f60cac4ed3290d2b7f5811c3ff32566eddf34437d0202e9bd00014d05a35", "size": 326, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2C41.json|1785404936.0|432": {"hash": "a2a53a0ef675c8715080716e5b8c1d9a1d6c0c39bd6b0b06d35e966c73768af0", "size": 432, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2D3A.json|1785404936.0|606": {"hash": "a9ef8b6fdd0f2d5a54b4f263dabbd5eaef51c962ce4a5df87a6d8a5fb0bf565e", "size": 606, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2DD4.json|1785404936.0|1054": {"hash": "8a58aa30190192007151af202f6fcc9a2dfa268becbf1a1fa2c2fa55a39e9622", "size": 1054, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2DJW.json|1785404936.0|341": {"hash": "126df72221b6a152d9a8c14ed3013a5a01a588edecc3682856dd17f2c1719005", "size": 341, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2E6G.json|1785404936.0|518": {"hash": "f1dbe30b317ba3092952f0d64cfd8873b3762322ca51a35458340555f04a2016", "size": 518, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2EWC.json|1785404936.0|400": {"hash": "c45e46f39519cc3d2ffb8ecd799ce80662339d8a40d64c879f8006683e8569c3", "size": 400, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2FKD.json|1785404936.0|408": {"hash": "6cfeb1da7763ba315d4e7e0811a0cea5efbbe7850536ea46da756f9a7c546350", "size": 408, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2G9T.json|1785404936.0|426": {"hash": "3ab52d639eac28a876726d6edc0abfd82c05170018d16d32290cbed4f68c2f6b", "size": 426, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2GRE.json|1785404936.0|623": {"hash": "9bb70cbcbe1163a220d0019f63837d073f1fbbdd5a8948c1800700f6d1ee4366", "size": 623, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2NV2.json|1785404936.0|1043": {"hash": "e10650f14ae54083e33b4a0bf06833cabedb477ed564235aae105e16236a2e3b", "size": 1043, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2OBX.json|1785404936.0|407": {"hash": "ac1572798df752851573fbe50b15a298e1fc4fcfbdd42bef45cf25cf69a87034", "size": 407, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2P1B.json|1785404936.0|372": {"hash": "96ec98ca020258481c21fcfa6384c855465a94235192f5fad98cd2eb91994342", "size": 372, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2QJG.json|1785404936.0|523": {"hash": "a31aca229433b6aa50c63eb0aa78aadd463016817a0fe88afe138e51859539e8", "size": 523, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2V18.json|1785404936.0|341": {"hash": "6632380045529717a80946e97246b6d5aa9d9955da88a6b8af9710042e1b568f", "size": 341, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2V5H.json|1785404936.0|834": {"hash": "bd3deb3031cc74f79abf97ade8a631acb3babb10193e86902ee5ad2df7db2d78", "size": 834, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2V7Q.json|1785404936.0|2409": {"hash": "50ea654cb0329114eb261f6cb737d32e30107f0e14a3507d69c393712b58ac8d", "size": 2409, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2VYC.json|1785404936.0|1005": {"hash": "f1e8a7085a4bab2c3c1b1bf842e77aa439900b01ab30193f637f210473dcf684", "size": 1005, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2VYR.json|1785404936.0|655": {"hash": "a01d5d02b8262feefe2caa8af0edaf1d5f3f116cf195b51e4256050d7f1ee68b", "size": 655, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2WCV.json|1785404936.0|390": {"hash": "981a9fe76f426a75b98e00a98251aba028b399da2ad596b7c94672a270034227", "size": 390, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2WYR.json|1785404936.0|606": {"hash": "ce19c81083b9f0ce3a6c5d8a7f0b8cc4b94bec5e50884ac6e0b5403e9e2670dc", "size": 606, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2X2V.json|1785404936.0|354": {"hash": "0a8f7559214ee4fd5eeab0b4c45af6fc7e4632ac2597edc684a6be8a69db60a2", "size": 354, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/2YMD.json|1785404936.0|462": {"hash": "873b415f7d332858acd558235e976ec49d77d02cabaf464c05a39253349325a2", "size": 462, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3A2C.json|1785404936.0|598": {"hash": "85b996fc036ab64ea8000c557633e4573667ec158dd25844b8082bbcf70cdd08", "size": 598, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3BFJ.json|1785404936.0|637": {"hash": "95cbfc76bf3883944397fbf89bbf06a818f16f19199f74dffb9e83a44e2ab279", "size": 637, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3BJQ.json|1785404936.0|566": {"hash": "303a52a566deca003e38ce0e61403e7d1320af77500aaec62cd3b1d19f83343f", "size": 566, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3DTD.json|1785404936.0|449": {"hash": "ab1a2e1b88bf86e412ab0983b77756b546b49e2c1b68589c83c8ecab8d7a084b", "size": 449, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3FP9.json|1785404936.0|427": {"hash": "67d84907800434348ff10811da1d6f329b0baa92192375620cbe274a0bd8d94c", "size": 427, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3HHW.json|1785404936.0|1004": {"hash": "9281911f2b4a539f9b12aeb6329f1fd73bfdc0ef73f6ca7b9f618ae22ae85583", "size": 1004, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3JVO.json|1785404936.0|394": {"hash": "4918b4d9705634f7b2f5f8f78d5216e2114f0e8804f2d8395dab90f6ec5dc014", "size": 394, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3K6C.json|1785404936.0|344": {"hash": "86c18cb49fff2c4dbcb4c42b6fcf4046e8ec7c38e7366db4585c97be7bc19e61", "size": 344, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3KIF.json|1785404936.0|356": {"hash": "abd1018dc91f8599e986f7a9df4572dd7ffc7231c3b6f20d6723800c8907c5ad", "size": 356, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3LAY.json|1785404936.0|425": {"hash": "d82d1ae04605bedfa9fc13dc2c2289d9a31b340760aced10d4186827e987d310", "size": 425, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3M0W.json|1785404936.0|350": {"hash": "f489f328546ec6c84bf405dbdfd84125d651ae1687cd9c5f98e5a7d94e47d8d1", "size": 350, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3M1A.json|1785404936.0|531": {"hash": "65c722f8d7f211570ba3dee192f94e3bd83f69554e6ef04941dc80feaa4b53ea", "size": 531, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3MQ7.json|1785404936.0|395": {"hash": "702adc5fcf564f79487c2676c85c462f44847f4a48dab8b105798bd2b27161b1", "size": 395, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3N99.json|1785404936.0|540": {"hash": "95850b7b130321215a4b0192be1fafc512f4557c4803cb17bfaa67aca33a62ae", "size": 540, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3OJ5.json|1785404936.0|607": {"hash": "06d1330694e6ab352c8c829e49abf9aeff2e5e1d7d92d476a008c2f4c60612e3", "size": 607, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3ONR.json|1785404936.0|345": {"hash": "cfa90a5fd9e8166642461e02e63c6ba54082fb74db4793bdb24c616bda970267", "size": 345, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3OOQ.json|1785404936.0|646": {"hash": "0866aefdda8fe31f30ccafd1ffd08c98054b8f91cc82dc61070e64270f4085b0", "size": 646, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3R90.json|1785404936.0|462": {"hash": "67c9fed3d947a65c2997e125176555bca825dcd76a38e1a91b6120bbf78eaac7", "size": 462, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3TOS.json|1785404936.0|507": {"hash": "c91b579fa5b0d5b8dd47cffd0e10635f4138151c83cfb4f139d8440b6803eaa2", "size": 507, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3TXQ.json|1785404936.0|348": {"hash": "9252ce811570b622b1b0cf128537f4d231040323322212ac24d322f116c30735", "size": 348, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3U6X.json|1785404936.0|670": {"hash": "766ab82cd528b94fd2e456be29082e1794ce3db495cb85056ee45fb72814a773", "size": 670, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3VG8.json|1785404936.0|486": {"hash": "7357a552f5939d1d11bee0d8192cd8dd5461ca7e57a78420d9f038375c4e1797", "size": 486, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3ZIA.json|1785404936.0|2411": {"hash": "b50e1574c8c2c62c4bfb77236b9ca8fb6783753fa764529af54acffe9332c088", "size": 2411, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3ZK1.json|1785404936.0|350": {"hash": "85b3638a6f9d526cb4d75e421e2e12b526f10f518e836981f163b1c70e871e1d", "size": 350, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3ZNU.json|1785404936.0|343": {"hash": "761b9d9b47c24c7e20b1b8ea5705223e847d8c17d14598659398412caa081a55", "size": 343, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/3ZQM.json|1785404936.0|321": {"hash": "f92af1a93a1b8899273758265c6429e5487dd041a77371fd89018d447a7c4b9b", "size": 321, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4BHU.json|1785404936.0|637": {"hash": "8f583123facb1c61d78b782fb7affc343672af3caba2734cb1ab2321f22e7b3f", "size": 637, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4C2M.json|1785404936.0|7197": {"hash": "8894f7997830c6310436e9628d7658b96cc92722e0a6b24a383f9360df7b10d6", "size": 7197, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4EJ0.json|1785404936.0|592": {"hash": "a8e023f074aa018e1a031d5374fa9f58ffa3d0e6f3c15157ec172f2a41862786", "size": 592, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4F4S.json|1785404936.0|325": {"hash": "57f60e66b381099a02a615053a6403f3dca41011a2439ac84844bd2ee4437c05", "size": 325, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4IC1.json|1785404936.0|456": {"hash": "bd849b011a66be118af995e75de95e432389542176d737d0b102ec073985a929", "size": 456, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4JPN.json|1785404936.0|328": {"hash": "2373450e930a6caa8c40248d7a24730c618a0bf95d1432e9fb94b3597ee9b0da", "size": 328, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4K2J.json|1785404936.0|390": {"hash": "bd18cc5178af7c6b5bb479effc1b4e8c26aa9c1f1426c08a4864d2354eb41489", "size": 390, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4RAP.json|1785404936.0|680": {"hash": "b67d06352165ab2ae90b8789499b12e6f3958c3769c7094a17ae4752606a9711", "size": 680, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4RDQ.json|1785404936.0|1402": {"hash": "47926bbd3b78403e039adedcad571a80f22cccfe274ef14e1575140faeb59aa4", "size": 1402, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/4RSU.json|1785404936.0|700": {"hash": "4180ac31a00a90d0b814b4abbcd6fe9603e5ac73c076e4a8de37eb698da4c08f", "size": 700, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5AA5.json|1785404936.0|1331": {"hash": "7665292299d4f9c802773d515bdf2297f6665b134836882ea75b5666cda6bd90", "size": 1331, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5B04.json|1785404936.0|3101": {"hash": "f5e3963dfe32cdba7da1210b172c6d92a277c0068bdd67b957087d5f431c2faf", "size": 3101, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5BSE.json|1785404936.0|527": {"hash": "e4c05efbd8ce8323b8fcbd364d8b98210fd6fcaf1c7fcfd7b102c1b0c4623c04", "size": 527, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5CW7.json|1785404936.0|619": {"hash": "a66e9b4993786a0ad5f5f21d5c47188875f1366d53c4f9409fb0e31a04615e39", "size": 619, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5F2Q.json|1785404936.0|385": {"hash": "34db04db8073a97478147952f480fb8a139cc58c868c2315a18e802e60069535", "size": 385, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5J09.json|1785404936.0|507": {"hash": "5cd33e1f2a253670a14ed636f5c7f202b762100b9ef2b8c4fc5beddabd69cc84", "size": 507, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5JQL.json|1785404936.0|675": {"hash": "0c6a682683f945a4ba3b4d8ffadca3f69c18d000992346d6251d76b5927b1eb8", "size": 675, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5JYX.json|1785404936.0|359": {"hash": "9087bed53b8e22e075363d7a3925e3079d0638ec95b8787790a38fd47525707b", "size": 359, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5K2M.json|1785404936.0|750": {"hash": "b97e2298179c906d95b56012a3d025b41a2e3dec5a138ed0f6863718e21dd488", "size": 750, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5LK5.json|1785404936.0|515": {"hash": "fdde88f56dc999b099c609030a7dc61d77c98ac1f8ba2bf1d85cc9eb0a80b552", "size": 515, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5N5E.json|1785404936.0|348": {"hash": "b70ccaacdfc7317d7d2ffde0793cd912731d83d32960a03e81e66c67798032ff", "size": 348, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5NFR.json|1785404936.0|642": {"hash": "5c51b6efb9eedfb8d7746532ea988a01a97f7cb4c84e5594a0d3978ffbcd493c", "size": 642, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5ODC.json|1785404936.0|2950": {"hash": "3a6c6839f706411c36ce49d5a1ca4a024ded8b1d9b74629f54bfd35a06b4ed6d", "size": 2950, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5OVS.json|1785404936.0|499": {"hash": "ba7b50a94162d14a08bf8e19e8be553d362dc380cfa7e8aae7322607fc8a120d", "size": 499, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5T11.json|1785404936.0|434": {"hash": "94bb785307718ca0fa85ee16d0e0605dd6c0336b87ea3abbeb3ea1ed371b6144", "size": 434, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5TRM.json|1785404936.0|586": {"hash": "ad0efc244b8e087183e807aa5d8d2442f01fadef13d986b79508af1243bd4d88", "size": 586, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5UK3.json|1785404936.0|426": {"hash": "229ff962769aabf513d848ccb0e974d91b82bb5023f4810310daec143c1753a4", "size": 426, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/5XPB.json|1785404936.0|350": {"hash": "7a025fad05b34e03318cc681c3d2c370475addbf5242ec5d647c476bd3cd569e", "size": 350, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6E7D.json|1785404936.0|662": {"hash": "b1f79ad252f0d6a15f13a140e7ba75be12020b4034350af6d26676e08810dfef", "size": 662, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6ESQ.json|1785404936.0|1399": {"hash": "85a2fc1fe82a78a8884c767bd266d669074bf5a7dd6c91c2477366ccb0beed27", "size": 1399, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6FWH.json|1785404936.0|615": {"hash": "1b06434a799b49de0facb64809c4899f4b5b14a64cefc85b03eb325517cc013d", "size": 615, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6G94.json|1785404936.0|1656": {"hash": "9304eae4dad8f3612dddd29da302b4bd2af8304d8d4ab50076327dad91b9c465", "size": 1656, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6GRJ.json|1785404936.0|617": {"hash": "67d77b2b2ef240d04ee6a2267c2fa991ad980a7f96dfd2293f1d0a76141dfc0b", "size": 617, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6J0B.json|1785404936.0|1049": {"hash": "ec8733fe533eb2541a0738cfe5f6e7cd6193935444dba5b66621e2b0e9c3b6d0", "size": 1049, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6JCV.json|1785404936.0|607": {"hash": "7849721e473e86277cf20e0753e619449f4dda3a9c503eb1f1ef34b9314cf0b0", "size": 607, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6KRB.json|1785404936.0|364": {"hash": "1fc2817679a708530a28e9b820428662e651754c07e66b2205caa1e62ac1a15f", "size": 364, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6KWY.json|1785404936.0|7716": {"hash": "4b95f2bb2d80cef7b2809e0b05644c58263b2e18ff6034e095b54a9f7e621766", "size": 7716, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6LNI.json|1785404936.0|460": {"hash": "1660b9210c9b7df69a7d9a7a11263f003cff021bdec078892f7f462614b55653", "size": 460, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6LQH.json|1785404936.0|902": {"hash": "15eb605610cd73ffae9a8179cfe42b53595ea34b9888beaf3882f2f51330f632", "size": 902, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6MRT.json|1785404936.0|598": {"hash": "320be0f9e10f7166ae8dbe6c935b4398ef25191d410cb7312149841f44901514", "size": 598, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6M3X.json|1785404936.0|729": {"hash": "938e4d0f744c0bc1403802f59d09ab95c626da6abf76489c3adb06f4b1012056", "size": 729, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6MST.json|1785404936.0|339": {"hash": "89af2f73cfb838ac650e4f1bfacd3ad999830a93c0639e1da1b5fd5a32ec3780", "size": 339, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6N3P.json|1785404936.0|634": {"hash": "f0b619c4cb7d25545650f344110c1080a09a89fab20b74665e505c8331e9d1f3", "size": 634, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6NHT.json|1785404936.0|995": {"hash": "b59aec67856b50f215060fe7e94c5542f00c63a939da9704f2096c77cead29ab", "size": 995, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6OFG.json|1785404936.0|428": {"hash": "144334bc50be551491a6be0de0379856b23bfb794ac458e60c32f2cecc2054d9", "size": 428, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6OSJ.json|1785404936.0|390": {"hash": "db92d00e053581192a9a1d10da0a30032afcc2ddccb25874e123ed7df8ef2552", "size": 390, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6OVH.json|1785404936.0|380": {"hash": "b00bc565c0c6b3e8a9c815540a1fe6809932975229c7b3a8d6017d076c1a3498", "size": 380, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6PYT.json|1785404936.0|1098": {"hash": "291c0e0533b302bd9c77209850f31201fcabe99a270dd738af024ac72e413c79", "size": 1098, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6QLV.json|1785404936.0|504": {"hash": "02c798c3f4fcc0a8110c4c01bc78e484231998ed46e86a53d5c2030c49084d78", "size": 504, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6QSU.json|1785404936.0|1352": {"hash": "0be1d7d710e257a66fe3d347b563ee77c9ff774696fbcfde4d28f24d3d967997", "size": 1352, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6RD7.json|1785404936.0|3298": {"hash": "15569fe6aa6ffccb667beed521d6fd923f1108377cd63cae717e071a6ac30fe9", "size": 3298, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6RDB.json|1785404936.0|3213": {"hash": "ad630916d4a55accd6e8e0ccc8c640d6c5820da05685af66cbf8c66f53690677", "size": 3213, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6RKE.json|1785404936.0|945": {"hash": "4c0403f45480fe92eba5d7b49e1375498edc61180169af3eb7280fbe45150d86", "size": 945, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6RO0.json|1785404936.0|1789": {"hash": "f14036e7b080241c6b54611e268960f9f2d9545de39684918431d13b736ba5df", "size": 1789, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6S5L.json|1785404936.0|414": {"hash": "7d9317c512633e04f8b67b6f8f33ec9506106af3fab63ed5030f9573d2352f31", "size": 414, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6SDZ.json|1785404936.0|389": {"hash": "0a6069d521ce125bd62e614424ccd33c828b3478118ec10a09d6d4a9e9fcd535", "size": 389, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6SQR.json|1785404936.0|1399": {"hash": "b4fb63d9e68aed8299b041451e7e69f05f69725cdf32e1878688138dfb380f38", "size": 1399, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6SSI.json|1785404936.0|816": {"hash": "b9c6c7d175df5cd571064bd21b92892b7752bdfe7471e86330d19d3d9c659350", "size": 816, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6UIW.json|1785404936.0|593": {"hash": "afc0188df6315dfcc37c295bcb6c3dd509e1d1d1e4875d4683ccba63c25bb730", "size": 593, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6UWR.json|1785404936.0|965": {"hash": "7fb50e4a527e17626e803d70a877eb4055fdc43acadef009ef07c78356b1917b", "size": 965, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6W6M.json|1785404936.0|869": {"hash": "26bf64e166a41b90c5bc54375e926da51c64a3814da48f1c94f720a236a25d8a", "size": 869, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6WBN.json|1785404936.0|671": {"hash": "c099697027b0f7ea681b1a417f720d19e98cba7068ca324b64fba5551afeb1cd", "size": 671, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6X04.json|1785404936.0|947": {"hash": "93125194f9c37dcdbda3a55f268f8eaade9171c3a11b7d82aa3e670b84278399", "size": 947, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6YBQ.json|1785404936.0|1578": {"hash": "71cef3538904f70a4505e59bf73cc09e73a22728b6331c1fc34d768a449c7a83", "size": 1578, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6Z1F.json|1785404936.0|1523": {"hash": "7579662a31ecb5e4a4902fab9fa4751ff3432011aaf61f6605b9ab00faa7c5ef", "size": 1523, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6Z16.json|1785404936.0|2987": {"hash": "329b1ddc05d4f28659c1a5b8e47edfc3d00656c7a2f8a2211872426324026dca", "size": 2987, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6ZEE.json|1785404936.0|777": {"hash": "c0642d81b287e48fb63000c39d2c625add887f3609054c08c6c076238f4188e3", "size": 777, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6ZK9.json|1785404936.0|6808": {"hash": "24704c2aaf217936c20680912d6fb19d5d5d9ebabfeb588fc1b8152514812e5a", "size": 6808, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/6ZKB.json|1785404936.0|9572": {"hash": "b06577628b5a8399ffbf87023242e7c735a4cdb1108b101c043672d214522130", "size": 9572, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7AJP.json|1785404936.0|482": {"hash": "83489ae32fdcb93386b6273cacba5def01e69a0f2343661fa19a742acf21eb97", "size": 482, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7C4J.json|1785404936.0|8996": {"hash": "5f9a72cf147807e994b9db0950c725df19fc04a799ac3b2afc37dccb7bbd7a50", "size": 8996, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7CGE.json|1785404936.0|1463": {"hash": "100542f9893bdb8295971b9366d4bd89a38e7dbca5a251f235a10b1ee9e7d1b4", "size": 1463, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7JJP.json|1785404936.0|714": {"hash": "8fcf762946f98c4b57dd984f7cb38b596d81fbade343e9c8d7803b14acebb606", "size": 714, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7JKC.json|1785404936.0|687": {"hash": "98fdc50e4a2d9dcee3883093d494a7b705bc65612cc8e7362480a4b165072ca8", "size": 687, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7JQZ.json|1785404936.0|559": {"hash": "833f0dbf41a57c7c0ab0fefba25a9d2922cc5040467f94c7d3d514b77d674bea", "size": 559, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7JZ2.json|1785404936.0|1725": {"hash": "a2f215f1af8cfc42420cd365edf3364cada31b2c2820c8466d09af2d726e1916", "size": 1725, "status": "c"}, "scripts/paper_resources/figures/data/benchmark3/pdb_infos/7NRQ.json|1785404936.0|691": {"hash": "fc0ceb98a57a21243be03bfd3be773ca5ea56bfd8448a282419798ca84d0d3b3", "size": 691, "status": "c"}, "scripts/paper_resources/figures/figure2.py|1785404936.0|11439": {"hash": "c7feaa229ee081b8ded0f27bed40d25a7eef525ccc413bd491791f9615f64391", "size": 11439, "status": "c"}, "scripts/paper_resources/figures/figure3.py|1785404936.0|15881": {"hash": "e41ef4e754bdfb573236bfa40f69939e970941399ff6571c83da57b512adcb50", "size": 15881, "status": "c"}, "scripts/paper_resources/figures/figureS2.py|1785404936.0|7351": {"hash": "f5d87b5289626af00e71917e83036d0d21f7cccd253d5504c30d79f664a4856b", "size": 7351, "status": "c"}, "scripts/paper_resources/figures/figureS3.py|1785404936.0|2358": {"hash": "662e33c572b7581a6fddcc77071dcba03eb1dda069f8473cb4c9d7122e9a3714", "size": 2358, "status": "c"}, "scripts/paper_resources/figures/figureS4.py|1785404936.0|6489": {"hash": "7be20f79aafcbe5bc468046c3b699ace40366e93f8d374fc19f4be9d282cee31", "size": 6489, "status": "c"}, "scripts/paper_resources/figures/figureS6.py|1785404936.0|5184": {"hash": "1118b403cf5c383642143ce293acffadb20f0b291618cff7c4ca3b288ac09bd1", "size": 5184, "status": "c"}, "scripts/paper_resources/figures/figureS7.py|1785404936.0|8636": {"hash": "77e8c969a46e4642c1815938443302d8732e8b777d2481b67e5de5ab539e4925", "size": 8636, "status": "c"}, "scripts/prepare_fastas.py|1785404936.0|6897": {"hash": "b45121d41c5ea283cb41256c63b484a284ba6ad655650e51461111e7c9cb429e", "size": 6897, "status": "c"}, "scripts/run_on_pdbs.py|1787795218.0|24415": {"hash": "1754ded4ea8bc635a77c2cc6775aaf68fc1d34c5ae7b4a806a83f55fe29982fe", "size": 24415, "status": "c"}, "weight/README.md|1787795225.0|937": {"hash": "407a46e00763811431cfc3012a2a35c99fe40f70c549d49ec26e7a2e72b087da", "size": 937, "status": "c"}, "weight/alphafold/params/download_complexes_multimer_v3_finished.txt|1787798263.0|0": {"hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855", "size": 0, "status": "c"}, "weight/alphafold/params/LICENSE|1787798140.0|18657": {"hash": "9ba9550ad48438d0836ddab3da480b3b69ffa0aac7b7878b5a0039e7ab429411", "size": 18657, "status": "c"}, "weight/alphafold/params/params_model_1.npz|1787798147.0|373069562": {"hash": "f95e453e6a290ddf317ba1c9698d53fa110cf007ea979b0eae43e6ad38b4e364", "size": 373069562, "status": "c"}, "weight/alphafold/params/params_model_2.npz|1787798147.0|373069562": {"hash": "4da37ed3b71f08d935f913dfab0133977cd0d76ad37cd9333ff294d7fae43f87", "size": 373069562, "status": "c"}, "weight/alphafold/params/params_model_1_multimer_v3.npz|1787798147.0|373043148": {"hash": "611da8fc7478928f68de12e8b226260ef1f4ce62bcc29b008572e52f4f212959", "size": 373043148, "status": "c"}, "weight/alphafold/params/params_model_2_multimer_v3.npz|1787798147.0|373043148": {"hash": "51362b0844382ae0f5720c59b81dd13a43eea40fbf9995dd2573bdab88865378", "size": 373043148, "status": "c"}, "weight/alphafold/params/params_model_2_ptm.npz|1787798147.0|373103340": {"hash": "23645d9a82c4af2ed54cd48a7b3c1c2575dc6aa9fe931adb4d7203ca5f0dc398", "size": 373103340, "status": "c"}, "weight/alphafold/params/params_model_3.npz|1787798147.0|371712506": {"hash": "3cc4584dc0b0d1bdd1f7af14bd0692d00df3aa0e738d0d1b314821ad7eee4ffe", "size": 371712506, "status": "c"}, "weight/alphafold/params/params_model_3_multimer_v3.npz|1787798147.0|373043148": {"hash": "46d9bcad288edc7ad5a6362ee8e5f84307a69712e00e6c36b1ef9daf96ebc9ce", "size": 373043148, "status": "c"}, "weight/alphafold/params/params_model_4.npz|1787798147.0|371712506": {"hash": "b0a78b7e18661abc6097a905f48505004e6e3993c5dc41fb6820acf56e9c1d12", "size": 371712506, "status": "c"}, "weight/alphafold/params/params_model_4_multimer_v3.npz|1787798147.0|373043148": {"hash": "59bdabd2d69c07fe26b37882d544acbd1b9f89f196828f4220da49e0610b572c", "size": 373043148, "status": "c"}, "weight/alphafold/params/params_model_5.npz|1787798147.0|371712506": {"hash": "5d261ec6e18ba87784541f5ce113570018b3338df61ae577661b6232358d47e7", "size": 371712506, "status": "c"}, "weight/alphafold/params/params_model_5_multimer_v3.npz|1787798147.0|373043148": {"hash": "917742be5a105d6b80f13f1f13f20459f27ec3fdcd34ea088b359f4502d6177f", "size": 373043148, "status": "c"}}}
|
LICENSE
ADDED
|
@@ -0,0 +1,201 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
Apache License
|
| 2 |
+
Version 2.0, January 2004
|
| 3 |
+
http://www.apache.org/licenses/
|
| 4 |
+
|
| 5 |
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
| 6 |
+
|
| 7 |
+
1. Definitions.
|
| 8 |
+
|
| 9 |
+
"License" shall mean the terms and conditions for use, reproduction,
|
| 10 |
+
and distribution as defined by Sections 1 through 9 of this document.
|
| 11 |
+
|
| 12 |
+
"Licensor" shall mean the copyright owner or entity authorized by
|
| 13 |
+
the copyright owner that is granting the License.
|
| 14 |
+
|
| 15 |
+
"Legal Entity" shall mean the union of the acting entity and all
|
| 16 |
+
other entities that control, are controlled by, or are under common
|
| 17 |
+
control with that entity. For the purposes of this definition,
|
| 18 |
+
"control" means (i) the power, direct or indirect, to cause the
|
| 19 |
+
direction or management of such entity, whether by contract or
|
| 20 |
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
| 21 |
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
| 22 |
+
|
| 23 |
+
"You" (or "Your") shall mean an individual or Legal Entity
|
| 24 |
+
exercising permissions granted by this License.
|
| 25 |
+
|
| 26 |
+
"Source" form shall mean the preferred form for making modifications,
|
| 27 |
+
including but not limited to software source code, documentation
|
| 28 |
+
source, and configuration files.
|
| 29 |
+
|
| 30 |
+
"Object" form shall mean any form resulting from mechanical
|
| 31 |
+
transformation or translation of a Source form, including but
|
| 32 |
+
not limited to compiled object code, generated documentation,
|
| 33 |
+
and conversions to other media types.
|
| 34 |
+
|
| 35 |
+
"Work" shall mean the work of authorship, whether in Source or
|
| 36 |
+
Object form, made available under the License, as indicated by a
|
| 37 |
+
copyright notice that is included in or attached to the work
|
| 38 |
+
(an example is provided in the Appendix below).
|
| 39 |
+
|
| 40 |
+
"Derivative Works" shall mean any work, whether in Source or Object
|
| 41 |
+
form, that is based on (or derived from) the Work and for which the
|
| 42 |
+
editorial revisions, annotations, elaborations, or other modifications
|
| 43 |
+
represent, as a whole, an original work of authorship. For the purposes
|
| 44 |
+
of this License, Derivative Works shall not include works that remain
|
| 45 |
+
separable from, or merely link (or bind by name) to the interfaces of,
|
| 46 |
+
the Work and Derivative Works thereof.
|
| 47 |
+
|
| 48 |
+
"Contribution" shall mean any work of authorship, including
|
| 49 |
+
the original version of the Work and any modifications or additions
|
| 50 |
+
to that Work or Derivative Works thereof, that is intentionally
|
| 51 |
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
| 52 |
+
or by an individual or Legal Entity authorized to submit on behalf of
|
| 53 |
+
the copyright owner. For the purposes of this definition, "submitted"
|
| 54 |
+
means any form of electronic, verbal, or written communication sent
|
| 55 |
+
to the Licensor or its representatives, including but not limited to
|
| 56 |
+
communication on electronic mailing lists, source code control systems,
|
| 57 |
+
and issue tracking systems that are managed by, or on behalf of, the
|
| 58 |
+
Licensor for the purpose of discussing and improving the Work, but
|
| 59 |
+
excluding communication that is conspicuously marked or otherwise
|
| 60 |
+
designated in writing by the copyright owner as "Not a Contribution."
|
| 61 |
+
|
| 62 |
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
| 63 |
+
on behalf of whom a Contribution has been received by Licensor and
|
| 64 |
+
subsequently incorporated within the Work.
|
| 65 |
+
|
| 66 |
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
| 67 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 68 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 69 |
+
copyright license to reproduce, prepare Derivative Works of,
|
| 70 |
+
publicly display, publicly perform, sublicense, and distribute the
|
| 71 |
+
Work and such Derivative Works in Source or Object form.
|
| 72 |
+
|
| 73 |
+
3. Grant of Patent License. Subject to the terms and conditions of
|
| 74 |
+
this License, each Contributor hereby grants to You a perpetual,
|
| 75 |
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
| 76 |
+
(except as stated in this section) patent license to make, have made,
|
| 77 |
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
| 78 |
+
where such license applies only to those patent claims licensable
|
| 79 |
+
by such Contributor that are necessarily infringed by their
|
| 80 |
+
Contribution(s) alone or by combination of their Contribution(s)
|
| 81 |
+
with the Work to which such Contribution(s) was submitted. If You
|
| 82 |
+
institute patent litigation against any entity (including a
|
| 83 |
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
| 84 |
+
or a Contribution incorporated within the Work constitutes direct
|
| 85 |
+
or contributory patent infringement, then any patent licenses
|
| 86 |
+
granted to You under this License for that Work shall terminate
|
| 87 |
+
as of the date such litigation is filed.
|
| 88 |
+
|
| 89 |
+
4. Redistribution. You may reproduce and distribute copies of the
|
| 90 |
+
Work or Derivative Works thereof in any medium, with or without
|
| 91 |
+
modifications, and in Source or Object form, provided that You
|
| 92 |
+
meet the following conditions:
|
| 93 |
+
|
| 94 |
+
(a) You must give any other recipients of the Work or
|
| 95 |
+
Derivative Works a copy of this License; and
|
| 96 |
+
|
| 97 |
+
(b) You must cause any modified files to carry prominent notices
|
| 98 |
+
stating that You changed the files; and
|
| 99 |
+
|
| 100 |
+
(c) You must retain, in the Source form of any Derivative Works
|
| 101 |
+
that You distribute, all copyright, patent, trademark, and
|
| 102 |
+
attribution notices from the Source form of the Work,
|
| 103 |
+
excluding those notices that do not pertain to any part of
|
| 104 |
+
the Derivative Works; and
|
| 105 |
+
|
| 106 |
+
(d) If the Work includes a "NOTICE" text file as part of its
|
| 107 |
+
distribution, then any Derivative Works that You distribute must
|
| 108 |
+
include a readable copy of the attribution notices contained
|
| 109 |
+
within such NOTICE file, excluding those notices that do not
|
| 110 |
+
pertain to any part of the Derivative Works, in at least one
|
| 111 |
+
of the following places: within a NOTICE text file distributed
|
| 112 |
+
as part of the Derivative Works; within the Source form or
|
| 113 |
+
documentation, if provided along with the Derivative Works; or,
|
| 114 |
+
within a display generated by the Derivative Works, if and
|
| 115 |
+
wherever such third-party notices normally appear. The contents
|
| 116 |
+
of the NOTICE file are for informational purposes only and
|
| 117 |
+
do not modify the License. You may add Your own attribution
|
| 118 |
+
notices within Derivative Works that You distribute, alongside
|
| 119 |
+
or as an addendum to the NOTICE text from the Work, provided
|
| 120 |
+
that such additional attribution notices cannot be construed
|
| 121 |
+
as modifying the License.
|
| 122 |
+
|
| 123 |
+
You may add Your own copyright statement to Your modifications and
|
| 124 |
+
may provide additional or different license terms and conditions
|
| 125 |
+
for use, reproduction, or distribution of Your modifications, or
|
| 126 |
+
for any such Derivative Works as a whole, provided Your use,
|
| 127 |
+
reproduction, and distribution of the Work otherwise complies with
|
| 128 |
+
the conditions stated in this License.
|
| 129 |
+
|
| 130 |
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
| 131 |
+
any Contribution intentionally submitted for inclusion in the Work
|
| 132 |
+
by You to the Licensor shall be under the terms and conditions of
|
| 133 |
+
this License, without any additional terms or conditions.
|
| 134 |
+
Notwithstanding the above, nothing herein shall supersede or modify
|
| 135 |
+
the terms of any separate license agreement you may have executed
|
| 136 |
+
with Licensor regarding such Contributions.
|
| 137 |
+
|
| 138 |
+
6. Trademarks. This License does not grant permission to use the trade
|
| 139 |
+
names, trademarks, service marks, or product names of the Licensor,
|
| 140 |
+
except as required for reasonable and customary use in describing the
|
| 141 |
+
origin of the Work and reproducing the content of the NOTICE file.
|
| 142 |
+
|
| 143 |
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
| 144 |
+
agreed to in writing, Licensor provides the Work (and each
|
| 145 |
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
| 146 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
| 147 |
+
implied, including, without limitation, any warranties or conditions
|
| 148 |
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
| 149 |
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
| 150 |
+
appropriateness of using or redistributing the Work and assume any
|
| 151 |
+
risks associated with Your exercise of permissions under this License.
|
| 152 |
+
|
| 153 |
+
8. Limitation of Liability. In no event and under no legal theory,
|
| 154 |
+
whether in tort (including negligence), contract, or otherwise,
|
| 155 |
+
unless required by applicable law (such as deliberate and grossly
|
| 156 |
+
negligent acts) or agreed to in writing, shall any Contributor be
|
| 157 |
+
liable to You for damages, including any direct, indirect, special,
|
| 158 |
+
incidental, or consequential damages of any character arising as a
|
| 159 |
+
result of this License or out of the use or inability to use the
|
| 160 |
+
Work (including but not limited to damages for loss of goodwill,
|
| 161 |
+
work stoppage, computer failure or malfunction, or any and all
|
| 162 |
+
other commercial damages or losses), even if such Contributor
|
| 163 |
+
has been advised of the possibility of such damages.
|
| 164 |
+
|
| 165 |
+
9. Accepting Warranty or Additional Liability. While redistributing
|
| 166 |
+
the Work or Derivative Works thereof, You may choose to offer,
|
| 167 |
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
| 168 |
+
or other liability obligations and/or rights consistent with this
|
| 169 |
+
License. However, in accepting such obligations, You may act only
|
| 170 |
+
on Your own behalf and on Your sole responsibility, not on behalf
|
| 171 |
+
of any other Contributor, and only if You agree to indemnify,
|
| 172 |
+
defend, and hold each Contributor harmless for any liability
|
| 173 |
+
incurred by, or claims asserted against, such Contributor by reason
|
| 174 |
+
of your accepting any such warranty or additional liability.
|
| 175 |
+
|
| 176 |
+
END OF TERMS AND CONDITIONS
|
| 177 |
+
|
| 178 |
+
APPENDIX: How to apply the Apache License to your work.
|
| 179 |
+
|
| 180 |
+
To apply the Apache License to your work, attach the following
|
| 181 |
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
| 182 |
+
replaced with your own identifying information. (Don't include
|
| 183 |
+
the brackets!) The text should be enclosed in the appropriate
|
| 184 |
+
comment syntax for the file format. We also recommend that a
|
| 185 |
+
file or class name and description of purpose be included on the
|
| 186 |
+
same "printed page" as the copyright notice for easier
|
| 187 |
+
identification within third-party archives.
|
| 188 |
+
|
| 189 |
+
Copyright [yyyy] [name of copyright owner]
|
| 190 |
+
|
| 191 |
+
Licensed under the Apache License, Version 2.0 (the "License");
|
| 192 |
+
you may not use this file except in compliance with the License.
|
| 193 |
+
You may obtain a copy of the License at
|
| 194 |
+
|
| 195 |
+
http://www.apache.org/licenses/LICENSE-2.0
|
| 196 |
+
|
| 197 |
+
Unless required by applicable law or agreed to in writing, software
|
| 198 |
+
distributed under the License is distributed on an "AS IS" BASIS,
|
| 199 |
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| 200 |
+
See the License for the specific language governing permissions and
|
| 201 |
+
limitations under the License.
|
README.md
ADDED
|
@@ -0,0 +1,375 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
frameworks:
|
| 3 |
+
- JAX
|
| 4 |
+
language:
|
| 5 |
+
- en
|
| 6 |
+
license: apache-2.0
|
| 7 |
+
tags:
|
| 8 |
+
- OneScience
|
| 9 |
+
- bioscience
|
| 10 |
+
- protein-complex-structure-prediction
|
| 11 |
+
- CombFold
|
| 12 |
+
- AlphaFold-Multimer
|
| 13 |
+
- ColabFold
|
| 14 |
+
tasks: []
|
| 15 |
+
datasets: []
|
| 16 |
+
---
|
| 17 |
+
|
| 18 |
+
<p align="center">
|
| 19 |
+
<strong>
|
| 20 |
+
<span style="font-size: 30px;">CombFold</span>
|
| 21 |
+
</strong>
|
| 22 |
+
</p>
|
| 23 |
+
|
| 24 |
+
# Model Introduction
|
| 25 |
+
|
| 26 |
+
CombFold is an open-source pipeline developed by dina-lab3D for predicting the structures of large protein complexes. Starting from the amino acid sequences of the individual chains in a complex, CombFold uses AlphaFold-Multimer to predict multiple candidate subcomplexes and then applies combinatorial assembly algorithms to construct the complete protein complex.
|
| 27 |
+
|
| 28 |
+
The original publication reports support for complexes containing at least 18,000 amino acids and up to 32 subunits.
|
| 29 |
+
|
| 30 |
+
Paper: [Assembly of protein complexes by combining AlphaFold and combinatorial optimization](https://www.nature.com/articles/s41592-024-02174-0)
|
| 31 |
+
|
| 32 |
+
# Model Description
|
| 33 |
+
|
| 34 |
+
CombFold consists of four main stages:
|
| 35 |
+
|
| 36 |
+
1. Define subunits according to protein domains and chain composition and generate `subunits.json`;
|
| 37 |
+
2. Generate FASTA files for all subunit pairs and predict pairwise subcomplexes using AlphaFold-Multimer;
|
| 38 |
+
3. Optionally predict candidate subcomplexes containing more than two subunits;
|
| 39 |
+
4. Extract relative transformations between subunits from the predicted PDB structures and use a C++ combinatorial optimization algorithm to assemble the complete complex.
|
| 40 |
+
|
| 41 |
+
The main components included in the Hugging Face model package are:
|
| 42 |
+
|
| 43 |
+
- `model/CombinatorialAssembler/`: C++17 combinatorial assembler and the `AF2trans` structural transformation tool;
|
| 44 |
+
- `scripts/prepare_fastas.py`: generates FASTA files for pairwise or larger subunit combinations;
|
| 45 |
+
- `scripts/inference.py`: unified assembly entry point for the Hugging Face model package;
|
| 46 |
+
- `scripts/run_on_pdbs.py`: original upstream entry point for assembly from predicted PDB structures;
|
| 47 |
+
- `weight/`: official pretrained AlphaFold-Multimer parameters used for offline ColabFold inference;
|
| 48 |
+
- `requirements.txt`: additional dependencies required on top of the OneScience base environment.
|
| 49 |
+
|
| 50 |
+
CombFold itself is not a trainable neural network. Neural-network inference is performed by pretrained AlphaFold-Multimer models, while CombFold is responsible for extracting structural transformations and performing combinatorial assembly.
|
| 51 |
+
|
| 52 |
+
# Use Cases
|
| 53 |
+
|
| 54 |
+
| Use Case | Description |
|
| 55 |
+
| :---: | :--- |
|
| 56 |
+
| Large protein complex prediction | Combine multiple AlphaFold-Multimer subcomplex predictions into a complete complex structure. |
|
| 57 |
+
| Homomer prediction | Assemble complexes containing multiple copies of the same unique subunit according to the specified stoichiometry. |
|
| 58 |
+
| Heteromer prediction | Integrate predictions from different subunit pairs or groups to construct the complete structure. |
|
| 59 |
+
| Assembly from existing AFM results | Directly use existing AlphaFold-Multimer PDB predictions without rerunning AlphaFold-Multimer. |
|
| 60 |
+
| Crosslink-guided assembly | Optionally incorporate crosslinking restraints to constrain candidate complex structures. |
|
| 61 |
+
|
| 62 |
+
# Usage
|
| 63 |
+
|
| 64 |
+
## 1. OneCode
|
| 65 |
+
|
| 66 |
+
You can use the OneCode online environment for an intelligent one-click AI4S programming experience:
|
| 67 |
+
|
| 68 |
+
[Try OneCode for AI4S Programming](https://web-2069360198568017922-iaaj.ksai.scnet.cn:58043/home)
|
| 69 |
+
|
| 70 |
+
## 2. Manual Installation
|
| 71 |
+
|
| 72 |
+
**Hardware Requirements**
|
| 73 |
+
|
| 74 |
+
- The CombFold C++ combinatorial assembly stage requires only CPU resources;
|
| 75 |
+
- Local AlphaFold-Multimer subcomplex prediction typically requires an accelerator;
|
| 76 |
+
- Memory usage for long-sequence and multi-model inference increases with the total number of residues, MSA depth, number of models, and number of recycles;
|
| 77 |
+
- PyTorch is not a direct runtime dependency of CombFold or the current ColabFold inference pipeline.
|
| 78 |
+
|
| 79 |
+
### Download the Model Package
|
| 80 |
+
|
| 81 |
+
Install the Hugging Face command-line tool and download the model repository:
|
| 82 |
+
|
| 83 |
+
```bash
|
| 84 |
+
pip install -U huggingface_hub
|
| 85 |
+
|
| 86 |
+
hf download OneScience-Group/CombFold --local-dir ./CombFold
|
| 87 |
+
cd CombFold
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
### Install the Runtime Environment
|
| 91 |
+
|
| 92 |
+
**OneScience DCU Base Environment**
|
| 93 |
+
|
| 94 |
+
```bash
|
| 95 |
+
conda create -n onescience311 python=3.11 -y
|
| 96 |
+
conda activate onescience311
|
| 97 |
+
|
| 98 |
+
python -m pip install onescience[bio-dcu] \
|
| 99 |
+
-i http://mirrors.onescience.ai:3141/pypi/simple/ \
|
| 100 |
+
--trusted-host mirrors.onescience.ai
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
Install the additional dependencies:
|
| 104 |
+
|
| 105 |
+
```bash
|
| 106 |
+
python -m pip install --no-deps -r requirements.txt
|
| 107 |
+
```
|
| 108 |
+
|
| 109 |
+
### Compile the Combinatorial Assembler
|
| 110 |
+
|
| 111 |
+
The combinatorial assembly stage of CombFold is implemented in C++17 and requires the following system-level components. These components cannot be installed through `requirements.txt`.
|
| 112 |
+
|
| 113 |
+
| Component | Purpose | Description |
|
| 114 |
+
| --- | --- | --- |
|
| 115 |
+
| C++17 compiler | Compile the C++ source code | `g++` is commonly used on Linux |
|
| 116 |
+
| GNU Make | Execute the Makefile | GNU Make 4.2.1 has been validated |
|
| 117 |
+
| Boost headers | Compile-time headers | The directory must contain `boost/algorithm/string.hpp` |
|
| 118 |
+
| Boost program_options | Link-time runtime library | Usually provided as `libboost_program_options.so` on Linux |
|
| 119 |
+
|
| 120 |
+
Boost headers are generally portable across Linux distributions, but compiled Boost libraries depend on the operating system, CPU architecture, compiler, and `libstdc++` ABI. Therefore, compiled Boost libraries should not be copied directly between Linux, macOS, Windows, or different CPU architectures.
|
| 121 |
+
|
| 122 |
+
It is recommended to use Boost headers and runtime libraries from the same Boost version.
|
| 123 |
+
|
| 124 |
+
The upstream Makefile is configured primarily for macOS Homebrew. On Linux, the following command can be used directly only when Boost is already available in the compiler's default search paths:
|
| 125 |
+
|
| 126 |
+
```bash
|
| 127 |
+
cd model/CombinatorialAssembler
|
| 128 |
+
make
|
| 129 |
+
cd ../..
|
| 130 |
+
```
|
| 131 |
+
|
| 132 |
+
#### Specify a Custom Boost Path
|
| 133 |
+
|
| 134 |
+
If Boost is not installed in the default compiler search paths, define the following environment variables:
|
| 135 |
+
|
| 136 |
+
```bash
|
| 137 |
+
export COMBFOLD_BOOST_INCLUDE="<Boost source or include directory>"
|
| 138 |
+
export COMBFOLD_BOOST_LIB="<Boost library directory>"
|
| 139 |
+
```
|
| 140 |
+
|
| 141 |
+
`COMBFOLD_BOOST_INCLUDE` must point to a directory that directly contains the `boost/` subdirectory.
|
| 142 |
+
|
| 143 |
+
`COMBFOLD_BOOST_LIB` must point to a directory that directly contains the `libboost_program_options` library.
|
| 144 |
+
|
| 145 |
+
Before compilation, you can verify the paths using:
|
| 146 |
+
|
| 147 |
+
```bash
|
| 148 |
+
test -f "${COMBFOLD_BOOST_INCLUDE}/boost/algorithm/string.hpp" \
|
| 149 |
+
&& echo "Boost headers OK"
|
| 150 |
+
|
| 151 |
+
find "${COMBFOLD_BOOST_LIB}" -maxdepth 1 \
|
| 152 |
+
-name 'libboost_program_options*' -print
|
| 153 |
+
```
|
| 154 |
+
|
| 155 |
+
Compile the assembler:
|
| 156 |
+
|
| 157 |
+
```bash
|
| 158 |
+
cd model/CombinatorialAssembler
|
| 159 |
+
|
| 160 |
+
make -j4 \
|
| 161 |
+
BOOST_INCLUDE="${COMBFOLD_BOOST_INCLUDE}" \
|
| 162 |
+
BOOST_LIB="${COMBFOLD_BOOST_LIB}"
|
| 163 |
+
|
| 164 |
+
cd ../..
|
| 165 |
+
```
|
| 166 |
+
|
| 167 |
+
### Weights and Data Preparation
|
| 168 |
+
|
| 169 |
+
The CombFold combinatorial assembler itself does not require model weights.
|
| 170 |
+
|
| 171 |
+
Local generation of AlphaFold-Multimer subcomplex predictions requires the five official AlphaFold-Multimer v3 parameter files:
|
| 172 |
+
|
| 173 |
+
| Asset | Location in the Model Package | Purpose |
|
| 174 |
+
| --- | --- | --- |
|
| 175 |
+
| `params_model_1_multimer_v3.npz` | `weight/alphafold/params/` | AFM v3 model 1 |
|
| 176 |
+
| `params_model_2_multimer_v3.npz` | `weight/alphafold/params/` | AFM v3 model 2 |
|
| 177 |
+
| `params_model_3_multimer_v3.npz` | `weight/alphafold/params/` | AFM v3 model 3 |
|
| 178 |
+
| `params_model_4_multimer_v3.npz` | `weight/alphafold/params/` | AFM v3 model 4 |
|
| 179 |
+
| `params_model_5_multimer_v3.npz` | `weight/alphafold/params/` | AFM v3 model 5 |
|
| 180 |
+
|
| 181 |
+
Use the following ColabFold data path:
|
| 182 |
+
|
| 183 |
+
```text
|
| 184 |
+
--data weight/alphafold
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
If you only use existing AlphaFold-Multimer PDB predictions for combinatorial assembly, AlphaFold-Multimer weights and a DCU device are not required.
|
| 188 |
+
|
| 189 |
+
### Define Subunits
|
| 190 |
+
|
| 191 |
+
The input `subunits.json` is a JSON dictionary keyed by unique subunit names.
|
| 192 |
+
|
| 193 |
+
Each subunit contains the following fields:
|
| 194 |
+
|
| 195 |
+
- `name`: unique subunit name;
|
| 196 |
+
- `sequence`: amino acid sequence;
|
| 197 |
+
- `chain_names`: chain names corresponding to this subunit in the complete complex. The number of entries also defines its stoichiometry;
|
| 198 |
+
- `start_res`: starting residue index of the sequence in the original chain.
|
| 199 |
+
|
| 200 |
+
Example:
|
| 201 |
+
|
| 202 |
+
```json
|
| 203 |
+
{
|
| 204 |
+
"A0": {
|
| 205 |
+
"name": "A0",
|
| 206 |
+
"chain_names": ["A", "B"],
|
| 207 |
+
"start_res": 1,
|
| 208 |
+
"sequence": "MKDILEKLEERRAQARLGGGEKRLEAQHKRGKLTARERIELLLDHGSFEE"
|
| 209 |
+
}
|
| 210 |
+
}
|
| 211 |
+
```
|
| 212 |
+
|
| 213 |
+
The Hugging Face model package provides a complete example:
|
| 214 |
+
|
| 215 |
+
```text
|
| 216 |
+
scripts/example/subunits.json
|
| 217 |
+
scripts/example/pdbs/
|
| 218 |
+
```
|
| 219 |
+
|
| 220 |
+
### Quick Inference: CPU Assembly from Existing PDB Files
|
| 221 |
+
|
| 222 |
+
This is the shortest CombFold inference path and does not run AlphaFold-Multimer:
|
| 223 |
+
|
| 224 |
+
```bash
|
| 225 |
+
python scripts/inference.py \
|
| 226 |
+
--subunits scripts/example/subunits.json \
|
| 227 |
+
--pdbs scripts/example/pdbs \
|
| 228 |
+
--output output/example_assembly
|
| 229 |
+
```
|
| 230 |
+
|
| 231 |
+
The output directory must either not exist or be empty before execution.
|
| 232 |
+
|
| 233 |
+
After successful execution, the main results are located at:
|
| 234 |
+
|
| 235 |
+
```text
|
| 236 |
+
output/example_assembly/assembled_results/output_clustered_0.pdb
|
| 237 |
+
output/example_assembly/assembled_results/confidence.txt
|
| 238 |
+
```
|
| 239 |
+
|
| 240 |
+
You can also use the original upstream positional-argument entry point:
|
| 241 |
+
|
| 242 |
+
```bash
|
| 243 |
+
python scripts/run_on_pdbs.py \
|
| 244 |
+
scripts/example/subunits.json \
|
| 245 |
+
scripts/example/pdbs \
|
| 246 |
+
output/example_assembly
|
| 247 |
+
```
|
| 248 |
+
|
| 249 |
+
### Generate Pairwise FASTA Files
|
| 250 |
+
|
| 251 |
+
Generate FASTA files for every pair of unique subunits defined in `subunits.json`:
|
| 252 |
+
|
| 253 |
+
```bash
|
| 254 |
+
python scripts/prepare_fastas.py \
|
| 255 |
+
scripts/example/subunits.json \
|
| 256 |
+
--stage pairs \
|
| 257 |
+
--output-fasta-folder output/pair_fastas \
|
| 258 |
+
--max-af-size 1800
|
| 259 |
+
```
|
| 260 |
+
|
| 261 |
+
The output directory must not already exist.
|
| 262 |
+
|
| 263 |
+
The official example generates files such as:
|
| 264 |
+
|
| 265 |
+
```text
|
| 266 |
+
A0_A0.fasta
|
| 267 |
+
A0_G0.fasta
|
| 268 |
+
G0_G0.fasta
|
| 269 |
+
```
|
| 270 |
+
|
| 271 |
+
### Minimal DCU Pairwise Inference
|
| 272 |
+
|
| 273 |
+
For an offline smoke test on a compute node, you can use `single_sequence`, one model, and one recycle:
|
| 274 |
+
|
| 275 |
+
```bash
|
| 276 |
+
colabfold_batch \
|
| 277 |
+
output/pair_fastas \
|
| 278 |
+
output/colabfold_pairs \
|
| 279 |
+
--data weight/alphafold \
|
| 280 |
+
--model-type alphafold2_multimer_v3 \
|
| 281 |
+
--model-order 1 \
|
| 282 |
+
--num-models 1 \
|
| 283 |
+
--num-recycle 1 \
|
| 284 |
+
--num-relax 0 \
|
| 285 |
+
--msa-mode single_sequence \
|
| 286 |
+
--disable-unified-memory
|
| 287 |
+
```
|
| 288 |
+
|
| 289 |
+
The configuration:
|
| 290 |
+
|
| 291 |
+
```text
|
| 292 |
+
single_sequence + 1 model + 1 recycle
|
| 293 |
+
```
|
| 294 |
+
|
| 295 |
+
is intended only to verify parameter loading, JAX/DCU forward execution, and PDB output generation.
|
| 296 |
+
|
| 297 |
+
It should not be used to evaluate formal prediction accuracy.
|
| 298 |
+
|
| 299 |
+
For production-quality predictions, prepare appropriate MSA features and increase the number of models and recycles according to available memory and runtime constraints.
|
| 300 |
+
|
| 301 |
+
### End-to-End DCU-to-CPU Inference
|
| 302 |
+
|
| 303 |
+
At least one predicted PDB structure must be selected for each pair.
|
| 304 |
+
|
| 305 |
+
To select the top-ranked ColabFold structure:
|
| 306 |
+
|
| 307 |
+
```bash
|
| 308 |
+
mkdir -p output/combfold_pdbs
|
| 309 |
+
|
| 310 |
+
find output/colabfold_pairs -maxdepth 1 \
|
| 311 |
+
-type f -name '*rank_001*.pdb' \
|
| 312 |
+
-exec cp {} output/combfold_pdbs/ \;
|
| 313 |
+
```
|
| 314 |
+
|
| 315 |
+
Then run the CombFold combinatorial assembly stage:
|
| 316 |
+
|
| 317 |
+
```bash
|
| 318 |
+
python scripts/inference.py \
|
| 319 |
+
--subunits scripts/example/subunits.json \
|
| 320 |
+
--pdbs output/combfold_pdbs \
|
| 321 |
+
--output output/end2end_assembly
|
| 322 |
+
```
|
| 323 |
+
|
| 324 |
+
The unified inference entry point also outputs a machine-readable summary, for example:
|
| 325 |
+
|
| 326 |
+
```text
|
| 327 |
+
COMBFOLD_INFERENCE_RESULT={"assembled_structures": 5, "format": "pdb", "status": "PASS", ...}
|
| 328 |
+
```
|
| 329 |
+
|
| 330 |
+
### Use Crosslinking Restraints
|
| 331 |
+
|
| 332 |
+
Use the `--crosslinks` option to provide a crosslink restraint file:
|
| 333 |
+
|
| 334 |
+
```bash
|
| 335 |
+
python scripts/inference.py \
|
| 336 |
+
--subunits scripts/example/example_xlinks/subunits.json \
|
| 337 |
+
--pdbs scripts/example/example_xlinks/pdbs \
|
| 338 |
+
--crosslinks scripts/example/example_xlinks/crosslinks.txt \
|
| 339 |
+
--output output/crosslink_assembly
|
| 340 |
+
```
|
| 341 |
+
|
| 342 |
+
### Optional Prediction of Larger Subcomplexes
|
| 343 |
+
|
| 344 |
+
After completing pairwise prediction, larger subcomplex FASTA files can be generated based on the pairwise results:
|
| 345 |
+
|
| 346 |
+
```bash
|
| 347 |
+
python scripts/prepare_fastas.py \
|
| 348 |
+
scripts/example/subunits.json \
|
| 349 |
+
--stage groups \
|
| 350 |
+
--output-fasta-folder output/group_fastas \
|
| 351 |
+
--max-af-size 1800 \
|
| 352 |
+
--input-pairs-results output/combfold_pdbs
|
| 353 |
+
```
|
| 354 |
+
|
| 355 |
+
### Training
|
| 356 |
+
|
| 357 |
+
CombFold is an inference algorithm that performs combinatorial assembly using predictions generated by pretrained AlphaFold-Multimer models.
|
| 358 |
+
|
| 359 |
+
CombFold itself does not contain a trainable neural network, training entry point, optimizer, or training-data pipeline. Therefore, this Hugging Face model package does not provide training commands.
|
| 360 |
+
|
| 361 |
+
Retraining AlphaFold-Multimer is a separate upstream large-scale model-training task and is not part of the CombFold combinatorial assembly workflow.
|
| 362 |
+
|
| 363 |
+
# OneScience Official Resources
|
| 364 |
+
|
| 365 |
+
| Platform | OneScience Main Repository | Skills Repository |
|
| 366 |
+
| --- | --- | --- |
|
| 367 |
+
| Gitee | https://gitee.com/onescience-ai/onescience | https://gitee.com/onescience-ai/oneskills |
|
| 368 |
+
| GitHub | https://github.com/onescience-ai/OneScience | https://github.com/onescience-ai/oneskills |
|
| 369 |
+
|
| 370 |
+
# Citation and License
|
| 371 |
+
|
| 372 |
+
- Paper: [Assembly of protein complexes by combining AlphaFold and combinatorial optimization](https://www.nature.com/articles/s41592-024-02174-0)
|
| 373 |
+
- Official implementation: https://github.com/dina-lab3D/CombFold
|
| 374 |
+
- The CombFold source code is provided under the Apache License 2.0 according to the upstream repository.
|
| 375 |
+
- AlphaFold, AlphaFold-Multimer, ColabFold, pretrained parameters, and other third-party components are subject to their respective original copyright notices, model terms, and licenses.
|
conf/config.json
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"assembler_dir": "model/CombinatorialAssembler",
|
| 3 |
+
"weight_dir": "weight/alphafold/params",
|
| 4 |
+
"model_type": "alphafold2_multimer_v3",
|
| 5 |
+
"msa_mode": "single_sequence",
|
| 6 |
+
"num_models": 1,
|
| 7 |
+
"num_recycle": 1,
|
| 8 |
+
"num_relax": 0,
|
| 9 |
+
"max_results": 5,
|
| 10 |
+
"output_cif": false
|
| 11 |
+
}
|
configuration.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"model_name": "CombFold",
|
| 3 |
+
"framework": "C++/Python/JAX",
|
| 4 |
+
"task": "protein-complex-structure-prediction",
|
| 5 |
+
"entry_points": {
|
| 6 |
+
"inference": "scripts/inference.py",
|
| 7 |
+
"prepare_fastas": "scripts/prepare_fastas.py",
|
| 8 |
+
"assemble": "scripts/run_on_pdbs.py"
|
| 9 |
+
},
|
| 10 |
+
"source_package": "model",
|
| 11 |
+
"config": "conf/config.json",
|
| 12 |
+
"weight_dir": "weight",
|
| 13 |
+
"license": "Apache-2.0"
|
| 14 |
+
}
|
model/CombinatorialAssembler/AF2trans/AF2trans.cc
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "Atom.h"
|
| 2 |
+
#include "Match.h"
|
| 3 |
+
#include "Molecule.h"
|
| 4 |
+
|
| 5 |
+
#include <fstream>
|
| 6 |
+
#include <string>
|
| 7 |
+
|
| 8 |
+
#include <boost/algorithm/string.hpp>
|
| 9 |
+
#include <boost/program_options.hpp>
|
| 10 |
+
|
| 11 |
+
namespace po = boost::program_options;
|
| 12 |
+
|
| 13 |
+
/* float calculateRMSD(Molecule<Atom>& origMol, Molecule<Atom>& transMol) {
|
| 14 |
+
float square_rmsd =0;
|
| 15 |
+
if((origMol.size() != transMol.size()) || (origMol.size() == 0)) {
|
| 16 |
+
std::cerr << "different molecules " << origMol.size() << " " << transMol.size()<< std::endl;
|
| 17 |
+
exit(1);
|
| 18 |
+
}
|
| 19 |
+
for(unsigned int i=0; i<origMol.size();i++) {
|
| 20 |
+
square_rmsd+=origMol(i).dist2(transMol(i));
|
| 21 |
+
}
|
| 22 |
+
return sqrt(square_rmsd/origMol.size());
|
| 23 |
+
} */
|
| 24 |
+
|
| 25 |
+
double getTempPercentile(Molecule<Atom> &mol1, Molecule<Atom> &mol2, float percentile) {
|
| 26 |
+
std::vector<double> temps1, temps2;
|
| 27 |
+
for (unsigned int i = 0; i < mol1.size(); i++) {
|
| 28 |
+
temps1.push_back(mol1[i].getTempFactor());
|
| 29 |
+
temps2.push_back(mol2[i].getTempFactor());
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
std::sort(temps1.begin(), temps1.end());
|
| 33 |
+
std::sort(temps2.begin(), temps2.end());
|
| 34 |
+
int index1 = std::max((int)(percentile * mol1.size() - 1), 0);
|
| 35 |
+
int index2 = std::max((int)(percentile * mol1.size() - 1), 0);
|
| 36 |
+
return std::min(temps1[index1], temps2[index2]);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
Match calculateTrans(Molecule<Atom> &origMol, Molecule<Atom> &transMol) {
|
| 40 |
+
if ((origMol.size() != transMol.size()) || (origMol.size() == 0)) {
|
| 41 |
+
std::cerr << "different molecules " << origMol.size() << " " << transMol.size() << std::endl;
|
| 42 |
+
exit(1);
|
| 43 |
+
}
|
| 44 |
+
Match match;
|
| 45 |
+
float tempThreshold = std::min(80.0, getTempPercentile(origMol, transMol, 0.5));
|
| 46 |
+
for (unsigned int i = 0; i < origMol.size(); i++) {
|
| 47 |
+
if (origMol[i].getTempFactor() < tempThreshold || transMol[i].getTempFactor() < tempThreshold)
|
| 48 |
+
continue;
|
| 49 |
+
match.add(i, i);
|
| 50 |
+
}
|
| 51 |
+
match.calculateBestFit(origMol, transMol);
|
| 52 |
+
// std::cout << "Got rmsd: " << match.rmsd() << std::endl;
|
| 53 |
+
return match;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
Molecule<Atom> readMolecule(std::string molName, bool all_atoms) {
|
| 57 |
+
Molecule<Atom> mol;
|
| 58 |
+
std::ifstream molFile(molName);
|
| 59 |
+
if (!molFile) {
|
| 60 |
+
std::cerr << "Can't open file " << molName << std::endl;
|
| 61 |
+
exit(0);
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
if (!all_atoms) {
|
| 65 |
+
mol.readPDBfile(molFile, PDB::CAlphaSelector());
|
| 66 |
+
// try nucleic acids
|
| 67 |
+
if (mol.size() == 0) {
|
| 68 |
+
molFile.clear();
|
| 69 |
+
molFile.seekg(0, std::ios::beg);
|
| 70 |
+
mol.readPDBfile(molFile, PDB::PSelector());
|
| 71 |
+
}
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
// in case no CA were read, we use all atoms
|
| 75 |
+
if (all_atoms || mol.size() == 0) {
|
| 76 |
+
molFile.clear();
|
| 77 |
+
molFile.seekg(0, std::ios::beg);
|
| 78 |
+
mol.readAllPDBfile(molFile);
|
| 79 |
+
}
|
| 80 |
+
molFile.close();
|
| 81 |
+
|
| 82 |
+
return mol;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
int main(int argc, char **argv) {
|
| 86 |
+
// output arguments
|
| 87 |
+
for (int i = 0; i < argc; i++)
|
| 88 |
+
std::cerr << argv[i] << " ";
|
| 89 |
+
std::cerr << std::endl;
|
| 90 |
+
|
| 91 |
+
bool all_atoms = false;
|
| 92 |
+
po::options_description desc(
|
| 93 |
+
"Usage: AF2trans <receptorRef> <ligandRef> <receptorAF2_1> <ligandAF2_1> <receptorAF2_2> <ligandAF2_2> ...\n "
|
| 94 |
+
"translates AF2 complexes into transformations of the ligandRef onto the receptorRef\n");
|
| 95 |
+
desc.add_options()("help",
|
| 96 |
+
"AF2mer2trans - produces ligand onto receptor docking like transformations from AF2 models\n")(
|
| 97 |
+
"input-files", po::value<std::vector<std::string>>(), "input files")("all,a",
|
| 98 |
+
"all atoms rmsd (default = false)");
|
| 99 |
+
|
| 100 |
+
po::positional_options_description p;
|
| 101 |
+
p.add("input-files", -1);
|
| 102 |
+
po::variables_map vm;
|
| 103 |
+
po::store(po::command_line_parser(argc, argv).options(desc).positional(p).run(), vm);
|
| 104 |
+
po::notify(vm);
|
| 105 |
+
|
| 106 |
+
std::vector<std::string> files;
|
| 107 |
+
if (vm.count("input-files")) {
|
| 108 |
+
files = vm["input-files"].as<std::vector<std::string>>();
|
| 109 |
+
}
|
| 110 |
+
if (vm.count("help") || files.size() < 4) {
|
| 111 |
+
std::cout << desc << "\n";
|
| 112 |
+
return 0;
|
| 113 |
+
}
|
| 114 |
+
if (vm.count("all_atoms")) {
|
| 115 |
+
all_atoms = true;
|
| 116 |
+
}
|
| 117 |
+
|
| 118 |
+
Molecule<Atom> receptorRef = readMolecule(files[0], all_atoms);
|
| 119 |
+
Molecule<Atom> ligandRef = readMolecule(files[1], all_atoms);
|
| 120 |
+
|
| 121 |
+
std::cout.precision(4);
|
| 122 |
+
for (unsigned int i = 2; i < files.size(); i += 2) {
|
| 123 |
+
Molecule<Atom> receptorAF2 = readMolecule(files[i], all_atoms);
|
| 124 |
+
Molecule<Atom> ligandAF2 = readMolecule(files[i + 1], all_atoms);
|
| 125 |
+
Match m1 = calculateTrans(receptorRef, receptorAF2);
|
| 126 |
+
Match m2 = calculateTrans(ligandRef, ligandAF2);
|
| 127 |
+
RigidTrans3 T = m1.rigidTrans() * (!m2.rigidTrans());
|
| 128 |
+
std::cout << i / 2 << " | " << m1.rmsd() << "_" << files[i] << " | " << m2.rmsd() << "_" << files[i + 1]
|
| 129 |
+
<< " | " << T << std::endl;
|
| 130 |
+
// std::cout << rms << std::endl;
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
return 0;
|
| 134 |
+
}
|
model/CombinatorialAssembler/BB.cc
ADDED
|
@@ -0,0 +1,178 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "BB.h"
|
| 2 |
+
|
| 3 |
+
#include <Common.h>
|
| 4 |
+
#include <connolly_surface.h>
|
| 5 |
+
|
| 6 |
+
BB::BB(int id, const std::string pdbFileName, int groupID, const ChemLib &lib, float gridResolution, float gridMargins,
|
| 7 |
+
float minTempFactor)
|
| 8 |
+
: id_(id), groupId_(groupID), pdbFileName_(pdbFileName) {
|
| 9 |
+
// read atoms
|
| 10 |
+
Common::readChemMolecule(pdbFileName_, allAtoms_, lib);
|
| 11 |
+
std::cout << "Done reading ChemMolecule " << allAtoms_.size() << std::endl;
|
| 12 |
+
// read backbone atoms
|
| 13 |
+
std::ifstream pdb2(pdbFileName_);
|
| 14 |
+
backBone_.readPDBfile(pdb2, PDB::BBSelector());
|
| 15 |
+
pdb2.close();
|
| 16 |
+
cm_ = backBone_.centroid();
|
| 17 |
+
numOfAtoms_ = allAtoms_.size();
|
| 18 |
+
|
| 19 |
+
// read CA atoms
|
| 20 |
+
std::ifstream pdb3(pdbFileName_);
|
| 21 |
+
caAtoms_.readPDBfile(pdb3, PDB::CAlphaSelector());
|
| 22 |
+
pdb3.close();
|
| 23 |
+
|
| 24 |
+
// compute ms surface
|
| 25 |
+
msSurface_ = get_connolly_surface(allAtoms_, 10, 1.8);
|
| 26 |
+
std::cout << "Surface size " << msSurface_.size() << std::endl;
|
| 27 |
+
|
| 28 |
+
// compute grid
|
| 29 |
+
grid_ = new BBGrid(msSurface_, gridResolution, gridMargins, 1.5);
|
| 30 |
+
grid_->computeDistFromSurface(msSurface_);
|
| 31 |
+
grid_->markTheInside(allAtoms_);
|
| 32 |
+
grid_->markResidues(backBone_);
|
| 33 |
+
std::cout << "Done compute grid " << pdbFileName_ << std::endl;
|
| 34 |
+
|
| 35 |
+
std::vector<Atom *> atomsMap;
|
| 36 |
+
atomsMap.push_back(&(*allAtoms_.begin()));
|
| 37 |
+
for (ChemMolecule::iterator i = allAtoms_.begin(); i != allAtoms_.end(); i++) {
|
| 38 |
+
atomsMap.push_back(&(*i));
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
computeFragments(minTempFactor); // get the endpoints
|
| 42 |
+
|
| 43 |
+
for (Molecule<Atom>::const_iterator it = caAtoms_.begin(); it != caAtoms_.end(); it++) {
|
| 44 |
+
resIndexToCAAtom[it->residueIndex()] = *it;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
maxRadius_ = 0.0;
|
| 48 |
+
for (Molecule<Atom>::const_iterator it = caAtoms_.begin(); it != caAtoms_.end(); it++) {
|
| 49 |
+
float r = (it->position() - cm_).norm();
|
| 50 |
+
if (r > maxRadius_)
|
| 51 |
+
maxRadius_ = r;
|
| 52 |
+
}
|
| 53 |
+
std::cout << "Max radius: " << maxRadius_ << std::endl;
|
| 54 |
+
|
| 55 |
+
std::cout << " done reading BB " << pdbFileName_.c_str() << std::endl;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
void BB::computeFragments(float minTempFactor) {
|
| 59 |
+
// calculate endpoints
|
| 60 |
+
char currChain;
|
| 61 |
+
int firstResIndex, prevResIndex;
|
| 62 |
+
bool currChainSet = false;
|
| 63 |
+
for (auto i = allAtoms_.begin(); i != allAtoms_.end(); i++) {
|
| 64 |
+
// only CA atoms are considered
|
| 65 |
+
if (!i->isCA())
|
| 66 |
+
continue;
|
| 67 |
+
if (i->getTempFactor() < minTempFactor)
|
| 68 |
+
continue;
|
| 69 |
+
char chain = i->chainId();
|
| 70 |
+
int resIndex = i->residueIndex();
|
| 71 |
+
// one more residue of the same chain - advance
|
| 72 |
+
// if over 20 residues diff - new fragment
|
| 73 |
+
if (currChainSet && currChain == chain && resIndex - prevResIndex <= 20) {
|
| 74 |
+
prevResIndex = resIndex;
|
| 75 |
+
} else { // new chain
|
| 76 |
+
if (currChainSet) { // save currChain
|
| 77 |
+
ResidueRange range(firstResIndex, prevResIndex);
|
| 78 |
+
fragmentEndpoints_.push_back(std::make_pair(currChain, range));
|
| 79 |
+
}
|
| 80 |
+
// update
|
| 81 |
+
currChain = chain;
|
| 82 |
+
firstResIndex = prevResIndex = resIndex;
|
| 83 |
+
currChainSet = true;
|
| 84 |
+
}
|
| 85 |
+
}
|
| 86 |
+
// save last fragment
|
| 87 |
+
if (currChainSet) { // save currChain
|
| 88 |
+
ResidueRange range(firstResIndex, prevResIndex);
|
| 89 |
+
fragmentEndpoints_.push_back(std::make_pair(currChain, range));
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
for (int i = 0; i < (int)fragmentEndpoints_.size(); i++) {
|
| 93 |
+
std::cout << "Fragment " << i << " chainId " << fragmentEndpoints_[i].first << " range "
|
| 94 |
+
<< fragmentEndpoints_[i].second.first << ":" << fragmentEndpoints_[i].second.second << std::endl;
|
| 95 |
+
}
|
| 96 |
+
}
|
| 97 |
+
|
| 98 |
+
void BB::getChainConnectivityConstraints(const BB &otherBB,
|
| 99 |
+
std::vector<std::pair<char, std::pair<int, int>>> &constraints) const {
|
| 100 |
+
for (int i = 0; i < (int)fragmentEndpoints_.size(); i++) {
|
| 101 |
+
char chainId1 = fragmentEndpoints_[i].first;
|
| 102 |
+
int resIndex1N = fragmentEndpoints_[i].second.first;
|
| 103 |
+
int resIndex1C = fragmentEndpoints_[i].second.second;
|
| 104 |
+
|
| 105 |
+
for (int j = 0; j < (int)otherBB.fragmentEndpoints_.size(); j++) {
|
| 106 |
+
char chainId2 = otherBB.fragmentEndpoints_[j].first;
|
| 107 |
+
if (chainId1 != chainId2)
|
| 108 |
+
continue;
|
| 109 |
+
int resIndex2N = otherBB.fragmentEndpoints_[j].second.first;
|
| 110 |
+
int resIndex2C = otherBB.fragmentEndpoints_[j].second.second;
|
| 111 |
+
if (resIndex1N < resIndex2N) { // add constraint on 1C and 2N
|
| 112 |
+
constraints.push_back(std::make_pair(chainId1, std::make_pair(resIndex1C, resIndex2N)));
|
| 113 |
+
} else { // add constraint on 2C and 1N
|
| 114 |
+
constraints.push_back(std::make_pair(chainId1, std::make_pair(resIndex1N, resIndex2C)));
|
| 115 |
+
}
|
| 116 |
+
}
|
| 117 |
+
}
|
| 118 |
+
}
|
| 119 |
+
|
| 120 |
+
bool BB::isPenetrating(const RigidTrans3 &trans, const BB &other, float threshold) const {
|
| 121 |
+
for (Surface::const_iterator it = other.surface_.begin(); it != other.surface_.end(); it++) {
|
| 122 |
+
float penetration = getDistFromSurface(trans * it->position());
|
| 123 |
+
if (threshold > penetration) {
|
| 124 |
+
// cerr << "trans " << trans << " penetrates " << penetration << endl;
|
| 125 |
+
return true;
|
| 126 |
+
}
|
| 127 |
+
}
|
| 128 |
+
return false;
|
| 129 |
+
}
|
| 130 |
+
|
| 131 |
+
float BB::maxPenetration(const RigidTrans3 &trans, const BB &other) const {
|
| 132 |
+
float max = 1000;
|
| 133 |
+
for (Surface::const_iterator it = other.surface_.begin(); it != other.surface_.end(); it++) {
|
| 134 |
+
float penetration = getDistFromSurface(trans * it->position());
|
| 135 |
+
if (max > penetration) {
|
| 136 |
+
max = penetration;
|
| 137 |
+
}
|
| 138 |
+
}
|
| 139 |
+
return max;
|
| 140 |
+
}
|
| 141 |
+
|
| 142 |
+
bool BB::isIdent(const BB &otherBB) const {
|
| 143 |
+
if (getNumOfAtoms() != otherBB.getNumOfAtoms()) {
|
| 144 |
+
std::cout << "different num of atoms" << std::endl;
|
| 145 |
+
return false;
|
| 146 |
+
}
|
| 147 |
+
for (unsigned int i = 0; i < allAtoms_.size(); i++) {
|
| 148 |
+
if (!(allAtoms_[i].position() - otherBB.allAtoms_[i].position()).isZero()) {
|
| 149 |
+
std::cout << "different atom position" << i << std::endl;
|
| 150 |
+
return false;
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
if (groupId_ != otherBB.groupId_) {
|
| 154 |
+
std::cout << "different group id" << std::endl;
|
| 155 |
+
return false;
|
| 156 |
+
}
|
| 157 |
+
std::cout << "checking transforms" << std::endl;
|
| 158 |
+
if (trans_.size() != otherBB.trans_.size())
|
| 159 |
+
return false;
|
| 160 |
+
for (unsigned int i = 0; i < trans_.size(); i++) {
|
| 161 |
+
if (i == id_ || i == otherBB.id_)
|
| 162 |
+
continue;
|
| 163 |
+
|
| 164 |
+
if (trans_[i].size() != otherBB.trans_[i].size()) {
|
| 165 |
+
std::cout << "different number of trans " << i << " " << trans_[i].size()
|
| 166 |
+
<< " != " << otherBB.trans_[i].size() << std::endl;
|
| 167 |
+
return false;
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
for (unsigned int j = 0; j < trans_[i].size(); j++) {
|
| 171 |
+
if (trans_[i][j]->score() != otherBB.trans_[i][j]->score()) {
|
| 172 |
+
std::cout << "different trans score" << i << std::endl;
|
| 173 |
+
return false;
|
| 174 |
+
}
|
| 175 |
+
}
|
| 176 |
+
}
|
| 177 |
+
return true;
|
| 178 |
+
}
|
model/CombinatorialAssembler/BB.h
ADDED
|
@@ -0,0 +1,106 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef BB_H
|
| 2 |
+
#define BB_H
|
| 3 |
+
|
| 4 |
+
#include "BBGrid.h"
|
| 5 |
+
#include "TransformationAndScore.h"
|
| 6 |
+
#include "BitId.h"
|
| 7 |
+
|
| 8 |
+
#include <ChemMolecule.h>
|
| 9 |
+
#include <GeomScore.h>
|
| 10 |
+
#include <RigidTrans3.h>
|
| 11 |
+
#include <Surface.h>
|
| 12 |
+
#include <Vector3.h>
|
| 13 |
+
|
| 14 |
+
#include <vector>
|
| 15 |
+
|
| 16 |
+
class BBConstructor {
|
| 17 |
+
// idea taken from
|
| 18 |
+
// https://stackoverflow.com/questions/3220009/is-this-key-oriented-access-protection-pattern-a-known-idiom
|
| 19 |
+
private:
|
| 20 |
+
friend class BBContainer;
|
| 21 |
+
BBConstructor() {}
|
| 22 |
+
};
|
| 23 |
+
|
| 24 |
+
class BB {
|
| 25 |
+
public:
|
| 26 |
+
friend class SuperBB;
|
| 27 |
+
|
| 28 |
+
BB(int id, const std::string pdbFilename, int groupID, const ChemLib &lib, float gridResolution, float gridMargins,
|
| 29 |
+
float minTempFactor);
|
| 30 |
+
|
| 31 |
+
// access
|
| 32 |
+
int getID() const { return id_; }
|
| 33 |
+
BitId bitId() const { return BitId(id_); }
|
| 34 |
+
int groupId() const { return groupId_; }
|
| 35 |
+
std::string getPDBFileName() const { return pdbFileName_; }
|
| 36 |
+
|
| 37 |
+
unsigned int getNumOfAtoms() const { return numOfAtoms_; }
|
| 38 |
+
const Vector3 &getCM() const { return cm_; }
|
| 39 |
+
const float getRadius() const { return maxRadius_; }
|
| 40 |
+
|
| 41 |
+
const ChemAtom &getChemAtom(int atomIndex) const { return allAtoms_.getChemAtom(atomIndex); }
|
| 42 |
+
const ChemAtom &getChemAtomByIndex(int atomIndex) const { return allAtoms_[atomIndex]; }
|
| 43 |
+
const Atom &getAtomByResId(unsigned int resId) const { return resIndexToCAAtom.at(resId); }
|
| 44 |
+
|
| 45 |
+
unsigned int getSurfaceSize() const { return surface_.size(); }
|
| 46 |
+
float getDistFromSurface(const Vector3 &v) const { return grid_->getDist(v); }
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
// This uses BBConstructor to make sure that only BBContainer can call this
|
| 50 |
+
void putTransWith(int bbIndex, const std::shared_ptr<TransformationAndScore> &t1, const BBConstructor &) const {
|
| 51 |
+
trans_[bbIndex].push_back(t1);
|
| 52 |
+
}
|
| 53 |
+
void initTrans(unsigned int numberOfBBs, const BBConstructor &) const {
|
| 54 |
+
trans_.insert(trans_.begin(), numberOfBBs, std::vector<std::shared_ptr<TransformationAndScore>>());
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
// TODO: do we still need isPenetrating/maxPenetration ?
|
| 58 |
+
bool isPenetrating(const RigidTrans3 &trans, const BB &other, float threshold) const;
|
| 59 |
+
float maxPenetration(const RigidTrans3 &trans, const BB &other) const;
|
| 60 |
+
|
| 61 |
+
void getChainConnectivityConstraints(const BB &bb,
|
| 62 |
+
std::vector<std::pair<char, std::pair<int, int>>> &) const; // update
|
| 63 |
+
|
| 64 |
+
const std::vector<std::shared_ptr<TransformationAndScore>> &getTransformations(int bbIndex) const {
|
| 65 |
+
return trans_[bbIndex];
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
bool isIdent(const BB &otherBB) const;
|
| 69 |
+
|
| 70 |
+
private:
|
| 71 |
+
// after BB is initialized, compute chains and fragment ranges
|
| 72 |
+
void computeFragments(float minTempFactor);
|
| 73 |
+
|
| 74 |
+
private:
|
| 75 |
+
// surface points
|
| 76 |
+
// Different methods for computing collision
|
| 77 |
+
Surface surface_; // shuo
|
| 78 |
+
Surface msSurface_; // connolly - dense
|
| 79 |
+
|
| 80 |
+
// BB id
|
| 81 |
+
unsigned int id_;
|
| 82 |
+
|
| 83 |
+
// transformations to other BBs
|
| 84 |
+
// This is the edge in a graph - The result of a patch dock calculation
|
| 85 |
+
mutable std::vector<std::vector<std::shared_ptr<TransformationAndScore>>> trans_;
|
| 86 |
+
|
| 87 |
+
int groupId_;
|
| 88 |
+
std::string pdbFileName_;
|
| 89 |
+
int numOfAtoms_;
|
| 90 |
+
|
| 91 |
+
Vector3 cm_;
|
| 92 |
+
float maxRadius_;
|
| 93 |
+
|
| 94 |
+
// chain id and residue numbers for each chain fragment in BB
|
| 95 |
+
typedef std::pair<int, int> ResidueRange;
|
| 96 |
+
std::vector<std::pair<char, ResidueRange>> fragmentEndpoints_;
|
| 97 |
+
|
| 98 |
+
public: // TODO
|
| 99 |
+
BBGrid *grid_;
|
| 100 |
+
ChemMolecule backBone_;
|
| 101 |
+
ChemMolecule allAtoms_;
|
| 102 |
+
Molecule<Atom> caAtoms_;
|
| 103 |
+
std::map<unsigned int, Atom> resIndexToCAAtom;
|
| 104 |
+
};
|
| 105 |
+
|
| 106 |
+
#endif /* BB_H */
|
model/CombinatorialAssembler/BBContainer.cc
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "BBContainer.h"
|
| 2 |
+
#include <boost/algorithm/string.hpp>
|
| 3 |
+
|
| 4 |
+
namespace {
|
| 5 |
+
std::string trim_extension(const std::string file_name) {
|
| 6 |
+
if (file_name[file_name.size() - 4] == '.')
|
| 7 |
+
return file_name.substr(0, file_name.size() - 4);
|
| 8 |
+
return file_name;
|
| 9 |
+
}
|
| 10 |
+
} // namespace
|
| 11 |
+
|
| 12 |
+
BBContainer::BBContainer(const std::string SUFileName, std::string chemLibFileName, float minTempFactor) {
|
| 13 |
+
readSUFile(SUFileName);
|
| 14 |
+
|
| 15 |
+
// prepare ChemLib
|
| 16 |
+
ChemLib chemLib(chemLibFileName);
|
| 17 |
+
|
| 18 |
+
// read the building blocks
|
| 19 |
+
bbs_.reserve(numOfBBs_);
|
| 20 |
+
for (unsigned int i = 0; i < numOfBBs_; i++) {
|
| 21 |
+
bbs_.push_back(std::make_shared<BB>(i, pdbs_[i], groupIDs_[i], chemLib, 0.5, 5.0, minTempFactor));
|
| 22 |
+
}
|
| 23 |
+
}
|
| 24 |
+
|
| 25 |
+
void BBContainer::readTransformationFiles(std::string transFilePrefix, unsigned int transNumToRead) {
|
| 26 |
+
// init transformations vector
|
| 27 |
+
for (unsigned int i = 0; i < numOfBBs_; i++) {
|
| 28 |
+
bbs_[i]->initTrans(numOfBBs_, {});
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
// read the files
|
| 32 |
+
for (size_t i = 0; i < numOfBBs_; i++) {
|
| 33 |
+
for (size_t j = 0; j < numOfBBs_; j++) {
|
| 34 |
+
if (i == j)
|
| 35 |
+
continue;
|
| 36 |
+
std::string inFileName = transFilePrefix + trim_extension(pdbs_[i]) + "_plus_" + trim_extension(pdbs_[j]);
|
| 37 |
+
std::ifstream inS(inFileName);
|
| 38 |
+
std::cerr << "Opening transformation file " << inFileName << std::endl;
|
| 39 |
+
if (!inS) {
|
| 40 |
+
std::cerr << "Problem opening transformation file " << inFileName << std::endl;
|
| 41 |
+
continue;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
unsigned int counter = 0;
|
| 45 |
+
while (!inS.eof() && counter < transNumToRead) {
|
| 46 |
+
TransformationAndScore *t1 = new TransformationAndScore();
|
| 47 |
+
if (readTrans(*t1, inS)) {
|
| 48 |
+
std::shared_ptr<TransformationAndScore> t2 = std::make_shared<TransformationAndScore>(*t1);
|
| 49 |
+
t2->refFrame_ = !t2->refFrame_;
|
| 50 |
+
bbs_[i]->putTransWith(j, std::make_shared<TransformationAndScore>(*t1), {});
|
| 51 |
+
bbs_[j]->putTransWith(i, t2, {});
|
| 52 |
+
counter++;
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
std::cerr << counter << " transforms were read from file " << inFileName << std::endl;
|
| 56 |
+
inS.close();
|
| 57 |
+
}
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
int BBContainer::readSUFile(const std::string SUFileName) {
|
| 62 |
+
numOfBBs_ = 0;
|
| 63 |
+
std::ifstream SUFile(SUFileName);
|
| 64 |
+
if (!SUFile) {
|
| 65 |
+
std::cerr << "Can't open SU file" << SUFileName << std::endl;
|
| 66 |
+
exit(1);
|
| 67 |
+
}
|
| 68 |
+
while (!SUFile.eof()) {
|
| 69 |
+
std::string line;
|
| 70 |
+
getline(SUFile, line);
|
| 71 |
+
boost::trim(line);
|
| 72 |
+
if (line.length() > 0) {
|
| 73 |
+
std::vector<std::string> split_results;
|
| 74 |
+
boost::split(split_results, line, boost::is_any_of(" "), boost::token_compress_on);
|
| 75 |
+
std::string pdbName(split_results[0]);
|
| 76 |
+
std::cout << "PDBname " << pdbName << ":" << line << std::endl;
|
| 77 |
+
numOfBBs_++;
|
| 78 |
+
pdbs_.push_back(pdbName);
|
| 79 |
+
// group assignment
|
| 80 |
+
int groupID = 0;
|
| 81 |
+
if (split_results.size() == 2) {
|
| 82 |
+
groupID = stoi(split_results[1]);
|
| 83 |
+
if (groupID <= 0) {
|
| 84 |
+
std::cerr << "Group ID must be positive" << std::endl;
|
| 85 |
+
}
|
| 86 |
+
}
|
| 87 |
+
groupIDs_.push_back(groupID);
|
| 88 |
+
}
|
| 89 |
+
}
|
| 90 |
+
return numOfBBs_;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
bool BBContainer::readTrans(TransformationAndScore &trans, std::ifstream &transFile) {
|
| 94 |
+
std::string line;
|
| 95 |
+
if (!transFile.eof()) {
|
| 96 |
+
getline(transFile, line);
|
| 97 |
+
boost::trim(line); // remove all spaces
|
| 98 |
+
// skip comments
|
| 99 |
+
if (line[0] == '#' || line[0] == '\0')
|
| 100 |
+
return false;
|
| 101 |
+
|
| 102 |
+
std::vector<std::string> split_results;
|
| 103 |
+
boost::split(split_results, line, boost::is_any_of(":|\t"), boost::token_compress_on);
|
| 104 |
+
if (split_results.size() != 4) {
|
| 105 |
+
std::cerr << "Wrong number of fields in transformation file, should be: "
|
| 106 |
+
<< "index(int) | score(float) | comment | transformation(space seperated 6 floats)" << std::endl;
|
| 107 |
+
return false;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
boost::trim(split_results[3]);
|
| 111 |
+
std::vector<std::string> splitted_transformation;
|
| 112 |
+
boost::split(splitted_transformation, split_results[3], boost::is_any_of(" "), boost::token_compress_on);
|
| 113 |
+
|
| 114 |
+
if (splitted_transformation.size() != 6)
|
| 115 |
+
return false;
|
| 116 |
+
|
| 117 |
+
// extract trans
|
| 118 |
+
RigidTrans3 tr(Vector3(std::stof(splitted_transformation[0].c_str()),
|
| 119 |
+
std::stof(splitted_transformation[1].c_str()),
|
| 120 |
+
std::stof(splitted_transformation[2].c_str())),
|
| 121 |
+
Vector3(std::stof(splitted_transformation[3].c_str()),
|
| 122 |
+
std::stof(splitted_transformation[4].c_str()),
|
| 123 |
+
std::stof(splitted_transformation[5].c_str())));
|
| 124 |
+
trans.refFrame_ = tr;
|
| 125 |
+
trans.score_.totalScore_ = 1.0;
|
| 126 |
+
trans.dist_ = 1.0;
|
| 127 |
+
|
| 128 |
+
trans.score_.totalScore_ = std::stof(split_results[1].c_str());
|
| 129 |
+
std::cout << "loaded score: " << trans.score_.totalScore_ << std::endl;
|
| 130 |
+
}
|
| 131 |
+
return !transFile.eof();
|
| 132 |
+
}
|
model/CombinatorialAssembler/BBContainer.h
ADDED
|
@@ -0,0 +1,43 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
//
|
| 2 |
+
// Created by dina on 8/1/18.
|
| 3 |
+
//
|
| 4 |
+
|
| 5 |
+
#ifndef BB_CONTAINER_H
|
| 6 |
+
#define BB_CONTAINER_H
|
| 7 |
+
|
| 8 |
+
#include "BB.h"
|
| 9 |
+
#include <memory>
|
| 10 |
+
|
| 11 |
+
class BBContainer {
|
| 12 |
+
public:
|
| 13 |
+
// Constructor
|
| 14 |
+
BBContainer(std::string SUFileName, std::string chemLibFileName, float minTempFactor);
|
| 15 |
+
|
| 16 |
+
// Group: access
|
| 17 |
+
std::shared_ptr<const BB> getBB(unsigned int bbIndex) const { return bbs_[bbIndex]; }
|
| 18 |
+
const std::vector<std::shared_ptr<const BB>> &getBBs() const { return bbs_; }
|
| 19 |
+
unsigned int getBBsNumber() const { return numOfBBs_; }
|
| 20 |
+
|
| 21 |
+
void readTransformationFiles(std::string transFilePrefix, unsigned int transNumToRead);
|
| 22 |
+
|
| 23 |
+
private:
|
| 24 |
+
int readSUFile(const std::string SUFileName);
|
| 25 |
+
bool readTrans(TransformationAndScore &trans, std::ifstream &transFile);
|
| 26 |
+
|
| 27 |
+
private:
|
| 28 |
+
// PDB filenames
|
| 29 |
+
std::vector<std::string> pdbs_;
|
| 30 |
+
|
| 31 |
+
// BBs
|
| 32 |
+
std::vector<std::shared_ptr<const BB>> bbs_;
|
| 33 |
+
|
| 34 |
+
// total bbs num
|
| 35 |
+
unsigned int numOfBBs_;
|
| 36 |
+
|
| 37 |
+
// BBs can be grouped according to a number provided by the user in SUlist
|
| 38 |
+
// BBs in the same group will be assembled first
|
| 39 |
+
// if no number is given, all the BBs are considered a group
|
| 40 |
+
std::vector<int> groupIDs_;
|
| 41 |
+
};
|
| 42 |
+
|
| 43 |
+
#endif // BBCONTAINER_H
|
model/CombinatorialAssembler/BBGrid.cc
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "BBGrid.h"
|
| 2 |
+
|
| 3 |
+
void BBGrid::markResidues(const ChemMolecule &M) {
|
| 4 |
+
std::vector<float> weights;
|
| 5 |
+
weights.insert(weights.end(), maxEntry, 0.0);
|
| 6 |
+
for (Molecule<ChemAtom>::const_iterator it = M.begin(); it != M.end(); it++) {
|
| 7 |
+
float atomRadius = it->getRadius() + radiusAdition_;
|
| 8 |
+
float radius = atomRadius * 2; // may be +1 is enouph
|
| 9 |
+
// cout << " atomRadius " << atomRadius << endl;
|
| 10 |
+
int centerIndex = getIndexForPoint(it->position());
|
| 11 |
+
if (!isValidIndex(centerIndex)) {
|
| 12 |
+
std::cerr << "Error: Point out of grid" << std::endl;
|
| 13 |
+
exit(1);
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
int intRadius = getIntGridRadius(radius);
|
| 17 |
+
int radius2 = intRadius * intRadius;
|
| 18 |
+
|
| 19 |
+
int i_bound, j_bound, k_bound;
|
| 20 |
+
i_bound = intRadius;
|
| 21 |
+
for (int i = -i_bound; i <= i_bound; i++) {
|
| 22 |
+
j_bound = (int)sqrt(radius2 - i * i);
|
| 23 |
+
for (int j = -j_bound; j <= j_bound; j++) {
|
| 24 |
+
k_bound = (int)sqrt(radius2 - i * i - j * j);
|
| 25 |
+
for (int k = -k_bound; k <= k_bound; k++) {
|
| 26 |
+
int index = centerIndex + i + xGridNum * j + xyGridNum * k;
|
| 27 |
+
if (isValidIndex(index) && grid[index] <= 0) {
|
| 28 |
+
Vector3 point = getPointForIndex(index);
|
| 29 |
+
float dist = point.dist(it->position());
|
| 30 |
+
if (dist == 0.0) {
|
| 31 |
+
if (it->isBackbone())
|
| 32 |
+
residues[index] = it->residueIndex() * -1;
|
| 33 |
+
else
|
| 34 |
+
residues[index] = it->residueIndex();
|
| 35 |
+
continue;
|
| 36 |
+
}
|
| 37 |
+
float weight = atomRadius / dist;
|
| 38 |
+
if (weight <= weights[index])
|
| 39 |
+
continue;
|
| 40 |
+
weights[index] = weight;
|
| 41 |
+
if (it->isBackbone())
|
| 42 |
+
residues[index] = it->residueIndex() * -1;
|
| 43 |
+
else
|
| 44 |
+
residues[index] = it->residueIndex();
|
| 45 |
+
}
|
| 46 |
+
}
|
| 47 |
+
}
|
| 48 |
+
}
|
| 49 |
+
}
|
| 50 |
+
weights.clear();
|
| 51 |
+
}
|
model/CombinatorialAssembler/BBGrid.h
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* \file BBGrid.h
|
| 3 |
+
* \brief
|
| 4 |
+
*
|
| 5 |
+
* \authors Dina Schneidman
|
| 6 |
+
*
|
| 7 |
+
*
|
| 8 |
+
*/
|
| 9 |
+
#ifndef BBGRID_H
|
| 10 |
+
#define BBGRID_H
|
| 11 |
+
|
| 12 |
+
#include <ChemMolecule.h>
|
| 13 |
+
#include <prGrid.h>
|
| 14 |
+
|
| 15 |
+
class BBGrid : public ResidueGrid {
|
| 16 |
+
public:
|
| 17 |
+
BBGrid(const Surface &surface, const float inDelta, const float maxRadius, float radiusAdition)
|
| 18 |
+
: ResidueGrid(surface, inDelta, maxRadius), radiusAdition_(radiusAdition){};
|
| 19 |
+
void markResidues(const ChemMolecule &M);
|
| 20 |
+
|
| 21 |
+
private:
|
| 22 |
+
float radiusAdition_;
|
| 23 |
+
};
|
| 24 |
+
|
| 25 |
+
#endif /* BBGRID_H */
|
model/CombinatorialAssembler/BestK.cc
ADDED
|
@@ -0,0 +1,82 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "BestK.h"
|
| 2 |
+
|
| 3 |
+
|
| 4 |
+
bool BestK::push(std::shared_ptr<SuperBB> in) {
|
| 5 |
+
std::lock_guard<std::mutex> locker(_mu);
|
| 6 |
+
if (size() < k_) {
|
| 7 |
+
insert(in);
|
| 8 |
+
return true;
|
| 9 |
+
} else {
|
| 10 |
+
|
| 11 |
+
if (internalMinScore() < score(in)) {
|
| 12 |
+
erase(begin());
|
| 13 |
+
insert(in);
|
| 14 |
+
curMinScore = score(*begin());
|
| 15 |
+
return true;
|
| 16 |
+
}
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
return false;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
bool BestK::push_cluster(std::shared_ptr<SuperBB> in, double rmsd, std::vector<std::vector<unsigned int>> &identGroups) {
|
| 23 |
+
std::lock_guard<std::mutex> locker(_mu);
|
| 24 |
+
|
| 25 |
+
if (internalMinScore() > score(in))
|
| 26 |
+
return false;
|
| 27 |
+
|
| 28 |
+
for (auto it = begin(); it != end(); it++) {
|
| 29 |
+
if (score(in) <= score(*it) && (*it)->calcRmsd(*in, identGroups) < rmsd)
|
| 30 |
+
return false;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
for (auto it = begin(); it != end();) {
|
| 34 |
+
if (score(in) > score(*it) && (*it)->calcRmsd(*in, identGroups) < rmsd) {
|
| 35 |
+
erase(it++);
|
| 36 |
+
} else {
|
| 37 |
+
++it;
|
| 38 |
+
}
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
if (size() >= k_) {
|
| 42 |
+
erase(begin());
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
insert(in);
|
| 46 |
+
curMinScore = score(*begin());
|
| 47 |
+
return true;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
void BestK::cluster(BestK &clusteredBest, double rmsd, std::vector<std::vector<unsigned int>> &identGroups) const {
|
| 51 |
+
if (size() == 0)
|
| 52 |
+
return;
|
| 53 |
+
const std::shared_ptr<SuperBB> firstSBB = *rbegin();
|
| 54 |
+
if (firstSBB->size() == 2) { // don't cluster
|
| 55 |
+
for (auto it = rbegin(); it != rend(); it++) {
|
| 56 |
+
clusteredBest.insert(*it);
|
| 57 |
+
}
|
| 58 |
+
} else {
|
| 59 |
+
std::vector<bool> clustered(size(), false);
|
| 60 |
+
int i = 0;
|
| 61 |
+
|
| 62 |
+
for (auto it = rbegin(); it != rend(); it++, i++) {
|
| 63 |
+
const std::shared_ptr<SuperBB> refSBB = *it;
|
| 64 |
+
// std::cout << "clustering " << i << " clsutered:" << clustered[i] << std::endl;
|
| 65 |
+
if (!clustered[i]) {
|
| 66 |
+
clustered[i] = true;
|
| 67 |
+
clusteredBest.insert(refSBB);
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
// TODO: maybe shouldn't cluster more if already clustered (can lead to drift)
|
| 71 |
+
|
| 72 |
+
// cluster to other SBBs
|
| 73 |
+
int j = 0;
|
| 74 |
+
// for(auto it2 = begin(); it2!= end(); it2++, j++) {
|
| 75 |
+
for (auto it2 = rbegin(); it2 != rend(); it2++, j++) {
|
| 76 |
+
if (!clustered[j] && (*it2)->calcRmsd(*refSBB, identGroups) < rmsd) {
|
| 77 |
+
clustered[j] = true;
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
}
|
| 82 |
+
}
|
model/CombinatorialAssembler/BestK.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef BESTK_H
|
| 2 |
+
#define BESTK_H
|
| 3 |
+
|
| 4 |
+
#include "SuperBB.h"
|
| 5 |
+
#include <mutex>
|
| 6 |
+
|
| 7 |
+
static float scoreSuperBB(const std::shared_ptr<SuperBB> &sbb) {
|
| 8 |
+
// return sbb->getRestraintsRatio();
|
| 9 |
+
// return sbb->weightedTransScore_;
|
| 10 |
+
|
| 11 |
+
// Note: if you change this, you also needs to change in HierarchicalFold::tryToConnect which optimizes by
|
| 12 |
+
// summing and comparing trans scores before trying to connect
|
| 13 |
+
// return sbb->transScore_;
|
| 14 |
+
return sbb->transScore_ * sbb->getRestraintsRatio();
|
| 15 |
+
}
|
| 16 |
+
struct comp {
|
| 17 |
+
bool operator()(const std::shared_ptr<SuperBB> &lhs, const std::shared_ptr<SuperBB> &rhs) const {
|
| 18 |
+
return scoreSuperBB(lhs) < scoreSuperBB(rhs);
|
| 19 |
+
}
|
| 20 |
+
};
|
| 21 |
+
|
| 22 |
+
/**
|
| 23 |
+
This class stores the best k permutations of a specific size
|
| 24 |
+
implemented as inheriting from a multiset with shapred_ptr and
|
| 25 |
+
the comp struct
|
| 26 |
+
*/
|
| 27 |
+
class BestK : public std::multiset<std::shared_ptr<SuperBB>, comp> {
|
| 28 |
+
|
| 29 |
+
public:
|
| 30 |
+
BestK(unsigned int k, bool toDel = true) : k_(k), curMinScore(-1) {}
|
| 31 |
+
|
| 32 |
+
float score(const std::shared_ptr<SuperBB> &sbb) const { return scoreSuperBB(sbb); }
|
| 33 |
+
|
| 34 |
+
float minScore() const { return curMinScore; }
|
| 35 |
+
float maxScore() const {
|
| 36 |
+
if (size() == 0)
|
| 37 |
+
return 0;
|
| 38 |
+
return score(*rbegin());
|
| 39 |
+
}
|
| 40 |
+
|
| 41 |
+
void setK(int k) { k_ = k; }
|
| 42 |
+
|
| 43 |
+
bool push(std::shared_ptr<SuperBB> in);
|
| 44 |
+
|
| 45 |
+
bool push_cluster(std::shared_ptr<SuperBB> in, double rmsd, std::vector<std::vector<unsigned int>> &identGroups);
|
| 46 |
+
|
| 47 |
+
void cluster(BestK &clusteredBest, double rmsd, std::vector<std::vector<unsigned int>> &identGroups) const;
|
| 48 |
+
virtual ~BestK() {}
|
| 49 |
+
|
| 50 |
+
private:
|
| 51 |
+
float internalMinScore() {
|
| 52 |
+
if (size() < k_)
|
| 53 |
+
return -1;
|
| 54 |
+
return score(*begin());
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
private:
|
| 58 |
+
std::mutex _mu;
|
| 59 |
+
unsigned int k_;
|
| 60 |
+
float curMinScore;
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
#endif /* BESTK_H */
|
model/CombinatorialAssembler/BestKContainer.h
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* \file BestKContainer.h
|
| 3 |
+
* \brief
|
| 4 |
+
*
|
| 5 |
+
* \authors Dina Schneidman
|
| 6 |
+
*
|
| 7 |
+
*/
|
| 8 |
+
#ifndef BESTKCONTAINER_H
|
| 9 |
+
#define BESTKCONTAINER_H
|
| 10 |
+
|
| 11 |
+
#include <unordered_map>
|
| 12 |
+
#include "BestK.h"
|
| 13 |
+
|
| 14 |
+
class BestKContainer : private std::vector<BestK *> {
|
| 15 |
+
public:
|
| 16 |
+
// N - subunit number
|
| 17 |
+
BestKContainer(int K) : K_(K) {}
|
| 18 |
+
|
| 19 |
+
~BestKContainer() {
|
| 20 |
+
for (auto it = begin(); it != end(); it++)
|
| 21 |
+
delete *it;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
BestK *newBestK(BitId set) {
|
| 25 |
+
BestK *best = new BestK(K_);
|
| 26 |
+
push_back(best);
|
| 27 |
+
set2index_[set] = size() - 1;
|
| 28 |
+
return best;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
bool isEmpty(const BitId set) const { return (set2index_.find(set) == set2index_.end()); }
|
| 32 |
+
|
| 33 |
+
// assumes BestK for set exists, can be checked with isEmpty
|
| 34 |
+
const BestK &operator[](const BitId set) const {
|
| 35 |
+
unsigned int index = set2index_.find(set)->second;
|
| 36 |
+
return *((std::vector<BestK *>)(*this))[index];
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
// assumes BestK for set exists
|
| 40 |
+
BestK &operator[](const BitId set) { return *((std::vector<BestK *>)(*this))[set2index_[set]]; }
|
| 41 |
+
|
| 42 |
+
private:
|
| 43 |
+
int K_;
|
| 44 |
+
// The long is a unique representation key for each SBB
|
| 45 |
+
// And it is the long type because we want to support more than 32 subunits
|
| 46 |
+
// int corresponds to an index in the vector that holds the BestK
|
| 47 |
+
std::unordered_map<BitId, unsigned int> set2index_;
|
| 48 |
+
};
|
| 49 |
+
|
| 50 |
+
#endif /* BESTKCONTAINER_H */
|
model/CombinatorialAssembler/BitId.h
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef BITID_H
|
| 2 |
+
#define BITID_H
|
| 3 |
+
|
| 4 |
+
#include <ostream>
|
| 5 |
+
#include <bitset>
|
| 6 |
+
|
| 7 |
+
|
| 8 |
+
template <size_t N>
|
| 9 |
+
class CustomBitset : public std::bitset<N> {
|
| 10 |
+
public:
|
| 11 |
+
CustomBitset() : std::bitset<N>() {}
|
| 12 |
+
|
| 13 |
+
CustomBitset(const std::bitset<N>& b) : std::bitset<N>(b) {}
|
| 14 |
+
|
| 15 |
+
// assert val < n and then set the val bit, this is different from std::bitset
|
| 16 |
+
CustomBitset(unsigned long long val) : std::bitset<N>(0) {
|
| 17 |
+
assert(val < N);
|
| 18 |
+
this->set(val);
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
// don't print leading zeros
|
| 22 |
+
std::string to_string() const {
|
| 23 |
+
std::string str = std::bitset<N>::to_string();
|
| 24 |
+
size_t first_one = str.find('1');
|
| 25 |
+
return first_one == std::string::npos ? "0" : str.substr(first_one);
|
| 26 |
+
}
|
| 27 |
+
};
|
| 28 |
+
|
| 29 |
+
template <size_t N>
|
| 30 |
+
std::ostream& operator<<(std::ostream& os, const CustomBitset<N>& b) {
|
| 31 |
+
os << b.to_string();
|
| 32 |
+
return os;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
namespace std {
|
| 37 |
+
template <size_t N>
|
| 38 |
+
struct hash<CustomBitset<N>> {
|
| 39 |
+
size_t operator()(const CustomBitset<N>& b) const {
|
| 40 |
+
return std::hash<std::string>()(b.to_string());
|
| 41 |
+
}
|
| 42 |
+
};
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
|
| 46 |
+
typedef CustomBitset<128> BitId;
|
| 47 |
+
|
| 48 |
+
#endif /* BITID_H */
|
model/CombinatorialAssembler/ComplexDistanceConstraint.cc
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "ComplexDistanceConstraint.h"
|
| 2 |
+
|
| 3 |
+
#include "BB.h"
|
| 4 |
+
|
| 5 |
+
void ComplexDistanceConstraint::addConstraint(int suInd1, int suInd2, Vector3 receptorAtom, Vector3 ligandAtom,
|
| 6 |
+
float maxDistance, float minDistance) {
|
| 7 |
+
int ind = suInd1 * noOfSUs_ + suInd2;
|
| 8 |
+
constraints_[ind].push_back(DistanceRestraint(receptorAtom, ligandAtom, maxDistance, minDistance));
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
bool ComplexDistanceConstraint::areConstraintsSatisfied(int suInd1, int suInd2, RigidTrans3 &trans2) const {
|
| 12 |
+
int ind = suInd1 * noOfSUs_ + suInd2;
|
| 13 |
+
for (unsigned int index = 0; index < constraints_[ind].size(); index++) {
|
| 14 |
+
bool sat = constraints_[ind][index].isSatisfied(trans2);
|
| 15 |
+
if (!sat) {
|
| 16 |
+
return false;
|
| 17 |
+
}
|
| 18 |
+
}
|
| 19 |
+
return true;
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
int ComplexDistanceConstraint::addChainConnectivityConstraints() {
|
| 23 |
+
for (int suInd1 = 0; suInd1 < noOfSUs_; suInd1++) {
|
| 24 |
+
for (int suInd2 = suInd1 + 1; suInd2 < noOfSUs_; suInd2++) {
|
| 25 |
+
std::vector<std::pair<char, std::pair<int, int>>> constraints;
|
| 26 |
+
int counter = 0;
|
| 27 |
+
float epsilon = 20.0; // for shorter connections
|
| 28 |
+
bbs_[suInd1]->getChainConnectivityConstraints(*bbs_[suInd2], constraints);
|
| 29 |
+
for (int i = 0; i < (int)constraints.size(); i++) {
|
| 30 |
+
int su1resIndex = constraints[i].second.first;
|
| 31 |
+
int su2resIndex = constraints[i].second.second;
|
| 32 |
+
|
| 33 |
+
int receptorAtomIndex = bbs_[suInd1]->allAtoms_.getFirstAtomEntryForResIndex(
|
| 34 |
+
constraints[i].first, std::to_string(su1resIndex));
|
| 35 |
+
int ligandAtomIndex = bbs_[suInd2]->allAtoms_.getFirstAtomEntryForResIndex(constraints[i].first,
|
| 36 |
+
std::to_string(su2resIndex));
|
| 37 |
+
|
| 38 |
+
Vector3 receptorAtom = bbs_[suInd1]->getChemAtomByIndex(receptorAtomIndex).position();
|
| 39 |
+
Vector3 ligandAtom = bbs_[suInd2]->getChemAtomByIndex(ligandAtomIndex).position();
|
| 40 |
+
|
| 41 |
+
int sequenceDist = std::fabs(su1resIndex - su2resIndex);
|
| 42 |
+
if (sequenceDist < 100) {
|
| 43 |
+
float maxDist = sequenceDist * 2.0;
|
| 44 |
+
if (sequenceDist <= 5)
|
| 45 |
+
maxDist += epsilon;
|
| 46 |
+
addConstraint(suInd1, suInd2, receptorAtom, ligandAtom, maxDist);
|
| 47 |
+
addConstraint(suInd2, suInd1, ligandAtom, receptorAtom, maxDist);
|
| 48 |
+
std::cerr << "DISTANCE CONSTRAINT ADDED: " << constraints[i].first << " su1 endpoint "
|
| 49 |
+
<< su1resIndex << " su2 endpoint " << su2resIndex << " " << maxDist << std::endl;
|
| 50 |
+
counter++;
|
| 51 |
+
}
|
| 52 |
+
}
|
| 53 |
+
numberOfConstraints_ += counter;
|
| 54 |
+
}
|
| 55 |
+
}
|
| 56 |
+
return numberOfConstraints_;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
std::set<int> ComplexDistanceConstraint::getSUs(const std::string residueSequenceID, const std::string chains,
|
| 60 |
+
int maxOffset) const {
|
| 61 |
+
|
| 62 |
+
int rOffset = 0;
|
| 63 |
+
std::set<int> ret;
|
| 64 |
+
// iterate chains
|
| 65 |
+
for (unsigned int chainIndex = 0; chainIndex < chains.size(); chainIndex++) {
|
| 66 |
+
// for each chain find corresponding SU
|
| 67 |
+
for (int suIndex = 0; suIndex < noOfSUs_; suIndex++) {
|
| 68 |
+
int atomIndex = bbs_[suIndex]->allAtoms_.getClosestAtomEntryForResIndex(
|
| 69 |
+
chains[chainIndex], residueSequenceID, maxOffset, rOffset);
|
| 70 |
+
if (atomIndex != -1) { // found
|
| 71 |
+
ret.insert(suIndex);
|
| 72 |
+
continue;
|
| 73 |
+
}
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
return ret;
|
| 77 |
+
}
|
| 78 |
+
|
| 79 |
+
int ComplexDistanceConstraint::readRestraintsFile(const std::string fileName) {
|
| 80 |
+
// read cross links
|
| 81 |
+
std::vector<CrossLink> crosslinks;
|
| 82 |
+
int xnum = readCrossLinkFile(fileName, crosslinks);
|
| 83 |
+
Logger::infoMessage() << "# of xlinks " << xnum << " read from file" << fileName << std::endl;
|
| 84 |
+
int MAX_OFFSET = 20;
|
| 85 |
+
|
| 86 |
+
crosslinkIndToWeight_ = std::vector<float>(crosslinks.size());
|
| 87 |
+
|
| 88 |
+
// map them to BB pairs
|
| 89 |
+
for (unsigned int i = 0; i < crosslinks.size(); i++) {
|
| 90 |
+
crosslinkIndToWeight_[i] = crosslinks[i].getWeight();
|
| 91 |
+
|
| 92 |
+
// SUs that have xlinks endpoints (sus1, sus2)
|
| 93 |
+
std::string residueSequenceID1 = std::to_string(crosslinks[i].getResidue1());
|
| 94 |
+
std::set<int> sus1 = getSUs(residueSequenceID1, crosslinks[i].getChain1());
|
| 95 |
+
if (sus1.size() == 0)
|
| 96 |
+
sus1 = getSUs(residueSequenceID1, crosslinks[i].getChain1(), MAX_OFFSET);
|
| 97 |
+
std::string residueSequenceID2 = std::to_string(crosslinks[i].getResidue2());
|
| 98 |
+
std::set<int> sus2 = getSUs(residueSequenceID2, crosslinks[i].getChain2());
|
| 99 |
+
if (sus2.size() == 0)
|
| 100 |
+
sus2 = getSUs(residueSequenceID2, crosslinks[i].getChain2(), MAX_OFFSET);
|
| 101 |
+
|
| 102 |
+
// iterate over all pairs of SUs
|
| 103 |
+
for (auto suIndexIter1 = sus1.begin(); suIndexIter1 != sus1.end(); suIndexIter1++) {
|
| 104 |
+
for (unsigned int chainIndex1 = 0; chainIndex1 < crosslinks[i].getChain1().size(); chainIndex1++) {
|
| 105 |
+
char chainId1 = crosslinks[i].getChain1()[chainIndex1];
|
| 106 |
+
int rOffset = 0;
|
| 107 |
+
int receptorAtomIndex = bbs_[*suIndexIter1]->allAtoms_.getClosestAtomEntryForResIndex(
|
| 108 |
+
chainId1, residueSequenceID1, MAX_OFFSET, rOffset);
|
| 109 |
+
if (rOffset < 0)
|
| 110 |
+
rOffset = -1 * rOffset;
|
| 111 |
+
if (receptorAtomIndex == -1)
|
| 112 |
+
continue;
|
| 113 |
+
Vector3 rcoord = bbs_[*suIndexIter1]->getChemAtomByIndex(receptorAtomIndex).position();
|
| 114 |
+
|
| 115 |
+
for (auto suIndexIter2 = sus2.begin(); suIndexIter2 != sus2.end(); suIndexIter2++) {
|
| 116 |
+
for (unsigned int chainIndex2 = 0; chainIndex2 < crosslinks[i].getChain2().size(); chainIndex2++) {
|
| 117 |
+
char chainId2 = crosslinks[i].getChain2()[chainIndex2];
|
| 118 |
+
int lOffset = 0;
|
| 119 |
+
int ligandAtomIndex = bbs_[*suIndexIter2]->allAtoms_.getClosestAtomEntryForResIndex(
|
| 120 |
+
chainId2, residueSequenceID2, MAX_OFFSET, lOffset);
|
| 121 |
+
if (ligandAtomIndex == -1)
|
| 122 |
+
continue;
|
| 123 |
+
if (lOffset < 0)
|
| 124 |
+
lOffset = -1 * lOffset;
|
| 125 |
+
|
| 126 |
+
Vector3 lcoord = bbs_[*suIndexIter2]->getChemAtomByIndex(ligandAtomIndex).position();
|
| 127 |
+
|
| 128 |
+
float maxDistance = crosslinks[i].getMaxDistance() + (rOffset + lOffset) * 3.0;
|
| 129 |
+
float minDistance = crosslinks[i].getMinDistance();
|
| 130 |
+
|
| 131 |
+
int ind1 = *suIndexIter1 * noOfSUs_ + *suIndexIter2;
|
| 132 |
+
DistanceRestraint d1(rcoord, lcoord, maxDistance, minDistance, crosslinks[i].getWeight());
|
| 133 |
+
restraintIndsToCrosslinkInds_[ind1].push_back(i);
|
| 134 |
+
restraints_[ind1].push_back(d1);
|
| 135 |
+
|
| 136 |
+
int ind2 = *suIndexIter2 * noOfSUs_ + *suIndexIter1;
|
| 137 |
+
DistanceRestraint d2(lcoord, rcoord, maxDistance, minDistance, crosslinks[i].getWeight());
|
| 138 |
+
restraintIndsToCrosslinkInds_[ind2].push_back(i);
|
| 139 |
+
restraints_[ind2].push_back(d2);
|
| 140 |
+
|
| 141 |
+
std::cout << " adding restraint to " << *suIndexIter1 << "x" << *suIndexIter2 << " :"
|
| 142 |
+
<< residueSequenceID1 << chainId1 << " : " << residueSequenceID2 << chainId2
|
| 143 |
+
<< " dist " << maxDistance << " " << minDistance << " indexes " << ind1 << " : "
|
| 144 |
+
<< ind2 << std::endl;
|
| 145 |
+
}
|
| 146 |
+
}
|
| 147 |
+
}
|
| 148 |
+
}
|
| 149 |
+
}
|
| 150 |
+
return crosslinks.size();
|
| 151 |
+
}
|
| 152 |
+
|
| 153 |
+
float ComplexDistanceConstraint::getRestraintsRatio(const std::vector<std::shared_ptr<const BB>> &bbs,
|
| 154 |
+
const std::vector<RigidTrans3> &trans) const {
|
| 155 |
+
std::set<unsigned int> totalSeenCrosslinks;
|
| 156 |
+
std::set<unsigned int> satisfiedCrosslinks;
|
| 157 |
+
for (int suInd1 = 0; suInd1 < (int)bbs.size(); suInd1++) {
|
| 158 |
+
for (int suInd2 = 0; suInd2 < (int)bbs.size(); suInd2++) {
|
| 159 |
+
int index1 = bbs[suInd1]->getID();
|
| 160 |
+
int index2 = bbs[suInd2]->getID();
|
| 161 |
+
if (index1 == index2)
|
| 162 |
+
continue;
|
| 163 |
+
int suPairIndex = index1 * noOfSUs_ + index2;
|
| 164 |
+
for (unsigned int restraintIndex = 0; restraintIndex < restraints_[suPairIndex].size(); restraintIndex++) {
|
| 165 |
+
unsigned int crosslinkIndex = restraintIndsToCrosslinkInds_[suPairIndex][restraintIndex];
|
| 166 |
+
if (satisfiedCrosslinks.find(crosslinkIndex) != satisfiedCrosslinks.end()) {
|
| 167 |
+
continue;
|
| 168 |
+
}
|
| 169 |
+
totalSeenCrosslinks.insert(crosslinkIndex);
|
| 170 |
+
if (restraints_[suPairIndex][restraintIndex].isSatisfied(trans[suInd1], trans[suInd2]))
|
| 171 |
+
satisfiedCrosslinks.insert(crosslinkIndex);
|
| 172 |
+
}
|
| 173 |
+
}
|
| 174 |
+
}
|
| 175 |
+
if (totalSeenCrosslinks.size() == 0)
|
| 176 |
+
return 1.0;
|
| 177 |
+
|
| 178 |
+
float satisfiedWeight = 0.0;
|
| 179 |
+
float totalWeight = 0.0;
|
| 180 |
+
for (auto it = satisfiedCrosslinks.begin(); it != satisfiedCrosslinks.end(); it++) {
|
| 181 |
+
satisfiedWeight += crosslinkIndToWeight_[*it];
|
| 182 |
+
}
|
| 183 |
+
for (auto it = totalSeenCrosslinks.begin(); it != totalSeenCrosslinks.end(); it++) {
|
| 184 |
+
totalWeight += crosslinkIndToWeight_[*it];
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
return satisfiedWeight / totalWeight;
|
| 188 |
+
// return (float)satisfiedCrosslinks.size() / (float)totalSeenCrosslinks.size();
|
| 189 |
+
}
|
model/CombinatorialAssembler/ComplexDistanceConstraint.h
ADDED
|
@@ -0,0 +1,63 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef DistanceConstraint_H
|
| 2 |
+
#define DistanceConstraint_H
|
| 3 |
+
|
| 4 |
+
#include <fstream>
|
| 5 |
+
#include <iostream>
|
| 6 |
+
#include <string>
|
| 7 |
+
#include <vector>
|
| 8 |
+
|
| 9 |
+
#include <Molecule.h>
|
| 10 |
+
// #include <DistanceConstraint.h>
|
| 11 |
+
#include <CrossLink.h>
|
| 12 |
+
#include <DistanceRestraint.h>
|
| 13 |
+
|
| 14 |
+
#include "BB.h"
|
| 15 |
+
|
| 16 |
+
class ComplexDistanceConstraint {
|
| 17 |
+
public:
|
| 18 |
+
ComplexDistanceConstraint(const std::vector<std::shared_ptr<const BB>> &bbs)
|
| 19 |
+
: bbs_(bbs), noOfSUs_(bbs.size()), constraints_(noOfSUs_ * noOfSUs_), restraints_(noOfSUs_ * noOfSUs_),
|
| 20 |
+
restraintIndsToCrosslinkInds_(noOfSUs_ * noOfSUs_) {}
|
| 21 |
+
|
| 22 |
+
int readRestraintsFile(const std::string fileName);
|
| 23 |
+
int addChainConnectivityConstraints();
|
| 24 |
+
|
| 25 |
+
int numberOfRestraints(int suInd1, int suInd2) const {
|
| 26 |
+
int ind = suInd1 * noOfSUs_ + suInd2;
|
| 27 |
+
return restraints_[ind].size();
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
int numberOfConstraints(int suInd1, int suInd2) const {
|
| 31 |
+
int ind = suInd1 * noOfSUs_ + suInd2;
|
| 32 |
+
return constraints_[ind].size();
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
// constraints satisfaction: every constraint needs to be satisfied
|
| 36 |
+
bool areConstraintsSatisfied(int suInd1, int suInd2, RigidTrans3 &trans2) const;
|
| 37 |
+
|
| 38 |
+
// restraints satisfaction: a predefined ratio needs to be satisfied
|
| 39 |
+
float getRestraintsRatio(const std::vector<std::shared_ptr<const BB>> &bbs,
|
| 40 |
+
const std::vector<RigidTrans3> &trans) const;
|
| 41 |
+
|
| 42 |
+
private:
|
| 43 |
+
void addConstraint(int suInd1, int suInd2, Vector3 receptorAtom, Vector3 ligandAtom, float maxDistance,
|
| 44 |
+
float minDistance = 0);
|
| 45 |
+
|
| 46 |
+
void addRestraint(int suInd1, int suInd2, Vector3 receptorAtom, Vector3 ligandAtom, float maxDistance,
|
| 47 |
+
float minDistance = 0);
|
| 48 |
+
|
| 49 |
+
// find all SUs with residueSequenceID and chains, maxoffset is +/- few residues
|
| 50 |
+
std::set<int> getSUs(const std::string residueSequenceID, const std::string chains, int maxoffset = 0) const;
|
| 51 |
+
|
| 52 |
+
private:
|
| 53 |
+
const std::vector<std::shared_ptr<const BB>> &bbs_;
|
| 54 |
+
int noOfSUs_;
|
| 55 |
+
std::vector<std::vector<DistanceRestraint>> constraints_;
|
| 56 |
+
std::vector<std::vector<DistanceRestraint>> restraints_;
|
| 57 |
+
int numberOfConstraints_ = 0;
|
| 58 |
+
int numberOfRestraints_ = 0;
|
| 59 |
+
std::vector<std::vector<unsigned int>> restraintIndsToCrosslinkInds_;
|
| 60 |
+
std::vector<float> crosslinkIndToWeight_;
|
| 61 |
+
};
|
| 62 |
+
|
| 63 |
+
#endif
|
model/CombinatorialAssembler/DOCK.conf
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#Model
|
| 2 |
+
MODEL_BUCKET_SIZE 0.5
|
| 3 |
+
MODEL_QUERY_RADIUS 1.5
|
| 4 |
+
HINGE_BUCKET_SIZE 0.5
|
| 5 |
+
HINGE_QUERY_RADIUS 6.0
|
| 6 |
+
TRIANGLE_SIZE_DIST 2.5
|
| 7 |
+
TRIANGLE_SIZE_DIST_WH 4.0
|
| 8 |
+
PROBABILITY 0.05
|
| 9 |
+
PROBABILITY_WH 0.2
|
| 10 |
+
CLUSTER_RADIUS 4.0
|
| 11 |
+
CLUSTER_RADIUS_WH 1.0
|
| 12 |
+
THRESHOLD 300
|
| 13 |
+
THRESHOLD_WH -100
|
| 14 |
+
GRID_RESOLUTION 0.5
|
| 15 |
+
GRID_MARGINS 5.0
|
| 16 |
+
#TriangleIterator
|
| 17 |
+
TRIANGLE_MAX_SEG_SIZE 12.0
|
| 18 |
+
TRIANGLE_MIN_SEG_SIZE 2.0
|
| 19 |
+
TRIANGLE_SEG_RATIO 4.0
|
| 20 |
+
#Cluster
|
| 21 |
+
CLUSTER_RADIUS_RATIO 3.0
|
model/CombinatorialAssembler/FoldStep.h
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef FOLDSTEP_H
|
| 2 |
+
#define FOLDSTEP_H
|
| 3 |
+
|
| 4 |
+
#include <algorithm>
|
| 5 |
+
|
| 6 |
+
class FoldStep {
|
| 7 |
+
public:
|
| 8 |
+
// Constructors
|
| 9 |
+
FoldStep(unsigned int i, unsigned int j, RigidTrans3 trans) : i_(i), j_(j), trans_(trans) {}
|
| 10 |
+
FoldStep(unsigned int i, unsigned int j) : i_(i), j_(j) {}
|
| 11 |
+
FoldStep(unsigned int i, unsigned int j, float score) : i_(i), j_(j), tScore_(score) {}
|
| 12 |
+
|
| 13 |
+
// bool operator < (const FoldStep& s2) const { return ((i_ < s2.i_) || (i_ == s2.i_ && j_ < s2.j_)); }
|
| 14 |
+
|
| 15 |
+
friend bool operator<(const FoldStep &s1, const FoldStep &s2) {
|
| 16 |
+
unsigned int max1 = std::max(s1.i_, s1.j_);
|
| 17 |
+
unsigned int max2 = std::max(s2.i_, s2.j_);
|
| 18 |
+
return (max1 < max2 || (max1 == max2 && std::min(s1.i_, s1.j_) < std::min(s2.i_, s2.j_)));
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
static void outputFoldSteps(std::ostream &out, const std::vector<FoldStep> &foldSteps) {
|
| 22 |
+
out << "foldSteps:";
|
| 23 |
+
for (unsigned int i = 0; i < foldSteps.size(); i++) {
|
| 24 |
+
out << " (" << foldSteps[i].i_ << ", " << foldSteps[i].j_ << ")-" << foldSteps[i].tScore_;
|
| 25 |
+
}
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
public:
|
| 29 |
+
unsigned int i_, j_;
|
| 30 |
+
float tScore_;
|
| 31 |
+
RigidTrans3 trans_;
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
#endif /* FOLDSTEP_H */
|
model/CombinatorialAssembler/HierarchicalFold.cc
ADDED
|
@@ -0,0 +1,730 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "HierarchicalFold.h"
|
| 2 |
+
|
| 3 |
+
#include <boost/graph/adjacency_list.hpp>
|
| 4 |
+
#include <boost/graph/connected_components.hpp>
|
| 5 |
+
|
| 6 |
+
Timer HierarchicalFold::timer_;
|
| 7 |
+
Timer HierarchicalFold::timerAll_;
|
| 8 |
+
unsigned int HierarchicalFold::countResults_(0);
|
| 9 |
+
|
| 10 |
+
std::vector<std::vector<unsigned int>> createIdentGroups(unsigned int N_, BestKContainer &bestKContainer_) {
|
| 11 |
+
std::vector<bool> addedToGroup(N_, false);
|
| 12 |
+
std::vector<std::vector<unsigned int>> identGroups;
|
| 13 |
+
for (unsigned int i = 0; i < N_; i++) {
|
| 14 |
+
std::shared_ptr<SuperBB> sbbI = *(bestKContainer_[BitId(i)].begin());
|
| 15 |
+
const std::shared_ptr<const BB> bbI = sbbI->bbs_[0];
|
| 16 |
+
|
| 17 |
+
if (addedToGroup[i])
|
| 18 |
+
continue;
|
| 19 |
+
addedToGroup[i] = true;
|
| 20 |
+
std::vector<unsigned int> identical;
|
| 21 |
+
|
| 22 |
+
for (unsigned int j = i + 1; j < N_; j++) {
|
| 23 |
+
std::cout << "checking ident " << i << " & " << j << std::endl;
|
| 24 |
+
std::shared_ptr<SuperBB> sbbJ = *(bestKContainer_[BitId(j)].begin());
|
| 25 |
+
|
| 26 |
+
const std::shared_ptr<const BB> bbJ = sbbJ->bbs_[0];
|
| 27 |
+
|
| 28 |
+
if (bbI->isIdent(*bbJ)) {
|
| 29 |
+
addedToGroup[j] = true;
|
| 30 |
+
std::cout << "found ident " << i << " " << j << std::endl;
|
| 31 |
+
identical.push_back(j);
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
if (identical.size() > 0) {
|
| 35 |
+
identical.insert(identical.begin(), i);
|
| 36 |
+
identGroups.push_back(identical);
|
| 37 |
+
}
|
| 38 |
+
}
|
| 39 |
+
std::cout << "---- ident groups " << std::endl;
|
| 40 |
+
for (std::vector<unsigned int> identGroup : identGroups) {
|
| 41 |
+
std::cout << "ident group: ";
|
| 42 |
+
for (unsigned int i : identGroup) {
|
| 43 |
+
std::cout << i << " ";
|
| 44 |
+
}
|
| 45 |
+
std::cout << std::endl;
|
| 46 |
+
}
|
| 47 |
+
|
| 48 |
+
return identGroups;
|
| 49 |
+
}
|
| 50 |
+
|
| 51 |
+
std::map<unsigned int, std::vector<unsigned int>> createAssemblyGroupsMap(unsigned int N_,
|
| 52 |
+
BestKContainer &bestKContainer_) {
|
| 53 |
+
std::map<unsigned int, std::vector<unsigned int>> assemblyGroupsMap;
|
| 54 |
+
for (unsigned int i = 0; i < N_; i++) {
|
| 55 |
+
std::shared_ptr<SuperBB> sbbI = *(bestKContainer_[BitId(i)].begin());
|
| 56 |
+
const std::shared_ptr<const BB> bbI = sbbI->bbs_[0];
|
| 57 |
+
if (assemblyGroupsMap.count(bbI->groupId()) == 0) {
|
| 58 |
+
std::vector<unsigned int> newGroup;
|
| 59 |
+
assemblyGroupsMap[bbI->groupId()] = newGroup;
|
| 60 |
+
}
|
| 61 |
+
assemblyGroupsMap[bbI->groupId()].push_back(i);
|
| 62 |
+
}
|
| 63 |
+
std::cout << "---- assembly groups " << std::endl;
|
| 64 |
+
// std::vector<std::vector<unsigned int>> assemblyGroups;
|
| 65 |
+
for (const auto &[groupId, groupBBIds] : assemblyGroupsMap) {
|
| 66 |
+
std::cout << "assembly group " << groupId << ":";
|
| 67 |
+
for (unsigned int i : groupBBIds) {
|
| 68 |
+
std::cout << i << " ";
|
| 69 |
+
}
|
| 70 |
+
std::cout << std::endl;
|
| 71 |
+
// assemblyGroups.push_back(groupBBIds);
|
| 72 |
+
}
|
| 73 |
+
return assemblyGroupsMap;
|
| 74 |
+
}
|
| 75 |
+
|
| 76 |
+
void printBestK(unsigned int N_, BestK *bestK) {
|
| 77 |
+
// just for print
|
| 78 |
+
std::map<unsigned int, unsigned int> count_new_kept_by_bb;
|
| 79 |
+
std::unordered_map<BitId, unsigned int> count_new_kept_by_resSet;
|
| 80 |
+
for (unsigned int bit_index = 0; bit_index < N_; bit_index++)
|
| 81 |
+
count_new_kept_by_bb[bit_index] = 0;
|
| 82 |
+
for (auto it1 = bestK->begin(); it1 != bestK->end(); it1++) {
|
| 83 |
+
if (count_new_kept_by_resSet.count((**it1).bitIds()) == 0)
|
| 84 |
+
count_new_kept_by_resSet[(**it1).bitIds()] = 0;
|
| 85 |
+
count_new_kept_by_resSet[(**it1).bitIds()] += 1;
|
| 86 |
+
for (unsigned int bit_index = 0; bit_index < N_; bit_index++)
|
| 87 |
+
if ((**it1).bitIds().test(bit_index)) {
|
| 88 |
+
count_new_kept_by_bb[bit_index] += 1;
|
| 89 |
+
}
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
std::cout << "scores of saved " << bestK->minScore() << ":" << bestK->maxScore() << std::endl;
|
| 93 |
+
std::cout << "new kept results by chain ";
|
| 94 |
+
for (const auto &elem : count_new_kept_by_bb)
|
| 95 |
+
std::cout << elem.first << ":" << elem.second << ", ";
|
| 96 |
+
std::cout << std::endl << "new kept results by resSet ";
|
| 97 |
+
for (const auto &elem : count_new_kept_by_resSet)
|
| 98 |
+
std::cout << elem.first << ":" << elem.second << ", ";
|
| 99 |
+
std::cout << std::endl;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
bool isValidBasedOnAssembly(std::map<unsigned int, std::vector<unsigned int>> assemblyGroupsMap,
|
| 103 |
+
BitId currResSet) {
|
| 104 |
+
if (assemblyGroupsMap.size() <= 1)
|
| 105 |
+
return true;
|
| 106 |
+
|
| 107 |
+
bool seenPartialGroup = false;
|
| 108 |
+
int numberOfGroups = 0;
|
| 109 |
+
|
| 110 |
+
bool seenGroupZero = false;
|
| 111 |
+
|
| 112 |
+
for (const auto &[groupId, assemblyGroup] : assemblyGroupsMap) {
|
| 113 |
+
bool seenZero = false;
|
| 114 |
+
bool seenOne = false;
|
| 115 |
+
|
| 116 |
+
for (unsigned int i = 0; i < assemblyGroup.size(); i++) {
|
| 117 |
+
if (currResSet.test(assemblyGroup[i]))
|
| 118 |
+
seenOne = true;
|
| 119 |
+
else
|
| 120 |
+
seenZero = true;
|
| 121 |
+
}
|
| 122 |
+
if (groupId == 0) {
|
| 123 |
+
// assembly group 0 is special, this group should not be assembled before joining others
|
| 124 |
+
// so we never treat it as partial, but it can't be with another partial group
|
| 125 |
+
if (seenOne)
|
| 126 |
+
seenGroupZero = true;
|
| 127 |
+
} else {
|
| 128 |
+
if (seenOne)
|
| 129 |
+
numberOfGroups++;
|
| 130 |
+
|
| 131 |
+
if (seenZero && seenOne) {
|
| 132 |
+
seenPartialGroup = true;
|
| 133 |
+
}
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
if (numberOfGroups >= 1 && seenPartialGroup && seenGroupZero)
|
| 137 |
+
return false;
|
| 138 |
+
|
| 139 |
+
|
| 140 |
+
if (numberOfGroups > 1 && seenPartialGroup)
|
| 141 |
+
return false;
|
| 142 |
+
|
| 143 |
+
return true;
|
| 144 |
+
}
|
| 145 |
+
|
| 146 |
+
void HierarchicalFold::fold(const std::string &outFileNamePrefix) {
|
| 147 |
+
std::vector<std::vector<unsigned int>> identGroups = createIdentGroups(N_, bestKContainer_);
|
| 148 |
+
std::map<unsigned int, std::vector<unsigned int>> assemblyGroupsMap = createAssemblyGroupsMap(N_, bestKContainer_);
|
| 149 |
+
|
| 150 |
+
std::map<unsigned int, BestK *> precomputedResults;
|
| 151 |
+
for (unsigned int i = 2; i <= N_; i++)
|
| 152 |
+
precomputedResults[i] = new BestK(K_);
|
| 153 |
+
|
| 154 |
+
// populate with homomers subunits
|
| 155 |
+
for (std::vector<unsigned int> identGroup : identGroups) {
|
| 156 |
+
for (unsigned int groupDivider = 1; (identGroup.size() / groupDivider) >= 5; groupDivider++) {
|
| 157 |
+
if ((identGroup.size() % groupDivider) != 0)
|
| 158 |
+
continue;
|
| 159 |
+
unsigned int groupSize = identGroup.size() / groupDivider;
|
| 160 |
+
std::vector<std::shared_ptr<SuperBB>> groupSBBs;
|
| 161 |
+
for (unsigned int j = 0; j < groupSize; j++) {
|
| 162 |
+
groupSBBs.push_back(*(bestKContainer_[BitId(identGroup[j])].begin()));
|
| 163 |
+
}
|
| 164 |
+
std::cout << "searching for size " << groupSBBs.size() << " has " << precomputedResults.count(groupSBBs.size())
|
| 165 |
+
<< std::endl;
|
| 166 |
+
createSymmetry(groupSBBs, *precomputedResults[groupSBBs.size()]);
|
| 167 |
+
}
|
| 168 |
+
}
|
| 169 |
+
|
| 170 |
+
// Hierarchical Assembly
|
| 171 |
+
for (unsigned int length = 2; length <= N_; length++) { // # subunits iteration
|
| 172 |
+
std::cout << "*** running iteration " << length
|
| 173 |
+
<< " prev kept results: " << keptResultsByLength[length - 1]->size() << std::endl;
|
| 174 |
+
std::unordered_map<BitId, BestK *> best_k_by_id;
|
| 175 |
+
|
| 176 |
+
// populate with precomputedResults
|
| 177 |
+
for (auto it1 = precomputedResults[length]->begin(); it1 != precomputedResults[length]->end(); it1++) {
|
| 178 |
+
BitId currResSet = (**it1).bitIds();
|
| 179 |
+
if (best_k_by_id.count(currResSet) == 0)
|
| 180 |
+
best_k_by_id[currResSet] = new BestK(K_);
|
| 181 |
+
best_k_by_id[currResSet]->push(*it1);
|
| 182 |
+
}
|
| 183 |
+
|
| 184 |
+
// try to assemble from each pair of kept results that together have (length) subunits
|
| 185 |
+
for (unsigned int firstResultSize = 1; firstResultSize <= length / 2; firstResultSize++) {
|
| 186 |
+
unsigned int secondResultSize = length - firstResultSize;
|
| 187 |
+
std::cout << "** running sub-iteration " << firstResultSize << " " << secondResultSize << std::endl;
|
| 188 |
+
std::cout << "counters " << countFilterTrasSkipped_ << "/" << countFilterTras_ << std::endl;
|
| 189 |
+
|
| 190 |
+
for (auto it1 = keptResultsByLength[firstResultSize]->begin();
|
| 191 |
+
it1 != keptResultsByLength[firstResultSize]->end(); it1++) {
|
| 192 |
+
SuperBB sbb1 = **it1;
|
| 193 |
+
BitId setA = sbb1.bitIds();
|
| 194 |
+
|
| 195 |
+
for (auto it2 = keptResultsByLength[secondResultSize]->begin();
|
| 196 |
+
it2 != keptResultsByLength[secondResultSize]->end(); it2++) {
|
| 197 |
+
|
| 198 |
+
if (firstResultSize == secondResultSize &&
|
| 199 |
+
std::distance(keptResultsByLength[firstResultSize]->begin(), it1) >
|
| 200 |
+
std::distance(keptResultsByLength[secondResultSize]->begin(), it2))
|
| 201 |
+
continue; // Since in this case there are 2 identical loops, don't do things twice
|
| 202 |
+
|
| 203 |
+
// If there are identical subunits in both results, rewrite the second result to not have the same
|
| 204 |
+
std::shared_ptr<SuperBB> sbb2Pointer = getMatchingSBB(sbb1, **it2, identGroups);
|
| 205 |
+
if (sbb2Pointer == NULL)
|
| 206 |
+
continue;
|
| 207 |
+
SuperBB sbb2 = *sbb2Pointer;
|
| 208 |
+
|
| 209 |
+
// make sure that the two results can be connected
|
| 210 |
+
BitId setB = sbb2.bitIds();
|
| 211 |
+
if ((setA & setB) != 0)
|
| 212 |
+
continue;
|
| 213 |
+
BitId currResSet = setA | setB;
|
| 214 |
+
if(!isValidBasedOnAssembly(assemblyGroupsMap, currResSet)){
|
| 215 |
+
std::cout << "invalid assembly " << currResSet << std::endl;
|
| 216 |
+
continue;
|
| 217 |
+
}
|
| 218 |
+
|
| 219 |
+
// connect the two results and add all new combined results to best_k_by_id[currResSet]
|
| 220 |
+
if (best_k_by_id.count(currResSet) == 0)
|
| 221 |
+
best_k_by_id[currResSet] = new BestK(K_);
|
| 222 |
+
|
| 223 |
+
unsigned int resCountBefore = best_k_by_id[currResSet]->size();
|
| 224 |
+
float minScoreBefore = best_k_by_id[currResSet]->minScore();
|
| 225 |
+
|
| 226 |
+
std::promise<int> promise1;
|
| 227 |
+
this->tryToConnect(1, sbb1, sbb2, *best_k_by_id[currResSet], (length < N_), promise1, identGroups);
|
| 228 |
+
|
| 229 |
+
if (resCountBefore < best_k_by_id[currResSet]->size() ||
|
| 230 |
+
minScoreBefore != best_k_by_id[currResSet]->minScore())
|
| 231 |
+
std::cout << "found more for " << currResSet << " based on " << setA << " and " << setB
|
| 232 |
+
<< " before: " << resCountBefore << " after: " << best_k_by_id[currResSet]->size()
|
| 233 |
+
<< " scores " << best_k_by_id[currResSet]->minScore() << ":"
|
| 234 |
+
<< best_k_by_id[currResSet]->maxScore() << std::endl;
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
}
|
| 238 |
+
|
| 239 |
+
// cluster results and save them
|
| 240 |
+
std::map<unsigned int, BestK *> bestForSubunitId;
|
| 241 |
+
keptResultsByLength[length] = new BestK(K_);
|
| 242 |
+
|
| 243 |
+
for (const auto &[currResSet, currBestK] : best_k_by_id) {
|
| 244 |
+
if (currBestK->size() > 0) {
|
| 245 |
+
BestK *clusteredBestK = bestKContainer_.newBestK(currResSet);
|
| 246 |
+
currBestK->cluster(*clusteredBestK, 1.0, identGroups);
|
| 247 |
+
|
| 248 |
+
std::cerr << "clustering resSet " << currResSet << " before: " << currBestK->size() << " after "
|
| 249 |
+
<< bestKContainer_[currResSet].size() << " scores " << bestKContainer_[currResSet].minScore()
|
| 250 |
+
<< ":" << bestKContainer_[currResSet].maxScore() << std::endl;
|
| 251 |
+
|
| 252 |
+
for (unsigned int i = 0; i < N_; i++) {
|
| 253 |
+
if (currResSet.test(i)) {
|
| 254 |
+
if (bestForSubunitId.count(i) == 0) {
|
| 255 |
+
bestForSubunitId[i] = new BestK(1);
|
| 256 |
+
}
|
| 257 |
+
bestForSubunitId[i]->push(*clusteredBestK->rbegin());
|
| 258 |
+
}
|
| 259 |
+
}
|
| 260 |
+
|
| 261 |
+
unsigned int count = 0;
|
| 262 |
+
for (auto it1 = bestKContainer_[currResSet].rbegin(); it1 != bestKContainer_[currResSet].rend(); it1++) {
|
| 263 |
+
keptResultsByLength[length]->push(*it1);
|
| 264 |
+
count += 1;
|
| 265 |
+
if (count >= maxResultPerResSet)
|
| 266 |
+
break;
|
| 267 |
+
}
|
| 268 |
+
}
|
| 269 |
+
delete currBestK;
|
| 270 |
+
}
|
| 271 |
+
|
| 272 |
+
// save best from each subunit
|
| 273 |
+
keptResultsByLength[length]->setK(K_ + bestForSubunitId.size());
|
| 274 |
+
for (const auto &[subunitId, currBestK] : bestForSubunitId) {
|
| 275 |
+
keptResultsByLength[length]->push(*currBestK->rbegin());
|
| 276 |
+
delete currBestK;
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
printBestK(N_, keptResultsByLength[length]);
|
| 280 |
+
}
|
| 281 |
+
|
| 282 |
+
// output fully assembled results or largest subsets
|
| 283 |
+
if (keptResultsByLength[N_]->size() != 0) {
|
| 284 |
+
std::string outFileName = outFileNamePrefix + ".res";
|
| 285 |
+
std::ofstream outFile(outFileName);
|
| 286 |
+
std::ofstream outFileClustered(outFileNamePrefix + "_clustered.res");
|
| 287 |
+
BestK clusteredBestK(finalSizeLimit_); // TODO: this should also change on the best_k_by_id level
|
| 288 |
+
|
| 289 |
+
for (auto it = keptResultsByLength[N_]->rbegin(); it != keptResultsByLength[N_]->rend(); it++)
|
| 290 |
+
(*it)->fullReport(outFile);
|
| 291 |
+
// output after clustering
|
| 292 |
+
keptResultsByLength[N_]->cluster(clusteredBestK, 5.0, identGroups);
|
| 293 |
+
for (auto it = clusteredBestK.rbegin(); it != clusteredBestK.rend(); it++)
|
| 294 |
+
(*it)->fullReport(outFileClustered);
|
| 295 |
+
outFile.close();
|
| 296 |
+
outFileClustered.close();
|
| 297 |
+
} else {
|
| 298 |
+
// output largest subsets
|
| 299 |
+
for (unsigned int i = N_; i > 1; i--) {
|
| 300 |
+
if (keptResultsByLength[i]->size() == 0)
|
| 301 |
+
continue;
|
| 302 |
+
std::string outFileName = "cb_" + std::to_string(i) + "_" + outFileNamePrefix + ".res";
|
| 303 |
+
std::ofstream outFile(outFileName);
|
| 304 |
+
for (auto it = keptResultsByLength[i]->rbegin(); it != keptResultsByLength[i]->rend(); it++)
|
| 305 |
+
(*it)->fullReport(outFile);
|
| 306 |
+
outFile.close();
|
| 307 |
+
break;
|
| 308 |
+
}
|
| 309 |
+
}
|
| 310 |
+
|
| 311 |
+
// cleanup
|
| 312 |
+
for (const auto &[length, currBestK] : precomputedResults) {
|
| 313 |
+
delete currBestK;
|
| 314 |
+
}
|
| 315 |
+
for (const auto &[length, currBestK] : keptResultsByLength) {
|
| 316 |
+
delete currBestK;
|
| 317 |
+
}
|
| 318 |
+
}
|
| 319 |
+
|
| 320 |
+
void HierarchicalFold::tryToConnect(int id, const SuperBB &sbb1, const SuperBB &sbb2, BestK &results, bool toAdd,
|
| 321 |
+
std::promise<int> &output, std::vector<std::vector<unsigned int>> &identGroups) {
|
| 322 |
+
// iterate over pairs of BBs os SuperBB1 and SuperBB2
|
| 323 |
+
for (int i = 0; i < (int)sbb1.bbs_.size(); i++) {
|
| 324 |
+
int firstBB = sbb1.bbs_[i]->getID();
|
| 325 |
+
for (int j = 0; j < (int)sbb2.bbs_.size(); j++) {
|
| 326 |
+
int secondBB = sbb2.bbs_[j]->getID();
|
| 327 |
+
|
| 328 |
+
// loop over possible transformations between BBs
|
| 329 |
+
for (TransIterator2 it(sbb1, sbb2, firstBB, secondBB); !it.isAtEnd(); it++) {
|
| 330 |
+
// optimization - check that the score is not lower than the minimum in the current bestK
|
| 331 |
+
if((it.getScore() + sbb1.transScore_ + sbb2.transScore_) < results.minScore()){
|
| 332 |
+
continue;
|
| 333 |
+
}
|
| 334 |
+
|
| 335 |
+
// discard any invalid transformations
|
| 336 |
+
bool filtered = filterTrans(sbb1, sbb2, it.transformation());
|
| 337 |
+
if (filtered)
|
| 338 |
+
continue;
|
| 339 |
+
|
| 340 |
+
FoldStep step(firstBB, secondBB, it.getScore());
|
| 341 |
+
std::shared_ptr<SuperBB> theNew = createJoined(sbb1, sbb2, it.transformation(), 0, step, it.getScore());
|
| 342 |
+
|
| 343 |
+
if (theNew->getRestraintsRatio() < restraintsRatioThreshold_) {
|
| 344 |
+
// std::cout << "not enough restraints " << theNew->getRestraintsRatio() << " : " <<
|
| 345 |
+
// complexConst_.getDistanceRestraintsRatioThreshold();
|
| 346 |
+
continue;
|
| 347 |
+
}
|
| 348 |
+
|
| 349 |
+
// results.push(theNew);
|
| 350 |
+
results.push_cluster(theNew, 1, identGroups);
|
| 351 |
+
}
|
| 352 |
+
}
|
| 353 |
+
}
|
| 354 |
+
output.set_value(1);
|
| 355 |
+
}
|
| 356 |
+
|
| 357 |
+
bool HierarchicalFold::filterTrans(const SuperBB &sbb1, const SuperBB &sbb2, const RigidTrans3 &trans) const {
|
| 358 |
+
|
| 359 |
+
// check distance constraints & restraints
|
| 360 |
+
for (unsigned int i = 0; i < sbb1.size_; i++) {
|
| 361 |
+
const BB &bb1 = *sbb1.bbs_[i];
|
| 362 |
+
RigidTrans3 t = (!sbb1.trans_[i]) * trans;
|
| 363 |
+
for (unsigned int j = 0; j < sbb2.size_; j++) {
|
| 364 |
+
const BB &bb2 = *sbb2.bbs_[j];
|
| 365 |
+
RigidTrans3 t2 = t * sbb2.trans_[j];
|
| 366 |
+
// check constraints first
|
| 367 |
+
if (!complexConst_.areConstraintsSatisfied(bb1.getID(), bb2.getID(), t2))
|
| 368 |
+
return true;
|
| 369 |
+
}
|
| 370 |
+
}
|
| 371 |
+
|
| 372 |
+
// backbone penetrations for each pair of BBs
|
| 373 |
+
for (unsigned int i = 0; i < sbb1.size_; i++) {
|
| 374 |
+
const BB &bb1 = *sbb1.bbs_[i];
|
| 375 |
+
RigidTrans3 t = (!sbb1.trans_[i]) * trans;
|
| 376 |
+
|
| 377 |
+
for (unsigned int j = 0; j < sbb2.size_; j++) {
|
| 378 |
+
const BB &bb2 = *sbb2.bbs_[j];
|
| 379 |
+
RigidTrans3 t2 = t * sbb2.trans_[j];
|
| 380 |
+
|
| 381 |
+
const BB *pBB1 = &bb1, *pBB2 = &bb2;
|
| 382 |
+
if (bb2.getSurfaceSize() > bb1.getSurfaceSize()) {
|
| 383 |
+
pBB1 = &bb2;
|
| 384 |
+
pBB2 = &bb1;
|
| 385 |
+
t2 = !t2;
|
| 386 |
+
}
|
| 387 |
+
|
| 388 |
+
countFilterTras_ = countFilterTras_ + 1;
|
| 389 |
+
|
| 390 |
+
// optimization - check if radiuses are too far apart and if so, skip check
|
| 391 |
+
if ((pBB1->getRadius() + pBB2->getRadius()) < (pBB1->getCM() - t2*pBB2->getCM()).norm()) {
|
| 392 |
+
countFilterTrasSkipped_ = countFilterTrasSkipped_ + 1;
|
| 393 |
+
continue;
|
| 394 |
+
}
|
| 395 |
+
|
| 396 |
+
unsigned int bbPenetrations = 0;
|
| 397 |
+
unsigned int totalUsedAtoms = 0;
|
| 398 |
+
|
| 399 |
+
// TODO: maybe should save Weighted bbPen using pBB1->grid_->getDist(v) as weight
|
| 400 |
+
for (Molecule<Atom>::const_iterator it = pBB2->caAtoms_.begin(); it != pBB2->caAtoms_.end(); it++) {
|
| 401 |
+
if (it->getTempFactor() < minTemperatureToConsiderCollision) {
|
| 402 |
+
continue;
|
| 403 |
+
}
|
| 404 |
+
totalUsedAtoms++;
|
| 405 |
+
|
| 406 |
+
Vector3 v = t2 * it->position();
|
| 407 |
+
if (pBB1->getDistFromSurface(v) < 0) {
|
| 408 |
+
// getResidueEntry(v) when used in BBGrid.h will return -1*res_index if res_index is backbone
|
| 409 |
+
if (pBB1->grid_->getResidueEntry(v) < 0 && pBB1->grid_->getDist(v) < penetrationThreshold_) {
|
| 410 |
+
int resEntry = pBB1->grid_->getResidueEntry(v) * -1;
|
| 411 |
+
if (pBB1->getAtomByResId(resEntry).getTempFactor() < minTemperatureToConsiderCollision)
|
| 412 |
+
continue;
|
| 413 |
+
|
| 414 |
+
bbPenetrations++;
|
| 415 |
+
}
|
| 416 |
+
}
|
| 417 |
+
}
|
| 418 |
+
float bbPenChangePercent = (float)(bbPenetrations) / (float)totalUsedAtoms;
|
| 419 |
+
if (bbPenChangePercent > maxBackboneCollisionPercentPerChain) {
|
| 420 |
+
return true;
|
| 421 |
+
}
|
| 422 |
+
}
|
| 423 |
+
}
|
| 424 |
+
|
| 425 |
+
return false;
|
| 426 |
+
}
|
| 427 |
+
|
| 428 |
+
void HierarchicalFold::createSymmetry(std::vector<std::shared_ptr<SuperBB>> identBBs, BestK &results) {
|
| 429 |
+
unsigned int transCount = 0;
|
| 430 |
+
std::cout << "started trans check, bb_size:" << identBBs.size() << std::endl;
|
| 431 |
+
for (TransIterator2 it(*identBBs[0], *identBBs[1], identBBs[0]->bbs_[0]->getID(), identBBs[1]->bbs_[0]->getID());
|
| 432 |
+
!it.isAtEnd(); it++)
|
| 433 |
+
transCount++;
|
| 434 |
+
|
| 435 |
+
std::cout << "number of transformations:" << transCount << std::endl;
|
| 436 |
+
unsigned int addedSymCount = 0;
|
| 437 |
+
for (unsigned int transNum = 0; transNum < transCount; transNum++) {
|
| 438 |
+
std::cout << "checking trans indexed" << transNum << std::endl;
|
| 439 |
+
// create symSBB for a trans, this is cumbersome because I don't really know how to handle transformations
|
| 440 |
+
std::shared_ptr<SuperBB> symSBB = identBBs[0];
|
| 441 |
+
for (unsigned int i = 1; i < identBBs.size(); i++) {
|
| 442 |
+
unsigned int count = -1;
|
| 443 |
+
|
| 444 |
+
// There is a memory issue here, I create TransIterator2 with symSBB as bb1, but then I override it
|
| 445 |
+
// and freeing the memory(?) of bb1_, so it is important to break after chanigng symSBB
|
| 446 |
+
for (TransIterator2 it(*symSBB, *identBBs[i], symSBB->bbs_[i - 1]->getID(), identBBs[i]->bbs_[0]->getID());
|
| 447 |
+
!it.isAtEnd(); it++) {
|
| 448 |
+
count++;
|
| 449 |
+
if (count != transNum)
|
| 450 |
+
continue;
|
| 451 |
+
float transScore = it.getScore() + it.getScore() * ((100 - it.getScore()) / 100);
|
| 452 |
+
|
| 453 |
+
FoldStep step(symSBB->bbs_[i - 1]->getID(), identBBs[i]->bbs_[0]->getID(), transScore);
|
| 454 |
+
std::cout << "adding trans " << it.transformation() << " **** " << it.getScore() << std::endl;
|
| 455 |
+
symSBB = createJoined(*symSBB, *identBBs[i], it.transformation(), 0, step, transScore);
|
| 456 |
+
break;
|
| 457 |
+
}
|
| 458 |
+
}
|
| 459 |
+
std::cout << "created possibly symSBB" << std::endl;
|
| 460 |
+
|
| 461 |
+
// check bb penetration between each 2 chains
|
| 462 |
+
double maxPenetration = 0;
|
| 463 |
+
bool shouldContinuePen = false;
|
| 464 |
+
for (unsigned int i = 0; i < symSBB->size_; i++) {
|
| 465 |
+
const BB &bb1 = *symSBB->bbs_[i];
|
| 466 |
+
RigidTrans3 t1 = (!symSBB->trans_[i]);
|
| 467 |
+
for (unsigned int j = i + 1; j < symSBB->size_; j++) {
|
| 468 |
+
const BB &bb2 = *symSBB->bbs_[j];
|
| 469 |
+
RigidTrans3 t2 = t1 * symSBB->trans_[j];
|
| 470 |
+
|
| 471 |
+
const BB *pBB1 = &bb1, *pBB2 = &bb2;
|
| 472 |
+
unsigned int totalUsedAtoms = 0;
|
| 473 |
+
unsigned int bbPenetrations = 0;
|
| 474 |
+
|
| 475 |
+
for (Molecule<Atom>::const_iterator it = pBB2->caAtoms_.begin(); it != pBB2->caAtoms_.end(); it++) {
|
| 476 |
+
if (it->getTempFactor() < minTemperatureToConsiderCollision) {
|
| 477 |
+
continue;
|
| 478 |
+
}
|
| 479 |
+
totalUsedAtoms++;
|
| 480 |
+
|
| 481 |
+
Vector3 v = t2 * it->position();
|
| 482 |
+
if (pBB1->getDistFromSurface(v) < 0) {
|
| 483 |
+
// getResidueEntry(v) when used in BBGrid.h will return -1*res_index if res_index is backbone
|
| 484 |
+
if (pBB1->grid_->getResidueEntry(v) < 0 && pBB1->grid_->getDist(v) < -1.0) {
|
| 485 |
+
int resEntry = pBB1->grid_->getResidueEntry(v) * -1;
|
| 486 |
+
if (pBB1->getAtomByResId(resEntry).getTempFactor() < minTemperatureToConsiderCollision)
|
| 487 |
+
continue;
|
| 488 |
+
bbPenetrations++;
|
| 489 |
+
}
|
| 490 |
+
}
|
| 491 |
+
}
|
| 492 |
+
|
| 493 |
+
if ((bbPenetrations / (1.0 * totalUsedAtoms)) > 0.2) {
|
| 494 |
+
std::cout << "dropping " << identBBs.size() << " because penetration "
|
| 495 |
+
<< bbPenetrations / (1.0 * totalUsedAtoms) << std::endl;
|
| 496 |
+
shouldContinuePen = true;
|
| 497 |
+
break;
|
| 498 |
+
}
|
| 499 |
+
|
| 500 |
+
maxPenetration = std::max(maxPenetration, bbPenetrations / (1.0 * totalUsedAtoms));
|
| 501 |
+
}
|
| 502 |
+
if (shouldContinuePen)
|
| 503 |
+
break;
|
| 504 |
+
}
|
| 505 |
+
if (shouldContinuePen)
|
| 506 |
+
continue;
|
| 507 |
+
std::cout << "checked penetrations ratio max: " << maxPenetration << std::endl;
|
| 508 |
+
// if above some TH (for everything, not per chain) (20%) - drop
|
| 509 |
+
|
| 510 |
+
// if last and first centers are the farthest - drop
|
| 511 |
+
std::vector<Vector3> centroids;
|
| 512 |
+
for (unsigned int i = 0; i < symSBB->size_; i++) {
|
| 513 |
+
centroids.push_back(symSBB->trans_[i] * symSBB->bbs_[i]->getCM());
|
| 514 |
+
}
|
| 515 |
+
std::cout << "centroids distance " << (centroids[0] - centroids[1]).norm2() << " : "
|
| 516 |
+
<< (centroids[0] - centroids.back()).norm2() << std::endl;
|
| 517 |
+
|
| 518 |
+
float allowedDistFactor = 1.5 + (symSBB->size_ - 3) * 0.25;
|
| 519 |
+
if ((centroids[0] - centroids[1]).norm2() * allowedDistFactor < (centroids[0] - centroids.back()).norm2()) {
|
| 520 |
+
std::cout << "dropping " << identBBs.size() << " because centroids distance "
|
| 521 |
+
<< (centroids[0] - centroids[1]).norm2() << " : " << (centroids[0] - centroids.back()).norm2()
|
| 522 |
+
<< std::endl;
|
| 523 |
+
continue;
|
| 524 |
+
}
|
| 525 |
+
|
| 526 |
+
// verify that centroids are first all increasing distance from first centroid and then all decreasing distance
|
| 527 |
+
// from first centroid
|
| 528 |
+
bool increasing = true;
|
| 529 |
+
bool shouldContinue = false;
|
| 530 |
+
for (unsigned int i = 1; i < centroids.size(); i++) {
|
| 531 |
+
if (increasing) {
|
| 532 |
+
if ((centroids[i] - centroids[0]).norm2() < (centroids[i - 1] - centroids[0]).norm2()) {
|
| 533 |
+
increasing = false;
|
| 534 |
+
}
|
| 535 |
+
} else {
|
| 536 |
+
if ((centroids[i] - centroids[0]).norm2() > (centroids[i - 1] - centroids[0]).norm2()) {
|
| 537 |
+
std::cout << "dropping " << identBBs.size() << " because centroids not increasing and decreasing"
|
| 538 |
+
<< std::endl;
|
| 539 |
+
shouldContinue = true;
|
| 540 |
+
break;
|
| 541 |
+
}
|
| 542 |
+
}
|
| 543 |
+
}
|
| 544 |
+
if (shouldContinue)
|
| 545 |
+
continue;
|
| 546 |
+
if (increasing) {
|
| 547 |
+
std::cout << "dropping " << identBBs.size() << " because centroids only increasing " << std::endl;
|
| 548 |
+
continue;
|
| 549 |
+
}
|
| 550 |
+
|
| 551 |
+
std::cout << "added with score " << symSBB->weightedTransScore_ << std::endl;
|
| 552 |
+
results.push(symSBB);
|
| 553 |
+
addedSymCount++;
|
| 554 |
+
}
|
| 555 |
+
|
| 556 |
+
BitId groupIdentifier;
|
| 557 |
+
for (unsigned int i = 0; i < identBBs.size(); i++) {
|
| 558 |
+
groupIdentifier |= identBBs[i]->bbs_[0]->bitId();
|
| 559 |
+
}
|
| 560 |
+
std::cout << "Created " << addedSymCount << " Symmetrical for " << groupIdentifier << std::endl;
|
| 561 |
+
}
|
| 562 |
+
|
| 563 |
+
// utils
|
| 564 |
+
std::shared_ptr<SuperBB> HierarchicalFold::createJoined(const SuperBB &sbb1, const SuperBB &sbb2, RigidTrans3 &trans,
|
| 565 |
+
int bbPen, FoldStep &step, float transScore) const {
|
| 566 |
+
std::shared_ptr<SuperBB> theNew = std::make_shared<SuperBB>(sbb1);
|
| 567 |
+
theNew->join(trans, sbb2, bbPen, step, transScore);
|
| 568 |
+
theNew->setRestraintsRatio(complexConst_.getRestraintsRatio(theNew->bbs_, theNew->trans_));
|
| 569 |
+
return theNew;
|
| 570 |
+
}
|
| 571 |
+
|
| 572 |
+
std::shared_ptr<SuperBB> HierarchicalFold::getMatchingSBB(SuperBB sbb1, SuperBB sbb2,
|
| 573 |
+
std::vector<std::vector<unsigned int>> &identGroups) {
|
| 574 |
+
/*
|
| 575 |
+
This function recieves two SuperBBs and checks if they have common BBs that are a part of the same ident group.
|
| 576 |
+
If so, it checks wether the total amount of BBs from the same ident group is smaller than the size of the ident
|
| 577 |
+
group. If so, It return a new SuperBB based on sbb2, but with the BBs from the ident group that are not in sbb1.
|
| 578 |
+
|
| 579 |
+
It also validates that in both sbb1&sbb2, the BBs from the ident group are the smallest BBs in the ident group (This
|
| 580 |
+
prevents duplications of results). If they are not valid - returns NULL.
|
| 581 |
+
*/
|
| 582 |
+
std::map<unsigned int, unsigned int> bbIdToNewId;
|
| 583 |
+
for (std::vector<unsigned int> identGroup : identGroups) {
|
| 584 |
+
// verify sbb1 is valid (mostly needed to ignore initial structures of BBs that are not first in group)
|
| 585 |
+
bool flag = false;
|
| 586 |
+
int maxIdInSbb1 = -1;
|
| 587 |
+
for (unsigned int i = 0; i < identGroup.size(); i++) {
|
| 588 |
+
if (!sbb1.bitIds().test(identGroup[i])) // ident_group[i] not in currResSet
|
| 589 |
+
flag = true;
|
| 590 |
+
else if (flag) {
|
| 591 |
+
if (sbb1.bbs_.size() != 1)
|
| 592 |
+
std::cout << "sbb1 not valid " << sbb1.bitIds() << ":" << sbb2.bitIds() << std::endl;
|
| 593 |
+
return NULL;
|
| 594 |
+
} else {
|
| 595 |
+
maxIdInSbb1 = i;
|
| 596 |
+
}
|
| 597 |
+
}
|
| 598 |
+
|
| 599 |
+
// compute mapping from sbb2 bb ids to new bb ids
|
| 600 |
+
int maxIdInSbb2 = -1;
|
| 601 |
+
flag = false;
|
| 602 |
+
for (unsigned int i = 0; i < identGroup.size(); i++) {
|
| 603 |
+
if (!sbb2.bitIds().test(identGroup[i])) // ident_group[i] not in currResSet
|
| 604 |
+
flag = true;
|
| 605 |
+
else if (flag) {
|
| 606 |
+
if (sbb2.bbs_.size() != 1)
|
| 607 |
+
std::cout << "sbb2 not valid " << sbb1.bitIds() << ":" << sbb2.bitIds() << std::endl;
|
| 608 |
+
return NULL;
|
| 609 |
+
} else {
|
| 610 |
+
maxIdInSbb2 = i;
|
| 611 |
+
}
|
| 612 |
+
}
|
| 613 |
+
|
| 614 |
+
if (maxIdInSbb1 == -1 || maxIdInSbb2 == -1)
|
| 615 |
+
continue;
|
| 616 |
+
|
| 617 |
+
// check if there are more copies in sbb1 and sbb2 than the size of the ident group
|
| 618 |
+
if ((maxIdInSbb1 + 1) + (maxIdInSbb2 + 1) > identGroup.size()) {
|
| 619 |
+
return NULL;
|
| 620 |
+
}
|
| 621 |
+
|
| 622 |
+
for (unsigned int i = 0; i < maxIdInSbb2 + 1; i++) {
|
| 623 |
+
bbIdToNewId[identGroup[i]] = identGroup[i + maxIdInSbb1 + 1];
|
| 624 |
+
}
|
| 625 |
+
}
|
| 626 |
+
|
| 627 |
+
// create new SuperBB with new ids
|
| 628 |
+
if (bbIdToNewId.size() == 0)
|
| 629 |
+
return std::make_shared<SuperBB>(sbb2);
|
| 630 |
+
|
| 631 |
+
// std::cout << "converting " << sbb1.bitIds() << ":" << sbb2.bitIds() << " with " << bbIdToNewId.size() <<
|
| 632 |
+
// std::endl;
|
| 633 |
+
std::shared_ptr<SuperBB> newSbb = std::make_shared<SuperBB>(sbb2);
|
| 634 |
+
|
| 635 |
+
for (auto iter = bbIdToNewId.rbegin(); iter != bbIdToNewId.rend(); ++iter) {
|
| 636 |
+
unsigned int oldId = iter->first;
|
| 637 |
+
unsigned int newId = iter->second;
|
| 638 |
+
newSbb->replaceIdentBB(BitId(oldId), (*(bestKContainer_[BitId(newId)].begin()))->bbs_[0]);
|
| 639 |
+
}
|
| 640 |
+
|
| 641 |
+
return newSbb;
|
| 642 |
+
}
|
| 643 |
+
|
| 644 |
+
void HierarchicalFold::checkConnectivity() const {
|
| 645 |
+
typedef boost::adjacency_list<boost::vecS, // edge list
|
| 646 |
+
boost::vecS, // vertex list
|
| 647 |
+
boost::undirectedS, // directedness
|
| 648 |
+
float> // property associated with vertices
|
| 649 |
+
Graph;
|
| 650 |
+
|
| 651 |
+
Graph g(N_);
|
| 652 |
+
for (unsigned int suIndex = 0; suIndex < N_; suIndex++) {
|
| 653 |
+
BitId index = BitId(suIndex);
|
| 654 |
+
std::cerr << "isEmpty " << suIndex << " " << bestKContainer_.isEmpty(index) << std::endl;
|
| 655 |
+
std::cerr << "SBB " << suIndex << " size " << bestKContainer_[index].size() << std::endl;
|
| 656 |
+
if (bestKContainer_[index].size() >= 1) {
|
| 657 |
+
std::shared_ptr<SuperBB> sbb = *(bestKContainer_[index].rbegin());
|
| 658 |
+
std::shared_ptr<const BB> bb = sbb->bbs_[0];
|
| 659 |
+
|
| 660 |
+
for (unsigned int suIndex2 = 0; suIndex2 < N_; suIndex2++) {
|
| 661 |
+
unsigned int transSize = bb->getTransformations(suIndex2).size();
|
| 662 |
+
std::cerr << suIndex << " " << suIndex2 << " trans size " << transSize << std::endl;
|
| 663 |
+
if (transSize > 0)
|
| 664 |
+
boost::add_edge(suIndex, suIndex2, g);
|
| 665 |
+
std::cerr << "done add_edge" << std::endl;
|
| 666 |
+
}
|
| 667 |
+
}
|
| 668 |
+
}
|
| 669 |
+
|
| 670 |
+
std::vector<int> component(boost::num_vertices(g));
|
| 671 |
+
size_t num_components = boost::connected_components(g, &component[0]);
|
| 672 |
+
std::cerr << "Num of components " << num_components << std::endl;
|
| 673 |
+
if (num_components != 1) {
|
| 674 |
+
for (size_t i = 0; i < boost::num_vertices(g); ++i)
|
| 675 |
+
std::cerr << "SU " << i << " component " << component[i] << std::endl;
|
| 676 |
+
std::cerr << "Not enough transformations between subunits, there should be one connected component!"
|
| 677 |
+
<< std::endl;
|
| 678 |
+
exit(1);
|
| 679 |
+
}
|
| 680 |
+
}
|
| 681 |
+
|
| 682 |
+
void HierarchicalFold::outputConnectivityGraph(std::string outFileName) const {
|
| 683 |
+
std::ofstream outFile(outFileName);
|
| 684 |
+
outFile << "SU1 Prot1 size1 SU2 Prot2 size2 Restraints" << std::endl;
|
| 685 |
+
for (unsigned int suIndex = 0; suIndex < N_; suIndex++) {
|
| 686 |
+
BitId set = BitId(suIndex);
|
| 687 |
+
std::cerr << "SBB " << suIndex << " set " << set << " isEmpty " << bestKContainer_.isEmpty(set) << std::endl;
|
| 688 |
+
std::cerr << "SBB " << suIndex << " size " << bestKContainer_[set].size() << std::endl;
|
| 689 |
+
if (bestKContainer_[set].size() >= 1) {
|
| 690 |
+
std::shared_ptr<SuperBB> sbb = *(bestKContainer_[set].rbegin());
|
| 691 |
+
std::shared_ptr<const BB> bb = sbb->bbs_[0];
|
| 692 |
+
|
| 693 |
+
for (unsigned int suIndex2 = suIndex + 1; suIndex2 < N_; suIndex2++) {
|
| 694 |
+
unsigned int transSize = bb->getTransformations(suIndex2).size();
|
| 695 |
+
BitId set2 = BitId(suIndex2);
|
| 696 |
+
std::cerr << suIndex << " " << suIndex2 << " trans size " << transSize << " " << set2 << std::endl;
|
| 697 |
+
std::shared_ptr<SuperBB> sbb2 = *(bestKContainer_[set2].rbegin());
|
| 698 |
+
std::shared_ptr<const BB> bb2 = sbb2->bbs_[0];
|
| 699 |
+
|
| 700 |
+
if (transSize > 0) {
|
| 701 |
+
std::vector<std::string> results1, results2;
|
| 702 |
+
std::string PDBFileName1 = bb->getPDBFileName();
|
| 703 |
+
boost::split(results1, PDBFileName1, [](char c) { return c == '_'; });
|
| 704 |
+
std::string PDBFileName2 = bb2->getPDBFileName();
|
| 705 |
+
boost::split(results2, PDBFileName2, [](char c) { return c == '_'; });
|
| 706 |
+
|
| 707 |
+
unsigned int xlinkNumber = complexConst_.numberOfRestraints(suIndex, suIndex2);
|
| 708 |
+
unsigned int connectivityConstraintsNumber = complexConst_.numberOfConstraints(suIndex, suIndex2);
|
| 709 |
+
|
| 710 |
+
if (xlinkNumber > 0) {
|
| 711 |
+
outFile << bb->getPDBFileName() << " " << results1[0] << " " << bb->backBone_.size() / 4 << " ";
|
| 712 |
+
outFile << bb2->getPDBFileName() << " " << results2[0] << " " << bb2->backBone_.size() / 4
|
| 713 |
+
<< " ";
|
| 714 |
+
outFile << complexConst_.numberOfRestraints(suIndex, suIndex2) << std::endl;
|
| 715 |
+
}
|
| 716 |
+
if (connectivityConstraintsNumber > 0) {
|
| 717 |
+
outFile << bb->getPDBFileName() << " " << results1[0] << " " << bb->backBone_.size() / 4 << " ";
|
| 718 |
+
outFile << bb2->getPDBFileName() << " " << results2[0] << " " << bb2->backBone_.size() / 4
|
| 719 |
+
<< " ";
|
| 720 |
+
outFile << complexConst_.numberOfConstraints(suIndex, suIndex2) << std::endl;
|
| 721 |
+
}
|
| 722 |
+
/*outFile << bb->getPDBFileName() << " "
|
| 723 |
+
<< complexConst_.numberOfRestraints(suIndex, suIndex2) << " "
|
| 724 |
+
<< bb2->getPDBFileName() << std::endl;*/
|
| 725 |
+
}
|
| 726 |
+
}
|
| 727 |
+
}
|
| 728 |
+
}
|
| 729 |
+
outFile.close();
|
| 730 |
+
}
|
model/CombinatorialAssembler/HierarchicalFold.h
ADDED
|
@@ -0,0 +1,86 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef HIERARCHICALFOLD_H
|
| 2 |
+
#define HIERARCHICALFOLD_H
|
| 3 |
+
|
| 4 |
+
#include "BestK.h"
|
| 5 |
+
#include "BestKContainer.h"
|
| 6 |
+
#include "ComplexDistanceConstraint.h"
|
| 7 |
+
#include "BBContainer.h"
|
| 8 |
+
#include <future>
|
| 9 |
+
#include <memory>
|
| 10 |
+
|
| 11 |
+
// TODO: should this class just be a namespace? because each function is called once...
|
| 12 |
+
class HierarchicalFold {
|
| 13 |
+
public:
|
| 14 |
+
// N - number of subunits, k - best solutions to save at each step
|
| 15 |
+
HierarchicalFold(BBContainer& bbContainer, unsigned int k, unsigned int maxResultPerResSet,
|
| 16 |
+
float minTemperatureToConsiderCollision, float maxBackboneCollisionPercentPerChain,
|
| 17 |
+
float penetrationThreshold, float restraintsRatio)
|
| 18 |
+
: countFilterTras_(0), countFilterTrasSkipped_(0), N_(bbContainer.getBBs().size()), K_(k),
|
| 19 |
+
maxResultPerResSet(maxResultPerResSet), minTemperatureToConsiderCollision(minTemperatureToConsiderCollision),
|
| 20 |
+
maxBackboneCollisionPercentPerChain(maxBackboneCollisionPercentPerChain),
|
| 21 |
+
restraintsRatioThreshold_(restraintsRatio), penetrationThreshold_(penetrationThreshold),
|
| 22 |
+
finalSizeLimit_(k * N_), bestKContainer_(k), complexConst_(bbContainer.getBBs()) {
|
| 23 |
+
|
| 24 |
+
// initialize keptResultsByLength and bestKContainer_
|
| 25 |
+
keptResultsByLength[1] = new BestK(N_);
|
| 26 |
+
for (unsigned int i = 0; i < bbContainer.getBBsNumber(); i++) {
|
| 27 |
+
std::shared_ptr<SuperBB> sbb = std::make_shared<SuperBB>(bbContainer.getBB(i));
|
| 28 |
+
|
| 29 |
+
keptResultsByLength[1]->push(sbb);
|
| 30 |
+
BitId set = BitId(i);
|
| 31 |
+
BestK *cb = bestKContainer_.newBestK(set);
|
| 32 |
+
cb->push(sbb);
|
| 33 |
+
}
|
| 34 |
+
}
|
| 35 |
+
|
| 36 |
+
|
| 37 |
+
void fold(const std::string &outFileNamePrefix);
|
| 38 |
+
|
| 39 |
+
void tryToConnect(int id, const SuperBB &sbb1, const SuperBB &sbb2, BestK &results, bool toAdd,
|
| 40 |
+
std::promise<int> &output, std::vector<std::vector<unsigned int>> &identGroups);
|
| 41 |
+
|
| 42 |
+
bool filterTrans(const SuperBB &sbb1, const SuperBB &sbb2, const RigidTrans3 &trans) const;
|
| 43 |
+
|
| 44 |
+
void createSymmetry(std::vector<std::shared_ptr<SuperBB>> identBBs, BestK &results);
|
| 45 |
+
|
| 46 |
+
// utils
|
| 47 |
+
std::shared_ptr<SuperBB> createJoined(const SuperBB &sbb1, const SuperBB &sbb2, RigidTrans3 &trans, int bbPen,
|
| 48 |
+
FoldStep &step, float transScore) const;
|
| 49 |
+
|
| 50 |
+
std::shared_ptr<SuperBB> getMatchingSBB(SuperBB sbb1, SuperBB sbb2,
|
| 51 |
+
std::vector<std::vector<unsigned int>> &identGroups);
|
| 52 |
+
|
| 53 |
+
void readConstraints(const std::string fileName) {
|
| 54 |
+
complexConst_.readRestraintsFile(fileName);
|
| 55 |
+
complexConst_.addChainConnectivityConstraints();
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
void checkConnectivity() const;
|
| 59 |
+
|
| 60 |
+
void outputConnectivityGraph(std::string outFileName = "graph.sif") const;
|
| 61 |
+
|
| 62 |
+
// members
|
| 63 |
+
static Timer timer_, timerAll_;
|
| 64 |
+
static unsigned int countResults_;
|
| 65 |
+
|
| 66 |
+
|
| 67 |
+
mutable unsigned int countFilterTras_;
|
| 68 |
+
mutable unsigned int countFilterTrasSkipped_;
|
| 69 |
+
|
| 70 |
+
private:
|
| 71 |
+
const unsigned int N_; // number of subunits
|
| 72 |
+
const unsigned int K_; // number of solutions to save at each stage
|
| 73 |
+
const unsigned int maxResultPerResSet; // number of solutions to save for each resSet
|
| 74 |
+
const float minTemperatureToConsiderCollision;
|
| 75 |
+
const float maxBackboneCollisionPercentPerChain;
|
| 76 |
+
const float restraintsRatioThreshold_;
|
| 77 |
+
|
| 78 |
+
float penetrationThreshold_; // this is ignored for now
|
| 79 |
+
|
| 80 |
+
int finalSizeLimit_;
|
| 81 |
+
BestKContainer bestKContainer_;
|
| 82 |
+
std::map<unsigned int, BestK *> keptResultsByLength;
|
| 83 |
+
ComplexDistanceConstraint complexConst_;
|
| 84 |
+
};
|
| 85 |
+
|
| 86 |
+
#endif /* HIERARCHICALFOLD_H */
|
model/CombinatorialAssembler/MainCombDock.cc
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "BBContainer.h"
|
| 2 |
+
#include "HierarchicalFold.h"
|
| 3 |
+
|
| 4 |
+
#include <fstream>
|
| 5 |
+
#include <iostream>
|
| 6 |
+
#include <sstream>
|
| 7 |
+
#include <stdio.h>
|
| 8 |
+
#include <string.h>
|
| 9 |
+
#include <sys/stat.h>
|
| 10 |
+
#include <vector>
|
| 11 |
+
// #include <memory>
|
| 12 |
+
|
| 13 |
+
#include <boost/program_options.hpp>
|
| 14 |
+
namespace po = boost::program_options;
|
| 15 |
+
|
| 16 |
+
// #include <gperftools/profiler.h>
|
| 17 |
+
|
| 18 |
+
int main(int argc, char *argv[]) {
|
| 19 |
+
// output arguments
|
| 20 |
+
for (int i = 0; i < argc; i++)
|
| 21 |
+
std::cout << argv[i] << " ";
|
| 22 |
+
std::cout << std::endl;
|
| 23 |
+
|
| 24 |
+
// input parsing
|
| 25 |
+
double penetrationThr;
|
| 26 |
+
float maxBackboneCollisionPerChain;
|
| 27 |
+
float minTemperatureToConsiderCollision;
|
| 28 |
+
unsigned int maxResultPerResSet;
|
| 29 |
+
|
| 30 |
+
std::string outFileNamePrefix;
|
| 31 |
+
double restraintsRatio;
|
| 32 |
+
double clusterRMSD;
|
| 33 |
+
|
| 34 |
+
// positional
|
| 35 |
+
std::string suFileName;
|
| 36 |
+
std::string transFilesPrefix;
|
| 37 |
+
int transNumToRead;
|
| 38 |
+
int bestK;
|
| 39 |
+
std::string constraintsFileName;
|
| 40 |
+
|
| 41 |
+
po::options_description desc("Usage: <subunitsFileList> <transFilesPrefix> \
|
| 42 |
+
<transNumToRead> <bestKeachStep> <constraintsFile>");
|
| 43 |
+
|
| 44 |
+
// optional
|
| 45 |
+
desc.add_options()("help,h", "Combinatoral Assembly help")("version", "CombFold 1.0 2022")(
|
| 46 |
+
"penetrationThr,p", po::value<double>(&penetrationThr)->default_value(-1.0),
|
| 47 |
+
"maximum allowed penetration between subunit surfaces (default = -1.0)")(
|
| 48 |
+
"restraintsRatio,r", po::value<double>(&restraintsRatio)->default_value(0.1),
|
| 49 |
+
"constraints ratio (default = 0.1)")("clusterRMSD,c", po::value<double>(&clusterRMSD)->default_value(5.0),
|
| 50 |
+
"final clustering RMSD (default = 5.0)")
|
| 51 |
+
|
| 52 |
+
("maxBackboneCollisionPerChain,b", po::value<float>(&maxBackboneCollisionPerChain)->default_value(0.1),
|
| 53 |
+
"Max percentage(0 to 1) of backbone atoms of a chain that can collide with another chain(default=0.1)")(
|
| 54 |
+
"minTemperatureToConsiderCollision,t",
|
| 55 |
+
po::value<float>(&minTemperatureToConsiderCollision)->default_value(0),
|
| 56 |
+
"Minimal Bfactor required for atom to be considered when calculating collisions(default=0)")(
|
| 57 |
+
"maxResultPerResSet,j", po::value<unsigned int>(&maxResultPerResSet)->default_value(0),
|
| 58 |
+
"number of results saved for each calculated combination of subunits (default=k)")
|
| 59 |
+
|
| 60 |
+
("outputFileNamePrefix,o", po::value<std::string>(&outFileNamePrefix)->default_value("output"),
|
| 61 |
+
"output file name, default name output.res");
|
| 62 |
+
|
| 63 |
+
// required options: currently 5
|
| 64 |
+
po::options_description hidden("Hidden options");
|
| 65 |
+
hidden.add_options()("SUlist", po::value<std::string>(&suFileName)->required(), "SU list file name")(
|
| 66 |
+
"transFilesPrefix", po::value<std::string>(&transFilesPrefix)->required(),
|
| 67 |
+
"Trans files prefix")("transNumToRead", po::value<int>(&transNumToRead)->required(),
|
| 68 |
+
"# of tranformations")("bestK", po::value<int>(&bestK)->required(), "bestK")(
|
| 69 |
+
"constraintsFile", po::value<std::string>(&constraintsFileName)->required(), "constraints file name");
|
| 70 |
+
|
| 71 |
+
po::options_description cmdline_options;
|
| 72 |
+
cmdline_options.add(desc).add(hidden);
|
| 73 |
+
|
| 74 |
+
po::positional_options_description p;
|
| 75 |
+
p.add("SUlist", 1);
|
| 76 |
+
p.add("transFilesPrefix", 1);
|
| 77 |
+
p.add("transNumToRead", 1);
|
| 78 |
+
p.add("bestK", 1);
|
| 79 |
+
p.add("constraintsFile", 1);
|
| 80 |
+
|
| 81 |
+
po::variables_map vm;
|
| 82 |
+
|
| 83 |
+
try {
|
| 84 |
+
po::store(po::command_line_parser(argc, argv).options(cmdline_options).positional(p).run(), vm);
|
| 85 |
+
|
| 86 |
+
if (vm.count("help")) {
|
| 87 |
+
std::cout << desc << "\n";
|
| 88 |
+
return 0;
|
| 89 |
+
}
|
| 90 |
+
po::notify(vm);
|
| 91 |
+
} catch (po::required_option &e) {
|
| 92 |
+
std::cout << desc << "\n";
|
| 93 |
+
return 0;
|
| 94 |
+
} catch (po::error &e) {
|
| 95 |
+
std::cout << desc << "\n";
|
| 96 |
+
return 0;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
if (maxResultPerResSet == 0)
|
| 100 |
+
maxResultPerResSet = bestK;
|
| 101 |
+
|
| 102 |
+
// done parsing
|
| 103 |
+
|
| 104 |
+
auto start = std::chrono::high_resolution_clock::now();
|
| 105 |
+
HierarchicalFold::timerAll_.reset();
|
| 106 |
+
|
| 107 |
+
std::cerr << "Before process input" << std::endl;
|
| 108 |
+
std::string argv_str(argv[0]);
|
| 109 |
+
std::string base = argv_str.substr(0, argv_str.find_last_of("/"));
|
| 110 |
+
std::string chemLibFileName = base + "/chem_params.txt";
|
| 111 |
+
BBContainer bbContainer(suFileName, chemLibFileName, minTemperatureToConsiderCollision);
|
| 112 |
+
bbContainer.readTransformationFiles(transFilesPrefix, transNumToRead);
|
| 113 |
+
|
| 114 |
+
std::cout << "Starting HierarchicalFold" << std::endl;
|
| 115 |
+
HierarchicalFold hierarchalFold(bbContainer, bestK, maxResultPerResSet, minTemperatureToConsiderCollision,
|
| 116 |
+
maxBackboneCollisionPerChain, penetrationThr, restraintsRatio);
|
| 117 |
+
|
| 118 |
+
// read constraints
|
| 119 |
+
hierarchalFold.readConstraints(constraintsFileName);
|
| 120 |
+
|
| 121 |
+
HierarchicalFold::timer_.reset();
|
| 122 |
+
|
| 123 |
+
hierarchalFold.outputConnectivityGraph("graph.txt");
|
| 124 |
+
hierarchalFold.checkConnectivity();
|
| 125 |
+
// ProfilerStart("nameOfProfile.log");
|
| 126 |
+
auto startBeforeFold = std::chrono::high_resolution_clock::now();
|
| 127 |
+
hierarchalFold.fold(outFileNamePrefix);
|
| 128 |
+
// ProfilerStop();
|
| 129 |
+
auto end = std::chrono::high_resolution_clock::now();
|
| 130 |
+
std::chrono::duration<double> diff = end - start;
|
| 131 |
+
std::chrono::duration<double> diffFold = end - startBeforeFold;
|
| 132 |
+
std::cout << "Overall time " << diff.count() << " s\n";
|
| 133 |
+
std::cout << "only fold time " << diffFold.count() << " s\n";
|
| 134 |
+
std::cerr << "countResults_ " << HierarchicalFold::countResults_ << std::endl;
|
| 135 |
+
std::cerr << "timer_ " << HierarchicalFold::timer_ << std::endl;
|
| 136 |
+
std::cerr << "timerAll_ " << HierarchicalFold::timerAll_ << std::endl;
|
| 137 |
+
// SuperBB::reportCounters();
|
| 138 |
+
|
| 139 |
+
return 0;
|
| 140 |
+
}
|
model/CombinatorialAssembler/Makefile
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
BOOST_INCLUDE = /opt/homebrew/include
|
| 2 |
+
BOOST_LIB = /opt/homebrew/lib/
|
| 3 |
+
|
| 4 |
+
CC=g++
|
| 5 |
+
# use -Wno-deprecated-declarations to suppress warnings from boost
|
| 6 |
+
# CFLAGS=-c -Wall -I./libs_gamb -I./libs_DockingLib -I$(BOOST_INCLUDE) -O2 --std=c++11 # -fexpensive-optimizations -ffast-math
|
| 7 |
+
CFLAGS=-c -Wall -Wno-deprecated-declarations -I./libs_gamb -I./libs_DockingLib -I$(BOOST_INCLUDE) -g -O2 --std=c++17 # -fexpensive-optimizations -ffast-math
|
| 8 |
+
# CFLAGS=-c -Wall -I./libs_gamb -I./libs_DockingLib -I$(BOOST_INCLUDE) -O0 -g --std=c++11 # -fexpensive-optimizations -ffast-math
|
| 9 |
+
|
| 10 |
+
SOURCES_MAIN = $(wildcard *.cc)
|
| 11 |
+
SOURCES_GAMB = $(wildcard libs_gamb/*.cc)
|
| 12 |
+
SOURCES_DOCKLIB = $(wildcard libs_DockingLib/*.cc)
|
| 13 |
+
SOURCES_AF2TRANS = $(wildcard AF2trans/*.cc)
|
| 14 |
+
|
| 15 |
+
OBJECTS_MAIN = $(SOURCES_MAIN:.cc=.o)
|
| 16 |
+
OBJECTS_GAMB = $(SOURCES_GAMB:.cc=.o)
|
| 17 |
+
OBJECTS_DOCKLIB = $(SOURCES_DOCKLIB:.cc=.o)
|
| 18 |
+
OBJECTS_AF2TRANS = $(SOURCES_AF2TRANS:.cc=.o)
|
| 19 |
+
|
| 20 |
+
all: MainCombAssemble MainAf2trans
|
| 21 |
+
|
| 22 |
+
MainCombAssemble: libgamb.a libdocklib.a $(OBJECTS_MAIN)
|
| 23 |
+
$(CC) $(OBJECTS_MAIN) -L. -L$(BOOST_LIB) -lgamb -ldocklib -lboost_program_options -lpthread -o CombinatorialAssembler.out
|
| 24 |
+
|
| 25 |
+
MainAf2trans: libgamb.a libdocklib.a $(OBJECTS_AF2TRANS)
|
| 26 |
+
$(CC) $(OBJECTS_AF2TRANS) -L. -L$(BOOST_LIB) -lgamb -ldocklib -lboost_program_options -lpthread -o AF2trans.out
|
| 27 |
+
|
| 28 |
+
%.o: %.cc
|
| 29 |
+
$(CC) $(CFLAGS) $< -o $@
|
| 30 |
+
|
| 31 |
+
libgamb.a: $(OBJECTS_GAMB)
|
| 32 |
+
ar rcs libgamb.a $(OBJECTS_GAMB)
|
| 33 |
+
|
| 34 |
+
libdocklib.a: $(OBJECTS_DOCKLIB) libgamb.a
|
| 35 |
+
ar rcs libdocklib.a $(OBJECTS_DOCKLIB) $(OBJECTS_GAMB)
|
| 36 |
+
|
| 37 |
+
clean_all:
|
| 38 |
+
rm -f *.o *.a AF2trans.out CombinatorialAssembler.out AF2trans/*.o libs_gamb/*.o libs_DockingLib/*.o
|
| 39 |
+
|
| 40 |
+
clean:
|
| 41 |
+
rm -f *.o AF2trans/*.o AF2trans.out CombinatorialAssembler.out
|
| 42 |
+
|
model/CombinatorialAssembler/SuperBB.cc
ADDED
|
@@ -0,0 +1,315 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "SuperBB.h"
|
| 2 |
+
#include "HierarchicalFold.h"
|
| 3 |
+
|
| 4 |
+
|
| 5 |
+
SuperBB::SuperBB(std::shared_ptr<const BB> bb)
|
| 6 |
+
: backBonePen_(0), transScore_(0), weightedTransScore_(100) {
|
| 7 |
+
bbs_.push_back(bb);
|
| 8 |
+
Vector3 v(0, 0, 0);
|
| 9 |
+
Matrix3 M(1);
|
| 10 |
+
RigidTrans3 T(M, v);
|
| 11 |
+
trans_.push_back(T);
|
| 12 |
+
size_ = 1;
|
| 13 |
+
bitIDS_ = bb->bitId();
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
float getWeightedTransScore(std::vector<FoldStep> steps, std::vector<std::shared_ptr<const BB>> bbs) {
|
| 17 |
+
unsigned int totalCa = 0;
|
| 18 |
+
float totalScore = 0;
|
| 19 |
+
std::map<unsigned int, unsigned int> bbIdToCaLength;
|
| 20 |
+
for (std::shared_ptr<const BB> bb : bbs) {
|
| 21 |
+
bbIdToCaLength[bb->getID()] = bb->getNumOfAtoms();
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
for (FoldStep step : steps) {
|
| 25 |
+
std::vector<unsigned int> right;
|
| 26 |
+
std::vector<unsigned int> left;
|
| 27 |
+
|
| 28 |
+
right.push_back(step.i_);
|
| 29 |
+
left.push_back(step.j_);
|
| 30 |
+
|
| 31 |
+
std::vector<FoldStep> notUsedSteps(steps);
|
| 32 |
+
|
| 33 |
+
while (!notUsedSteps.empty()) {
|
| 34 |
+
FoldStep step2 = notUsedSteps.back();
|
| 35 |
+
notUsedSteps.pop_back();
|
| 36 |
+
if (step2.i_ == step.i_ && step2.j_ == step.j_)
|
| 37 |
+
continue;
|
| 38 |
+
if (std::find(right.begin(), right.end(), step2.i_) != right.end() &&
|
| 39 |
+
std::find(right.begin(), right.end(), step2.j_) == right.end()) {
|
| 40 |
+
right.push_back(step2.j_);
|
| 41 |
+
} else if (std::find(right.begin(), right.end(), step2.j_) != right.end() &&
|
| 42 |
+
std::find(right.begin(), right.end(), step2.i_) == right.end()) {
|
| 43 |
+
right.push_back(step2.i_);
|
| 44 |
+
} else if (std::find(left.begin(), left.end(), step2.i_) != left.end() &&
|
| 45 |
+
std::find(left.begin(), left.end(), step2.j_) == left.end()) {
|
| 46 |
+
left.push_back(step2.j_);
|
| 47 |
+
} else if (std::find(left.begin(), left.end(), step2.j_) != left.end() &&
|
| 48 |
+
std::find(left.begin(), left.end(), step2.i_) == left.end()) {
|
| 49 |
+
left.push_back(step2.i_);
|
| 50 |
+
} else {
|
| 51 |
+
notUsedSteps.insert(notUsedSteps.begin(), step2);
|
| 52 |
+
}
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
unsigned int rightSize = 0;
|
| 56 |
+
unsigned int leftSize = 0;
|
| 57 |
+
|
| 58 |
+
for (unsigned int elem : right)
|
| 59 |
+
rightSize += bbIdToCaLength[elem];
|
| 60 |
+
|
| 61 |
+
for (unsigned int elem : left)
|
| 62 |
+
leftSize += bbIdToCaLength[elem];
|
| 63 |
+
|
| 64 |
+
unsigned int usedSize = rightSize;
|
| 65 |
+
if (rightSize > leftSize)
|
| 66 |
+
usedSize = leftSize;
|
| 67 |
+
|
| 68 |
+
totalScore += usedSize * step.tScore_;
|
| 69 |
+
totalCa += usedSize;
|
| 70 |
+
}
|
| 71 |
+
return totalScore / totalCa;
|
| 72 |
+
}
|
| 73 |
+
|
| 74 |
+
void SuperBB::join(const RigidTrans3 &trans, const SuperBB &other, int bbPen, FoldStep &step, float transScore) {
|
| 75 |
+
// now joining is simple
|
| 76 |
+
for (unsigned int j = 0; j < other.size_; j++) {
|
| 77 |
+
bbs_.push_back(other.bbs_[j]);
|
| 78 |
+
trans_.push_back(trans * other.trans_[j]);
|
| 79 |
+
}
|
| 80 |
+
size_ += other.size_;
|
| 81 |
+
bitIDS_ |= other.bitIDS_;
|
| 82 |
+
backBonePen_ = bbPen;
|
| 83 |
+
|
| 84 |
+
transScore_ += other.transScore_ + transScore;
|
| 85 |
+
|
| 86 |
+
if (!other.foldSteps_.empty()) {
|
| 87 |
+
foldSteps_.insert(foldSteps_.end(), other.foldSteps_.begin(), other.foldSteps_.end());
|
| 88 |
+
}
|
| 89 |
+
foldSteps_.push_back(step);
|
| 90 |
+
|
| 91 |
+
weightedTransScore_ = getWeightedTransScore(foldSteps_, bbs_);
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
void SuperBB::replaceIdentBB(BitId oldBBBitId, std::shared_ptr<const BB> bb) {
|
| 95 |
+
if((bb->bitId() & bitIDS_) != 0)
|
| 96 |
+
throw std::runtime_error("Tried to replace BB with BB that already exists in SuperBB");
|
| 97 |
+
|
| 98 |
+
std::shared_ptr<const BB> oldBB;
|
| 99 |
+
unsigned int bbIndex = -1;
|
| 100 |
+
for (unsigned int i = 0; i < size_; i++) {
|
| 101 |
+
if (bbs_[i]->bitId() == oldBBBitId) {
|
| 102 |
+
oldBB = bbs_[i];
|
| 103 |
+
bbIndex = i;
|
| 104 |
+
break;
|
| 105 |
+
}
|
| 106 |
+
}
|
| 107 |
+
if(bbIndex == -1)
|
| 108 |
+
throw std::runtime_error("SuperBB::replaceIdentBB: oldBBBitId not found in SuperBB");
|
| 109 |
+
|
| 110 |
+
bbs_[bbIndex] = bb;
|
| 111 |
+
// bitIDS_ -= oldBB->bitId();
|
| 112 |
+
// bitIDS_ += bb->bitId();
|
| 113 |
+
bitIDS_[oldBB->getID()] = false;
|
| 114 |
+
bitIDS_[bb->getID()] = true;
|
| 115 |
+
|
| 116 |
+
for(FoldStep &step : foldSteps_) {
|
| 117 |
+
if(step.i_ == oldBB->getID())
|
| 118 |
+
step.i_ = bb->getID();
|
| 119 |
+
if(step.j_ == oldBB->getID())
|
| 120 |
+
step.j_ = bb->getID();
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
|
| 124 |
+
bool SuperBB::isPenetrating(const RigidTrans3 &trans, const SuperBB &other, float threshold) const {
|
| 125 |
+
for (unsigned int i = 0; i < size_; i++) {
|
| 126 |
+
RigidTrans3 t = (!trans_[i]) * trans;
|
| 127 |
+
for (unsigned int j = 0; j < other.size_; j++) {
|
| 128 |
+
if (bbs_[i]->isPenetrating(t * other.trans_[j], *other.bbs_[j], threshold))
|
| 129 |
+
return true;
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
return false;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
// RMSD between two SBBs (assuming same BBs in each SBB)
|
| 136 |
+
double SuperBB::calcRmsd(const SuperBB &other, std::vector<std::vector<unsigned int>> &identGroups) const {
|
| 137 |
+
std::vector<std::vector<unsigned int>> presentIdentGroups;
|
| 138 |
+
|
| 139 |
+
for (std::vector<unsigned int> identGroup : identGroups) {
|
| 140 |
+
std::vector<unsigned int> possiblyRelevantIdentGroup;
|
| 141 |
+
for (unsigned int i : identGroup) {
|
| 142 |
+
if (bitIDS_.test(i))
|
| 143 |
+
possiblyRelevantIdentGroup.push_back(i);
|
| 144 |
+
}
|
| 145 |
+
if (possiblyRelevantIdentGroup.size() >= 2)
|
| 146 |
+
presentIdentGroups.push_back(possiblyRelevantIdentGroup);
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
std::map<unsigned int, unsigned int> bbIdToThisBBIndex;
|
| 150 |
+
std::map<unsigned int, unsigned int> bbIdToOtherBBIndex;
|
| 151 |
+
std::vector<unsigned int> bbIdsInThis;
|
| 152 |
+
for (unsigned int i = 0; i < bbs_.size(); i++) {
|
| 153 |
+
bbIdsInThis.push_back(bbs_[i]->getID());
|
| 154 |
+
bbIdToThisBBIndex[bbs_[i]->getID()] = i;
|
| 155 |
+
for (unsigned int j = 0; j < size_; j++) {
|
| 156 |
+
if (bbs_[i]->getID() == other.bbs_[j]->getID()) { // same BB
|
| 157 |
+
bbIdToOtherBBIndex[bbs_[i]->getID()] = j;
|
| 158 |
+
break;
|
| 159 |
+
}
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// base rmsd find
|
| 164 |
+
Match cmMatch;
|
| 165 |
+
Molecule<Vector3> cmA, cmB;
|
| 166 |
+
|
| 167 |
+
for (unsigned int bbId : bbIdsInThis) {
|
| 168 |
+
Vector3 a = trans_[bbIdToThisBBIndex[bbId]] * bbs_[bbIdToThisBBIndex[bbId]]->cm_;
|
| 169 |
+
cmA.add(a);
|
| 170 |
+
Vector3 b = other.trans_[bbIdToOtherBBIndex[bbId]] * other.bbs_[bbIdToOtherBBIndex[bbId]]->cm_;
|
| 171 |
+
cmB.add(b);
|
| 172 |
+
}
|
| 173 |
+
for (unsigned int i = 0; i < size_; i++) {
|
| 174 |
+
cmMatch.add(i, i);
|
| 175 |
+
}
|
| 176 |
+
cmMatch.calculateBestFit(cmA, cmB);
|
| 177 |
+
float foundRMSD = cmMatch.rmsd();
|
| 178 |
+
|
| 179 |
+
int MAX_ITER = 10;
|
| 180 |
+
// try replacing chains with each other
|
| 181 |
+
for (int i = 0; i < MAX_ITER; i++) {
|
| 182 |
+
// std::cout << "iter " << i << std::endl;
|
| 183 |
+
bool somethingChanged = false;
|
| 184 |
+
for (std::vector<unsigned int> identGroup : presentIdentGroups) {
|
| 185 |
+
for (unsigned int i = 0; i < identGroup.size(); i++) {
|
| 186 |
+
for (unsigned int j = i + 1; j < identGroup.size(); j++) {
|
| 187 |
+
Match cmMatch;
|
| 188 |
+
Molecule<Vector3> cmA, cmB;
|
| 189 |
+
|
| 190 |
+
for (unsigned int bbId : bbIdsInThis) {
|
| 191 |
+
Vector3 a;
|
| 192 |
+
if (bbId == identGroup[i]) {
|
| 193 |
+
unsigned int replacedbbId = identGroup[j];
|
| 194 |
+
a = trans_[bbIdToThisBBIndex[replacedbbId]] * bbs_[bbIdToThisBBIndex[replacedbbId]]->cm_;
|
| 195 |
+
} else if (bbId == identGroup[j]) {
|
| 196 |
+
unsigned int replacedbbId = identGroup[i];
|
| 197 |
+
a = trans_[bbIdToThisBBIndex[replacedbbId]] * bbs_[bbIdToThisBBIndex[replacedbbId]]->cm_;
|
| 198 |
+
} else {
|
| 199 |
+
a = trans_[bbIdToThisBBIndex[bbId]] * bbs_[bbIdToThisBBIndex[bbId]]->cm_;
|
| 200 |
+
}
|
| 201 |
+
cmA.add(a);
|
| 202 |
+
Vector3 b =
|
| 203 |
+
other.trans_[bbIdToOtherBBIndex[bbId]] * other.bbs_[bbIdToOtherBBIndex[bbId]]->cm_;
|
| 204 |
+
cmB.add(b);
|
| 205 |
+
}
|
| 206 |
+
for (unsigned int i = 0; i < size_; i++) {
|
| 207 |
+
cmMatch.add(i, i);
|
| 208 |
+
}
|
| 209 |
+
cmMatch.calculateBestFit(cmA, cmB);
|
| 210 |
+
float newRMSD = cmMatch.rmsd();
|
| 211 |
+
if (newRMSD < foundRMSD) {
|
| 212 |
+
// std::cout << "replacing chains in calcRMSD " << newRMSD << " " << foundRMSD << " " <<
|
| 213 |
+
// identGroup[i] << " " << identGroup[j] << " " << bbIdToThisBBIndex[identGroup[i]] << " " <<
|
| 214 |
+
// bbIdToThisBBIndex[identGroup[j]] << std::endl;
|
| 215 |
+
unsigned int tmp = bbIdToThisBBIndex[identGroup[i]];
|
| 216 |
+
bbIdToThisBBIndex[identGroup[i]] = bbIdToThisBBIndex[identGroup[j]];
|
| 217 |
+
bbIdToThisBBIndex[identGroup[j]] = tmp;
|
| 218 |
+
foundRMSD = newRMSD;
|
| 219 |
+
somethingChanged = true;
|
| 220 |
+
} else {
|
| 221 |
+
// std::cout << "not replacing chains in calcRMSD " << newRMSD << " " << foundRMSD << " " <<
|
| 222 |
+
// identGroup[i] << " " << identGroup[j] << std::endl;
|
| 223 |
+
}
|
| 224 |
+
}
|
| 225 |
+
}
|
| 226 |
+
}
|
| 227 |
+
if (!somethingChanged)
|
| 228 |
+
break;
|
| 229 |
+
if (i == MAX_ITER - 1)
|
| 230 |
+
std::cout << "stops clustering because max iteration " << bitIDS_ << std::endl;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
if (foundRMSD > 1.5)
|
| 234 |
+
return foundRMSD;
|
| 235 |
+
|
| 236 |
+
Match match;
|
| 237 |
+
Molecule<Atom> A, B;
|
| 238 |
+
for (unsigned int bbId : bbIdsInThis) {
|
| 239 |
+
Molecule<Atom> molA = bbs_[bbIdToThisBBIndex[bbId]]->caAtoms_;
|
| 240 |
+
molA.rigidTrans(trans_[bbIdToThisBBIndex[bbId]]);
|
| 241 |
+
A.concat(molA);
|
| 242 |
+
|
| 243 |
+
Molecule<Atom> molB = other.bbs_[bbIdToOtherBBIndex[bbId]]->caAtoms_;
|
| 244 |
+
molB.rigidTrans(other.trans_[bbIdToOtherBBIndex[bbId]]);
|
| 245 |
+
B.concat(molB);
|
| 246 |
+
}
|
| 247 |
+
|
| 248 |
+
for (unsigned int i = 0; i < A.size(); i++) {
|
| 249 |
+
match.add(i, i);
|
| 250 |
+
}
|
| 251 |
+
match.calculateBestFit(A, B);
|
| 252 |
+
return match.rmsd();
|
| 253 |
+
}
|
| 254 |
+
|
| 255 |
+
double SuperBB::calcRmsd(const SuperBB &other) const {
|
| 256 |
+
std::vector<std::vector<unsigned int>> emptyIdentGroups;
|
| 257 |
+
return calcRmsd(other, emptyIdentGroups);
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
void SuperBB::fullReport(std::ostream &s) {
|
| 261 |
+
HierarchicalFold::countResults_++;
|
| 262 |
+
RigidTrans3 tr;
|
| 263 |
+
s << "size_ " << size_ << " transScore_ " << transScore_ << " multPen_ " << multPen_ << " singlePen_ "
|
| 264 |
+
<< singlePen_ << " diffPen " << singlePen_ - multPen_ << " backBonePen_ " << backBonePen_ << " maxPen_ "
|
| 265 |
+
<< maxPen_ << " restraintsRatio_ " << restraintsRatio_ << " weightedTransScore " << weightedTransScore_;
|
| 266 |
+
s << " [";
|
| 267 |
+
int i = 0;
|
| 268 |
+
for (auto it = bbs_.begin(); it != bbs_.end(); it++, i++) {
|
| 269 |
+
s << (*it)->id_ << "(" << trans_[i] << ")";
|
| 270 |
+
if (it + 1 != bbs_.end())
|
| 271 |
+
s << ",";
|
| 272 |
+
}
|
| 273 |
+
s << "] " << tr;
|
| 274 |
+
FoldStep::outputFoldSteps(s, foldSteps_);
|
| 275 |
+
s << std::endl;
|
| 276 |
+
}
|
| 277 |
+
|
| 278 |
+
std::ostream &operator<<(std::ostream &s, const SuperBB &sbb) {
|
| 279 |
+
// scores
|
| 280 |
+
s << "size_ " << sbb.size_ << " backBonePen_ " << sbb.backBonePen_ << " restraintsRatio_ " << sbb.restraintsRatio_;
|
| 281 |
+
|
| 282 |
+
// transformations
|
| 283 |
+
s << " [";
|
| 284 |
+
int i = 0;
|
| 285 |
+
for (auto it = sbb.bbs_.begin(); it != sbb.bbs_.end(); it++, i++) {
|
| 286 |
+
s << (*it)->getID() << "(" << sbb.trans_[i] << ")";
|
| 287 |
+
if (it + 1 != sbb.bbs_.end())
|
| 288 |
+
s << ",";
|
| 289 |
+
}
|
| 290 |
+
s << "] ";
|
| 291 |
+
|
| 292 |
+
FoldStep::outputFoldSteps(s, sbb.foldSteps_);
|
| 293 |
+
s << std::endl;
|
| 294 |
+
return s;
|
| 295 |
+
}
|
| 296 |
+
|
| 297 |
+
TransIterator2::TransIterator2(const SuperBB &bb1, const SuperBB &bb2, int pbb1, int pbb2)
|
| 298 |
+
: bb1_(bb1), bb2_(bb2), index1_(0), index2_(0) {
|
| 299 |
+
|
| 300 |
+
std::shared_ptr<const BB> b1 = bb1_.bbs_[index1_];
|
| 301 |
+
while (b1->getID() != pbb1) {
|
| 302 |
+
b1 = bb1_.bbs_[++index1_];
|
| 303 |
+
}
|
| 304 |
+
std::shared_ptr<const BB> b2 = bb2_.bbs_[index2_];
|
| 305 |
+
while (b2->getID() != pbb2) {
|
| 306 |
+
b2 = bb2_.bbs_[++index2_];
|
| 307 |
+
}
|
| 308 |
+
|
| 309 |
+
mediatorTrans_ = !bb2_.trans_[index2_];
|
| 310 |
+
trans_ = &(b1->getTransformations(b2->getID())); // BB::trans(*b1, *b2);
|
| 311 |
+
it_ = trans_->begin();
|
| 312 |
+
if (!isAtEnd()) {
|
| 313 |
+
generateTransformation();
|
| 314 |
+
}
|
| 315 |
+
}
|
model/CombinatorialAssembler/SuperBB.h
ADDED
|
@@ -0,0 +1,91 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
/**
|
| 2 |
+
* This class represents a SuperBB - A subcomplex composed by multiple subunits (saved in bbs_) and in certain
|
| 3 |
+
* transformations (saved in trans_)
|
| 4 |
+
*/
|
| 5 |
+
#ifndef SUPERBB_H
|
| 6 |
+
#define SUPERBB_H
|
| 7 |
+
|
| 8 |
+
#include "BB.h"
|
| 9 |
+
#include "FoldStep.h"
|
| 10 |
+
|
| 11 |
+
class SuperBB {
|
| 12 |
+
public:
|
| 13 |
+
friend class BestK;
|
| 14 |
+
friend class HierarchicalFold;
|
| 15 |
+
friend class TransIterator2;
|
| 16 |
+
|
| 17 |
+
SuperBB(std::shared_ptr<const BB> bb);
|
| 18 |
+
|
| 19 |
+
BitId bitIds() const { return bitIDS_; }
|
| 20 |
+
unsigned int size() const { return size_; }
|
| 21 |
+
float getRestraintsRatio() const { return restraintsRatio_; }
|
| 22 |
+
void setRestraintsRatio(float r) { restraintsRatio_ = r; }
|
| 23 |
+
|
| 24 |
+
// This function takes Two super BBs and joins them using a transformation between to BBs
|
| 25 |
+
void join(const RigidTrans3 &trans, const SuperBB &other, int bbPen, FoldStep &step, float transScore);
|
| 26 |
+
void replaceIdentBB(BitId oldBBBitId, std::shared_ptr<const BB> bb);
|
| 27 |
+
|
| 28 |
+
// This function checks for collissions - Receives transformation and a second super BB and decides if
|
| 29 |
+
// they collide
|
| 30 |
+
bool isPenetrating(const RigidTrans3 &trans, const SuperBB &other, float threshold) const;
|
| 31 |
+
double calcRmsd(const SuperBB &other, std::vector<std::vector<unsigned int>> &identGroups) const;
|
| 32 |
+
double calcRmsd(const SuperBB &other) const;
|
| 33 |
+
|
| 34 |
+
void fullReport(std::ostream &s);
|
| 35 |
+
friend std::ostream &operator<<(std::ostream &s, const SuperBB &sbb);
|
| 36 |
+
|
| 37 |
+
private:
|
| 38 |
+
// members
|
| 39 |
+
unsigned int size_;
|
| 40 |
+
std::vector<FoldStep> foldSteps_; // FoldStep is a transformation between two SUs
|
| 41 |
+
BitId bitIDS_;
|
| 42 |
+
float restraintsRatio_;
|
| 43 |
+
|
| 44 |
+
public: // TODO: Make private
|
| 45 |
+
// BBs that make up the SuperBB
|
| 46 |
+
std::vector<std::shared_ptr<const BB>> bbs_;
|
| 47 |
+
// Holds the transformations of the BBs
|
| 48 |
+
std::vector<RigidTrans3> trans_;
|
| 49 |
+
|
| 50 |
+
int backBonePen_;
|
| 51 |
+
float maxPen_;
|
| 52 |
+
float transScore_;
|
| 53 |
+
float weightedTransScore_;
|
| 54 |
+
int multPen_;
|
| 55 |
+
int singlePen_;
|
| 56 |
+
};
|
| 57 |
+
|
| 58 |
+
class TransIterator2 {
|
| 59 |
+
public:
|
| 60 |
+
TransIterator2(const SuperBB &sbb1, const SuperBB &sbb2, int pbb1, int pbb2);
|
| 61 |
+
|
| 62 |
+
RigidTrans3 &transformation() { return transformation_; }
|
| 63 |
+
|
| 64 |
+
float getScore() { return (*it_)->score_.totalScore_; }
|
| 65 |
+
|
| 66 |
+
void generateTransformation() { transformation_ = bb1_.trans_[index1_] * (*it_)->refFrame_ * mediatorTrans_; }
|
| 67 |
+
|
| 68 |
+
TransIterator2 &operator++(int) {
|
| 69 |
+
while (!isAtEnd()) {
|
| 70 |
+
it_++;
|
| 71 |
+
if (it_ == trans_->end()) {
|
| 72 |
+
return *this;
|
| 73 |
+
}
|
| 74 |
+
generateTransformation();
|
| 75 |
+
return *this;
|
| 76 |
+
}
|
| 77 |
+
return *this;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
bool isAtEnd() { return it_ == trans_->end(); }
|
| 81 |
+
|
| 82 |
+
private:
|
| 83 |
+
const SuperBB &bb1_, &bb2_;
|
| 84 |
+
unsigned int index1_, index2_;
|
| 85 |
+
const std::vector<std::shared_ptr<TransformationAndScore>> *trans_;
|
| 86 |
+
std::vector<std::shared_ptr<TransformationAndScore>>::const_iterator it_;
|
| 87 |
+
RigidTrans3 mediatorTrans_;
|
| 88 |
+
RigidTrans3 transformation_;
|
| 89 |
+
};
|
| 90 |
+
|
| 91 |
+
#endif /* SUPERBB_H */
|
model/CombinatorialAssembler/TransformationAndScore.cc
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "TransformationAndScore.h"
|
| 2 |
+
|
| 3 |
+
template <>
|
| 4 |
+
void TransformationAndScore_T<Score>::outputTrans(std::vector<TransformationAndScore_T<Score> *> &transformations) {
|
| 5 |
+
int count = 0;
|
| 6 |
+
for (std::vector<TransformationAndScore *>::iterator it = transformations.begin(); it != transformations.end();
|
| 7 |
+
it++) {
|
| 8 |
+
count++;
|
| 9 |
+
std::cout << count << ": " << **it << std::endl;
|
| 10 |
+
}
|
| 11 |
+
}
|
model/CombinatorialAssembler/TransformationAndScore.h
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef TRANSFORMATIONANDSCORE_H
|
| 2 |
+
#define TRANSFORMATIONANDSCORE_H
|
| 3 |
+
|
| 4 |
+
#include <RigidTrans3.h>
|
| 5 |
+
#include <vector>
|
| 6 |
+
|
| 7 |
+
#define NO_OF_RANGES 8
|
| 8 |
+
typedef struct pointsAndSurface_t {
|
| 9 |
+
int count_;
|
| 10 |
+
float surface_;
|
| 11 |
+
} pointsAndSurface;
|
| 12 |
+
|
| 13 |
+
template <class SCORE_T> class TransformationAndScore_T {
|
| 14 |
+
public:
|
| 15 |
+
const RigidTrans3 &trans() { return refFrame_; }
|
| 16 |
+
float score() { return score_.totalScore_; }
|
| 17 |
+
|
| 18 |
+
RigidTrans3 refFrame_;
|
| 19 |
+
SCORE_T score_;
|
| 20 |
+
float dist_; // for debug
|
| 21 |
+
static void outputTrans(std::vector<TransformationAndScore_T *> &transformations);
|
| 22 |
+
};
|
| 23 |
+
|
| 24 |
+
template <class SCORE_T> std::ostream &operator<<(std::ostream &s, const TransformationAndScore_T<SCORE_T> &ts) {
|
| 25 |
+
return s << ts.refFrame_ << " " << ts.score_ << " , " << ts.dist_ << " , " << ((ts.dist_ == 0) ? 1 : 0);
|
| 26 |
+
}
|
| 27 |
+
|
| 28 |
+
template <class SCORE_T> std::istream &operator>>(std::istream &s, TransformationAndScore_T<SCORE_T> &ts) {
|
| 29 |
+
char c;
|
| 30 |
+
return s >> c >> ts.score_ >> c >> c >> ts.refFrame_ >> c >> c >> ts.dist_;
|
| 31 |
+
}
|
| 32 |
+
|
| 33 |
+
class Score {
|
| 34 |
+
public:
|
| 35 |
+
Score() { init(); }
|
| 36 |
+
|
| 37 |
+
void init() {
|
| 38 |
+
totalScore_ = 0;
|
| 39 |
+
resCount1_ = resCount2_ = 0;
|
| 40 |
+
interfaceSurface_ = maxPenetrate_ = s_ = c_ = e_ = 0.0;
|
| 41 |
+
for (int i = 0; i < NO_OF_RANGES; i++) {
|
| 42 |
+
ps_[i].count_ = 0;
|
| 43 |
+
ps_[i].surface_ = 0;
|
| 44 |
+
}
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
float totalScore_;
|
| 48 |
+
pointsAndSurface ps_[NO_OF_RANGES];
|
| 49 |
+
int resCount1_;
|
| 50 |
+
int resCount2_;
|
| 51 |
+
float interfaceSurface_;
|
| 52 |
+
float maxPenetrate_;
|
| 53 |
+
float s_, c_, e_;
|
| 54 |
+
Score *referenceScore_;
|
| 55 |
+
|
| 56 |
+
friend std::ostream &operator<<(std::ostream &s, const Score &score) { return s << score.totalScore_; }
|
| 57 |
+
|
| 58 |
+
friend std::istream &operator>>(std::istream &s, Score &ts);
|
| 59 |
+
};
|
| 60 |
+
|
| 61 |
+
// #define CLUSTER_DEBUG
|
| 62 |
+
typedef TransformationAndScore_T<Score> TransformationAndScore;
|
| 63 |
+
|
| 64 |
+
#endif
|
model/CombinatorialAssembler/chem_params.txt
ADDED
|
@@ -0,0 +1,412 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
ALA N 1.83 -0.15 1
|
| 2 |
+
ALA CA 2.265 0.10 2
|
| 3 |
+
ALA CB 2.165 0.00 6
|
| 4 |
+
ALA C 1.87 0.60 3
|
| 5 |
+
ALA O 1.55 -0.55 4
|
| 6 |
+
ALA OXT 1.48 -0.57 9
|
| 7 |
+
ALA OT2 1.48 -0.57 9
|
| 8 |
+
ARG N 1.83 -0.15 1
|
| 9 |
+
ARG CA 2.265 0.10 2
|
| 10 |
+
ARG CB 2.235 0.00 6
|
| 11 |
+
ARG CG 2.235 0.00 16
|
| 12 |
+
ARG CD 2.235 0.10 12
|
| 13 |
+
ARG NE 1.83 -0.10 12
|
| 14 |
+
ARG CZ 1.87 0.50 10
|
| 15 |
+
ARG NH1 1.83 0.25 10
|
| 16 |
+
ARG NH2 1.83 0.25 10
|
| 17 |
+
ARG C 1.87 0.60 3
|
| 18 |
+
ARG O 1.55 -0.55 4
|
| 19 |
+
ARG OXT 1.48 -0.57 9
|
| 20 |
+
ARG OT2 1.48 -0.57 9
|
| 21 |
+
ARGN N 1.83 -0.15 1
|
| 22 |
+
ARGN CA 2.265 0.10 2
|
| 23 |
+
ARGN CB 2.235 0.00 6
|
| 24 |
+
ARGN CG 2.235 0.00 16
|
| 25 |
+
ARGN CD 2.235 0.10 12
|
| 26 |
+
ARGN NE 1.83 -0.10 12
|
| 27 |
+
ARGN CZ 1.87 -0.20 11
|
| 28 |
+
ARGN NH1 1.83 0.10 11
|
| 29 |
+
ARGN NH2 1.83 0.10 11
|
| 30 |
+
ARGN C 1.87 0.60 3
|
| 31 |
+
ARGN O 1.55 -0.55 4
|
| 32 |
+
ARGN OXT 1.48 -0.57 9
|
| 33 |
+
ARGN OT2 1.48 -0.57 9
|
| 34 |
+
ASN N 1.83 -0.15 1
|
| 35 |
+
ASN CA 2.265 0.10 2
|
| 36 |
+
ASN CB 2.265 0.00 6
|
| 37 |
+
ASN CG 1.87 0.55 11
|
| 38 |
+
ASN OD1 1.55 -0.55 11
|
| 39 |
+
ASN ND2 1.83 0.00 11
|
| 40 |
+
ASN C 1.87 0.60 3
|
| 41 |
+
ASN O 1.55 -0.55 4
|
| 42 |
+
ASN OXT 1.48 -0.57 9
|
| 43 |
+
ASN OT2 1.48 -0.57 9
|
| 44 |
+
ASP N 1.83 -0.15 1
|
| 45 |
+
ASP CA 2.265 0.10 2
|
| 46 |
+
ASP CB 2.235 0.00 6
|
| 47 |
+
ASP CG 1.87 0.14 9
|
| 48 |
+
ASP OD1 1.66 -0.57 9
|
| 49 |
+
ASP OD2 1.66 -0.57 9
|
| 50 |
+
ASP C 1.87 0.60 3
|
| 51 |
+
ASP O 1.55 -0.55 4
|
| 52 |
+
ASP OXT 1.48 -0.57 9
|
| 53 |
+
ASP OT2 1.48 -0.57 9
|
| 54 |
+
ASPH N 1.83 -0.15 1
|
| 55 |
+
ASPH CA 2.265 0.10 2
|
| 56 |
+
ASPH CB 2.235 0.00 6
|
| 57 |
+
ASPH CG 1.87 0.70 11
|
| 58 |
+
ASPH OD1 1.36 -0.35 11
|
| 59 |
+
ASPH OD2 1.55 -0.35 11
|
| 60 |
+
ASPH C 1.87 0.60 3
|
| 61 |
+
ASPH O 1.55 -0.55 4
|
| 62 |
+
ASPH OXT 1.48 -0.57 9
|
| 63 |
+
ASPH OT2 1.48 -0.57 9
|
| 64 |
+
CYS N 1.83 -0.15 1
|
| 65 |
+
CYS CA 2.265 0.10 2
|
| 66 |
+
CYS CB 2.235 0.19 6
|
| 67 |
+
CYS SG 1.89 -0.19 18
|
| 68 |
+
CYS C 1.87 0.60 3
|
| 69 |
+
CYS O 1.55 -0.55 4
|
| 70 |
+
CYS OXT 1.48 -0.57 9
|
| 71 |
+
CYS OT2 1.48 -0.57 9
|
| 72 |
+
GLN N 1.83 -0.15 1
|
| 73 |
+
GLN CA 2.265 0.10 2
|
| 74 |
+
GLN CB 2.235 0.00 6
|
| 75 |
+
GLN CG 2.235 0.00 16
|
| 76 |
+
GLN CD 1.87 0.55 11
|
| 77 |
+
GLN OE1 1.55 -0.55 11
|
| 78 |
+
GLN NE2 1.83 0.00 11
|
| 79 |
+
GLN C 1.87 0.60 3
|
| 80 |
+
GLN O 1.55 -0.55 4
|
| 81 |
+
GLN OXT 1.48 -0.57 9
|
| 82 |
+
GLN OT2 1.48 -0.57 9
|
| 83 |
+
GLU N 1.83 -0.15 1
|
| 84 |
+
GLU CA 2.265 0.10 2
|
| 85 |
+
GLU CB 2.235 0.00 6
|
| 86 |
+
GLU CG 2.235 0.00 16
|
| 87 |
+
GLU CD 1.87 0.14 9
|
| 88 |
+
GLU OE1 1.66 -0.57 9
|
| 89 |
+
GLU OE2 1.66 -0.57 9
|
| 90 |
+
GLU C 1.87 0.60 3
|
| 91 |
+
GLU O 1.55 -0.55 4
|
| 92 |
+
GLU OXT 1.48 -0.57 9
|
| 93 |
+
GLU OT2 1.48 -0.57 9
|
| 94 |
+
GLUH N 1.83 -0.15 1
|
| 95 |
+
GLUH CA 2.265 0.10 2
|
| 96 |
+
GLUH CB 2.235 0.00 6
|
| 97 |
+
GLUH CG 2.235 0.00 16
|
| 98 |
+
GLUH CD 1.87 0.70 11
|
| 99 |
+
GLUH OE1 1.36 -0.35 11
|
| 100 |
+
GLUH OE2 1.55 -0.35 11
|
| 101 |
+
GLUH C 1.87 0.60 3
|
| 102 |
+
GLUH O 1.55 -0.55 4
|
| 103 |
+
GLUH OXT 1.48 -0.57 9
|
| 104 |
+
GLUH OT2 1.48 -0.57 9
|
| 105 |
+
GLY N 1.83 -0.15 1
|
| 106 |
+
GLY CA 2.235 0.10 5
|
| 107 |
+
GLY C 1.87 0.60 3
|
| 108 |
+
GLY O 1.55 -0.55 4
|
| 109 |
+
GLY OXT 1.48 -0.57 9
|
| 110 |
+
GLY OT2 1.48 -0.57 9
|
| 111 |
+
HIS N 1.83 -0.15 1
|
| 112 |
+
HIS CA 2.265 0.10 2
|
| 113 |
+
HIS CB 2.235 0.00 6
|
| 114 |
+
HIS CG 2.04 0.10 14
|
| 115 |
+
HIS ND1 1.72 -0.10 14
|
| 116 |
+
HIS CD2 2.10 0.10 14
|
| 117 |
+
HIS NE2 1.72 -0.40 14
|
| 118 |
+
HIS CE1 2.10 0.30 14
|
| 119 |
+
HIS C 1.87 0.60 3
|
| 120 |
+
HIS O 1.55 -0.55 4
|
| 121 |
+
HIS OXT 1.48 -0.57 9
|
| 122 |
+
HIS OT2 1.48 -0.57 9
|
| 123 |
+
ILE N 1.83 -0.15 1
|
| 124 |
+
ILE CA 2.265 0.10 2
|
| 125 |
+
ILE CB 2.265 0.00 6
|
| 126 |
+
ILE CG2 2.165 0.00 17
|
| 127 |
+
ILE CG1 2.235 0.00 16
|
| 128 |
+
ILE CD 2.165 0.00 17
|
| 129 |
+
ILE CD1 2.165 0.00 17
|
| 130 |
+
ILE C 1.87 0.60 3
|
| 131 |
+
ILE O 1.55 -0.55 4
|
| 132 |
+
ILE OXT 1.48 -0.57 9
|
| 133 |
+
ILE OT2 1.48 -0.57 9
|
| 134 |
+
LEU N 1.83 -0.15 1
|
| 135 |
+
LEU CA 2.265 0.10 2
|
| 136 |
+
LEU CB 2.235 0.00 6
|
| 137 |
+
LEU CG 2.265 0.00 16
|
| 138 |
+
LEU CD1 2.165 0.00 17
|
| 139 |
+
LEU CD2 2.165 0.00 17
|
| 140 |
+
LEU C 1.87 0.60 3
|
| 141 |
+
LEU O 1.55 -0.55 4
|
| 142 |
+
LEU OXT 1.48 -0.57 9
|
| 143 |
+
LEU OT1 1.48 -0.57 9
|
| 144 |
+
LEU OT2 1.48 -0.57 9
|
| 145 |
+
LYS N 1.83 -0.15 1
|
| 146 |
+
LYS CA 2.265 0.10 2
|
| 147 |
+
LYS CB 2.235 0.00 6
|
| 148 |
+
LYS CG 2.235 0.00 16
|
| 149 |
+
LYS CD 2.235 0.00 8
|
| 150 |
+
LYS CE 2.235 0.25 7
|
| 151 |
+
LYS NZ 1.65 0.75 7
|
| 152 |
+
LYS C 1.87 0.60 3
|
| 153 |
+
LYS O 1.55 -0.55 4
|
| 154 |
+
LYS OXT 1.48 -0.57 9
|
| 155 |
+
LYS OT2 1.48 -0.57 9
|
| 156 |
+
LYSN N 1.83 -0.15 1
|
| 157 |
+
LYSN CA 2.265 0.10 2
|
| 158 |
+
LYSN CB 2.235 0.00 6
|
| 159 |
+
LYSN CG 2.235 0.00 16
|
| 160 |
+
LYSN CD 2.235 0.00 8
|
| 161 |
+
LYSN CE 2.235 0.00 11
|
| 162 |
+
LYSN NZ 1.65 0.00 7
|
| 163 |
+
LYSN C 1.87 0.60 3
|
| 164 |
+
LYSN O 1.55 -0.55 4
|
| 165 |
+
LYSN OXT 1.48 -0.57 9
|
| 166 |
+
LYSN OT2 1.48 -0.57 9
|
| 167 |
+
MET N 1.83 -0.15 1
|
| 168 |
+
MET CA 2.265 0.10 2
|
| 169 |
+
MET CB 2.235 0.00 6
|
| 170 |
+
MET CG 2.235 0.06 16
|
| 171 |
+
MET SD 1.97 -0.12 16
|
| 172 |
+
MET CE 2.165 0.06 17
|
| 173 |
+
MET C 1.87 0.60 3
|
| 174 |
+
MET O 1.55 -0.55 4
|
| 175 |
+
MET OXT 1.48 -0.57 9
|
| 176 |
+
MET OT2 1.48 -0.57 9
|
| 177 |
+
PHE N 1.83 -0.15 1
|
| 178 |
+
PHE CA 2.265 0.10 2
|
| 179 |
+
PHE CB 2.235 0.00 6
|
| 180 |
+
PHE CG 2.04 0.00 16
|
| 181 |
+
PHE CD1 1.99 0.00 16
|
| 182 |
+
PHE CD2 1.99 0.00 16
|
| 183 |
+
PHE CE1 1.99 0.00 16
|
| 184 |
+
PHE CE2 1.99 0.00 16
|
| 185 |
+
PHE CZ 1.99 0.00 16
|
| 186 |
+
PHE C 1.87 0.60 3
|
| 187 |
+
PHE O 1.55 -0.55 4
|
| 188 |
+
PHE OXT 1.48 -0.57 9
|
| 189 |
+
PHE OT2 1.48 -0.57 9
|
| 190 |
+
PRO N 1.83 -0.25 1
|
| 191 |
+
PRO CD 2.235 0.10 6
|
| 192 |
+
PRO CA 2.265 0.10 2
|
| 193 |
+
PRO CB 2.235 0.00 6
|
| 194 |
+
PRO CG 2.235 0.00 6
|
| 195 |
+
PRO C 1.87 0.60 3
|
| 196 |
+
PRO O 1.55 -0.55 4
|
| 197 |
+
PRO OXT 1.48 -0.57 9
|
| 198 |
+
PRO OT2 1.48 -0.57 9
|
| 199 |
+
PRO OD 1.55 -0.25 13
|
| 200 |
+
5HP N 1.83 -0.25 1
|
| 201 |
+
5HP CD 2.235 0.10 6
|
| 202 |
+
5HP CA 2.265 0.10 2
|
| 203 |
+
5HP CB 2.235 0.00 6
|
| 204 |
+
5HP CG 2.235 0.00 6
|
| 205 |
+
5HP C 1.87 0.60 3
|
| 206 |
+
5HP O 1.55 -0.55 4
|
| 207 |
+
5HP OD 1.55 -0.25 13
|
| 208 |
+
5HP OXT 1.48 -0.57 9
|
| 209 |
+
5HP OT2 1.48 -0.57 9
|
| 210 |
+
SER N 1.83 -0.15 1
|
| 211 |
+
SER CA 2.265 0.10 2
|
| 212 |
+
SER CB 2.235 0.25 13
|
| 213 |
+
SER OG 1.55 -0.25 13
|
| 214 |
+
SER C 1.87 0.60 3
|
| 215 |
+
SER O 1.55 -0.55 4
|
| 216 |
+
SER OXT 1.48 -0.57 9
|
| 217 |
+
SER OT2 1.48 -0.57 9
|
| 218 |
+
THR N 1.83 -0.15 1
|
| 219 |
+
THR CA 2.265 0.10 2
|
| 220 |
+
THR CB 2.265 0.25 6
|
| 221 |
+
THR OG1 1.55 -0.25 13
|
| 222 |
+
THR CG2 2.165 0.00 16
|
| 223 |
+
THR C 1.87 0.60 3
|
| 224 |
+
THR O 1.55 -0.55 4
|
| 225 |
+
THR OXT 1.48 -0.57 9
|
| 226 |
+
THR OT2 1.48 -0.57 9
|
| 227 |
+
TRP N 1.83 -0.15 1
|
| 228 |
+
TRP CA 2.265 0.10 2
|
| 229 |
+
TRP CB 2.235 0.00 6
|
| 230 |
+
TRP CG 2.04 -0.03 16
|
| 231 |
+
TRP CD2 2.04 0.10 16
|
| 232 |
+
TRP CE2 2.04 -0.04 16
|
| 233 |
+
TRP CE3 1.99 -0.03 16
|
| 234 |
+
TRP CD1 2.10 0.06 16
|
| 235 |
+
TRP NE1 1.72 -0.06 14
|
| 236 |
+
TRP CZ2 1.99 0.00 16
|
| 237 |
+
TRP CZ3 1.99 0.00 16
|
| 238 |
+
TRP CH2 1.99 0.00 16
|
| 239 |
+
TRP C 1.87 0.60 3
|
| 240 |
+
TRP O 1.55 -0.55 4
|
| 241 |
+
TRP OXT 1.48 -0.57 9
|
| 242 |
+
TRP OT2 1.48 -0.57 9
|
| 243 |
+
TYR N 1.83 -0.15 1
|
| 244 |
+
TYR CA 2.265 0.10 2
|
| 245 |
+
TYR CB 2.235 0.00 6
|
| 246 |
+
TYR CG 2.04 0.00 16
|
| 247 |
+
TYR CD1 1.99 0.00 16
|
| 248 |
+
TYR CE1 1.99 0.00 15
|
| 249 |
+
TYR CD2 1.99 0.00 16
|
| 250 |
+
TYR CE2 1.99 0.00 15
|
| 251 |
+
TYR CZ 2.04 0.25 15
|
| 252 |
+
TYR OH 1.55 -0.25 13
|
| 253 |
+
TYR C 1.87 0.60 3
|
| 254 |
+
TYR O 1.55 -0.55 4
|
| 255 |
+
TYR OXT 1.48 -0.57 9
|
| 256 |
+
TYR OT2 1.48 -0.57 9
|
| 257 |
+
VAL N 1.83 -0.15 1
|
| 258 |
+
VAL CA 2.265 0.10 2
|
| 259 |
+
VAL CB 2.265 0.00 6
|
| 260 |
+
VAL CG1 2.165 0.00 17
|
| 261 |
+
VAL CG2 2.165 0.00 17
|
| 262 |
+
VAL C 1.87 0.60 3
|
| 263 |
+
VAL O 1.55 -0.55 4
|
| 264 |
+
VAL OXT 1.48 -0.57 9
|
| 265 |
+
VAL OT2 1.48 -0.57 9
|
| 266 |
+
HSC N 1.83 -0.15 1
|
| 267 |
+
HSC CA 2.265 0.10 2
|
| 268 |
+
HSC CB 2.235 0.10 6
|
| 269 |
+
HSC CG 2.04 0.15 14
|
| 270 |
+
HSC CD2 1.87 0.20 14
|
| 271 |
+
HSC ND1 1.54 0.05 10
|
| 272 |
+
HSC CE1 1.87 0.45 14
|
| 273 |
+
HSC NE2 1.54 0.05 10
|
| 274 |
+
HSC C 1.87 0.60 3
|
| 275 |
+
HSC O 1.55 -0.55 4
|
| 276 |
+
HSC OXT 1.48 -0.57 9
|
| 277 |
+
HSC OT2 1.48 -0.57 9
|
| 278 |
+
HSD N 1.83 -0.15 1
|
| 279 |
+
HSD CA 2.265 0.10 2
|
| 280 |
+
HSD CB 2.235 0.00 6
|
| 281 |
+
HSD CG 2.04 0.10 14
|
| 282 |
+
HSD ND1 1.54 -0.40 14
|
| 283 |
+
HSD CE1 1.87 0.30 14
|
| 284 |
+
HSD CD2 1.87 0.10 14
|
| 285 |
+
HSD NE2 1.54 -0.10 14
|
| 286 |
+
HSD C 1.87 0.60 3
|
| 287 |
+
HSD O 1.55 -0.55 4
|
| 288 |
+
HSD OXT 1.48 -0.57 9
|
| 289 |
+
HSD OT2 1.48 -0.57 9
|
| 290 |
+
HEM FE 2.13 0.24 10
|
| 291 |
+
HEM E 2.13 0.24 10
|
| 292 |
+
HEM NA 1.54 -0.18 14
|
| 293 |
+
HEM NB 1.54 -0.18 14
|
| 294 |
+
HEM NC 1.54 -0.18 14
|
| 295 |
+
HEM ND 1.54 -0.18 14
|
| 296 |
+
HEM C1A 1.87 0.03 3
|
| 297 |
+
HEM CHA 2.265 0.04 2
|
| 298 |
+
HEM C4D 1.87 0.02 3
|
| 299 |
+
HEM C1B 1.87 0.03 3
|
| 300 |
+
HEM CHB 2.265 0.04 2
|
| 301 |
+
HEM C4A 1.87 0.02 3
|
| 302 |
+
HEM C1C 1.87 0.03 3
|
| 303 |
+
HEM CHC 2.265 0.04 2
|
| 304 |
+
HEM C4B 1.87 0.02 3
|
| 305 |
+
HEM C1D 1.87 0.03 3
|
| 306 |
+
HEM CHD 2.265 0.04 2
|
| 307 |
+
HEM C4C 1.87 0.02 3
|
| 308 |
+
HEM C2A 1.87 -0.02 3
|
| 309 |
+
HEM CAA 2.235 0.04 6
|
| 310 |
+
HEM C3A 1.87 0.02 3
|
| 311 |
+
HEM CMA 2.235 -0.04 17
|
| 312 |
+
HEM CBA 2.235 -0.10 6
|
| 313 |
+
HEM CGA 1.87 0.30 9
|
| 314 |
+
HEM O1A 1.48 -0.50 9
|
| 315 |
+
HEM O2A 1.48 -0.50 9
|
| 316 |
+
HEM C2B 1.87 0.02 3
|
| 317 |
+
HEM CMB 2.235 -0.04 17
|
| 318 |
+
HEM C3B 1.87 -0.05 3
|
| 319 |
+
HEM CAB 2.265 0.03 2
|
| 320 |
+
HEM CBB 2.235 -0.10 6
|
| 321 |
+
HEM C2C 1.87 0.02 3
|
| 322 |
+
HEM CMC 2.235 -0.04 17
|
| 323 |
+
HEM C3C 1.87 -0.05 3
|
| 324 |
+
HEM CAC 2.265 0.03 2
|
| 325 |
+
HEM CBC 2.235 -0.10 6
|
| 326 |
+
HEM C2D 1.87 0.02 3
|
| 327 |
+
HEM CMD 2.235 -0.04 17
|
| 328 |
+
HEM C3D 1.87 -0.02 3
|
| 329 |
+
HEM CAD 2.235 0.04 6
|
| 330 |
+
HEM CBD 2.235 -0.10 6
|
| 331 |
+
HEM CGD 1.87 0.30 9
|
| 332 |
+
HEM O1D 1.48 -0.50 9
|
| 333 |
+
HEM O2D 1.48 -0.50 9
|
| 334 |
+
TML CH1 2.235 0.00 17
|
| 335 |
+
TML CH2 2.235 0.00 17
|
| 336 |
+
TML CH3 2.235 0.00 17
|
| 337 |
+
SO4 S 1.76 0.53 9
|
| 338 |
+
SO4 O1 1.48 -0.62 9
|
| 339 |
+
SO4 O2 1.48 -0.62 9
|
| 340 |
+
SO4 O3 1.48 -0.62 9
|
| 341 |
+
SO4 O4 1.48 -0.62 9
|
| 342 |
+
GDP C2 2.04 0.88 14
|
| 343 |
+
GDP N3 1.54 -0.71 14
|
| 344 |
+
GDP C4 2.04 0.39 14
|
| 345 |
+
GDP C5 2.04 -0.06 14
|
| 346 |
+
GDP C6 1.87 0.69 14
|
| 347 |
+
GDP N1 1.54 -0.25 14
|
| 348 |
+
GDP N9 1.54 -0.11 14
|
| 349 |
+
GDP C8 1.88 0.33 14
|
| 350 |
+
GDP N7 1.54 -0.54 14
|
| 351 |
+
GDP C2* 2.02 0.33 6
|
| 352 |
+
GDP C3* 2.02 0.26 6
|
| 353 |
+
GDP C4* 2.02 0.11 6
|
| 354 |
+
GDP O4* 1.43 -0.37 4
|
| 355 |
+
GDP C1* 2.02 0.21 6
|
| 356 |
+
GDP C5* 2.00 0.01 6
|
| 357 |
+
GDP O5* 1.43 -0.46 4
|
| 358 |
+
GDP PA 1.70 0.90 3
|
| 359 |
+
GDP O1A 1.48 -0.72 4
|
| 360 |
+
GDP O2A 1.48 -0.72 4
|
| 361 |
+
GDP O3A 1.43 -0.67 4
|
| 362 |
+
GDP PB 1.70 0.53 9
|
| 363 |
+
GDP O1B 1.48 -0.62 9
|
| 364 |
+
GDP O2B 1.48 -0.62 9
|
| 365 |
+
GDP O3B 1.48 -0.62 9
|
| 366 |
+
GDP O6 1.55 -0.55 4
|
| 367 |
+
GDP N2 1.83 -0.12 7
|
| 368 |
+
GDP O2 1.55 -0.25 13
|
| 369 |
+
GDP O3 1.55 -0.25 13
|
| 370 |
+
GNP N1 1.54 -0.25 14
|
| 371 |
+
GNP C2 2.04 0.88 14
|
| 372 |
+
GNP N2 1.83 -0.12 7
|
| 373 |
+
GNP N3 1.54 -0.71 14
|
| 374 |
+
GNP C4 2.04 0.39 14
|
| 375 |
+
GNP C5 2.04 -0.06 14
|
| 376 |
+
GNP C6 1.87 0.69 14
|
| 377 |
+
GNP O6 1.55 -0.55 4
|
| 378 |
+
GNP N7 1.54 -0.54 14
|
| 379 |
+
GNP C8 1.88 0.33 14
|
| 380 |
+
GNP N9 1.54 -0.11 14
|
| 381 |
+
GNP C1* 2.02 0.21 6
|
| 382 |
+
GNP C2* 2.02 0.33 6
|
| 383 |
+
GNP O2* 1.55 -0.25 13
|
| 384 |
+
GNP C3* 2.02 0.26 6
|
| 385 |
+
GNP O3* 1.55 -0.25 13
|
| 386 |
+
GNP C4* 2.02 0.11 6
|
| 387 |
+
GNP O4* 1.43 -0.37 4
|
| 388 |
+
GNP C5* 2.00 0.01 6
|
| 389 |
+
GNP O5* 1.43 -0.46 4
|
| 390 |
+
GNP PA 1.70 0.90 3
|
| 391 |
+
GNP O1A 1.48 -0.72 4
|
| 392 |
+
GNP O2A 1.48 -0.72 4
|
| 393 |
+
GNP O3A 1.43 -0.67 4
|
| 394 |
+
GNP PB 1.70 1.11 3
|
| 395 |
+
GNP O1B 1.48 -0.72 4
|
| 396 |
+
GNP O2B 1.48 -0.72 4
|
| 397 |
+
GNP N3B 1.83 -0.15 1
|
| 398 |
+
GNP PG 1.70 0.53 9
|
| 399 |
+
GNP O1G 1.48 -0.62 9
|
| 400 |
+
GNP O2G 1.48 -0.62 9
|
| 401 |
+
GNP O3G 1.48 -0.62 9
|
| 402 |
+
UNK CAL 1.97 2.00 10
|
| 403 |
+
XXX XXX 1.83 0.00 0
|
| 404 |
+
XXX C?? 2.23 0.00 3
|
| 405 |
+
XXX N?? 1.83 0.00 1
|
| 406 |
+
XXX O?? 1.55 -0.55 4
|
| 407 |
+
XXX S?? 1.97 -0.19 18
|
| 408 |
+
XXX P?? 1.87 0.53 9
|
| 409 |
+
XXX FE? 2.13 0.24 10
|
| 410 |
+
XXX MG? 2.13 0.24 10
|
| 411 |
+
XXX F?? 2.13 0.24 10
|
| 412 |
+
XXX BR? 2.13 0.24 10
|
model/CombinatorialAssembler/libs_DockingLib/ChemAtom.cc
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "ChemAtom.h"
|
| 2 |
+
|
| 3 |
+
const float ChemAtom::maxRadius = 3.5;
|
| 4 |
+
ChemAtom::ChemAtom(){}
|
| 5 |
+
|
| 6 |
+
ChemAtom::ChemAtom(const Vector3& p, const char ch, const unsigned int aid,
|
| 7 |
+
const unsigned int resid, const char* const t, const char resTp,
|
| 8 |
+
const int chemType, const float radius, const float charge):
|
| 9 |
+
Atom(p, ch, aid, resid, t, resTp),
|
| 10 |
+
chemType_(chemType), radius_(radius), charge_(charge), epsilon_(-0.01),
|
| 11 |
+
hbType_(NONE), hbDirection_(Vector3(0,0,0)), ASA_(0) {
|
| 12 |
+
setPolarity();
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
ChemAtom::ChemAtom(const std::string& PDBrec, bool cif) :
|
| 16 |
+
Atom(PDBrec, cif),
|
| 17 |
+
chemType_(0), radius_(1.5), charge_(0), epsilon_(-0.01), hbType_(NONE), hbDirection_(Vector3(0,0,0)), ASA_(0) {
|
| 18 |
+
setPolarity();
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
void ChemAtom::setHBData(const HB_TYPE hbType, const Vector3& hbDirection) {
|
| 22 |
+
// set type
|
| 23 |
+
if(hbType_ == NONE) hbType_ = hbType;
|
| 24 |
+
if((hbType_ == DONOR && hbType == ACCEPTOR) || (hbType_ == ACCEPTOR && hbType == DONOR)) hbType_ = HB_BOTH;
|
| 25 |
+
|
| 26 |
+
// set direction
|
| 27 |
+
if(hbDirection_.isZero()) {
|
| 28 |
+
hbDirection_ = hbDirection;
|
| 29 |
+
}
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
void ChemAtom::setPolarity() {
|
| 33 |
+
const char res = residueType();
|
| 34 |
+
const char* atomT = type();
|
| 35 |
+
|
| 36 |
+
bool nonPolar = true;
|
| 37 |
+
|
| 38 |
+
if (atomT[1] == 'S') nonPolar = true;
|
| 39 |
+
|
| 40 |
+
if (atomT[1] != 'C') nonPolar = false;
|
| 41 |
+
if ((atomT[2] == 'A' || atomT[2] == 'B' ) && atomT[3] == ' ') nonPolar = true;
|
| 42 |
+
if ( atomT[2] == 'H') nonPolar = true;
|
| 43 |
+
if ( atomT[2] == 'G') {
|
| 44 |
+
if (res == 'N') nonPolar = false;
|
| 45 |
+
nonPolar = true;
|
| 46 |
+
}
|
| 47 |
+
if ( atomT[2] == 'D') {
|
| 48 |
+
if (res == 'Q') nonPolar = false;
|
| 49 |
+
nonPolar = true;
|
| 50 |
+
}
|
| 51 |
+
if ( atomT[2] == 'E') {
|
| 52 |
+
if (res == 'H') nonPolar = false;
|
| 53 |
+
nonPolar = true;
|
| 54 |
+
}
|
| 55 |
+
if ( atomT[2] == 'Z') {
|
| 56 |
+
if (res == 'R') nonPolar = false;
|
| 57 |
+
nonPolar = true;
|
| 58 |
+
}
|
| 59 |
+
if ( atomT[2] == 'Z') {
|
| 60 |
+
if (res == 'R') nonPolar = false;
|
| 61 |
+
nonPolar = true;
|
| 62 |
+
}
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
if(fabs(charge_) > 0.4 && nonPolar) {
|
| 66 |
+
//Logger::warningMessage() << "Non Polar atom " << *this << " charge = " << charge_ << endl;
|
| 67 |
+
}
|
| 68 |
+
isNonPolar_ = nonPolar;
|
| 69 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/ChemAtom.h
ADDED
|
@@ -0,0 +1,156 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CHEM_ATOM_H
|
| 2 |
+
#define CHEM_ATOM_H
|
| 3 |
+
|
| 4 |
+
#include "Atom.h"
|
| 5 |
+
|
| 6 |
+
enum HB_TYPE {DONOR = 0, ACCEPTOR = 1, HB_BOTH = 2, NONE = 3};
|
| 7 |
+
enum MOL2_TYPE {C2 = 0, C3 =1 , Car = 2, Ccat = 3, N2 = 4, N4 = 5, Nam = 6,
|
| 8 |
+
Nar = 7, Npl3 = 8, O2 = 9, O3 = 10, Oco2 = 11, P3 = 12, S3 = 13, UNK_MOL2_TYPE = 14 };
|
| 9 |
+
|
| 10 |
+
/*
|
| 11 |
+
CLASS
|
| 12 |
+
ChemAtom
|
| 13 |
+
|
| 14 |
+
This is a class that addes additional atrributes to Atom
|
| 15 |
+
|
| 16 |
+
KEYWORD
|
| 17 |
+
ChemAtom, radius, charge, type, ASA, solvation
|
| 18 |
+
|
| 19 |
+
AUTHORS
|
| 20 |
+
Dina Schneidman (duhovka@tau.ac.il)
|
| 21 |
+
|
| 22 |
+
copyright: GAMBA Group , Tel-Aviv Univ. Israel, 2004.
|
| 23 |
+
|
| 24 |
+
GOALS
|
| 25 |
+
ChemAtom extends Atom and has 4 additional attributes: chemical
|
| 26 |
+
type, radius, charge and probability of the atom of being steady.
|
| 27 |
+
|
| 28 |
+
CHANGES LOG
|
| 29 |
+
<UL>
|
| 30 |
+
</UL>
|
| 31 |
+
|
| 32 |
+
USAGE
|
| 33 |
+
*/
|
| 34 |
+
|
| 35 |
+
class ChemAtom : public Atom { //, public EnergyAtom {
|
| 36 |
+
public:
|
| 37 |
+
// GROUP: Constructors
|
| 38 |
+
|
| 39 |
+
//// empty atom
|
| 40 |
+
ChemAtom();
|
| 41 |
+
|
| 42 |
+
//// construction with atom data
|
| 43 |
+
ChemAtom(const Vector3& p, const char ch, const unsigned int aid,
|
| 44 |
+
const unsigned int resid, const char* const t, const char resTp,
|
| 45 |
+
const int chem_type=0, const float rad=1.5, const float charge=0);
|
| 46 |
+
|
| 47 |
+
ChemAtom(const std::string& PDBrec, bool cif = false);
|
| 48 |
+
|
| 49 |
+
|
| 50 |
+
// GROUP: modifiers
|
| 51 |
+
|
| 52 |
+
//// set chemical type
|
| 53 |
+
void setChemType(const int chem_type) {
|
| 54 |
+
if(chem_type <= 0 || chem_type > 18) {
|
| 55 |
+
std::cerr << "Error in ChemType for atom " << *this << std::endl;
|
| 56 |
+
} else {
|
| 57 |
+
chemType_ = chem_type;
|
| 58 |
+
}
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
//// set radius
|
| 62 |
+
void setRadius(const float r) { radius_ = r; }
|
| 63 |
+
|
| 64 |
+
//// set epsilon
|
| 65 |
+
void setEpsilon(const float e) { epsilon_ = e; }
|
| 66 |
+
|
| 67 |
+
//// set charge
|
| 68 |
+
void setCharge(const float c) { charge_ = c; }
|
| 69 |
+
|
| 70 |
+
//// set HB data
|
| 71 |
+
void setHBData(const HB_TYPE hbType, const Vector3& hbDirection);
|
| 72 |
+
|
| 73 |
+
//// set probability of being steady
|
| 74 |
+
void setSteadyProb(const float p) { steadyProb_ = p; }
|
| 75 |
+
|
| 76 |
+
//// set ASA
|
| 77 |
+
void setASA(const float ASA) { ASA_ = ASA; }
|
| 78 |
+
|
| 79 |
+
//// set atom position
|
| 80 |
+
void setPosition(const Vector3& v) { update(v); }
|
| 81 |
+
|
| 82 |
+
//// set mol2 type
|
| 83 |
+
void setMol2Type(const MOL2_TYPE t) { mol2Type_ = t; }
|
| 84 |
+
|
| 85 |
+
// GROUP: Inspectors
|
| 86 |
+
|
| 87 |
+
//// get atom chemical type for ACE computation
|
| 88 |
+
int getChemType() const {
|
| 89 |
+
if(chemType_ <= 0 || chemType_ > 18) return 0;
|
| 90 |
+
return chemType_;
|
| 91 |
+
}
|
| 92 |
+
|
| 93 |
+
//// get atom radius
|
| 94 |
+
float getRadius() const { return radius_; }
|
| 95 |
+
|
| 96 |
+
//// get epsilon value
|
| 97 |
+
float getEpsilon() const { return epsilon_; }
|
| 98 |
+
|
| 99 |
+
////
|
| 100 |
+
bool isHydrogen() const { return isH(); }
|
| 101 |
+
|
| 102 |
+
//// get atom charge
|
| 103 |
+
float getCharge() const { return charge_; }
|
| 104 |
+
|
| 105 |
+
////
|
| 106 |
+
bool isDonor() const { return (hbType_ == HB_BOTH || hbType_ == DONOR); }
|
| 107 |
+
|
| 108 |
+
////
|
| 109 |
+
bool isAcceptor() const { return (hbType_ == HB_BOTH || hbType_ == ACCEPTOR); }
|
| 110 |
+
|
| 111 |
+
//// returns direction of h-donor/acceptor, in case of undefined direction zero vector is returned
|
| 112 |
+
const Vector3& getHBDirection() const { return hbDirection_; }
|
| 113 |
+
|
| 114 |
+
//// get probability of being steady
|
| 115 |
+
float getSteadyProb() const { return steadyProb_; }
|
| 116 |
+
|
| 117 |
+
//// get ASA
|
| 118 |
+
float getASA() const { return ASA_; }
|
| 119 |
+
|
| 120 |
+
////
|
| 121 |
+
bool isNonPolar() const { return isNonPolar_; }
|
| 122 |
+
|
| 123 |
+
////
|
| 124 |
+
MOL2_TYPE getMol2Type() const { return mol2Type_; }
|
| 125 |
+
|
| 126 |
+
Vector3 position() const {return (Atom(*this)).position(); }
|
| 127 |
+
|
| 128 |
+
friend Vector3& operator*=(ChemAtom &v,const RigidTrans3 &rt) {
|
| 129 |
+
//cout << "ChemAtom *= RigidTrans3" << endl;
|
| 130 |
+
v += (rt.rotation() * v) + rt.translation() - v;
|
| 131 |
+
if (!v.hbDirection_.isZero())
|
| 132 |
+
v.hbDirection_ = rt.rotation() * v.hbDirection_;
|
| 133 |
+
return v;
|
| 134 |
+
}
|
| 135 |
+
|
| 136 |
+
|
| 137 |
+
//// maximal atom radius
|
| 138 |
+
static const float maxRadius;
|
| 139 |
+
|
| 140 |
+
|
| 141 |
+
private:
|
| 142 |
+
void setPolarity();
|
| 143 |
+
|
| 144 |
+
private:
|
| 145 |
+
int chemType_; // type required for ACE computation
|
| 146 |
+
float radius_;
|
| 147 |
+
float charge_;
|
| 148 |
+
float epsilon_; // for vdw computation
|
| 149 |
+
HB_TYPE hbType_;
|
| 150 |
+
Vector3 hbDirection_;
|
| 151 |
+
bool isNonPolar_;
|
| 152 |
+
float steadyProb_;
|
| 153 |
+
float ASA_;
|
| 154 |
+
MOL2_TYPE mol2Type_;
|
| 155 |
+
};
|
| 156 |
+
#endif /* IMP_CHEMATOM_H */
|
model/CombinatorialAssembler/libs_DockingLib/ChemLib.cc
ADDED
|
@@ -0,0 +1,121 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "ChemLib.h"
|
| 2 |
+
|
| 3 |
+
#include <boost/algorithm/string.hpp>
|
| 4 |
+
|
| 5 |
+
bool ChemEntry::isSameEntry(const std::string residueName, const std::string atomName) const {
|
| 6 |
+
if(residueName == residueName_ && atomName == atomName_)
|
| 7 |
+
return true;
|
| 8 |
+
return false;
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
ChemLib::ChemLib(const std::string libFileName) {
|
| 12 |
+
loadLibrary(libFileName);
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
void ChemLib::loadLibrary(const std::string libFileName) {
|
| 16 |
+
std::ifstream libFile(libFileName);
|
| 17 |
+
if(!libFile) {
|
| 18 |
+
std::cerr << "Can't find library file: " << libFileName << std::endl;
|
| 19 |
+
exit(1);
|
| 20 |
+
}
|
| 21 |
+
|
| 22 |
+
std::string line;
|
| 23 |
+
while (!libFile.eof()) {
|
| 24 |
+
getline(libFile, line);
|
| 25 |
+
boost::trim(line); // remove all spaces
|
| 26 |
+
// skip comments
|
| 27 |
+
if (line[0] == '#' || line[0] == '\0') continue;
|
| 28 |
+
std::vector < std::string > splitResults;
|
| 29 |
+
boost::split(splitResults, line, boost::is_any_of(" "), boost::token_compress_on);
|
| 30 |
+
for(unsigned int i=0; i<splitResults.size(); i++) boost::trim(splitResults[i]);
|
| 31 |
+
|
| 32 |
+
ChemEntry entry;
|
| 33 |
+
|
| 34 |
+
entry.residueName_ = splitResults[0];
|
| 35 |
+
entry.atomName_ = splitResults[1];
|
| 36 |
+
entry.radius_ = atof(splitResults[2].c_str());
|
| 37 |
+
entry.charge_ = atof(splitResults[3].c_str());
|
| 38 |
+
entry.chemType_ = atoi(splitResults[4].c_str());
|
| 39 |
+
libVector.push_back(entry);
|
| 40 |
+
|
| 41 |
+
}
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
const ChemEntry* ChemLib::getLibEntry(const char* residueName, const char* atomPDBType) const {
|
| 45 |
+
std::string resName(residueName);
|
| 46 |
+
std::string atomName(atomPDBType);
|
| 47 |
+
|
| 48 |
+
if(resName.length() != 3) {
|
| 49 |
+
std::cerr << "Error in resName: " << resName << " length " << resName.length() << std::endl;
|
| 50 |
+
// exit(1);
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
if(atomName.length() != 4) {
|
| 54 |
+
std::cerr << "Error in atomName: " << atomName << " length " << atomName.length() << std::endl;
|
| 55 |
+
// exit(1);
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
std::string atomTrimmedName = atomName;
|
| 59 |
+
boost::trim(atomTrimmedName);
|
| 60 |
+
|
| 61 |
+
const ChemEntry* libEntry = searchLibEntry(resName, atomTrimmedName);
|
| 62 |
+
if(libEntry == NULL) {
|
| 63 |
+
libEntry = searchLibEntry("XXX", atomTrimmedName);
|
| 64 |
+
if(libEntry == NULL) {
|
| 65 |
+
switch(atomTrimmedName.length()) {
|
| 66 |
+
case 1: atomTrimmedName.append("??"); break;
|
| 67 |
+
case 2: atomTrimmedName.append("?"); break;
|
| 68 |
+
case 3: atomTrimmedName[2] = '?'; break;
|
| 69 |
+
default: atomTrimmedName = "???"; break;
|
| 70 |
+
}
|
| 71 |
+
libEntry = searchLibEntry("XXX", atomTrimmedName);
|
| 72 |
+
|
| 73 |
+
if(libEntry == NULL) {
|
| 74 |
+
atomTrimmedName[1] = '?';
|
| 75 |
+
libEntry = searchLibEntry("XXX", atomTrimmedName);
|
| 76 |
+
if(libEntry == NULL)
|
| 77 |
+
std::cerr << "Unidentified atom " << atomName << " using default values!!!" << std::endl;
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
return libEntry;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
const ChemEntry* ChemLib::searchLibEntry(const std::string residueName, const std::string atomName) const {
|
| 85 |
+
const ChemEntry* libEntry = NULL;
|
| 86 |
+
for(std::vector<ChemEntry>::const_iterator iter = libVector.begin();
|
| 87 |
+
iter != libVector.end(); iter++)
|
| 88 |
+
if((*iter).isSameEntry(residueName, atomName)) {
|
| 89 |
+
libEntry = &(*iter);
|
| 90 |
+
break;
|
| 91 |
+
}
|
| 92 |
+
return libEntry;
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
float ChemLib::getAtomRadius(const char* residueName, const char* atomPDBType) const {
|
| 96 |
+
const ChemEntry* libEntry = getLibEntry(residueName, atomPDBType);
|
| 97 |
+
if(libEntry!=NULL)
|
| 98 |
+
return libEntry->getEntryRadius();
|
| 99 |
+
return 1.5;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
float ChemLib::getAtomCharge(const char* residueName, const char* atomPDBType) const {
|
| 103 |
+
const ChemEntry* libEntry = getLibEntry(residueName, atomPDBType);
|
| 104 |
+
if(libEntry!=NULL)
|
| 105 |
+
return libEntry->getEntryCharge();
|
| 106 |
+
return 0.0;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
int ChemLib::getAtomChemType(const char* residueName, const char* atomPDBType) const {
|
| 110 |
+
const ChemEntry* libEntry = getLibEntry(residueName, atomPDBType);
|
| 111 |
+
if(libEntry!=NULL)
|
| 112 |
+
return libEntry->getEntryChemType();
|
| 113 |
+
return 0;
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
void ChemLib::printLibrary(std::ostream& outFile) const {
|
| 117 |
+
for(std::vector<ChemEntry>::const_iterator iter = libVector.begin();
|
| 118 |
+
iter != libVector.end(); iter++) {
|
| 119 |
+
outFile << *iter << std::endl;
|
| 120 |
+
}
|
| 121 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/ChemLib.h
ADDED
|
@@ -0,0 +1,127 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CHEM_LIB
|
| 2 |
+
#define CHEM_LIB
|
| 3 |
+
|
| 4 |
+
#include <vector>
|
| 5 |
+
#include <string>
|
| 6 |
+
#include <iostream>
|
| 7 |
+
#include <fstream>
|
| 8 |
+
|
| 9 |
+
/*
|
| 10 |
+
CLASS
|
| 11 |
+
ChemEntry
|
| 12 |
+
|
| 13 |
+
This is a class that keeps protein atom attributes: type, radius and charge
|
| 14 |
+
|
| 15 |
+
KEYWORD
|
| 16 |
+
ChemEntry, ChemAtom radius, charge, type
|
| 17 |
+
|
| 18 |
+
AUTHORS
|
| 19 |
+
Dina Schneidman (duhovka@tau.ac.il)
|
| 20 |
+
|
| 21 |
+
copyright: GAMBA Group , Tel-Aviv Univ. Israel, 2004.
|
| 22 |
+
|
| 23 |
+
GOALS
|
| 24 |
+
ChemEntry keeps atom attribures that are not given in PDB file.
|
| 25 |
+
|
| 26 |
+
CHANGES LOG
|
| 27 |
+
<UL>
|
| 28 |
+
</UL>
|
| 29 |
+
|
| 30 |
+
USAGE
|
| 31 |
+
*/
|
| 32 |
+
class ChemEntry {
|
| 33 |
+
public:
|
| 34 |
+
// GROUP: Inspectors
|
| 35 |
+
////
|
| 36 |
+
bool isSameEntry(const std::string residueName, const std::string atomName) const;
|
| 37 |
+
|
| 38 |
+
//// returns radius
|
| 39 |
+
float getEntryRadius() const { return radius_; }
|
| 40 |
+
|
| 41 |
+
//// returns charge
|
| 42 |
+
float getEntryCharge() const { return charge_; }
|
| 43 |
+
|
| 44 |
+
//// returns atom type
|
| 45 |
+
int getEntryChemType() const { return chemType_; }
|
| 46 |
+
|
| 47 |
+
//// read entry
|
| 48 |
+
friend std::istream& operator>>(std::istream& s, ChemEntry &entry) {
|
| 49 |
+
return s >> entry.residueName_ >> entry.atomName_ >> entry.radius_ >> entry.charge_ >> entry.chemType_;
|
| 50 |
+
}
|
| 51 |
+
|
| 52 |
+
//// output entry
|
| 53 |
+
friend std::ostream& operator<<(std::ostream& s, const ChemEntry &entry) {
|
| 54 |
+
s << entry.residueName_ << ' ' << entry.atomName_ << ' '
|
| 55 |
+
<< entry.radius_ << ' ' << entry.charge_ << ' ' << entry.chemType_;
|
| 56 |
+
return s;
|
| 57 |
+
}
|
| 58 |
+
|
| 59 |
+
public:
|
| 60 |
+
std::string residueName_;
|
| 61 |
+
std::string atomName_;
|
| 62 |
+
float radius_;
|
| 63 |
+
float charge_;
|
| 64 |
+
int chemType_;
|
| 65 |
+
};
|
| 66 |
+
|
| 67 |
+
|
| 68 |
+
/*
|
| 69 |
+
CLASS
|
| 70 |
+
ChemLib
|
| 71 |
+
|
| 72 |
+
This is a class that serves as a library for protein attributes:
|
| 73 |
+
type, radius and charge.
|
| 74 |
+
|
| 75 |
+
KEYWORD
|
| 76 |
+
ChemEntry, ChemAtom, ChemLib radius, charge, type
|
| 77 |
+
|
| 78 |
+
AUTHORS
|
| 79 |
+
Dina Schneidman (duhovka@tau.ac.il)
|
| 80 |
+
|
| 81 |
+
copyright: GAMBA Group , Tel-Aviv Univ. Israel, 2004.
|
| 82 |
+
|
| 83 |
+
GOALS
|
| 84 |
+
ChemLib keeps attribures for each of the 20 amino acids atoms. These
|
| 85 |
+
attribures are not given in PDB file.
|
| 86 |
+
|
| 87 |
+
CHANGES LOG
|
| 88 |
+
<UL>
|
| 89 |
+
</UL>
|
| 90 |
+
|
| 91 |
+
USAGE
|
| 92 |
+
The ChemLib is initialized with the special library file (mol/lib/gamb++/chem.lib).
|
| 93 |
+
|
| 94 |
+
*/
|
| 95 |
+
class ChemLib {
|
| 96 |
+
public:
|
| 97 |
+
// GROUP: Constructors
|
| 98 |
+
|
| 99 |
+
//// Init and load library
|
| 100 |
+
ChemLib(const std::string libFileName);
|
| 101 |
+
void loadLibrary(const std::string libFileName);
|
| 102 |
+
|
| 103 |
+
// GROUP: Inspectors
|
| 104 |
+
|
| 105 |
+
//// get radius
|
| 106 |
+
float getAtomRadius(const char* residueName, const char* atomPDBType) const;
|
| 107 |
+
|
| 108 |
+
//// get charge
|
| 109 |
+
float getAtomCharge(const char* residueName, const char* atomPDBType) const;
|
| 110 |
+
|
| 111 |
+
//// get chemical type
|
| 112 |
+
int getAtomChemType(const char* residueName, const char* atomPDBType) const;
|
| 113 |
+
|
| 114 |
+
//// print function
|
| 115 |
+
void printLibrary(std::ostream& outFile) const;
|
| 116 |
+
|
| 117 |
+
//// get the whole lib entry
|
| 118 |
+
const ChemEntry* getLibEntry(const char* residueName, const char* atomPDBType) const;
|
| 119 |
+
|
| 120 |
+
private:
|
| 121 |
+
const ChemEntry* searchLibEntry(const std::string residueName, const std::string atomName) const;
|
| 122 |
+
|
| 123 |
+
private:
|
| 124 |
+
std::vector<ChemEntry> libVector;
|
| 125 |
+
};
|
| 126 |
+
|
| 127 |
+
#endif
|
model/CombinatorialAssembler/libs_DockingLib/ChemMolecule.cc
ADDED
|
@@ -0,0 +1,309 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "ChemMolecule.h"
|
| 2 |
+
#include "SASurface.h"
|
| 3 |
+
|
| 4 |
+
/* ARG,LYS,GLU,GLN,ASP,
|
| 5 |
+
ASN,PRO,GLY,SER,THR,
|
| 6 |
+
HIS,ALA,ILE,LEU,VAL,
|
| 7 |
+
PHE,CYS,MET,TYR,TRP */
|
| 8 |
+
const float ChemMolecule::flexProbs[MAX_AA]={0.24, 0.38, 0.14, 0.23, 0.06,
|
| 9 |
+
0.11, 0.05, 0.05, 0.06, 0.07,
|
| 10 |
+
0.05, 0.00, 0.13, 0.13, 0.08,
|
| 11 |
+
0.015,0.02, 0.24, 0.07, 0.02,
|
| 12 |
+
0.0//OTHER
|
| 13 |
+
};
|
| 14 |
+
|
| 15 |
+
const float ChemMolecule::maxCaDist[MAX_AA]={8.0, 6.3, 5.5, 5.3, 4.2,
|
| 16 |
+
4.2, 3.0, 2.0, 3.0, 3.0,
|
| 17 |
+
5.4, 3.0, 4.5, 4.4, 3.1,
|
| 18 |
+
5.7, 3.5, 5.7, 7.0, 6.6,
|
| 19 |
+
0.0//OTHER
|
| 20 |
+
};
|
| 21 |
+
|
| 22 |
+
bool compareFragment(ChemMolecule::Fragment f1, ChemMolecule::Fragment f2) {
|
| 23 |
+
if(f1.first != f2.first) { //different chains
|
| 24 |
+
return f1.first < f2.first;
|
| 25 |
+
}
|
| 26 |
+
// same chain
|
| 27 |
+
return f1.second.first < f2.second.first;
|
| 28 |
+
}
|
| 29 |
+
|
| 30 |
+
void ChemMolecule::loadMolecule(std::istream &molFile, const ChemLib& chemLib, const PDB::Selector& selector) {
|
| 31 |
+
Molecule<ChemAtom>::readAllPDBfile(molFile, selector);
|
| 32 |
+
for(Molecule<ChemAtom>::iterator molIter = begin(); molIter != end(); molIter++) {
|
| 33 |
+
if(!molIter->isHydrogen()) {
|
| 34 |
+
const ChemEntry* entry=chemLib.getLibEntry(molIter->residueName(), molIter->type());
|
| 35 |
+
if(entry != NULL) {
|
| 36 |
+
molIter->setRadius(entry->getEntryRadius());
|
| 37 |
+
molIter->setCharge(entry->getEntryCharge());
|
| 38 |
+
molIter->setChemType(entry->getEntryChemType());
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
centroid_ = centroid();
|
| 44 |
+
setIsProtein();
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
void ChemMolecule::readAllPDBfile(std::istream &molFile, const PDB::Selector& selector) {
|
| 48 |
+
Molecule<ChemAtom>::readAllPDBfile(molFile, selector);
|
| 49 |
+
computeASAperAtom();
|
| 50 |
+
centroid_ = centroid();
|
| 51 |
+
setIsProtein();
|
| 52 |
+
}
|
| 53 |
+
|
| 54 |
+
float ChemMolecule::computeASAperAtom() {
|
| 55 |
+
SASurface sas(*this, 1.8, 10); //probe radius = 1.8, density = 10
|
| 56 |
+
float asa = sas.computeASAForAtoms();
|
| 57 |
+
Logger::infoMessage() << "ASA of the molecule = " << asa << std::endl;
|
| 58 |
+
return asa;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
void ChemMolecule::computeSteadyProbs() {
|
| 62 |
+
Vector3 caAtom;
|
| 63 |
+
for(Molecule<ChemAtom>::iterator molIter = begin(); molIter != end(); molIter++) {
|
| 64 |
+
RESIDUE_INDEX resIndex = RESIDUE_INDEX(*molIter);
|
| 65 |
+
if(molIter->isBackbone()) {
|
| 66 |
+
// glycine backbone can be flexible, since it has no side-chain
|
| 67 |
+
if(resIndex == GLY)
|
| 68 |
+
molIter->setSteadyProb(1-flexProbs[resIndex]);
|
| 69 |
+
else {
|
| 70 |
+
molIter->setSteadyProb(1-flexProbs[OTHER]);
|
| 71 |
+
if(molIter->isCA())
|
| 72 |
+
caAtom = molIter->position();
|
| 73 |
+
}
|
| 74 |
+
} else {
|
| 75 |
+
float distanceFromCa = caAtom.dist(molIter->position());
|
| 76 |
+
float normFactor= distanceFromCa/maxCaDist[resIndex];
|
| 77 |
+
molIter->setSteadyProb(1-flexProbs[resIndex]*normFactor);
|
| 78 |
+
}
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
void ChemMolecule::setIsProtein() {
|
| 83 |
+
for(Molecule<ChemAtom>::iterator molIter = begin(); molIter != end(); molIter++) {
|
| 84 |
+
if(molIter->isCA()) {
|
| 85 |
+
isProtein_ = true;
|
| 86 |
+
return;
|
| 87 |
+
}
|
| 88 |
+
}
|
| 89 |
+
isProtein_ = false;
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
unsigned int ChemMolecule::readBindingSite(const std::string fileName) {
|
| 93 |
+
bindingSites_.push_back(std::set<unsigned int>());
|
| 94 |
+
return readSiteFile(fileName, bindingSites_.back());
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
unsigned int ChemMolecule::readBlockingSite(const std::string fileName) {
|
| 98 |
+
blockingSites_.push_back(std::set<unsigned int>());
|
| 99 |
+
return readSiteFile(fileName, blockingSites_.back());
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
unsigned int ChemMolecule::readSiteFile(const std::string fileName, std::set<unsigned int>& site) {
|
| 103 |
+
std::ifstream file(fileName.c_str());
|
| 104 |
+
if(!file) {
|
| 105 |
+
std::cerr << "Can't open file " << fileName << std::endl;
|
| 106 |
+
Logger::errorMessage() << "Can't open file " << fileName << std::endl;
|
| 107 |
+
exit(1);
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
char chainId;
|
| 111 |
+
std::string residueSequenceID;
|
| 112 |
+
|
| 113 |
+
while(!file.eof()) {
|
| 114 |
+
std::string line;
|
| 115 |
+
getline(file, line);
|
| 116 |
+
boost::trim(line);
|
| 117 |
+
if(line.length() == 0) continue;
|
| 118 |
+
int entry = -1;
|
| 119 |
+
|
| 120 |
+
char record[line.size()+1];
|
| 121 |
+
strcpy(record, line.c_str());
|
| 122 |
+
|
| 123 |
+
char* splittedRecord = strtok(record, " ");
|
| 124 |
+
residueSequenceID = std::string(splittedRecord);
|
| 125 |
+
|
| 126 |
+
splittedRecord = strtok (NULL, " ");
|
| 127 |
+
if(splittedRecord != NULL) {
|
| 128 |
+
chainId = splittedRecord[0];
|
| 129 |
+
} else {
|
| 130 |
+
chainId = ' ';
|
| 131 |
+
}
|
| 132 |
+
//cerr << residueSequenceID << ";" << chainId << ";" << endl;
|
| 133 |
+
entry = residueEntry(chainId, residueSequenceID);
|
| 134 |
+
|
| 135 |
+
if(entry != -1) {
|
| 136 |
+
site.insert(entry);
|
| 137 |
+
} else {
|
| 138 |
+
Logger::errorMessage() << "Invalid line in site file: " << line << std::endl;
|
| 139 |
+
std::cerr << "Invalid line in site file: " << line << std::endl;
|
| 140 |
+
exit(1);
|
| 141 |
+
}
|
| 142 |
+
}
|
| 143 |
+
|
| 144 |
+
Logger::infoMessage() << site.size() << " residues were read from site file: " << fileName << std::endl;
|
| 145 |
+
file.close();
|
| 146 |
+
return site.size();
|
| 147 |
+
}
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
const std::set<unsigned int>& ChemMolecule::getBindingSite(unsigned int siteNumber) const {
|
| 151 |
+
const static std::set<unsigned int> emptySet;
|
| 152 |
+
if(bindingSites_.size() > siteNumber) {
|
| 153 |
+
return bindingSites_[siteNumber];
|
| 154 |
+
}
|
| 155 |
+
return emptySet;
|
| 156 |
+
}
|
| 157 |
+
|
| 158 |
+
const std::set<unsigned int>& ChemMolecule::getBlockingSite(unsigned int siteNumber) const {
|
| 159 |
+
const static std::set<unsigned int> emptySet;
|
| 160 |
+
if(blockingSites_.size() > siteNumber) {
|
| 161 |
+
return blockingSites_[siteNumber];
|
| 162 |
+
}
|
| 163 |
+
return emptySet;
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
const ChemAtom& ChemMolecule::getChemAtom(int atomIndex) const {
|
| 167 |
+
for(Molecule<ChemAtom>::const_iterator molIter = begin(); molIter != end(); molIter++) {
|
| 168 |
+
if((int)molIter->atomIndex() == atomIndex) {
|
| 169 |
+
return *molIter;
|
| 170 |
+
}
|
| 171 |
+
}
|
| 172 |
+
Logger::errorMessage() << "Input Error: Can't find atom with atom index " << atomIndex << "!" << std::endl;
|
| 173 |
+
std::cerr << "Input Error: Can't find atom with atom index " << atomIndex << "!" << std::endl;
|
| 174 |
+
exit(1);
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
double ChemMolecule::getVolume() const {
|
| 178 |
+
double volume = 0.0;
|
| 179 |
+
double c = (4.0/3.0)*M_PI;
|
| 180 |
+
for(Molecule<ChemAtom>::const_iterator molIter = begin(); molIter != end(); molIter++) {
|
| 181 |
+
double r = molIter->getRadius();
|
| 182 |
+
volume += c * r * r * r;
|
| 183 |
+
}
|
| 184 |
+
return volume;
|
| 185 |
+
}
|
| 186 |
+
|
| 187 |
+
const std::vector<ChemMolecule::Fragment>& ChemMolecule::getFragments() const {
|
| 188 |
+
if(fragments_.size() == 0) {
|
| 189 |
+
ChemMolecule* nonConstThis = const_cast<ChemMolecule*>(this);
|
| 190 |
+
nonConstThis->computeFragments();
|
| 191 |
+
}
|
| 192 |
+
return fragments_;
|
| 193 |
+
}
|
| 194 |
+
|
| 195 |
+
void ChemMolecule::computeFragments() {
|
| 196 |
+
// calculate endpoints
|
| 197 |
+
char currChain;
|
| 198 |
+
int firstResIndex, prevResIndex;
|
| 199 |
+
bool currChainSet = false;
|
| 200 |
+
for(auto i = begin(); i != end(); i++) {
|
| 201 |
+
if(!i->isCA() || i->getAtomEntryType() == HETATM) continue;
|
| 202 |
+
char chain = i->chainId();
|
| 203 |
+
int resIndex = i->residueIndex();
|
| 204 |
+
//if(i->getAtomEntryType() == HETATM) continue;
|
| 205 |
+
// one more residue of the same chain - advance
|
| 206 |
+
if(currChainSet && currChain == chain &&
|
| 207 |
+
resIndex > prevResIndex) {
|
| 208 |
+
prevResIndex = resIndex;
|
| 209 |
+
} else { // new chain
|
| 210 |
+
if(currChainSet) { // save currChain
|
| 211 |
+
ResidueRange range(firstResIndex, prevResIndex);
|
| 212 |
+
Fragment fragment(std::make_pair(currChain, range));
|
| 213 |
+
fragments_.push_back(fragment);
|
| 214 |
+
}
|
| 215 |
+
// update
|
| 216 |
+
currChain = chain;
|
| 217 |
+
firstResIndex = prevResIndex = resIndex;
|
| 218 |
+
currChainSet = true;
|
| 219 |
+
}
|
| 220 |
+
}
|
| 221 |
+
// save last fragment
|
| 222 |
+
if(currChainSet) { // save currChain
|
| 223 |
+
ResidueRange range(firstResIndex, prevResIndex);
|
| 224 |
+
Fragment fragment(std::make_pair(currChain, range));
|
| 225 |
+
fragments_.push_back(fragment);
|
| 226 |
+
}
|
| 227 |
+
|
| 228 |
+
std::sort(fragments_.begin(), fragments_.end(), compareFragment);
|
| 229 |
+
|
| 230 |
+
for(int i=0; i<(int)fragments_.size(); i++) {
|
| 231 |
+
std::cout << "Fragment " << i << " chainId "
|
| 232 |
+
<< fragments_[i].first << " range "
|
| 233 |
+
<< fragments_[i].second.first << ":"
|
| 234 |
+
<< fragments_[i].second.second << std::endl;
|
| 235 |
+
}
|
| 236 |
+
}
|
| 237 |
+
|
| 238 |
+
void ChemMolecule::addMol2Type() {
|
| 239 |
+
|
| 240 |
+
|
| 241 |
+
for(auto i = begin(); i != end(); i++) {
|
| 242 |
+
const char* type = i->type();
|
| 243 |
+
char res = i->residueType();
|
| 244 |
+
i->setMol2Type(UNK_MOL2_TYPE);
|
| 245 |
+
if(i->isN()) i->setMol2Type(N2);
|
| 246 |
+
if(i->isC()) i->setMol2Type(C2);
|
| 247 |
+
if(i->isCA()) i->setMol2Type(C3);
|
| 248 |
+
if(i->isO()) i->setMol2Type(O2); // TODO: the last residue should be O.co2
|
| 249 |
+
if(i->isCB()) i->setMol2Type(C3);
|
| 250 |
+
|
| 251 |
+
// carbon
|
| 252 |
+
if(i->isCD() && (res == 'K' || res == 'P' || res == 'R')) i->setMol2Type(C3);
|
| 253 |
+
if(i->isCD() && (res == 'Q' || res == 'E' )) i->setMol2Type(C2);
|
| 254 |
+
|
| 255 |
+
if(i->isCG() && (res == 'K' || res == 'P' || res == 'R' || res == 'M' || res == 'L' || res == 'Q' || res == 'E' )) i->setMol2Type(C3);
|
| 256 |
+
if(i->isCG() && (res == 'D' || res == 'N')) i->setMol2Type(C2);
|
| 257 |
+
if(i->isCG() && (res == 'H' || res == 'F' || res == 'W' || res == 'Y')) i->setMol2Type(Car);
|
| 258 |
+
if(i->isCZ() && (res == 'F' || res == 'Y')) i->setMol2Type(Car);
|
| 259 |
+
if(i->isCZ() && res == 'R') i->setMol2Type(Ccat);
|
| 260 |
+
if((i->isCD1() || i->isCD2()) && (res == 'F' || res == 'W' || res == 'Y' || res == 'H')) i->setMol2Type(Car);
|
| 261 |
+
if((i->isCD1() || i->isCD2()) && (res == 'L' || res == 'I')) i->setMol2Type(C3);
|
| 262 |
+
if(i->isCE() || i->isCG1() || i->isCG2()) i->setMol2Type(C3);
|
| 263 |
+
if(i->isCE1() || i->isCE2() || i->isCE3() || i->isCZ2() || i->isCZ3() || i->isCH2() ) i->setMol2Type(Car);
|
| 264 |
+
|
| 265 |
+
// for RNA
|
| 266 |
+
if (i->isSugarCarbon())
|
| 267 |
+
i->setMol2Type(C3);
|
| 268 |
+
|
| 269 |
+
// oxygen
|
| 270 |
+
if((i->isOD1() || i->isOE1()) && ((res == 'N' || res == 'Q'))) i->setMol2Type(O2);
|
| 271 |
+
if((i->isOD1() || i->isOE1()|| i->isOD2()|| i->isOE2()) && (res == 'D' || res == 'E')) i->setMol2Type(Oco2);
|
| 272 |
+
if(i->isOH() || i->isOG()|| i->isOG1()) i->setMol2Type(O3);
|
| 273 |
+
|
| 274 |
+
// for RNA
|
| 275 |
+
if (i->isSugarOxygen())
|
| 276 |
+
i->setMol2Type(O3);
|
| 277 |
+
if (i->isPhosphateOxygen())
|
| 278 |
+
i->setMol2Type(Oco2);
|
| 279 |
+
|
| 280 |
+
// nitrogen
|
| 281 |
+
if(i->isNH1() || i->isNH2() || i->isNE()) i->setMol2Type(Npl3);
|
| 282 |
+
if((i->isND2() && res == 'N') || (i->isNE2() && res == 'Q')) i->setMol2Type(Nam);
|
| 283 |
+
if(((i->isND1() || i->isNE2()) && res == 'H') || (i->isNE1() && res == 'W')) i->setMol2Type(Nar);
|
| 284 |
+
if(i->isNZ()) i->setMol2Type(N4);
|
| 285 |
+
|
| 286 |
+
// for RNA
|
| 287 |
+
if (i->isNitrogenousBaseAtom()) {
|
| 288 |
+
if (type[1] == 'N') {
|
| 289 |
+
if ((type[2] == '4' && res == 'C') || (type[2] == '6' && res == 'A') || (type[2] == '2' && res == 'G'))
|
| 290 |
+
i->setMol2Type(Npl3);
|
| 291 |
+
else
|
| 292 |
+
i->setMol2Type(Nar);
|
| 293 |
+
}
|
| 294 |
+
else if (type[1] == 'O')
|
| 295 |
+
i->setMol2Type(O2);
|
| 296 |
+
else if (type[1] == 'C')
|
| 297 |
+
i->setMol2Type(Car);
|
| 298 |
+
}
|
| 299 |
+
|
| 300 |
+
// sulfur
|
| 301 |
+
if(i->isSD() || i->isSG()) i->setMol2Type(S3);
|
| 302 |
+
|
| 303 |
+
// phosphate
|
| 304 |
+
if(i->isP()) i->setMol2Type(P3);
|
| 305 |
+
|
| 306 |
+
if(i->getMol2Type() == UNK_MOL2_TYPE)
|
| 307 |
+
std::cout << "Can't assign mol2 type:" << type[0] << type[1] << type[2] << type[3] << ":" << std::endl;
|
| 308 |
+
}
|
| 309 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/ChemMolecule.h
ADDED
|
@@ -0,0 +1,132 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CHEM_MOL_H
|
| 2 |
+
#define CHEM_MOL_H
|
| 3 |
+
|
| 4 |
+
#include "ChemAtom.h"
|
| 5 |
+
#include "ResidueIndexedMolecule.h"
|
| 6 |
+
#include "ChemLib.h"
|
| 7 |
+
#include "PDB.h"
|
| 8 |
+
#include "Logger.h"
|
| 9 |
+
#include "EnergyAtom.h"
|
| 10 |
+
|
| 11 |
+
#include <iostream>
|
| 12 |
+
#include <fstream>
|
| 13 |
+
#include <set>
|
| 14 |
+
|
| 15 |
+
/*
|
| 16 |
+
CLASS
|
| 17 |
+
ChemMolecule
|
| 18 |
+
|
| 19 |
+
This is a class that is a container of ChemAtoms
|
| 20 |
+
|
| 21 |
+
KEYWORD
|
| 22 |
+
ChemAtom, radius, charge, type
|
| 23 |
+
|
| 24 |
+
AUTHORS
|
| 25 |
+
Dina Schneidman (duhovka@tau.ac.il)
|
| 26 |
+
|
| 27 |
+
copyright: GAMBA Group , Tel-Aviv Univ. Israel, 2004.
|
| 28 |
+
|
| 29 |
+
GOALS
|
| 30 |
+
ChemMolecule is a molecule of ChemAtoms. ChemAtom extends Atom and has 4
|
| 31 |
+
additional attributes: chemical type, radius, charge and probability of
|
| 32 |
+
the atom of being steady. The type, radius and charge are taken from
|
| 33 |
+
ChemLib. This library is initiated with chem.lib file.
|
| 34 |
+
The chemical types are from:
|
| 35 |
+
Zhang,C., Cornette,J.L. and DeLisi,C. (1997) Determination of atomic
|
| 36 |
+
desolvation energies from the structures of crystallized
|
| 37 |
+
proteins. J. Mol. Biol., 267, 707 726.
|
| 38 |
+
This types are only for protein atoms!
|
| 39 |
+
The radii are taken from CHARMM, however they are slightly bigger
|
| 40 |
+
to account for missing hydrogens. The charges are from CHARMM too.
|
| 41 |
+
The probabilities of being steady were computed based on the maximal
|
| 42 |
+
distance between C-alpha and side-chain atoms of that residue. The
|
| 43 |
+
lower the distance the higher is the prob. of being steady.
|
| 44 |
+
CHANGES LOG
|
| 45 |
+
<UL>
|
| 46 |
+
</UL>
|
| 47 |
+
|
| 48 |
+
USAGE
|
| 49 |
+
ChemMolecule chemMolecule;
|
| 50 |
+
ifstream pdbFile("mol.pdb");
|
| 51 |
+
ChemLib chemLib("chem.lib");
|
| 52 |
+
chemMolecule.loadMolecule(pdbFile, chemLib);
|
| 53 |
+
*/
|
| 54 |
+
class ChemMolecule : public ResidueIndexedMolecule<ChemAtom> {
|
| 55 |
+
private:
|
| 56 |
+
static const float flexProbs[];
|
| 57 |
+
static const float maxCaDist[];
|
| 58 |
+
|
| 59 |
+
public:
|
| 60 |
+
//// load molecule from PDB file, using chemLib for attributes.
|
| 61 |
+
void loadMolecule(std::istream &molFile, const ChemLib& chemLib, const PDB::Selector& selector = PDB::WaterHydrogenUnSelector());
|
| 62 |
+
|
| 63 |
+
//// reads and assigns default values for radius, charge and chemType
|
| 64 |
+
void readAllPDBfile(std::istream &molFile, const PDB::Selector& selector = PDB::WaterHydrogenUnSelector());
|
| 65 |
+
|
| 66 |
+
//// compute probabilities of being steady
|
| 67 |
+
void computeSteadyProbs();
|
| 68 |
+
|
| 69 |
+
//// read and save binding site, returns number of residues in site
|
| 70 |
+
unsigned int readBindingSite(const std::string fileName);
|
| 71 |
+
|
| 72 |
+
//// read and save blocking site, returns number of residues in site
|
| 73 |
+
unsigned int readBlockingSite(const std::string fileName);
|
| 74 |
+
|
| 75 |
+
////
|
| 76 |
+
const std::set<unsigned int>& getBindingSite(unsigned int siteNumber = 0) const;
|
| 77 |
+
|
| 78 |
+
////
|
| 79 |
+
const std::set<unsigned int>& getBlockingSite(unsigned int siteNumber = 0) const;
|
| 80 |
+
|
| 81 |
+
////
|
| 82 |
+
const ChemAtom& getChemAtom(int atomIndex) const;
|
| 83 |
+
|
| 84 |
+
////
|
| 85 |
+
const Vector3& getCentroid() const { return centroid_; }
|
| 86 |
+
|
| 87 |
+
bool isProtein() const { return isProtein_; }
|
| 88 |
+
|
| 89 |
+
//// get the volume by summing the volume of all atoms
|
| 90 |
+
double getVolume() const;
|
| 91 |
+
|
| 92 |
+
typedef std::pair<int, int> ResidueRange;
|
| 93 |
+
typedef std::pair<char, ResidueRange> Fragment;
|
| 94 |
+
|
| 95 |
+
//// get the fragments
|
| 96 |
+
const std::vector<Fragment>& getFragments() const;
|
| 97 |
+
|
| 98 |
+
//// add mol2 atom type
|
| 99 |
+
void addMol2Type();
|
| 100 |
+
|
| 101 |
+
//// compute accessible surface area
|
| 102 |
+
float computeASAperAtom();
|
| 103 |
+
private:
|
| 104 |
+
//// read site file and return number of reasidues that were read
|
| 105 |
+
unsigned int readSiteFile(const std::string fileName, std::set<unsigned int>& site);
|
| 106 |
+
|
| 107 |
+
//// checks if the molecule is protein (if there is at least one Ca atom)
|
| 108 |
+
void setIsProtein();
|
| 109 |
+
|
| 110 |
+
//// compute fragments of the same chain
|
| 111 |
+
void computeFragments();
|
| 112 |
+
|
| 113 |
+
protected:
|
| 114 |
+
//// entries of binding site residues according to ResidueIndexedMolecule
|
| 115 |
+
std::vector<std::set<unsigned int> > bindingSites_;
|
| 116 |
+
|
| 117 |
+
//// entries of blocking site residues according to ResidueIndexedMolecule
|
| 118 |
+
std::vector<std::set<unsigned int> > blockingSites_;
|
| 119 |
+
|
| 120 |
+
////
|
| 121 |
+
Vector3 centroid_;
|
| 122 |
+
|
| 123 |
+
////
|
| 124 |
+
bool isProtein_;
|
| 125 |
+
|
| 126 |
+
//// fragments of the same chain in the molecule
|
| 127 |
+
std::vector<Fragment> fragments_;
|
| 128 |
+
};
|
| 129 |
+
|
| 130 |
+
bool compareFragment(ChemMolecule::Fragment f1, ChemMolecule::Fragment f2);
|
| 131 |
+
|
| 132 |
+
#endif
|
model/CombinatorialAssembler/libs_DockingLib/Common.cc
ADDED
|
@@ -0,0 +1,41 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "Common.h"
|
| 2 |
+
|
| 3 |
+
void Common::checkFile(const char* fileName, std::ifstream& file) {
|
| 4 |
+
if(!file) {
|
| 5 |
+
std::cerr << "Can't open file: " << fileName << std::endl;
|
| 6 |
+
Logger::errorMessage() << "Can't open file: " << fileName << std::endl;
|
| 7 |
+
exit(1);
|
| 8 |
+
}
|
| 9 |
+
}
|
| 10 |
+
|
| 11 |
+
void Common::readChemMolecule(const std::string fileName, ChemMolecule& mol, const ChemLib& protLib) {
|
| 12 |
+
std::ifstream molFile(fileName.c_str());
|
| 13 |
+
checkFile(fileName.c_str(), molFile);
|
| 14 |
+
mol.loadMolecule(molFile, protLib);
|
| 15 |
+
molFile.close();
|
| 16 |
+
Logger::infoMessage() << "Chem molecule: " << mol.size() << " atoms were read" << std::endl;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
void Common::readChemMolecule(const std::string fileName, ChemMolecule& mol) {
|
| 20 |
+
std::ifstream molFile(fileName.c_str());
|
| 21 |
+
checkFile(fileName.c_str(), molFile);
|
| 22 |
+
mol.readPDBfile(molFile, PDB::WaterHydrogenUnSelector());
|
| 23 |
+
molFile.close();
|
| 24 |
+
Logger::infoMessage() << "Chem molecule: " << mol.size() << " atoms were read" << std::endl;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
void Common::readHydrogenMolecule(const std::string fileName, Molecule<Atom>& mol) {
|
| 28 |
+
std::ifstream molFile(fileName.c_str());
|
| 29 |
+
checkFile(fileName.c_str(), molFile);
|
| 30 |
+
mol.readAllPDBfile(molFile, PDB::WaterUnSelector());
|
| 31 |
+
molFile.close();
|
| 32 |
+
Logger::infoMessage() << "Hydrogen molecule: " << mol.size() << " atoms were read" << std::endl;
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
void Common::readSurface(const std::string fileName, Surface& surface) {
|
| 36 |
+
std::ifstream surfFile(fileName.c_str());
|
| 37 |
+
checkFile(fileName.c_str(), surfFile);
|
| 38 |
+
surface.readShouFile(surfFile);
|
| 39 |
+
surfFile.close();
|
| 40 |
+
Logger::infoMessage() << "Surface: " << surface.size() << " surface points were read" << std::endl;
|
| 41 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/Common.h
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef COMMON_H
|
| 2 |
+
#define COMMON_H
|
| 3 |
+
|
| 4 |
+
#include <Surface.h>
|
| 5 |
+
#include <Logger.h>
|
| 6 |
+
|
| 7 |
+
#include "ChemMolecule.h"
|
| 8 |
+
|
| 9 |
+
#include <fstream>
|
| 10 |
+
|
| 11 |
+
class Common {
|
| 12 |
+
public:
|
| 13 |
+
|
| 14 |
+
static void checkFile(const char* fileName, std::ifstream& file);
|
| 15 |
+
static void readChemMolecule(const std::string fileName, ChemMolecule& mol, const ChemLib& protLib);
|
| 16 |
+
static void readChemMolecule(const std::string fileName, ChemMolecule& mol);
|
| 17 |
+
static void readHydrogenMolecule(const std::string fileName, Molecule<Atom>& mol);
|
| 18 |
+
static void readSurface(const std::string fileName, Surface& surface);
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
#endif //COMMON_H
|
model/CombinatorialAssembler/libs_DockingLib/CrossLink.cc
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "CrossLink.h"
|
| 2 |
+
|
| 3 |
+
#include <boost/algorithm/string.hpp>
|
| 4 |
+
|
| 5 |
+
#include <iostream>
|
| 6 |
+
|
| 7 |
+
int readCrossLinkFile(const std::string& fileName,
|
| 8 |
+
std::vector<CrossLink>& crossLinks,
|
| 9 |
+
bool addReverse) {
|
| 10 |
+
std::ifstream s(fileName);
|
| 11 |
+
if (!s) {
|
| 12 |
+
std::cerr << "Can't find cross links file " << fileName << std::endl;
|
| 13 |
+
exit(0);
|
| 14 |
+
}
|
| 15 |
+
CrossLink cl;
|
| 16 |
+
while (s >> cl) {
|
| 17 |
+
if(! cl.isInList(crossLinks)) { // check for duplicates
|
| 18 |
+
|
| 19 |
+
if(!addReverse) {
|
| 20 |
+
// check reversed for duplicates
|
| 21 |
+
CrossLink clReversed = cl.getReversed();
|
| 22 |
+
if(! clReversed.isInList(crossLinks)) {
|
| 23 |
+
crossLinks.push_back(cl);
|
| 24 |
+
}
|
| 25 |
+
} else {
|
| 26 |
+
crossLinks.push_back(cl);
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
} else {
|
| 30 |
+
// TODO: check if shorter distance restraint and replace if needed
|
| 31 |
+
std::cerr << "Duplicate cross link " << cl << std::endl;
|
| 32 |
+
}
|
| 33 |
+
|
| 34 |
+
// add reverse
|
| 35 |
+
if(addReverse) {
|
| 36 |
+
CrossLink clReversed = cl.getReversed();
|
| 37 |
+
if(! clReversed.isInList(crossLinks)) {
|
| 38 |
+
crossLinks.push_back(clReversed);
|
| 39 |
+
}
|
| 40 |
+
}
|
| 41 |
+
}
|
| 42 |
+
return crossLinks.size();
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
void writeCrossLinkFile(const std::string& fileName,
|
| 46 |
+
const std::vector<CrossLink>& crossLinks) {
|
| 47 |
+
std::ofstream ofile(fileName);
|
| 48 |
+
for (unsigned int i = 0; i < crossLinks.size(); i++) {
|
| 49 |
+
ofile << crossLinks[i];
|
| 50 |
+
ofile << std::endl;
|
| 51 |
+
}
|
| 52 |
+
ofile.close();
|
| 53 |
+
}
|
| 54 |
+
|
| 55 |
+
void writeXLAnalizerFile(const std::string& fileName,
|
| 56 |
+
const std::vector<CrossLink>& crossLinks) {
|
| 57 |
+
std::ofstream ofile(fileName);
|
| 58 |
+
ofile << "id,Protein1,Protein2,AbsPos1,AbsPos2,score" << std::endl;
|
| 59 |
+
for (unsigned int i = 0; i < crossLinks.size(); i++) {
|
| 60 |
+
ofile << i+1 << "," << crossLinks[i].getChain1() << "," << crossLinks[i].getChain2() << ","
|
| 61 |
+
<< crossLinks[i].getResidue1() << "," << crossLinks[i].getResidue2()
|
| 62 |
+
<< ",100" << std::endl;
|
| 63 |
+
ofile << std::endl;
|
| 64 |
+
}
|
| 65 |
+
ofile.close();
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
std::ostream& operator<<(std::ostream& s, const CrossLink& cl) {
|
| 69 |
+
s << cl.residueNumber1_ << " ";
|
| 70 |
+
if (cl.chainId1_ == " ")
|
| 71 |
+
s << "-";
|
| 72 |
+
else
|
| 73 |
+
s << cl.chainId1_;
|
| 74 |
+
|
| 75 |
+
s << " " << cl.residueNumber2_ << " ";
|
| 76 |
+
if (cl.chainId2_ == " ")
|
| 77 |
+
s << "-";
|
| 78 |
+
else
|
| 79 |
+
s << cl.chainId2_;
|
| 80 |
+
s << " " << cl.minDistance_ << " " << cl.maxDistance_;
|
| 81 |
+
return s;
|
| 82 |
+
}
|
| 83 |
+
|
| 84 |
+
std::istream& operator>>(std::istream& s, CrossLink& cl) {
|
| 85 |
+
|
| 86 |
+
std::string line;
|
| 87 |
+
std::getline(s, line);
|
| 88 |
+
boost::trim(line); // remove spaces at the beginning/end of the line
|
| 89 |
+
if(line.length()==0) return s;
|
| 90 |
+
// skip comments
|
| 91 |
+
if (line[0] == '#' || line[0] == '\0' || !isdigit(line[0])) return s;
|
| 92 |
+
|
| 93 |
+
std::vector<std::string> split_results;
|
| 94 |
+
boost::split(split_results, line, boost::is_any_of("\t "),
|
| 95 |
+
boost::token_compress_on);
|
| 96 |
+
|
| 97 |
+
if (split_results.size() >= 5 && split_results.size() <= 7) {
|
| 98 |
+
cl.residueSequenceID1_ = split_results[0];
|
| 99 |
+
cl.chainId1_ = split_results[1];
|
| 100 |
+
cl.residueSequenceID2_ = split_results[2];
|
| 101 |
+
cl.chainId2_ = split_results[3];
|
| 102 |
+
cl.residueNumber1_ = std::stoi(cl.residueSequenceID1_);
|
| 103 |
+
cl.residueNumber2_ = std::stoi(cl.residueSequenceID2_);
|
| 104 |
+
cl.maxDistance_ = std::stof(split_results[4]);
|
| 105 |
+
|
| 106 |
+
if(split_results.size() >= 6) {
|
| 107 |
+
cl.minDistance_ = std::stof(split_results[4]);
|
| 108 |
+
cl.maxDistance_ = std::stof(split_results[5]);
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
if(split_results.size() == 7) {
|
| 112 |
+
cl.weight_ = std::stof(split_results[6]);
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
if (cl.chainId1_ == "-") cl.chainId1_ = " ";
|
| 117 |
+
if (cl.chainId2_ == "-") cl.chainId2_ = " ";
|
| 118 |
+
// std::cerr << cl << std::endl;
|
| 119 |
+
return s;
|
| 120 |
+
}
|
| 121 |
+
|
| 122 |
+
bool CrossLink::operator==(const CrossLink& cl) const {
|
| 123 |
+
return (residueNumber1_ == cl.residueNumber1_ && residueNumber2_ == cl.residueNumber2_ &&
|
| 124 |
+
residueSequenceID1_ == cl.residueSequenceID1_ && residueSequenceID2_ == cl.residueSequenceID2_ &&
|
| 125 |
+
chainId1_ == cl.chainId1_ && chainId2_ == cl.chainId2_);
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
bool CrossLink::isInList(const std::vector<CrossLink>& crossLinks) const {
|
| 129 |
+
for(unsigned int i = 0; i<crossLinks.size(); i++)
|
| 130 |
+
if(*this == crossLinks[i])
|
| 131 |
+
return true;
|
| 132 |
+
return false;
|
| 133 |
+
}
|
| 134 |
+
|
| 135 |
+
CrossLink CrossLink::getReversed() const {
|
| 136 |
+
CrossLink reversed(residueNumber2_, chainId2_,
|
| 137 |
+
residueNumber1_, chainId1_,
|
| 138 |
+
minDistance_, maxDistance_, weight_);
|
| 139 |
+
return reversed;
|
| 140 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/CrossLink.h
ADDED
|
@@ -0,0 +1,69 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef CROSS_LINK_H
|
| 2 |
+
#define CROSS_LINK_H
|
| 3 |
+
|
| 4 |
+
#include <fstream>
|
| 5 |
+
#include <iostream>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
class CrossLink {
|
| 9 |
+
public:
|
| 10 |
+
CrossLink()
|
| 11 |
+
: residueNumber1_(0), chainId1_(" "),
|
| 12 |
+
residueNumber2_(0), chainId2_(" "),
|
| 13 |
+
minDistance_(0.0), maxDistance_(0.0), weight_(1.0) {}
|
| 14 |
+
|
| 15 |
+
CrossLink(int residueNumber1, std::string chainId1,
|
| 16 |
+
int residueNumber2, std::string chainId2,
|
| 17 |
+
float minDistance, float maxDistance, float weight=1.0)
|
| 18 |
+
: residueNumber1_(residueNumber1), residueSequenceID1_(std::to_string(residueNumber1)), chainId1_(chainId1),
|
| 19 |
+
residueNumber2_(residueNumber2), residueSequenceID2_(std::to_string(residueNumber2)), chainId2_(chainId2),
|
| 20 |
+
minDistance_(minDistance), maxDistance_(maxDistance), weight_(weight) {}
|
| 21 |
+
|
| 22 |
+
|
| 23 |
+
int getResidue1() const { return residueNumber1_; }
|
| 24 |
+
int getResidue2() const { return residueNumber2_; }
|
| 25 |
+
|
| 26 |
+
std::string getResidueSequenceID1() const { return residueSequenceID1_; }
|
| 27 |
+
std::string getResidueSequenceID2() const { return residueSequenceID2_; }
|
| 28 |
+
|
| 29 |
+
std::string getChain1() const { return chainId1_; }
|
| 30 |
+
std::string getChain2() const { return chainId2_; }
|
| 31 |
+
|
| 32 |
+
float getMinDistance() const { return minDistance_; }
|
| 33 |
+
float getMaxDistance() const { return maxDistance_; }
|
| 34 |
+
float getWeight() const { return weight_; }
|
| 35 |
+
|
| 36 |
+
bool operator==(const CrossLink& cl) const;
|
| 37 |
+
|
| 38 |
+
bool isInList(const std::vector<CrossLink>& crossLinks) const;
|
| 39 |
+
|
| 40 |
+
CrossLink getReversed() const;
|
| 41 |
+
|
| 42 |
+
friend std::ostream& operator<<(std::ostream& q, const CrossLink& cl);
|
| 43 |
+
friend std::istream& operator>>(std::istream& s, CrossLink& cl);
|
| 44 |
+
|
| 45 |
+
protected:
|
| 46 |
+
int residueNumber1_;
|
| 47 |
+
std::string residueSequenceID1_; // to support numbering of type 99A
|
| 48 |
+
std::string chainId1_;
|
| 49 |
+
int residueNumber2_;
|
| 50 |
+
std::string residueSequenceID2_;
|
| 51 |
+
std::string chainId2_;
|
| 52 |
+
float minDistance_;
|
| 53 |
+
float maxDistance_;
|
| 54 |
+
float weight_;
|
| 55 |
+
};
|
| 56 |
+
|
| 57 |
+
|
| 58 |
+
int readCrossLinkFile(const std::string& fileName,
|
| 59 |
+
std::vector<CrossLink>& crossLinks,
|
| 60 |
+
bool addReverse = false);
|
| 61 |
+
|
| 62 |
+
|
| 63 |
+
void writeCrossLinkFile(const std::string& fileName,
|
| 64 |
+
const std::vector<CrossLink>& crossLinks);
|
| 65 |
+
|
| 66 |
+
void writeXLAnalizerFile(const std::string& fileName,
|
| 67 |
+
const std::vector<CrossLink>& crossLinks);
|
| 68 |
+
|
| 69 |
+
#endif
|
model/CombinatorialAssembler/libs_DockingLib/DistanceRestraint.cc
ADDED
|
@@ -0,0 +1,40 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "DistanceRestraint.h"
|
| 2 |
+
#include <boost/algorithm/string/trim.hpp>
|
| 3 |
+
|
| 4 |
+
float DistanceRestraint::minDistanceIndices(unsigned int& index1, unsigned int& index2) const {
|
| 5 |
+
float bestdist = std::numeric_limits<float>::max();
|
| 6 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 7 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 8 |
+
float dist = p1_[i].dist(p2_[j]);
|
| 9 |
+
if(dist < bestdist) {
|
| 10 |
+
bestdist = dist;
|
| 11 |
+
index1 = i;
|
| 12 |
+
index2 = j;
|
| 13 |
+
}
|
| 14 |
+
}
|
| 15 |
+
}
|
| 16 |
+
return bestdist;
|
| 17 |
+
}
|
| 18 |
+
|
| 19 |
+
std::string DistanceRestraint::getChimeraXPseudoBond() const {
|
| 20 |
+
unsigned int best_i = 0, best_j = 0;
|
| 21 |
+
float bestdist = minDistanceIndices(best_i, best_j);
|
| 22 |
+
|
| 23 |
+
if(p1Info_.size() == p1_.size() && p2Info_.size() == p2_.size()) {
|
| 24 |
+
// /E:157@ca /B:58@ca red
|
| 25 |
+
std::string res1 = p1Info_[best_i].first;
|
| 26 |
+
boost::algorithm::trim(res1);
|
| 27 |
+
std::string res2 = p2Info_[best_j].first;
|
| 28 |
+
boost::algorithm::trim(res2);
|
| 29 |
+
|
| 30 |
+
// skip self cross link
|
| 31 |
+
if(res1 == res2 && p1Info_[best_i].second == p2Info_[best_j].second)
|
| 32 |
+
return std::string();
|
| 33 |
+
|
| 34 |
+
std::string ret = "/" + p1Info_[best_i].second + ":" + res1 + "@ca /" +
|
| 35 |
+
p2Info_[best_j].second + ":" + res2 + "@ca";
|
| 36 |
+
if(bestdist > maxdist_) ret += " red";
|
| 37 |
+
return ret;
|
| 38 |
+
}
|
| 39 |
+
return std::string();
|
| 40 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/DistanceRestraint.h
ADDED
|
@@ -0,0 +1,189 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef DISTANCE_RESTRAINT_H
|
| 2 |
+
#define DISTANCE_RESTRAINT_H
|
| 3 |
+
|
| 4 |
+
#include <Vector3.h>
|
| 5 |
+
#include <RigidTrans3.h>
|
| 6 |
+
|
| 7 |
+
#include <vector>
|
| 8 |
+
#include <limits>
|
| 9 |
+
|
| 10 |
+
class DistanceRestraint {
|
| 11 |
+
public:
|
| 12 |
+
DistanceRestraint(const std::vector<Vector3>& p1,
|
| 13 |
+
const std::vector<Vector3>& p2,
|
| 14 |
+
float maxdist, float mindist = 0.0, float weight=1.0)
|
| 15 |
+
: p1_(p1), p2_(p2), mindist_(mindist), maxdist_(maxdist),
|
| 16 |
+
mindist2_(mindist*mindist), maxdist2_(maxdist*maxdist),
|
| 17 |
+
weight_(weight) {}
|
| 18 |
+
|
| 19 |
+
DistanceRestraint(const std::vector<Vector3>& p1,
|
| 20 |
+
const std::vector<Vector3>& p2,
|
| 21 |
+
const std::vector<std::pair<std::string, std::string>>& p1Info,
|
| 22 |
+
const std::vector<std::pair<std::string, std::string>>& p2Info,
|
| 23 |
+
float maxdist, float mindist = 0.0, float weight=1.0)
|
| 24 |
+
: DistanceRestraint(p1, p2, maxdist, mindist, weight) {
|
| 25 |
+
p1Info_ = p1Info;
|
| 26 |
+
p2Info_ = p2Info;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
DistanceRestraint(const Vector3& p1, const Vector3& p2,
|
| 30 |
+
float maxdist, float mindist = 0.0, float weight=1.0)
|
| 31 |
+
: mindist_(mindist), maxdist_(maxdist),
|
| 32 |
+
mindist2_(mindist*mindist), maxdist2_(maxdist*maxdist),
|
| 33 |
+
weight_(weight)
|
| 34 |
+
{
|
| 35 |
+
p1_.push_back(p1);
|
| 36 |
+
p2_.push_back(p2);
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
DistanceRestraint() = default;
|
| 40 |
+
|
| 41 |
+
float getWeight() const { return weight_; }
|
| 42 |
+
float getMinDistance() const { return mindist_; }
|
| 43 |
+
float getMaxDistance() const { return maxdist_; }
|
| 44 |
+
const std::vector<Vector3>& getPoints1() const { return p1_; }
|
| 45 |
+
const std::vector<Vector3>& getPoints2() const { return p2_; }
|
| 46 |
+
|
| 47 |
+
bool isViolated() const {
|
| 48 |
+
// calculate the distance and compare to mindist_ and maxdist_
|
| 49 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 50 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 51 |
+
float dist2 = p1_[i].dist2(p2_[j]);
|
| 52 |
+
if(dist2 <= maxdist2_) return false; // found one in range
|
| 53 |
+
}
|
| 54 |
+
}
|
| 55 |
+
return true;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
bool isViolated(const std::vector<RigidTrans3>& trans) const {
|
| 59 |
+
// calculate the distance and compare to mindist_ and maxdist_
|
| 60 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 61 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 62 |
+
float dist2 = p1_[i].dist2(trans[j]*p2_[j]);
|
| 63 |
+
if(dist2 <= maxdist2_) return false; // found one in range
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
return true;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
bool isViolated(const std::vector<RigidTrans3>& trans1,
|
| 70 |
+
const std::vector<RigidTrans3>& trans2) const {
|
| 71 |
+
// calculate the distance and compare to mindist_ and maxdist_
|
| 72 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 73 |
+
Vector3 transP1 = trans1[i]*p1_[i];
|
| 74 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 75 |
+
float dist2 = transP1.dist2(trans2[j]*p2_[j]);
|
| 76 |
+
if(dist2 <= maxdist2_) return false; // found one in range
|
| 77 |
+
}
|
| 78 |
+
}
|
| 79 |
+
return true;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
// backward compatability
|
| 83 |
+
bool isSatisfied() const { return !isViolated(); }
|
| 84 |
+
bool isSatisfied(const RigidTrans3& trans) const {
|
| 85 |
+
std::vector<RigidTrans3> t(p2_.size(), trans);
|
| 86 |
+
return !isViolated(t);
|
| 87 |
+
}
|
| 88 |
+
bool isSatisfied(const RigidTrans3& trans1,
|
| 89 |
+
const RigidTrans3& trans2) const {
|
| 90 |
+
std::vector<RigidTrans3> t1(p1_.size(), trans1);
|
| 91 |
+
std::vector<RigidTrans3> t2(p2_.size(), trans2);
|
| 92 |
+
return !isViolated(t1, t2);
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
//calculate violationDistance
|
| 96 |
+
float violationDistance() const {
|
| 97 |
+
float bestdist = distance();
|
| 98 |
+
if(bestdist > maxdist_) return bestdist - maxdist_;
|
| 99 |
+
return 0.0;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
float violationDistance(const std::vector<RigidTrans3>& trans) const {
|
| 103 |
+
float bestdist = distance(trans);
|
| 104 |
+
if(bestdist > maxdist_) return bestdist - maxdist_;
|
| 105 |
+
return 0.0;
|
| 106 |
+
}
|
| 107 |
+
|
| 108 |
+
float violationDistance(const std::vector<RigidTrans3>& trans1,
|
| 109 |
+
const std::vector<RigidTrans3>& trans2) const {
|
| 110 |
+
float bestdist = distance(trans1, trans2);
|
| 111 |
+
if(bestdist > maxdist_) return bestdist - maxdist_;
|
| 112 |
+
return 0.0;
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
float distance2() const {
|
| 116 |
+
float bestdist2 = std::numeric_limits<float>::max();
|
| 117 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 118 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 119 |
+
float dist2 = p1_[i].dist2(p2_[j]);
|
| 120 |
+
if(dist2 < bestdist2) bestdist2 = dist2;
|
| 121 |
+
}
|
| 122 |
+
}
|
| 123 |
+
return bestdist2;
|
| 124 |
+
}
|
| 125 |
+
|
| 126 |
+
float distance() const { return sqrt(distance2()); }
|
| 127 |
+
|
| 128 |
+
float distance2(const std::vector<RigidTrans3>& trans) const {
|
| 129 |
+
float bestdist2 = std::numeric_limits<float>::max();
|
| 130 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 131 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 132 |
+
float dist2 = p1_[i].dist2(trans[j]*p2_[j]);
|
| 133 |
+
if(dist2 < bestdist2) bestdist2 = dist2;
|
| 134 |
+
}
|
| 135 |
+
}
|
| 136 |
+
return bestdist2;
|
| 137 |
+
}
|
| 138 |
+
|
| 139 |
+
float distance(const std::vector<RigidTrans3>& trans) const {
|
| 140 |
+
return sqrt(distance2(trans));
|
| 141 |
+
}
|
| 142 |
+
|
| 143 |
+
float distance(const RigidTrans3& trans) const {
|
| 144 |
+
std::vector<RigidTrans3> t(1, trans);
|
| 145 |
+
return distance(t);
|
| 146 |
+
}
|
| 147 |
+
|
| 148 |
+
float distance2(const std::vector<RigidTrans3>& trans1,
|
| 149 |
+
const std::vector<RigidTrans3>& trans2) const {
|
| 150 |
+
float bestdist2 = std::numeric_limits<float>::max();
|
| 151 |
+
for(unsigned int i = 0; i < p1_.size(); i++) {
|
| 152 |
+
Vector3 transP1 = trans1[i]*p1_[i];
|
| 153 |
+
for(unsigned int j = 0; j < p2_.size(); j++) {
|
| 154 |
+
float dist2 = transP1.dist2(trans2[j]*p2_[j]);
|
| 155 |
+
if(dist2 < bestdist2) bestdist2 = dist2;
|
| 156 |
+
}
|
| 157 |
+
}
|
| 158 |
+
return bestdist2;
|
| 159 |
+
}
|
| 160 |
+
|
| 161 |
+
float distance(const std::vector<RigidTrans3>& trans1,
|
| 162 |
+
const std::vector<RigidTrans3>& trans2) const {
|
| 163 |
+
return sqrt(distance2(trans1, trans2));
|
| 164 |
+
}
|
| 165 |
+
|
| 166 |
+
// TODO: add trans versions
|
| 167 |
+
float minDistanceIndices(unsigned int& index1, unsigned int& index2) const;
|
| 168 |
+
|
| 169 |
+
std::string getChimeraXPseudoBond() const;
|
| 170 |
+
|
| 171 |
+
bool operator < (const DistanceRestraint& d) const { return (maxdist_ < d.maxdist_); }
|
| 172 |
+
|
| 173 |
+
friend std::ostream& operator<<(std::ostream& s, const DistanceRestraint& d) {
|
| 174 |
+
// TODO
|
| 175 |
+
return s << d.p1_[0] << ' ' << d.p2_[0] << ' ' << d.mindist_ <<' ' << d.maxdist_;
|
| 176 |
+
}
|
| 177 |
+
|
| 178 |
+
private:
|
| 179 |
+
std::vector<Vector3> p1_; // end point1, vector for ambiguity
|
| 180 |
+
std::vector<Vector3> p2_; // end point2, vector for ambiguity
|
| 181 |
+
std::vector<std::pair<std::string, std::string>> p1Info_, p2Info_; // residueSequenceID and chain for p1 and p2 endpoints
|
| 182 |
+
float mindist_; // minimal distance threshold
|
| 183 |
+
float maxdist_; // maximal distance threshold
|
| 184 |
+
float mindist2_; // minimal distance threshold (squared)
|
| 185 |
+
float maxdist2_; // maximal distance threshold (squared)
|
| 186 |
+
float weight_;
|
| 187 |
+
};
|
| 188 |
+
|
| 189 |
+
#endif /* DISTANCE_RESTRAINT_H */
|
model/CombinatorialAssembler/libs_DockingLib/DotSphere.cc
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "DotSphere.h"
|
| 2 |
+
#include <numerics.h>
|
| 3 |
+
|
| 4 |
+
int DotSphere::createSphereDots(float radius, float density) {
|
| 5 |
+
|
| 6 |
+
float num_equat = 2*pi*radius*sqrt(density);
|
| 7 |
+
float vert_count = 0.5*num_equat;
|
| 8 |
+
|
| 9 |
+
for(int i=0; i<vert_count; i++) {
|
| 10 |
+
float phi = (pi*i)/vert_count;
|
| 11 |
+
float z = cos(phi);
|
| 12 |
+
float xy = sin(phi);
|
| 13 |
+
float horz_count = xy*num_equat;
|
| 14 |
+
for(int j=0; j<horz_count-1; j++) {
|
| 15 |
+
float teta = (2*pi*j)/horz_count;
|
| 16 |
+
float x = xy*cos(teta);
|
| 17 |
+
float y = xy*sin(teta);
|
| 18 |
+
push_back(Vector3(radius*x,radius*y,radius*z));
|
| 19 |
+
}
|
| 20 |
+
}
|
| 21 |
+
return size();
|
| 22 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/DotSphere.h
ADDED
|
@@ -0,0 +1,18 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef DOT_SPHERE_H
|
| 2 |
+
#define DOT_SPHERE_H
|
| 3 |
+
|
| 4 |
+
#include <Vector3.h>
|
| 5 |
+
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
class DotSphere : public std::vector<Vector3> {
|
| 9 |
+
public:
|
| 10 |
+
// Constructors
|
| 11 |
+
DotSphere(float radius, float density) {
|
| 12 |
+
createSphereDots(radius, density);
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
int createSphereDots(float radius, float density);
|
| 16 |
+
};
|
| 17 |
+
|
| 18 |
+
#endif
|
model/CombinatorialAssembler/libs_DockingLib/EnergyAtom.h
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
|
| 2 |
+
#ifndef ENERGY_ATOM_H
|
| 3 |
+
#define ENERGY_ATOM_H
|
| 4 |
+
|
| 5 |
+
class EnergyAtom{
|
| 6 |
+
public:
|
| 7 |
+
|
| 8 |
+
virtual float getRadius() const = 0;
|
| 9 |
+
virtual float getEpsilon() const = 0;
|
| 10 |
+
virtual bool isHydrogen() const = 0;
|
| 11 |
+
virtual float getCharge() const = 0;
|
| 12 |
+
virtual bool isDonor() const = 0;
|
| 13 |
+
virtual bool isAcceptor() const = 0;
|
| 14 |
+
virtual const Vector3& getHBDirection() const = 0;
|
| 15 |
+
virtual Vector3 position() const = 0;
|
| 16 |
+
|
| 17 |
+
virtual ~EnergyAtom() {}
|
| 18 |
+
};
|
| 19 |
+
|
| 20 |
+
#endif
|
| 21 |
+
|
model/CombinatorialAssembler/libs_DockingLib/GeomScore.cc
ADDED
|
@@ -0,0 +1,423 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#include "GeomScore.h"
|
| 2 |
+
#include "Logger.h"
|
| 3 |
+
|
| 4 |
+
RangeParams::RangeParams(const std::vector<int>& wts) {
|
| 5 |
+
ranges.push_back(-3.6);
|
| 6 |
+
ranges.push_back(-2.2);
|
| 7 |
+
ranges.push_back(-1.0);
|
| 8 |
+
ranges.push_back(1.0);
|
| 9 |
+
weights.insert(weights.begin(), wts.begin(), wts.end());
|
| 10 |
+
}
|
| 11 |
+
|
| 12 |
+
//-------------------------------- GeomScore class -----------------------------
|
| 13 |
+
|
| 14 |
+
GeomScore::GeomScore(const Surface& lowLevel, MoleculeGrid* grid,
|
| 15 |
+
const std::vector<int>& wts, float penetration_thr, float ns_thr, float d, float gridMargins) :
|
| 16 |
+
grid_(grid), rangeParams(wts),
|
| 17 |
+
penetrationThr_(penetration_thr), divNsThr(1.0/ns_thr),
|
| 18 |
+
density(d), tree(lowLevel, density, gridMargins)
|
| 19 |
+
{}
|
| 20 |
+
|
| 21 |
+
GeomScore::GeomScore(const Surface& lowLevel,
|
| 22 |
+
const std::vector<int>& wts, float penetration_thr, float ns_thr, float d, float gridMargins) :
|
| 23 |
+
grid_(NULL), rangeParams(wts),
|
| 24 |
+
penetrationThr_(penetration_thr), divNsThr(1.0/ns_thr),
|
| 25 |
+
density(d), tree(lowLevel, density, gridMargins)
|
| 26 |
+
{}
|
| 27 |
+
|
| 28 |
+
GeomScore::GeomScore(MoleculeGrid* grid,
|
| 29 |
+
const std::vector<int>& wts, float penetration_thr, float ns_thr, float d, float gridMargins) :
|
| 30 |
+
grid_(grid), rangeParams(wts),
|
| 31 |
+
penetrationThr_(penetration_thr), divNsThr(1.0/ns_thr),
|
| 32 |
+
density(d)
|
| 33 |
+
{}
|
| 34 |
+
|
| 35 |
+
void GeomScore::buildTree() {
|
| 36 |
+
tree.buildTree();
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
void GeomScore::buildTree(const std::vector<bool>& as) {
|
| 40 |
+
tree.buildTree(as);
|
| 41 |
+
// countActiveSitePoints(as);
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
float GeomScore::maxPenetration(const RigidTrans3& trans) {
|
| 45 |
+
float maxPenetration=MAX_FLOAT;
|
| 46 |
+
Level& highLevel = tree.getLevel(tree.size()-1);
|
| 47 |
+
std::stack<const Node *> st;
|
| 48 |
+
for (unsigned int i=0; i< highLevel.size(); i++)
|
| 49 |
+
st.push(&highLevel[i]);
|
| 50 |
+
while (!st.empty()) {
|
| 51 |
+
const Node *node = st.top();
|
| 52 |
+
st.pop();
|
| 53 |
+
float dist = grid_->getDist(trans*(node->position()));
|
| 54 |
+
if (dist != MAX_FLOAT) {
|
| 55 |
+
if (node->getLevel() == 0) {
|
| 56 |
+
if (dist < maxPenetration)
|
| 57 |
+
maxPenetration = dist;
|
| 58 |
+
continue;
|
| 59 |
+
}
|
| 60 |
+
if (dist - node->getRadius() <= maxPenetration) {
|
| 61 |
+
const std::vector<const Node *>& lowLevelPointers = node->getChildren();
|
| 62 |
+
for (unsigned int i=0; i<lowLevelPointers.size(); i++)
|
| 63 |
+
st.push(lowLevelPointers[i]);
|
| 64 |
+
}
|
| 65 |
+
}
|
| 66 |
+
}
|
| 67 |
+
return maxPenetration;
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
bool GeomScore::isPenetrating(const RigidTrans3& trans) {
|
| 71 |
+
Level& highLevel = tree.getLevel(tree.size()-1);
|
| 72 |
+
std::stack<const Node *> st;
|
| 73 |
+
for(unsigned int i=0; i< highLevel.size(); i++) {
|
| 74 |
+
float dist = grid_->getDist(trans*(highLevel[i].position()));
|
| 75 |
+
if(dist < penetrationThr_) {
|
| 76 |
+
return true;
|
| 77 |
+
} else {
|
| 78 |
+
st.push(&highLevel[i]);
|
| 79 |
+
}
|
| 80 |
+
}
|
| 81 |
+
while(!st.empty()) {
|
| 82 |
+
const Node *node = st.top();
|
| 83 |
+
st.pop();
|
| 84 |
+
float dist = grid_->getDist(trans*(node->position()));
|
| 85 |
+
if(dist < penetrationThr_)
|
| 86 |
+
return true;
|
| 87 |
+
if(node->getLevel() != 0) {
|
| 88 |
+
// check if dist - pointRadius is more then thr
|
| 89 |
+
if(dist - node->getRadius() <= penetrationThr_) {
|
| 90 |
+
const std::vector<const Node *>& lowLevelPointers = node->getChildren();
|
| 91 |
+
for(unsigned int i=0; i< lowLevelPointers.size(); i++)
|
| 92 |
+
st.push(lowLevelPointers[i]);
|
| 93 |
+
}
|
| 94 |
+
}
|
| 95 |
+
}
|
| 96 |
+
return false;
|
| 97 |
+
}
|
| 98 |
+
|
| 99 |
+
bool GeomScore::fastIsPenetrating(const RigidTrans3& trans) {
|
| 100 |
+
Level& highLevel = tree.getLevel(tree.size()-1);
|
| 101 |
+
std::stack<const Node *> st;
|
| 102 |
+
for(unsigned int i=0; i< highLevel.size(); i++) {
|
| 103 |
+
float dist = grid_->getDist(trans*(highLevel[i].position()));
|
| 104 |
+
if(dist < penetrationThr_) {
|
| 105 |
+
return true;
|
| 106 |
+
}
|
| 107 |
+
}
|
| 108 |
+
return false;
|
| 109 |
+
}
|
| 110 |
+
|
| 111 |
+
|
| 112 |
+
void GeomScore::getInterface(const RigidTrans3& trans, float low_thr, float high_thr,
|
| 113 |
+
std::vector<const SurfacePoint*>& interface) {
|
| 114 |
+
Level& highLevel = tree.getLevel(tree.size()-1);
|
| 115 |
+
std::stack<const Node *> st;
|
| 116 |
+
for (unsigned int i=0; i< highLevel.size(); i++)
|
| 117 |
+
st.push(&highLevel[i]);
|
| 118 |
+
while (!st.empty()) {
|
| 119 |
+
const Node *node = st.top();
|
| 120 |
+
st.pop();
|
| 121 |
+
float dist = grid_->getDist(trans*(node->position()));
|
| 122 |
+
if (dist == MAX_FLOAT) continue;
|
| 123 |
+
if (node->getLevel() == 0) {
|
| 124 |
+
if (dist > low_thr && dist < high_thr)
|
| 125 |
+
interface.push_back(node->getPoint());
|
| 126 |
+
continue;
|
| 127 |
+
}
|
| 128 |
+
if (dist - node->getRadius() > low_thr && dist + node->getRadius() < high_thr) {
|
| 129 |
+
node2interface(node, interface);
|
| 130 |
+
continue;
|
| 131 |
+
}
|
| 132 |
+
const std::vector<const Node *>& lowLevelPointers = node->getChildren();
|
| 133 |
+
for (unsigned int i=0; i<lowLevelPointers.size(); i++)
|
| 134 |
+
st.push(lowLevelPointers[i]);
|
| 135 |
+
}
|
| 136 |
+
}
|
| 137 |
+
|
| 138 |
+
void GeomScore::node2interface(const Node* node, std::vector<const SurfacePoint*>& interface) {
|
| 139 |
+
std::stack<const Node *> st;
|
| 140 |
+
st.push(node);
|
| 141 |
+
while (!st.empty()) {
|
| 142 |
+
const Node *node = st.top();
|
| 143 |
+
st.pop();
|
| 144 |
+
if (node->getLevel() == 0) {
|
| 145 |
+
interface.push_back(node->getPoint());
|
| 146 |
+
continue;
|
| 147 |
+
}
|
| 148 |
+
const std::vector<const Node *>& lowLevelPointers = node->getChildren();
|
| 149 |
+
for (unsigned int i=0; i<lowLevelPointers.size(); i++)
|
| 150 |
+
st.push(lowLevelPointers[i]);
|
| 151 |
+
}
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
int GeomScore::score(const RigidTrans3& trans) {
|
| 155 |
+
std::vector<unsigned int> pointsInRanges(rangeParams.weights.size(),0);
|
| 156 |
+
scoreRanges(trans, pointsInRanges);
|
| 157 |
+
//calculate total, based on weights
|
| 158 |
+
int score=0;
|
| 159 |
+
for(unsigned int i=0; i<rangeParams.weights.size(); i++)
|
| 160 |
+
score+= (pointsInRanges[i]*rangeParams.weights[i]);
|
| 161 |
+
|
| 162 |
+
if(score <= 0)
|
| 163 |
+
return -1;
|
| 164 |
+
|
| 165 |
+
if(((float)pointsInRanges[pointsInRanges.size()-2])/score > divNsThr) {
|
| 166 |
+
return -1;
|
| 167 |
+
}
|
| 168 |
+
return score;
|
| 169 |
+
}
|
| 170 |
+
|
| 171 |
+
int GeomScore::score(const RigidTrans3& trans, const Surface& surface, float& penetration) {
|
| 172 |
+
std::vector<unsigned int> pointsInRanges(rangeParams.weights.size(),0);
|
| 173 |
+
penetration = MAX_FLOAT;
|
| 174 |
+
// count number of points
|
| 175 |
+
for(unsigned int i=0; i<surface.size(); i++) {
|
| 176 |
+
float dist = grid_->getDist(trans * (surface[i].position()));
|
| 177 |
+
if(dist < penetrationThr_)
|
| 178 |
+
return -1;
|
| 179 |
+
if(dist < penetration)
|
| 180 |
+
penetration = dist;
|
| 181 |
+
unsigned int range = rangeParams.findRange(dist);
|
| 182 |
+
pointsInRanges[range]++;
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
//calculate total, based on weights
|
| 186 |
+
int score=0;
|
| 187 |
+
for(unsigned int i=0; i<rangeParams.weights.size(); i++)
|
| 188 |
+
score+= (pointsInRanges[i]*rangeParams.weights[i]);
|
| 189 |
+
|
| 190 |
+
if(score <= 0)
|
| 191 |
+
return -1;
|
| 192 |
+
|
| 193 |
+
if(((float)pointsInRanges[pointsInRanges.size()-2])/score > divNsThr) {
|
| 194 |
+
return -1;
|
| 195 |
+
}
|
| 196 |
+
return score;
|
| 197 |
+
}
|
| 198 |
+
|
| 199 |
+
int GeomScore::score(const RigidTrans3& trans, float& asRatio, int& asScore) {
|
| 200 |
+
std::vector<unsigned int> pointsInRanges(rangeParams.weights.size(),0);
|
| 201 |
+
std::vector<unsigned int> asInRanges(rangeParams.weights.size(),0);
|
| 202 |
+
scoreRanges(trans, pointsInRanges, asInRanges);
|
| 203 |
+
//calculate total, based on weights
|
| 204 |
+
int score=0;
|
| 205 |
+
int interfaceCount = 0;
|
| 206 |
+
int asInterfaceCount = 0;
|
| 207 |
+
asScore=0;
|
| 208 |
+
for(unsigned int i=0; i<rangeParams.weights.size(); i++) {
|
| 209 |
+
score+= (pointsInRanges[i]*rangeParams.weights[i]);
|
| 210 |
+
asScore+= (asInRanges[i]*rangeParams.weights[i]);
|
| 211 |
+
if(i < rangeParams.weights.size() -1 ) {
|
| 212 |
+
interfaceCount+= pointsInRanges[i];
|
| 213 |
+
asInterfaceCount+= asInRanges[i];
|
| 214 |
+
}
|
| 215 |
+
}
|
| 216 |
+
|
| 217 |
+
if(interfaceCount == 0) {
|
| 218 |
+
asRatio = 0;
|
| 219 |
+
} else {
|
| 220 |
+
asRatio = ((float)asInterfaceCount)/interfaceCount;
|
| 221 |
+
}
|
| 222 |
+
|
| 223 |
+
if(score <= 0)
|
| 224 |
+
return -1;
|
| 225 |
+
|
| 226 |
+
if(((float)pointsInRanges[pointsInRanges.size()-2])/score > divNsThr) {
|
| 227 |
+
return -1;
|
| 228 |
+
}
|
| 229 |
+
|
| 230 |
+
return score;
|
| 231 |
+
}
|
| 232 |
+
|
| 233 |
+
void GeomScore::scoreRanges(const RigidTrans3& trans, std::vector<unsigned int>& pointsInRanges) {
|
| 234 |
+
Level& highLevel = tree.getLevel(tree.size()-1);
|
| 235 |
+
std::stack<const Node *> st;
|
| 236 |
+
for (unsigned int i=0; i< highLevel.size(); i++)
|
| 237 |
+
st.push(&highLevel[i]);
|
| 238 |
+
while (!st.empty()) {
|
| 239 |
+
const Node *node = st.top();
|
| 240 |
+
st.pop();
|
| 241 |
+
float dist = grid_->getDist(trans*(node->position()));
|
| 242 |
+
if (dist == MAX_FLOAT) { //add to last range
|
| 243 |
+
pointsInRanges[pointsInRanges.size()-1]+=node->getSubtreeSize();
|
| 244 |
+
continue;
|
| 245 |
+
}
|
| 246 |
+
unsigned int range = rangeParams.findRange(dist);
|
| 247 |
+
if (node->getLevel() == 0) {
|
| 248 |
+
pointsInRanges[range]++;
|
| 249 |
+
continue;
|
| 250 |
+
}
|
| 251 |
+
unsigned int range1 = rangeParams.findRange(dist + node->getRadius());
|
| 252 |
+
unsigned int range2 = rangeParams.findRange(dist - node->getRadius());
|
| 253 |
+
if (range == range1 && range == range2) {
|
| 254 |
+
pointsInRanges[range] += node->getSubtreeSize();
|
| 255 |
+
continue;
|
| 256 |
+
}
|
| 257 |
+
const std::vector<const Node *>& lowLevelPointers = node->getChildren();
|
| 258 |
+
for (unsigned int i=0; i<lowLevelPointers.size(); i++)
|
| 259 |
+
st.push(lowLevelPointers[i]);
|
| 260 |
+
}
|
| 261 |
+
}
|
| 262 |
+
|
| 263 |
+
void GeomScore::scoreRanges(const RigidTrans3& trans, std::vector<unsigned int>& pointsInRanges,
|
| 264 |
+
std::vector<unsigned int>& asInRanges) {
|
| 265 |
+
Level& highLevel = tree.getLevel(tree.size()-1);
|
| 266 |
+
std::stack<const Node *> st;
|
| 267 |
+
for (unsigned int i=0; i< highLevel.size(); i++)
|
| 268 |
+
st.push(&highLevel[i]);
|
| 269 |
+
while (!st.empty()) {
|
| 270 |
+
const Node *node = st.top();
|
| 271 |
+
st.pop();
|
| 272 |
+
Vector3 point = trans*(node->position());
|
| 273 |
+
float dist = grid_->getDist(point);
|
| 274 |
+
if (dist == MAX_FLOAT) { //add to last range
|
| 275 |
+
pointsInRanges[pointsInRanges.size()-1]+=node->getSubtreeSize();
|
| 276 |
+
asInRanges[asInRanges.size()-1]+=node->getAsNum();
|
| 277 |
+
continue;
|
| 278 |
+
}
|
| 279 |
+
unsigned int range = rangeParams.findRange(dist);
|
| 280 |
+
if (node->getLevel() == 0) {
|
| 281 |
+
pointsInRanges[range]++;
|
| 282 |
+
asInRanges[range]+=node->getAsNum();
|
| 283 |
+
continue;
|
| 284 |
+
}
|
| 285 |
+
unsigned int range1 = rangeParams.findRange(dist + node->getRadius());
|
| 286 |
+
unsigned int range2 = rangeParams.findRange(dist - node->getRadius());
|
| 287 |
+
if (range == range1 && range == range2) {
|
| 288 |
+
pointsInRanges[range]+=node->getSubtreeSize();
|
| 289 |
+
asInRanges[range]+=node->getAsNum();
|
| 290 |
+
continue;
|
| 291 |
+
}
|
| 292 |
+
const std::vector<const Node *>& lowLevelPointers = node->getChildren();
|
| 293 |
+
for (unsigned int i=0; i< lowLevelPointers.size(); i++)
|
| 294 |
+
st.push(lowLevelPointers[i]);
|
| 295 |
+
}
|
| 296 |
+
}
|
| 297 |
+
|
| 298 |
+
ScoreData GeomScore::fullScore(const RigidTrans3& trans, bool as) {
|
| 299 |
+
ScoreData scoreData;
|
| 300 |
+
std::vector<unsigned int> pointsInRanges(rangeParams.weights.size(),0);
|
| 301 |
+
if (as) {
|
| 302 |
+
std::vector<unsigned int> asInRanges(rangeParams.weights.size(),0);
|
| 303 |
+
scoreRanges(trans, pointsInRanges, asInRanges);
|
| 304 |
+
for (unsigned int i=0; i<rangeParams.weights.size()-1; i++) {
|
| 305 |
+
scoreData.score+= (pointsInRanges[i] * rangeParams.weights[i]);
|
| 306 |
+
scoreData.asScore+= (asInRanges[i] * rangeParams.weights[i]);
|
| 307 |
+
scoreData.interfaceArea+= pointsInRanges[i];
|
| 308 |
+
}
|
| 309 |
+
asInRanges.clear();
|
| 310 |
+
} else {
|
| 311 |
+
scoreRanges(trans, pointsInRanges);
|
| 312 |
+
for (unsigned int i=0; i<rangeParams.weights.size()-1; i++) {
|
| 313 |
+
scoreData.score+= (pointsInRanges[i] * rangeParams.weights[i]);
|
| 314 |
+
scoreData.interfaceArea+= pointsInRanges[i];
|
| 315 |
+
}
|
| 316 |
+
}
|
| 317 |
+
scoreData.interfaceArea/=density;
|
| 318 |
+
scoreData.maxPenetration = maxPenetration(trans);
|
| 319 |
+
pointsInRanges.clear();
|
| 320 |
+
return scoreData;
|
| 321 |
+
}
|
| 322 |
+
|
| 323 |
+
float GeomScore::computePropensity(const RigidTrans3& trans) {
|
| 324 |
+
std::vector<unsigned int> pointsInRanges(rangeParams.weights.size(),0);
|
| 325 |
+
std::vector<unsigned int> asInRanges(rangeParams.weights.size(),0);
|
| 326 |
+
scoreRanges(trans, pointsInRanges, asInRanges);
|
| 327 |
+
//calculate total, based on weights
|
| 328 |
+
int score=0;
|
| 329 |
+
int asScore=0;
|
| 330 |
+
for (unsigned int i=0; i<rangeParams.weights.size()-1; i++) {
|
| 331 |
+
score+= pointsInRanges[i];
|
| 332 |
+
asScore+= asInRanges[i];
|
| 333 |
+
}
|
| 334 |
+
float prop = ((float)asScore/score)/((float)tree.getAsPointsNumber()/tree.getLevel(0).size());
|
| 335 |
+
return prop;
|
| 336 |
+
}
|
| 337 |
+
|
| 338 |
+
int GeomScore::refineTrans(const RigidTrans3& trans, RigidTrans3& newTrans) {
|
| 339 |
+
/*
|
| 340 |
+
float Tmag = 0.1;
|
| 341 |
+
float Rmag = 0.05;
|
| 342 |
+
|
| 343 |
+
|
| 344 |
+
// compute ligand interface points
|
| 345 |
+
std::vector<const SurfacePoint*> interface;
|
| 346 |
+
getInterface(trans, -2.0, 1.5, interface); //add thr - which??
|
| 347 |
+
|
| 348 |
+
Logger::debugMessage() << "interface size: " << interface.size() << " trans " << trans << endl;
|
| 349 |
+
|
| 350 |
+
std::vector<Vector3> interfacePoints(interface.size());
|
| 351 |
+
std::vector<Vector3> virtualPoints(interface.size());
|
| 352 |
+
MyMatch matchList;
|
| 353 |
+
|
| 354 |
+
Vector3 centerOfRotation;
|
| 355 |
+
for (unsigned int i=0; i<interface.size(); i++) {
|
| 356 |
+
interfacePoints[i] = interface[i]->position();
|
| 357 |
+
centerOfRotation += interfacePoints[i];
|
| 358 |
+
matchList.add(i,i);
|
| 359 |
+
}
|
| 360 |
+
centerOfRotation /= interface.size();
|
| 361 |
+
|
| 362 |
+
RigidTrans3 bestTrans;
|
| 363 |
+
RigidTrans3 currTrans = trans;
|
| 364 |
+
int currScore=1000000;
|
| 365 |
+
int oldScore = score(trans);
|
| 366 |
+
MMonteCarlo::init(oldScore);
|
| 367 |
+
newTrans = trans;
|
| 368 |
+
int nums = 0;
|
| 369 |
+
while (nums < 1000) {
|
| 370 |
+
|
| 371 |
+
currTrans = newTrans;
|
| 372 |
+
nums++;
|
| 373 |
+
//Logger::debugMessage() << "oldScore: " << oldScore;
|
| 374 |
+
for (unsigned int i=0; i<interface.size(); i++) {
|
| 375 |
+
Vector3 point = newTrans * interfacePoints[i];
|
| 376 |
+
float dist = grid_->getDist(point);
|
| 377 |
+
virtualPoints[i] = point + dist*(interface[i]->normal());
|
| 378 |
+
if (dist == 0.00)
|
| 379 |
+
matchList.setScore(i,10.0);
|
| 380 |
+
else
|
| 381 |
+
matchList.setScore(i,1/fabs(dist));
|
| 382 |
+
}
|
| 383 |
+
matchList.calculateBestFit(virtualPoints, interfacePoints);
|
| 384 |
+
newTrans = matchList.rigidTrans();
|
| 385 |
+
//oldScore = currScore;
|
| 386 |
+
currScore = score(newTrans);
|
| 387 |
+
MMonteCarlo::MMC_acceptance mmc_accept = MMonteCarlo::step(currScore);
|
| 388 |
+
|
| 389 |
+
if (mmc_accept == MMonteCarlo::ACCEPT_LOWEST) {
|
| 390 |
+
bestTrans = newTrans;
|
| 391 |
+
}
|
| 392 |
+
|
| 393 |
+
if (mmc_accept == MMonteCarlo::REJECT) {
|
| 394 |
+
|
| 395 |
+
|
| 396 |
+
float delta_TR[6] = {0.0};
|
| 397 |
+
delta_TR[0] = MMonteCarlo::getGaussianRandomNumber() * Tmag;
|
| 398 |
+
delta_TR[1] = MMonteCarlo::getGaussianRandomNumber() * Tmag;
|
| 399 |
+
delta_TR[2] = MMonteCarlo::getGaussianRandomNumber() * Tmag;
|
| 400 |
+
delta_TR[3] = MMonteCarlo::getGaussianRandomNumber() * Rmag;
|
| 401 |
+
delta_TR[4] = MMonteCarlo::getGaussianRandomNumber() * Rmag;
|
| 402 |
+
delta_TR[5] = MMonteCarlo::getGaussianRandomNumber() * Rmag;
|
| 403 |
+
|
| 404 |
+
Vector3 rotVec(delta_TR[3],delta_TR[4],delta_TR[5]);
|
| 405 |
+
Vector3 transVec(delta_TR[0],delta_TR[1],delta_TR[2]);
|
| 406 |
+
|
| 407 |
+
RigidTrans3 delta_rt3(rotVec,transVec);
|
| 408 |
+
|
| 409 |
+
const Matrix3 &delta_mat3 = delta_rt3.rotation();
|
| 410 |
+
RigidTrans3 delta_rt3_COR(delta_mat3,centerOfRotation-delta_mat3*centerOfRotation+delta_rt3.translation());
|
| 411 |
+
newTrans = delta_rt3_COR*currTrans;
|
| 412 |
+
|
| 413 |
+
}
|
| 414 |
+
|
| 415 |
+
//Logger::debugMessage() << " RMSD: " << matchList.rmsd() << " newTrans " << newTrans << " newScore " << currScore << endl;
|
| 416 |
+
}
|
| 417 |
+
|
| 418 |
+
newTrans = bestTrans;
|
| 419 |
+
|
| 420 |
+
//Logger::debugMessage() << "oldScore: " << oldScore << " newScore " << currScore << endl;
|
| 421 |
+
return currScore;*/
|
| 422 |
+
return 0;
|
| 423 |
+
}
|
model/CombinatorialAssembler/libs_DockingLib/GeomScore.h
ADDED
|
@@ -0,0 +1,129 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef GEOM_SCORE_H
|
| 2 |
+
#define GEOM_SCORE_H
|
| 3 |
+
|
| 4 |
+
#include <stack>
|
| 5 |
+
#include <utility>
|
| 6 |
+
#include <vector>
|
| 7 |
+
|
| 8 |
+
#include <Surface.h>
|
| 9 |
+
#include <MoleculeGrid.h>
|
| 10 |
+
#include "MultiResolution.h"
|
| 11 |
+
|
| 12 |
+
#include <Match.h>
|
| 13 |
+
#include <Particle.h>
|
| 14 |
+
//#include "MMonteCarlo.h"
|
| 15 |
+
|
| 16 |
+
class MyMatch : public Match {
|
| 17 |
+
public:
|
| 18 |
+
void setScore(unsigned int pairIndex, float score) { pairs[pairIndex].score = score; }
|
| 19 |
+
};
|
| 20 |
+
|
| 21 |
+
class RangeParams {
|
| 22 |
+
public:
|
| 23 |
+
RangeParams(const std::vector<int>& wts);
|
| 24 |
+
unsigned int findRange(float dist) const {
|
| 25 |
+
for(unsigned int i=0; i< ranges.size(); i++)
|
| 26 |
+
if(dist <= ranges[i]) return i;
|
| 27 |
+
return ranges.size();
|
| 28 |
+
}
|
| 29 |
+
public:
|
| 30 |
+
std::vector<float> ranges;
|
| 31 |
+
std::vector<int> weights;
|
| 32 |
+
};
|
| 33 |
+
|
| 34 |
+
class ScoreData {
|
| 35 |
+
public:
|
| 36 |
+
ScoreData() { score=0; asScore=0; interfaceArea=0;}
|
| 37 |
+
int score;
|
| 38 |
+
int asScore;
|
| 39 |
+
float interfaceArea;
|
| 40 |
+
float maxPenetration;
|
| 41 |
+
public:
|
| 42 |
+
// int getSurfaceRange() {return pointsInRanges[3];}
|
| 43 |
+
friend std::ostream& operator<<(std::ostream& s, const ScoreData& data) {
|
| 44 |
+
s.width(5); s << data.score << "|";
|
| 45 |
+
s.width(5); s << data.asScore << "|";
|
| 46 |
+
s.width(5); s << data.maxPenetration << "|";
|
| 47 |
+
s.width(5); s << data.interfaceArea << "|";
|
| 48 |
+
return s;
|
| 49 |
+
}
|
| 50 |
+
};
|
| 51 |
+
|
| 52 |
+
class ScorePair : public std::pair<ScoreData, ScoreData> {
|
| 53 |
+
public:
|
| 54 |
+
ScorePair(ScoreData f, ScoreData s, RigidTrans3 trans) : std::pair<ScoreData, ScoreData> (f,s) {
|
| 55 |
+
trans_ = trans;
|
| 56 |
+
score_ = f.score + s.score - abs(f.score - s.score);
|
| 57 |
+
}
|
| 58 |
+
int score() const { return score_; }
|
| 59 |
+
const RigidTrans3& rigidTrans() const { return trans_; }
|
| 60 |
+
friend std::ostream& operator<<(std::ostream& s, const ScorePair& p) {
|
| 61 |
+
s << p.first << "|";
|
| 62 |
+
s << std::endl << " ";
|
| 63 |
+
s << p.second << "|";
|
| 64 |
+
return s;
|
| 65 |
+
}
|
| 66 |
+
protected:
|
| 67 |
+
RigidTrans3 trans_;
|
| 68 |
+
int score_;
|
| 69 |
+
};
|
| 70 |
+
|
| 71 |
+
class GeomScore {
|
| 72 |
+
public:
|
| 73 |
+
typedef MultiResolution<SurfacePoint>::Node Node;
|
| 74 |
+
typedef MultiResolution<SurfacePoint>::Level Level;
|
| 75 |
+
|
| 76 |
+
GeomScore(const Surface& lowLevel, MoleculeGrid* grid,
|
| 77 |
+
const std::vector<int>& wts, float penetration_thr, float ns_thr, float density=10.0, float gridMargins=7.0);
|
| 78 |
+
|
| 79 |
+
GeomScore(const Surface& lowLevel,
|
| 80 |
+
const std::vector<int>& wts, float penetration_thr, float ns_thr, float density=10.0, float gridMargins=7.0);
|
| 81 |
+
|
| 82 |
+
GeomScore(MoleculeGrid* grid,
|
| 83 |
+
const std::vector<int>& wts, float penetration_thr, float ns_thr=0.5, float density=10.0, float gridMargins=7.0);
|
| 84 |
+
|
| 85 |
+
void setGrid(const MoleculeGrid* grid) { grid_ = grid; }
|
| 86 |
+
|
| 87 |
+
void setSurface(const Surface& lowLevel) {
|
| 88 |
+
tree.setPointSet(lowLevel);
|
| 89 |
+
buildTree();
|
| 90 |
+
}
|
| 91 |
+
|
| 92 |
+
void buildTree();
|
| 93 |
+
void buildTree(const std::vector<bool>& as);
|
| 94 |
+
|
| 95 |
+
//// Penetration checks
|
| 96 |
+
float maxPenetration(const RigidTrans3& trans);
|
| 97 |
+
bool isPenetrating(const RigidTrans3& trans);
|
| 98 |
+
|
| 99 |
+
//// fast check, but can return false for penetrating trans
|
| 100 |
+
bool fastIsPenetrating(const RigidTrans3& trans);
|
| 101 |
+
|
| 102 |
+
void getInterface(const RigidTrans3& trans, float low_thr, float high_thr, std::vector<const SurfacePoint*>& interface);
|
| 103 |
+
|
| 104 |
+
//// Scoring functions
|
| 105 |
+
int score(const RigidTrans3& trans);
|
| 106 |
+
int score(const RigidTrans3& trans, float& asRatio, int& asScore);
|
| 107 |
+
int score(const RigidTrans3& trans, const Surface& surface, float& penetration);
|
| 108 |
+
ScoreData fullScore(const RigidTrans3& trans, bool as=false);
|
| 109 |
+
|
| 110 |
+
int refineTrans(const RigidTrans3& trans, RigidTrans3& newTrans);
|
| 111 |
+
|
| 112 |
+
void printTree(std::ofstream& outFile);
|
| 113 |
+
float computePropensity(const RigidTrans3& trans);
|
| 114 |
+
private:
|
| 115 |
+
void scoreRanges(const RigidTrans3& trans, std::vector<unsigned int>& pointsInRanges);
|
| 116 |
+
void scoreRanges(const RigidTrans3& trans, std::vector<unsigned int>& pointsInRanges,
|
| 117 |
+
std::vector<unsigned int>& asInRanges);
|
| 118 |
+
void node2interface(const Node* node, std::vector<const SurfacePoint*>& interface);
|
| 119 |
+
void countActiveSitePoints(const std::vector<bool>& as);
|
| 120 |
+
private:
|
| 121 |
+
const MoleculeGrid* grid_;
|
| 122 |
+
const RangeParams rangeParams;
|
| 123 |
+
float penetrationThr_;
|
| 124 |
+
float divNsThr; // 1/nsThr
|
| 125 |
+
float density;
|
| 126 |
+
MultiResolution<SurfacePoint> tree;
|
| 127 |
+
};
|
| 128 |
+
|
| 129 |
+
#endif
|
model/CombinatorialAssembler/libs_DockingLib/MolIntersection.h
ADDED
|
@@ -0,0 +1,116 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef MOL_INTERSECTION_H
|
| 2 |
+
#define MOL_INTERSECTION_H
|
| 3 |
+
|
| 4 |
+
#include <Interface.h>
|
| 5 |
+
#include <Vector3.h>
|
| 6 |
+
|
| 7 |
+
/*
|
| 8 |
+
Class for checking sphere intersections with atoms of the molecule
|
| 9 |
+
*/
|
| 10 |
+
template<class MoleculeT>
|
| 11 |
+
class MolIntersection {
|
| 12 |
+
public:
|
| 13 |
+
// GROUP: Constructors
|
| 14 |
+
MolIntersection();
|
| 15 |
+
MolIntersection(MoleculeT* mol, float probe_radius);
|
| 16 |
+
|
| 17 |
+
void setMolecule(MoleculeT* mol) { molecule = mol; }
|
| 18 |
+
|
| 19 |
+
// GROUP: neighbours related queries
|
| 20 |
+
bool isNeighbours(unsigned int atom1, unsigned int atom2) const;
|
| 21 |
+
|
| 22 |
+
const Interface::ParticleAdjacency& getNeighbours(unsigned int atom) const;
|
| 23 |
+
|
| 24 |
+
// GROUP: intersections queries
|
| 25 |
+
bool isIntersectingSpheres(const Vector3& sphereCenter1, const Vector3& sphereCenter2,
|
| 26 |
+
const float radius1, const float radius2) const;
|
| 27 |
+
|
| 28 |
+
bool isIntersecting(const Vector3& probeCenter, unsigned int atomIndex) const;
|
| 29 |
+
|
| 30 |
+
bool isIntersecting(const Vector3& probeCenter, unsigned int atomIndex1, unsigned int atomIndex2) const;
|
| 31 |
+
|
| 32 |
+
bool isIntersecting(const Vector3& probeCenter,
|
| 33 |
+
unsigned int atom1Index, unsigned int atom2Index, unsigned int atom3Index) const;
|
| 34 |
+
private:
|
| 35 |
+
void computeNeighbours();
|
| 36 |
+
|
| 37 |
+
private:
|
| 38 |
+
MoleculeT* molecule;
|
| 39 |
+
Interface neighbours;
|
| 40 |
+
float probeRadius;
|
| 41 |
+
};
|
| 42 |
+
|
| 43 |
+
template<class MoleculeT>
|
| 44 |
+
MolIntersection<MoleculeT>::MolIntersection(MoleculeT* mol, float probe_radius) :
|
| 45 |
+
molecule(mol), probeRadius(probe_radius) {
|
| 46 |
+
computeNeighbours();
|
| 47 |
+
}
|
| 48 |
+
|
| 49 |
+
template<class MoleculeT>
|
| 50 |
+
bool MolIntersection<MoleculeT>::isNeighbours(unsigned int atom1, unsigned int atom2) const {
|
| 51 |
+
if(neighbours.isAdjacent(atom1, atom2))
|
| 52 |
+
return true;
|
| 53 |
+
return false;
|
| 54 |
+
}
|
| 55 |
+
|
| 56 |
+
template<class MoleculeT>
|
| 57 |
+
const Interface::ParticleAdjacency& MolIntersection<MoleculeT>::getNeighbours(unsigned int atom) const {
|
| 58 |
+
return neighbours.adjacencies(atom);
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
template<class MoleculeT>
|
| 62 |
+
bool MolIntersection<MoleculeT>::isIntersectingSpheres(const Vector3& sphereCenter1, const Vector3& sphereCenter2,
|
| 63 |
+
const float radius1, const float radius2) const {
|
| 64 |
+
float radiusSum2 = (radius1+radius2)*(radius1+radius2);
|
| 65 |
+
float dist2 = sphereCenter1.dist2(sphereCenter2);
|
| 66 |
+
if(fabs(radiusSum2-dist2) < 0.0001)
|
| 67 |
+
return false;
|
| 68 |
+
if(radiusSum2 > dist2)
|
| 69 |
+
return true;
|
| 70 |
+
return false;
|
| 71 |
+
}
|
| 72 |
+
|
| 73 |
+
template<class MoleculeT>
|
| 74 |
+
bool MolIntersection<MoleculeT>::isIntersecting(const Vector3& probeCenter, unsigned int atomIndex) const {
|
| 75 |
+
const Interface::ParticleAdjacency& atomNeighbours = neighbours.adjacencies(atomIndex);
|
| 76 |
+
for(Interface::ParticleAdjacency::const_iterator it = atomNeighbours.begin(); it != atomNeighbours.end(); it++)
|
| 77 |
+
if(isIntersectingSpheres(probeCenter, (*molecule)(it->first), probeRadius, (*molecule)[it->first].getRadius()))
|
| 78 |
+
return true;
|
| 79 |
+
return false;
|
| 80 |
+
}
|
| 81 |
+
|
| 82 |
+
template<class MoleculeT>
|
| 83 |
+
bool MolIntersection<MoleculeT>::isIntersecting(const Vector3& probeCenter,
|
| 84 |
+
unsigned int atom1Index, unsigned int atom2Index) const {
|
| 85 |
+
std::vector<unsigned int> nUnion;
|
| 86 |
+
neighbours.neighboursUnion(neighbours.adjacencies(atom1Index), neighbours.adjacencies(atom2Index), nUnion);
|
| 87 |
+
for(std::vector<unsigned int>::iterator it=nUnion.begin(); it!=nUnion.end(); it++)
|
| 88 |
+
if(isIntersectingSpheres(probeCenter, (*molecule)(*it), probeRadius, (*molecule)[*it].getRadius()))
|
| 89 |
+
return true;
|
| 90 |
+
return false;
|
| 91 |
+
// return (isIntersecting(probeCenter, atom1Index) || isIntersecting(probeCenter, atom2Index));
|
| 92 |
+
}
|
| 93 |
+
|
| 94 |
+
template<class MoleculeT>
|
| 95 |
+
bool MolIntersection<MoleculeT>::isIntersecting(const Vector3& probeCenter, unsigned int atom1Index,
|
| 96 |
+
unsigned int atom2Index, unsigned int atom3Index) const {
|
| 97 |
+
return (isIntersecting(probeCenter, atom1Index) ||
|
| 98 |
+
isIntersecting(probeCenter, atom2Index) || isIntersecting(probeCenter, atom3Index));
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
template<class MoleculeT>
|
| 102 |
+
void MolIntersection<MoleculeT>::computeNeighbours() {
|
| 103 |
+
for(unsigned int i=0; i<molecule->size(); i++) {
|
| 104 |
+
for(unsigned int j=i+1; j<molecule->size(); j++) {
|
| 105 |
+
float radiusSum = (*molecule)[i].getRadius() + (*molecule)[j].getRadius() + 2*probeRadius;
|
| 106 |
+
float dist2 = (*molecule)(i).dist2((*molecule)(j));
|
| 107 |
+
if(dist2 < radiusSum*radiusSum) {
|
| 108 |
+
float dist = sqrt(dist2);
|
| 109 |
+
neighbours.addAdjacency(i, j, dist);
|
| 110 |
+
neighbours.addAdjacency(j, i, dist);
|
| 111 |
+
}
|
| 112 |
+
}
|
| 113 |
+
}
|
| 114 |
+
}
|
| 115 |
+
|
| 116 |
+
#endif
|
model/CombinatorialAssembler/libs_DockingLib/MultiResolution.h
ADDED
|
@@ -0,0 +1,279 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
#ifndef MULT_RES_H
|
| 2 |
+
#define MULT_RES_H
|
| 3 |
+
|
| 4 |
+
#include <Vector3.h>
|
| 5 |
+
#include <Atom.h>
|
| 6 |
+
#include <GeomHash.h>
|
| 7 |
+
#include <numerics.h>
|
| 8 |
+
|
| 9 |
+
template<class PointT>
|
| 10 |
+
class MultiResolution {
|
| 11 |
+
public:
|
| 12 |
+
|
| 13 |
+
//// TreeNode
|
| 14 |
+
class Node {
|
| 15 |
+
|
| 16 |
+
public:
|
| 17 |
+
// GROUP: Constructors
|
| 18 |
+
Node(const PointT* point, short level=0, float lowLevelRadius=0.0,
|
| 19 |
+
unsigned int subtreeSize=1, unsigned int asNum=0):
|
| 20 |
+
point_(point), level_(level), lowLevelRadius_(lowLevelRadius), subtreeSize_(subtreeSize), asNum_(asNum) {}
|
| 21 |
+
|
| 22 |
+
// GROUP: Modifiers
|
| 23 |
+
//// update asNum
|
| 24 |
+
void incrementAsNum(unsigned int num) { asNum_ += num; }
|
| 25 |
+
|
| 26 |
+
//// add children to node
|
| 27 |
+
void addChildren(const std::vector<const Node *>& children) {
|
| 28 |
+
lowLevelPointers_.insert(lowLevelPointers_.begin(), children.begin(), children.end());
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
// GROUP: Queries
|
| 32 |
+
//// return point pointer
|
| 33 |
+
const PointT* getPoint() const { return point_; }
|
| 34 |
+
|
| 35 |
+
//// return point position
|
| 36 |
+
Vector3 position() const { return point_->position(); }
|
| 37 |
+
|
| 38 |
+
//// get node level
|
| 39 |
+
short getLevel() const { return level_; }
|
| 40 |
+
|
| 41 |
+
//// get radius
|
| 42 |
+
float getRadius() const { return lowLevelRadius_; }
|
| 43 |
+
|
| 44 |
+
//// get subtree size
|
| 45 |
+
unsigned int getSubtreeSize() const { return subtreeSize_; }
|
| 46 |
+
|
| 47 |
+
//// get number of active nodes in the subtree
|
| 48 |
+
unsigned int getAsNum() const { return asNum_; }
|
| 49 |
+
|
| 50 |
+
//// get pointers to node children
|
| 51 |
+
const std::vector<const Node *>& getChildren() const { return lowLevelPointers_; }
|
| 52 |
+
|
| 53 |
+
protected:
|
| 54 |
+
// point
|
| 55 |
+
const PointT* point_;
|
| 56 |
+
// level
|
| 57 |
+
short level_;
|
| 58 |
+
// radius of lower level points
|
| 59 |
+
float lowLevelRadius_;
|
| 60 |
+
// number of subtree nodes
|
| 61 |
+
unsigned int subtreeSize_;
|
| 62 |
+
// number of active site nodes
|
| 63 |
+
unsigned int asNum_;
|
| 64 |
+
// pointers to lower level
|
| 65 |
+
std::vector<const Node *> lowLevelPointers_;
|
| 66 |
+
|
| 67 |
+
};
|
| 68 |
+
|
| 69 |
+
typedef std::vector<Node> Level;
|
| 70 |
+
|
| 71 |
+
// GROUP: Contructors
|
| 72 |
+
//// The initial bin size is computed based on density and number of tree
|
| 73 |
+
// levels is computed based on the size of the grid margins
|
| 74 |
+
MultiResolution(const std::vector<PointT>& pointSet, float density=10.0, float gridMargins=6.0);
|
| 75 |
+
MultiResolution(float density=10.0, float gridMargins=6.0);
|
| 76 |
+
|
| 77 |
+
// GROUP: Modifiers
|
| 78 |
+
void setPointSet(const std::vector<PointT>& pointSet) { pointSet_ = pointSet; }
|
| 79 |
+
void buildTree();
|
| 80 |
+
void buildTree(const std::vector<bool>& as);
|
| 81 |
+
void countActiveSitePoints(const std::vector<bool>& as);
|
| 82 |
+
|
| 83 |
+
// GROUP: Queries
|
| 84 |
+
Level& getLevel(unsigned int num) { return tree_[num]; }
|
| 85 |
+
unsigned int size() const { return tree_.size(); }
|
| 86 |
+
int getAsPointsNumber() const { return asPointsNumber_; }
|
| 87 |
+
void printTree(std::ofstream& outFile);
|
| 88 |
+
|
| 89 |
+
private:
|
| 90 |
+
void createHighLevel(const int lowLevelIndex, float radius);
|
| 91 |
+
void findMaxRadiusForPoint(const Vector3& point, const Node* currNode, float& currMaxRadius2);
|
| 92 |
+
|
| 93 |
+
private:
|
| 94 |
+
std::vector<PointT> pointSet_;
|
| 95 |
+
std::vector<Level> tree_;
|
| 96 |
+
int asPointsNumber_;
|
| 97 |
+
float binSize_;
|
| 98 |
+
};
|
| 99 |
+
|
| 100 |
+
template<class PointT>
|
| 101 |
+
MultiResolution<PointT>::MultiResolution(const std::vector<PointT>& pointSet, float density, float gridMargins) :
|
| 102 |
+
pointSet_(pointSet) {
|
| 103 |
+
unsigned int POINTS_PER_CUBE = 5;
|
| 104 |
+
binSize_ = POINTS_PER_CUBE/density;
|
| 105 |
+
Level l;
|
| 106 |
+
for(float cs=binSize_; cs <= gridMargins*2; cs*=2) { //-1
|
| 107 |
+
tree_.push_back(l);
|
| 108 |
+
}
|
| 109 |
+
// cout << "Tree size: " << tree_.size() << endl;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
template<class PointT>
|
| 113 |
+
MultiResolution<PointT>::MultiResolution(float density, float gridMargins) {
|
| 114 |
+
unsigned int POINTS_PER_CUBE = 5;
|
| 115 |
+
binSize_ = POINTS_PER_CUBE/density;
|
| 116 |
+
Level l;
|
| 117 |
+
for(float cs=binSize_; cs <= gridMargins*2; cs*=2) { //-1
|
| 118 |
+
tree_.push_back(l);
|
| 119 |
+
}
|
| 120 |
+
// cout << "Tree size: " << tree_.size() << endl;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
|
| 124 |
+
template<class PointT>
|
| 125 |
+
void MultiResolution<PointT>::createHighLevel(const int lowLevelIndex, float binSize) {
|
| 126 |
+
const Level& lowLevel = tree_[lowLevelIndex];
|
| 127 |
+
// insert to ghash
|
| 128 |
+
GeomHash<Vector3, const Node* > gHash(3, binSize);
|
| 129 |
+
for(unsigned int i=0; i< lowLevel.size(); i++)
|
| 130 |
+
gHash.insert(lowLevel[i].position(), &lowLevel[i]);
|
| 131 |
+
|
| 132 |
+
// init Level
|
| 133 |
+
short levelIndex = lowLevelIndex+1;
|
| 134 |
+
Level& highLevel = tree_[levelIndex];
|
| 135 |
+
|
| 136 |
+
// compute high resolution - iterate over each Bucket
|
| 137 |
+
typename GeomHash<Vector3, const Node*>::BucketsPointerList *bucketList = gHash.getBuckets();
|
| 138 |
+
typename GeomHash<Vector3, const Node*>::BucketsPointerList::const_iterator bIter, bEndIter = bucketList->end();
|
| 139 |
+
for(bIter = bucketList->begin(); bIter != bEndIter; bIter++) {
|
| 140 |
+
const std::vector<const Node*>& currBucket = **bIter;
|
| 141 |
+
// compute average bucket point
|
| 142 |
+
// compute subtree size
|
| 143 |
+
Vector3 average;
|
| 144 |
+
unsigned int subTreeSize=0;
|
| 145 |
+
typename std::vector<const Node*>::const_iterator currBucketIter, bucketEndIter = currBucket.end();
|
| 146 |
+
for(currBucketIter = currBucket.begin(); currBucketIter != bucketEndIter; currBucketIter++) {
|
| 147 |
+
average+= (*currBucketIter)->position();
|
| 148 |
+
subTreeSize+=(*currBucketIter)->getSubtreeSize();
|
| 149 |
+
}
|
| 150 |
+
average/=currBucket.size();
|
| 151 |
+
|
| 152 |
+
// find point closest to average
|
| 153 |
+
float minDist2 = MAX_FLOAT;
|
| 154 |
+
const Node* selectedNode=NULL;
|
| 155 |
+
for(currBucketIter = currBucket.begin(); currBucketIter != bucketEndIter; currBucketIter++) {
|
| 156 |
+
float currDist2 = average.dist2((*currBucketIter)->position());
|
| 157 |
+
if(currDist2 < minDist2) {
|
| 158 |
+
selectedNode = *currBucketIter;
|
| 159 |
+
minDist2 = currDist2;
|
| 160 |
+
}
|
| 161 |
+
}
|
| 162 |
+
|
| 163 |
+
// find radius of pts == maxDist from average
|
| 164 |
+
float maxDist2 = MIN_FLOAT;
|
| 165 |
+
for(currBucketIter = currBucket.begin(); currBucketIter != bucketEndIter; currBucketIter++)
|
| 166 |
+
findMaxRadiusForPoint(selectedNode->position(), *currBucketIter, maxDist2);
|
| 167 |
+
|
| 168 |
+
// create new node
|
| 169 |
+
Node newNode(selectedNode->getPoint(), levelIndex, sqrt(maxDist2), subTreeSize);
|
| 170 |
+
newNode.addChildren(currBucket);
|
| 171 |
+
highLevel.push_back(newNode);
|
| 172 |
+
}
|
| 173 |
+
delete bucketList;
|
| 174 |
+
// cout << ": " << highLevel.size() << " ";
|
| 175 |
+
}
|
| 176 |
+
|
| 177 |
+
template<class PointT>
|
| 178 |
+
void MultiResolution<PointT>::findMaxRadiusForPoint(const Vector3& point, const Node* currNode, float& currMaxRadius2) {
|
| 179 |
+
int levelIndex = currNode->getLevel();
|
| 180 |
+
float dist2 = currNode->position().dist2(point);
|
| 181 |
+
if(levelIndex==0) {
|
| 182 |
+
if(dist2 > currMaxRadius2)
|
| 183 |
+
currMaxRadius2=dist2;
|
| 184 |
+
return;
|
| 185 |
+
}
|
| 186 |
+
// check if distance to (point+radius)^2 < currMaxRadius2
|
| 187 |
+
float radius = currNode->getRadius();
|
| 188 |
+
float dist = sqrt(dist2);
|
| 189 |
+
if(sqr(radius+dist) < currMaxRadius2) return;
|
| 190 |
+
const std::vector<const Node*>& lowLevelPointersForPoint = currNode->getChildren();
|
| 191 |
+
typename std::vector<const Node*>::const_iterator iter, endIter=lowLevelPointersForPoint.end();
|
| 192 |
+
if(levelIndex==1) {
|
| 193 |
+
for(iter=lowLevelPointersForPoint.begin(); iter!=endIter; iter++) {
|
| 194 |
+
float dist2=point.dist2((*iter)->position());
|
| 195 |
+
if(dist2 > currMaxRadius2)
|
| 196 |
+
currMaxRadius2=dist2;
|
| 197 |
+
}
|
| 198 |
+
return;
|
| 199 |
+
}
|
| 200 |
+
if(levelIndex > 1) {
|
| 201 |
+
for(iter=lowLevelPointersForPoint.begin(); iter!=endIter; iter++) {
|
| 202 |
+
findMaxRadiusForPoint(point, *iter, currMaxRadius2);
|
| 203 |
+
}
|
| 204 |
+
return;
|
| 205 |
+
}
|
| 206 |
+
return;
|
| 207 |
+
}
|
| 208 |
+
|
| 209 |
+
template<class PointT>
|
| 210 |
+
void MultiResolution<PointT>::buildTree() {
|
| 211 |
+
// initiate lowest level
|
| 212 |
+
Level& lowLevel = tree_[0];
|
| 213 |
+
for(unsigned int i=0; i<pointSet_.size(); i++) {
|
| 214 |
+
Node node(&pointSet_[i], 0, 0, 1);
|
| 215 |
+
lowLevel.push_back(node);
|
| 216 |
+
}
|
| 217 |
+
|
| 218 |
+
// create the rest of the tree
|
| 219 |
+
// cout << "start building levels ";
|
| 220 |
+
float radius = binSize_;
|
| 221 |
+
for(unsigned int i=0; i< tree_.size()-1; i++) {
|
| 222 |
+
// cout << i+1;
|
| 223 |
+
createHighLevel(i, radius);
|
| 224 |
+
radius*=2;
|
| 225 |
+
}
|
| 226 |
+
// cout << "done " << endl;
|
| 227 |
+
}
|
| 228 |
+
|
| 229 |
+
template<class PointT>
|
| 230 |
+
void MultiResolution<PointT>::buildTree(const std::vector<bool>& as) {
|
| 231 |
+
buildTree();
|
| 232 |
+
countActiveSitePoints(as);
|
| 233 |
+
}
|
| 234 |
+
|
| 235 |
+
template<class PointT>
|
| 236 |
+
void MultiResolution<PointT>::countActiveSitePoints(const std::vector<bool>& as) {
|
| 237 |
+
Level& lowLevel = tree_[0];
|
| 238 |
+
if(as.size() != lowLevel.size()) {
|
| 239 |
+
std::cerr << "Error in active site array" << std::endl;
|
| 240 |
+
return;
|
| 241 |
+
}
|
| 242 |
+
// mark low level leaves
|
| 243 |
+
asPointsNumber_=0;
|
| 244 |
+
for(unsigned int i=0; i<lowLevel.size(); i++) {
|
| 245 |
+
lowLevel[i].incrementAsNum(as[i]);
|
| 246 |
+
if(as[i]==1) asPointsNumber_++;
|
| 247 |
+
}
|
| 248 |
+
// go up the tree and mark nodes
|
| 249 |
+
for(unsigned int levelIndex=1; levelIndex<tree_.size(); levelIndex++) {
|
| 250 |
+
Level& currLevel = tree_[levelIndex];
|
| 251 |
+
for(unsigned int nodeIndex=0; nodeIndex<currLevel.size(); nodeIndex++) {
|
| 252 |
+
Node& currNode = currLevel[nodeIndex];
|
| 253 |
+
const std::vector<const Node *>& lowLevelPointers = currNode.getChildren();
|
| 254 |
+
for(unsigned int lowLevelIndex=0; lowLevelIndex<lowLevelPointers.size(); lowLevelIndex++)
|
| 255 |
+
currNode.incrementAsNum(lowLevelPointers[lowLevelIndex]->getAsNum());
|
| 256 |
+
}
|
| 257 |
+
}
|
| 258 |
+
}
|
| 259 |
+
|
| 260 |
+
template<class PointT>
|
| 261 |
+
void MultiResolution<PointT>::printTree(std::ofstream& outFile)
|
| 262 |
+
{
|
| 263 |
+
int count=0;
|
| 264 |
+
for(unsigned int levelIndex=0; levelIndex<tree_.size(); levelIndex++) {
|
| 265 |
+
Level& currLevel = tree_[levelIndex];
|
| 266 |
+
for(unsigned int nodeIndex=0; nodeIndex<currLevel.size(); nodeIndex++) {
|
| 267 |
+
Node& currNode = currLevel[nodeIndex];
|
| 268 |
+
if(currNode.asNum_ > 0) {
|
| 269 |
+
Atom atom(currNode.position(), 'A', count++, levelIndex, "INT", 'X');
|
| 270 |
+
outFile << atom << std::endl;
|
| 271 |
+
} else {
|
| 272 |
+
Atom atom(currNode.position(), 'A', count++, levelIndex, "PRB", 'X');
|
| 273 |
+
outFile << atom << std::endl;
|
| 274 |
+
}
|
| 275 |
+
}
|
| 276 |
+
}
|
| 277 |
+
}
|
| 278 |
+
|
| 279 |
+
#endif
|