ms-contactmap 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- ms_contactmap-0.1.0/.github/workflows/docs.yml +58 -0
- ms_contactmap-0.1.0/.github/workflows/publish.yml +31 -0
- ms_contactmap-0.1.0/.gitignore +264 -0
- ms_contactmap-0.1.0/LICENSE +21 -0
- ms_contactmap-0.1.0/PKG-INFO +52 -0
- ms_contactmap-0.1.0/README.md +26 -0
- ms_contactmap-0.1.0/docs/api.md +68 -0
- ms_contactmap-0.1.0/docs/api_reference.md +37 -0
- ms_contactmap-0.1.0/docs/examples.md +43 -0
- ms_contactmap-0.1.0/docs/index.md +58 -0
- ms_contactmap-0.1.0/pyproject.toml +52 -0
- ms_contactmap-0.1.0/setup.cfg +4 -0
- ms_contactmap-0.1.0/src/ms_contactmap/__init__.py +41 -0
- ms_contactmap-0.1.0/src/ms_contactmap/__main__.py +96 -0
- ms_contactmap-0.1.0/src/ms_contactmap/chem.py +709 -0
- ms_contactmap-0.1.0/src/ms_contactmap/detect/__init__.py +14 -0
- ms_contactmap-0.1.0/src/ms_contactmap/detect/engine.py +387 -0
- ms_contactmap-0.1.0/src/ms_contactmap/detect/geometry.py +762 -0
- ms_contactmap-0.1.0/src/ms_contactmap/detect/ligand.py +358 -0
- ms_contactmap-0.1.0/src/ms_contactmap/detect/protein.py +510 -0
- ms_contactmap-0.1.0/src/ms_contactmap/detect/roles.py +122 -0
- ms_contactmap-0.1.0/src/ms_contactmap/export.py +110 -0
- ms_contactmap-0.1.0/src/ms_contactmap/fast_layout.py +602 -0
- ms_contactmap-0.1.0/src/ms_contactmap/interactions.py +274 -0
- ms_contactmap-0.1.0/src/ms_contactmap/json_io.py +277 -0
- ms_contactmap-0.1.0/src/ms_contactmap/layout.py +1574 -0
- ms_contactmap-0.1.0/src/ms_contactmap/model.py +425 -0
- ms_contactmap-0.1.0/src/ms_contactmap/render.py +1588 -0
- ms_contactmap-0.1.0/src/ms_contactmap/widget.py +863 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/PKG-INFO +52 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/SOURCES.txt +36 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/dependency_links.txt +1 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/entry_points.txt +2 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/requires.txt +5 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/scm_file_list.json +32 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/scm_version.json +8 -0
- ms_contactmap-0.1.0/src/ms_contactmap.egg-info/top_level.txt +1 -0
- ms_contactmap-0.1.0/zensical.toml +75 -0
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
name: Documentation
|
|
2
|
+
on:
|
|
3
|
+
push:
|
|
4
|
+
branches:
|
|
5
|
+
- main
|
|
6
|
+
tags:
|
|
7
|
+
- "v*"
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
concurrency:
|
|
11
|
+
group: documentation
|
|
12
|
+
cancel-in-progress: false
|
|
13
|
+
|
|
14
|
+
permissions:
|
|
15
|
+
contents: write
|
|
16
|
+
pages: write
|
|
17
|
+
id-token: write
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
deploy:
|
|
21
|
+
environment:
|
|
22
|
+
name: github-pages
|
|
23
|
+
url: ${{ steps.deployment.outputs.page_url }}
|
|
24
|
+
runs-on: ubuntu-latest
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v6
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
- uses: actions/configure-pages@v6
|
|
30
|
+
- uses: actions/setup-python@v6
|
|
31
|
+
with:
|
|
32
|
+
python-version: 3.x
|
|
33
|
+
- run: pip install zensical "mkdocstrings[python]" "mike @ git+https://github.com/squidfunk/mike.git"
|
|
34
|
+
- name: Configure Git author
|
|
35
|
+
run: |
|
|
36
|
+
git config user.name "github-actions[bot]"
|
|
37
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
38
|
+
- name: Deploy development documentation
|
|
39
|
+
if: github.ref == 'refs/heads/main'
|
|
40
|
+
run: |
|
|
41
|
+
mike deploy --push dev
|
|
42
|
+
if ! mike list latest >/dev/null 2>&1; then
|
|
43
|
+
mike set-default --push dev
|
|
44
|
+
fi
|
|
45
|
+
- name: Deploy release documentation
|
|
46
|
+
if: startsWith(github.ref, 'refs/tags/v')
|
|
47
|
+
run: |
|
|
48
|
+
mike deploy --push --update-aliases --alias-type redirect "$GITHUB_REF_NAME" latest
|
|
49
|
+
mike set-default --push latest
|
|
50
|
+
- name: Export versioned site
|
|
51
|
+
run: |
|
|
52
|
+
mkdir -p site
|
|
53
|
+
git archive gh-pages | tar -x -C site
|
|
54
|
+
- uses: actions/upload-pages-artifact@v5
|
|
55
|
+
with:
|
|
56
|
+
path: site
|
|
57
|
+
- uses: actions/deploy-pages@v5
|
|
58
|
+
id: deployment
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Publish to PyPI on a GitHub release.
|
|
2
|
+
#
|
|
3
|
+
# No secrets: the job authenticates to PyPI over OIDC (Trusted Publishing).
|
|
4
|
+
# It has to be enabled on the PyPI side *before* the first upload -- for a
|
|
5
|
+
# project that does not exist yet, that is a "pending publisher" under
|
|
6
|
+
# Your projects > Publishing, and it must name this repo, `publish.yml`
|
|
7
|
+
# and the `pypi` environment below.
|
|
8
|
+
name: publish
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
release:
|
|
12
|
+
types: [published]
|
|
13
|
+
|
|
14
|
+
jobs:
|
|
15
|
+
pypi:
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
environment: pypi
|
|
18
|
+
permissions:
|
|
19
|
+
# A permissions block sets every scope it does not name to none, so
|
|
20
|
+
# checkout needs contents spelled out or it cannot read a private repo.
|
|
21
|
+
contents: read
|
|
22
|
+
id-token: write # mint the OIDC token PyPI checks; no secret involved
|
|
23
|
+
steps:
|
|
24
|
+
- uses: actions/checkout@v7
|
|
25
|
+
with:
|
|
26
|
+
fetch-depth: 0 # setuptools-scm reads the version off the tag
|
|
27
|
+
- uses: actions/setup-python@v7
|
|
28
|
+
with:
|
|
29
|
+
python-version: "3.12"
|
|
30
|
+
- run: pipx run build
|
|
31
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
### JetBrains template
|
|
2
|
+
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio, WebStorm and Rider
|
|
3
|
+
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
|
4
|
+
|
|
5
|
+
# User-specific stuff
|
|
6
|
+
.idea/**/workspace.xml
|
|
7
|
+
.idea/**/tasks.xml
|
|
8
|
+
.idea/**/usage.statistics.xml
|
|
9
|
+
.idea/**/dictionaries
|
|
10
|
+
.idea/**/shelf
|
|
11
|
+
|
|
12
|
+
# AWS User-specific
|
|
13
|
+
.idea/**/aws.xml
|
|
14
|
+
|
|
15
|
+
# Generated files
|
|
16
|
+
.idea/**/contentModel.xml
|
|
17
|
+
|
|
18
|
+
# Sensitive or high-churn files
|
|
19
|
+
.idea/**/dataSources/
|
|
20
|
+
.idea/**/dataSources.ids
|
|
21
|
+
.idea/**/dataSources.local.xml
|
|
22
|
+
.idea/**/sqlDataSources.xml
|
|
23
|
+
.idea/**/dynamic.xml
|
|
24
|
+
.idea/**/uiDesigner.xml
|
|
25
|
+
.idea/**/dbnavigator.xml
|
|
26
|
+
|
|
27
|
+
# Gradle
|
|
28
|
+
.idea/**/gradle.xml
|
|
29
|
+
.idea/**/libraries
|
|
30
|
+
|
|
31
|
+
# Gradle and Maven with auto-import
|
|
32
|
+
# When using Gradle or Maven with auto-import, you should exclude module files,
|
|
33
|
+
# since they will be recreated, and may cause churn. Uncomment if using
|
|
34
|
+
# auto-import.
|
|
35
|
+
# .idea/artifacts
|
|
36
|
+
# .idea/compiler.xml
|
|
37
|
+
# .idea/jarRepositories.xml
|
|
38
|
+
# .idea/modules.xml
|
|
39
|
+
# .idea/*.iml
|
|
40
|
+
# .idea/modules
|
|
41
|
+
# *.iml
|
|
42
|
+
# *.ipr
|
|
43
|
+
|
|
44
|
+
# CMake
|
|
45
|
+
cmake-build-*/
|
|
46
|
+
|
|
47
|
+
# Mongo Explorer plugin
|
|
48
|
+
.idea/**/mongoSettings.xml
|
|
49
|
+
|
|
50
|
+
# File-based project format
|
|
51
|
+
*.iws
|
|
52
|
+
|
|
53
|
+
# IntelliJ
|
|
54
|
+
out/
|
|
55
|
+
|
|
56
|
+
# mpeltonen/sbt-idea plugin
|
|
57
|
+
.idea_modules/
|
|
58
|
+
|
|
59
|
+
# JIRA plugin
|
|
60
|
+
atlassian-ide-plugin.xml
|
|
61
|
+
|
|
62
|
+
# Cursive Clojure plugin
|
|
63
|
+
.idea/replstate.xml
|
|
64
|
+
|
|
65
|
+
# SonarLint plugin
|
|
66
|
+
.idea/sonarlint/
|
|
67
|
+
|
|
68
|
+
# Crashlytics plugin (for Android Studio and IntelliJ)
|
|
69
|
+
com_crashlytics_export_strings.xml
|
|
70
|
+
crashlytics.properties
|
|
71
|
+
crashlytics-build.properties
|
|
72
|
+
fabric.properties
|
|
73
|
+
|
|
74
|
+
# Editor-based Rest Client
|
|
75
|
+
.idea/httpRequests
|
|
76
|
+
|
|
77
|
+
# Android studio 3.1+ serialized cache file
|
|
78
|
+
.idea/caches/build_file_checksums.ser
|
|
79
|
+
|
|
80
|
+
### VirtualEnv template
|
|
81
|
+
# Virtualenv
|
|
82
|
+
# http://iamzed.com/2009/05/07/a-primer-on-virtualenv/
|
|
83
|
+
.Python
|
|
84
|
+
[Bb]in
|
|
85
|
+
[Ii]nclude
|
|
86
|
+
[Ll]ib
|
|
87
|
+
[Ll]ib64
|
|
88
|
+
[Ll]ocal
|
|
89
|
+
[Ss]cripts
|
|
90
|
+
pyvenv.cfg
|
|
91
|
+
.venv
|
|
92
|
+
pip-selfcheck.json
|
|
93
|
+
|
|
94
|
+
### Python template
|
|
95
|
+
# Byte-compiled / optimized / DLL files
|
|
96
|
+
__pycache__/
|
|
97
|
+
*.py[cod]
|
|
98
|
+
*$py.class
|
|
99
|
+
|
|
100
|
+
# C extensions
|
|
101
|
+
*.so
|
|
102
|
+
|
|
103
|
+
# Distribution / packaging
|
|
104
|
+
.Python
|
|
105
|
+
build/
|
|
106
|
+
develop-eggs/
|
|
107
|
+
dist/
|
|
108
|
+
downloads/
|
|
109
|
+
eggs/
|
|
110
|
+
.eggs/
|
|
111
|
+
lib/
|
|
112
|
+
lib64/
|
|
113
|
+
parts/
|
|
114
|
+
sdist/
|
|
115
|
+
var/
|
|
116
|
+
wheels/
|
|
117
|
+
share/python-wheels/
|
|
118
|
+
*.egg-info/
|
|
119
|
+
.installed.cfg
|
|
120
|
+
*.egg
|
|
121
|
+
MANIFEST
|
|
122
|
+
|
|
123
|
+
# PyInstaller
|
|
124
|
+
# Usually these files are written by a python script from a template
|
|
125
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
126
|
+
*.manifest
|
|
127
|
+
*.spec
|
|
128
|
+
|
|
129
|
+
# Installer logs
|
|
130
|
+
pip-log.txt
|
|
131
|
+
pip-delete-this-directory.txt
|
|
132
|
+
|
|
133
|
+
# Unit test / coverage reports
|
|
134
|
+
htmlcov/
|
|
135
|
+
.tox/
|
|
136
|
+
.nox/
|
|
137
|
+
.coverage
|
|
138
|
+
.coverage.*
|
|
139
|
+
.cache
|
|
140
|
+
nosetests.xml
|
|
141
|
+
coverage.xml
|
|
142
|
+
*.cover
|
|
143
|
+
*.py,cover
|
|
144
|
+
.hypothesis/
|
|
145
|
+
.pytest_cache/
|
|
146
|
+
cover/
|
|
147
|
+
|
|
148
|
+
# Translations
|
|
149
|
+
*.mo
|
|
150
|
+
*.pot
|
|
151
|
+
|
|
152
|
+
# Django stuff:
|
|
153
|
+
*.log
|
|
154
|
+
local_settings.py
|
|
155
|
+
db.sqlite3
|
|
156
|
+
db.sqlite3-journal
|
|
157
|
+
|
|
158
|
+
# Flask stuff:
|
|
159
|
+
instance/
|
|
160
|
+
.webassets-cache
|
|
161
|
+
|
|
162
|
+
# Scrapy stuff:
|
|
163
|
+
.scrapy
|
|
164
|
+
|
|
165
|
+
# Sphinx documentation
|
|
166
|
+
docs/_build/
|
|
167
|
+
|
|
168
|
+
# PyBuilder
|
|
169
|
+
.pybuilder/
|
|
170
|
+
target/
|
|
171
|
+
|
|
172
|
+
# Jupyter Notebook
|
|
173
|
+
.ipynb_checkpoints
|
|
174
|
+
|
|
175
|
+
# IPython
|
|
176
|
+
profile_default/
|
|
177
|
+
ipython_config.py
|
|
178
|
+
|
|
179
|
+
# pyenv
|
|
180
|
+
# For a library or package, you might want to ignore these files since the code is
|
|
181
|
+
# intended to run in multiple environments; otherwise, check them in:
|
|
182
|
+
# .python-version
|
|
183
|
+
|
|
184
|
+
# pipenv
|
|
185
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
186
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
187
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
188
|
+
# install all needed dependencies.
|
|
189
|
+
#Pipfile.lock
|
|
190
|
+
|
|
191
|
+
# poetry
|
|
192
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
|
193
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
|
194
|
+
# commonly ignored for libraries.
|
|
195
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
|
196
|
+
#poetry.lock
|
|
197
|
+
|
|
198
|
+
# pdm
|
|
199
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
|
200
|
+
#pdm.lock
|
|
201
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
|
202
|
+
# in version control.
|
|
203
|
+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
|
|
204
|
+
.pdm.toml
|
|
205
|
+
.pdm-python
|
|
206
|
+
.pdm-build/
|
|
207
|
+
|
|
208
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
|
209
|
+
__pypackages__/
|
|
210
|
+
|
|
211
|
+
# Celery stuff
|
|
212
|
+
celerybeat-schedule
|
|
213
|
+
celerybeat.pid
|
|
214
|
+
|
|
215
|
+
# SageMath parsed files
|
|
216
|
+
*.sage.py
|
|
217
|
+
|
|
218
|
+
# Environments
|
|
219
|
+
.env
|
|
220
|
+
.venv
|
|
221
|
+
env/
|
|
222
|
+
venv/
|
|
223
|
+
ENV/
|
|
224
|
+
env.bak/
|
|
225
|
+
venv.bak/
|
|
226
|
+
|
|
227
|
+
# Spyder project settings
|
|
228
|
+
.spyderproject
|
|
229
|
+
.spyproject
|
|
230
|
+
|
|
231
|
+
# Rope project settings
|
|
232
|
+
.ropeproject
|
|
233
|
+
|
|
234
|
+
# mkdocs documentation
|
|
235
|
+
/site
|
|
236
|
+
|
|
237
|
+
# mypy
|
|
238
|
+
.mypy_cache/
|
|
239
|
+
.dmypy.json
|
|
240
|
+
dmypy.json
|
|
241
|
+
|
|
242
|
+
# Pyre type checker
|
|
243
|
+
.pyre/
|
|
244
|
+
|
|
245
|
+
# pytype static type analyzer
|
|
246
|
+
.pytype/
|
|
247
|
+
|
|
248
|
+
# Cython debug symbols
|
|
249
|
+
cython_debug/
|
|
250
|
+
|
|
251
|
+
# PyCharm
|
|
252
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
|
253
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
|
254
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
|
255
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
|
256
|
+
#.idea/
|
|
257
|
+
|
|
258
|
+
|
|
259
|
+
# Maestro reference screenshots used only while tuning colours/layout (42 MB).
|
|
260
|
+
data/*.png
|
|
261
|
+
.idea/
|
|
262
|
+
|
|
263
|
+
# Internal planning notes, not part of the published package.
|
|
264
|
+
PLAN.md
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco, Ernesto Moreno, Pedro A. Valiente
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: ms_contactmap
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: MolSuite Interaction Profiler
|
|
5
|
+
Author: Mario S. Valdés-Tresanco, Mario E. Valdés-Tresanco, Ernesto Moreno, Pedro A. Valiente
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/MolSuite/ms_contactmap
|
|
8
|
+
Project-URL: Issues, https://github.com/MolSuite/ms_contactmap/issues
|
|
9
|
+
Keywords: protein-ligand,interactions,contact-map,molsuite,structural-biology
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Science/Research
|
|
12
|
+
Classifier: Programming Language :: Python :: 3 :: Only
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Operating System :: OS Independent
|
|
15
|
+
Classifier: Topic :: Scientific/Engineering :: Chemistry
|
|
16
|
+
Classifier: Topic :: Scientific/Engineering :: Bio-Informatics
|
|
17
|
+
Requires-Python: >=3.12
|
|
18
|
+
Description-Content-Type: text/markdown
|
|
19
|
+
License-File: LICENSE
|
|
20
|
+
Requires-Dist: PySide6>=6.10
|
|
21
|
+
Requires-Dist: rdkit>=2025.3
|
|
22
|
+
Requires-Dist: numpy>=2.0
|
|
23
|
+
Requires-Dist: scipy>=1.15
|
|
24
|
+
Requires-Dist: biopython>=1.86
|
|
25
|
+
Dynamic: license-file
|
|
26
|
+
|
|
27
|
+
# ms_contactmap
|
|
28
|
+
|
|
29
|
+
MolSuite Contact Map: computes protein–ligand contact maps and renders
|
|
30
|
+
2D interaction diagrams.
|
|
31
|
+
|
|
32
|
+
Part of the [MolSuite](https://molsuite.github.io/) stack.
|
|
33
|
+
|
|
34
|
+
## Install
|
|
35
|
+
|
|
36
|
+
```bash
|
|
37
|
+
pip install git+https://github.com/MolSuite/ms_contactmap
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
## Usage
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
ms_contactmap --help
|
|
44
|
+
ms_contactmap complex.pdb --ligand LIG --smiles "CCO" --json contacts.json
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Reference structures and ligand catalogs in `data/` are development and test
|
|
48
|
+
fixtures; the installed package does not depend on them.
|
|
49
|
+
|
|
50
|
+
## License
|
|
51
|
+
|
|
52
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# ms_contactmap
|
|
2
|
+
|
|
3
|
+
MolSuite Contact Map: computes protein–ligand contact maps and renders
|
|
4
|
+
2D interaction diagrams.
|
|
5
|
+
|
|
6
|
+
Part of the [MolSuite](https://molsuite.github.io/) stack.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install git+https://github.com/MolSuite/ms_contactmap
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Usage
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
ms_contactmap --help
|
|
18
|
+
ms_contactmap complex.pdb --ligand LIG --smiles "CCO" --json contacts.json
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Reference structures and ligand catalogs in `data/` are development and test
|
|
22
|
+
fixtures; the installed package does not depend on them.
|
|
23
|
+
|
|
24
|
+
## License
|
|
25
|
+
|
|
26
|
+
MIT — see [LICENSE](LICENSE).
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
# Python API
|
|
2
|
+
|
|
3
|
+
The package root exposes the supported high-level API through lazy imports.
|
|
4
|
+
|
|
5
|
+
## Analysis pipeline
|
|
6
|
+
|
|
7
|
+
`build_diagram()` is the normal entry point. It selects the requested ligand,
|
|
8
|
+
detects interactions, computes pocket context and exposure, and returns a
|
|
9
|
+
`Diagram` independent of Qt rendering.
|
|
10
|
+
|
|
11
|
+
```python
|
|
12
|
+
from ms_contactmap import build_diagram
|
|
13
|
+
|
|
14
|
+
diagram = build_diagram(
|
|
15
|
+
pdb_path="complex.pdb",
|
|
16
|
+
resname="LIG",
|
|
17
|
+
smiles="CCO",
|
|
18
|
+
name="screening hit 17",
|
|
19
|
+
chain="A",
|
|
20
|
+
resnum=401,
|
|
21
|
+
compute_exposure=True,
|
|
22
|
+
)
|
|
23
|
+
|
|
24
|
+
for interaction in diagram.interactions:
|
|
25
|
+
print(interaction.kind, interaction.residue_key, interaction.distance)
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Set `compute_exposure=False` when solvent accessibility is unnecessary. This
|
|
29
|
+
does not change interaction detection.
|
|
30
|
+
|
|
31
|
+
## Layout and persistence
|
|
32
|
+
|
|
33
|
+
Analysis can be serialized before or after solving its layout:
|
|
34
|
+
|
|
35
|
+
```python
|
|
36
|
+
from ms_contactmap import load_json, save_json, solve_layout
|
|
37
|
+
|
|
38
|
+
layout = solve_layout(diagram)
|
|
39
|
+
save_json("hit-17.json", diagram, layout)
|
|
40
|
+
|
|
41
|
+
restored_diagram, restored_layout, view = load_json("hit-17.json")
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
The JSON document includes a schema version. Prefer `save_json()` and
|
|
45
|
+
`load_json()` over depending on its internal dictionary layout.
|
|
46
|
+
|
|
47
|
+
## Qt widget
|
|
48
|
+
|
|
49
|
+
```python
|
|
50
|
+
from PySide6.QtWidgets import QApplication
|
|
51
|
+
from ms_contactmap import InteractionDiagramWidget
|
|
52
|
+
|
|
53
|
+
app = QApplication([])
|
|
54
|
+
widget = InteractionDiagramWidget(diagram)
|
|
55
|
+
widget.resize(1100, 780)
|
|
56
|
+
widget.show()
|
|
57
|
+
app.exec()
|
|
58
|
+
```
|
|
59
|
+
|
|
60
|
+
`set_diagram_async()` solves larger layouts in the Qt thread pool and emits
|
|
61
|
+
`layoutStarted`, `layoutFinished`, or `layoutFailed`. Use the synchronous
|
|
62
|
+
constructor for batch export and the asynchronous method for a responsive UI.
|
|
63
|
+
|
|
64
|
+
## Low-level detection
|
|
65
|
+
|
|
66
|
+
`ms_contactmap.detect.detect_interactions()` is available for integrations that
|
|
67
|
+
already own a `LigandGeometry`. Most callers should use `build_diagram()` so
|
|
68
|
+
residue context, exposure, and metadata remain consistent.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# API reference
|
|
2
|
+
|
|
3
|
+
## Public facade
|
|
4
|
+
|
|
5
|
+
::: ms_contactmap
|
|
6
|
+
|
|
7
|
+
## Diagram model
|
|
8
|
+
|
|
9
|
+
::: ms_contactmap.model
|
|
10
|
+
|
|
11
|
+
## Interaction analysis
|
|
12
|
+
|
|
13
|
+
::: ms_contactmap.interactions
|
|
14
|
+
|
|
15
|
+
## Detection
|
|
16
|
+
|
|
17
|
+
::: ms_contactmap.detect
|
|
18
|
+
|
|
19
|
+
## Ligand and PDB chemistry
|
|
20
|
+
|
|
21
|
+
::: ms_contactmap.chem
|
|
22
|
+
|
|
23
|
+
## Layout
|
|
24
|
+
|
|
25
|
+
::: ms_contactmap.layout
|
|
26
|
+
|
|
27
|
+
## Qt widget
|
|
28
|
+
|
|
29
|
+
::: ms_contactmap.widget.InteractionDiagramWidget
|
|
30
|
+
|
|
31
|
+
## JSON persistence
|
|
32
|
+
|
|
33
|
+
::: ms_contactmap.json_io
|
|
34
|
+
|
|
35
|
+
## Image export
|
|
36
|
+
|
|
37
|
+
::: ms_contactmap.export
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# Examples
|
|
2
|
+
|
|
3
|
+
## Batch JSON, PNG, and SVG export
|
|
4
|
+
|
|
5
|
+
```python
|
|
6
|
+
from PySide6.QtWidgets import QApplication
|
|
7
|
+
|
|
8
|
+
from ms_contactmap import InteractionDiagramWidget, build_diagram
|
|
9
|
+
|
|
10
|
+
app = QApplication.instance() or QApplication([])
|
|
11
|
+
diagram = build_diagram(
|
|
12
|
+
"complex.pdb",
|
|
13
|
+
"LIG",
|
|
14
|
+
"CCO",
|
|
15
|
+
chain="A",
|
|
16
|
+
resnum=401,
|
|
17
|
+
)
|
|
18
|
+
widget = InteractionDiagramWidget(diagram)
|
|
19
|
+
widget.export_json("contacts.json")
|
|
20
|
+
widget.export_png("contacts.png", scale=2.0)
|
|
21
|
+
widget.export_svg("contacts.svg")
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
The widget owns the solved scene used by the exporters. A Qt event loop does
|
|
25
|
+
not need to be started for this synchronous batch case, but a `QApplication`
|
|
26
|
+
must exist.
|
|
27
|
+
|
|
28
|
+
## Reopen and edit a saved diagram
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
from PySide6.QtWidgets import QApplication
|
|
32
|
+
from ms_contactmap import InteractionDiagramWidget
|
|
33
|
+
|
|
34
|
+
app = QApplication([])
|
|
35
|
+
widget = InteractionDiagramWidget.from_json("contacts.json")
|
|
36
|
+
widget.resize(1100, 780)
|
|
37
|
+
widget.show()
|
|
38
|
+
app.exec()
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The interactive widget supports moving residues, rotating or mirroring the
|
|
42
|
+
ligand, recalculating the layout, changing the legend position, and exporting
|
|
43
|
+
the edited result.
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
# ms_contactmap
|
|
2
|
+
|
|
3
|
+
`ms_contactmap` detects protein-ligand interactions from a PDB complex and
|
|
4
|
+
renders an editable two-dimensional contact map. Analysis, layout, JSON
|
|
5
|
+
serialization, Qt presentation, and image export are separate layers, so the
|
|
6
|
+
same result can be used in a batch process or an interactive application.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install "ms_contactmap @ git+https://github.com/MolSuite/ms_contactmap"
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
The package requires Python 3.12, RDKit, Biopython, SciPy, NumPy, and PySide6.
|
|
15
|
+
|
|
16
|
+
## Command line
|
|
17
|
+
|
|
18
|
+
Build a diagram directly from a complex:
|
|
19
|
+
|
|
20
|
+
```bash
|
|
21
|
+
ms_contactmap complex.pdb \
|
|
22
|
+
--ligand LIG \
|
|
23
|
+
--smiles "CCO" \
|
|
24
|
+
--json contacts.json \
|
|
25
|
+
--png contacts.png
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Open a saved analysis without detecting the interactions again:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
ms_contactmap --from-json contacts.json --show
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Use `--chain` and `--resnum` when the PDB contains more than one copy of the
|
|
35
|
+
ligand. Use `--no-exposure` for a faster first pass without solvent-exposure
|
|
36
|
+
halos.
|
|
37
|
+
|
|
38
|
+
## Python entry point
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
from ms_contactmap import build_diagram
|
|
42
|
+
|
|
43
|
+
diagram = build_diagram(
|
|
44
|
+
"complex.pdb",
|
|
45
|
+
"LIG",
|
|
46
|
+
"CCO",
|
|
47
|
+
chain="A",
|
|
48
|
+
resnum=401,
|
|
49
|
+
)
|
|
50
|
+
print(len(diagram.interactions))
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
See the [Python API guide](api.md), [complete examples](examples.md), and
|
|
54
|
+
[generated reference](api_reference.md).
|
|
55
|
+
|
|
56
|
+
## License
|
|
57
|
+
|
|
58
|
+
`ms_contactmap` is released under the MIT License.
|