crevice 0.1.1__py3-none-any.whl
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.
- crevice/__init__.py +296 -0
- crevice/__main__.py +10 -0
- crevice/analysis.py +862 -0
- crevice/analysis_report.py +168 -0
- crevice/analysis_scene_templates.py +519 -0
- crevice/analysis_viewers.py +309 -0
- crevice/benchmarks.py +387 -0
- crevice/cast_segments.py +557 -0
- crevice/cavities.py +241 -0
- crevice/cavity_obstacles.py +284 -0
- crevice/cavity_reports.py +222 -0
- crevice/cavity_selection.py +265 -0
- crevice/cavity_trajectory.py +934 -0
- crevice/channel_exits.py +810 -0
- crevice/channels.py +397 -0
- crevice/cli.py +1611 -0
- crevice/connectivity.py +308 -0
- crevice/ensemble.py +254 -0
- crevice/examples.py +334 -0
- crevice/figures.py +2237 -0
- crevice/geometry.py +474 -0
- crevice/grid.py +168 -0
- crevice/hydration.py +422 -0
- crevice/hydration_export.py +429 -0
- crevice/hydration_extensions.py +130 -0
- crevice/hydration_trajectory.py +429 -0
- crevice/hydration_workflow.py +185 -0
- crevice/interaction_analysis.py +391 -0
- crevice/interaction_chemistry.py +535 -0
- crevice/io.py +950 -0
- crevice/ml.py +513 -0
- crevice/mmcif.py +515 -0
- crevice/models.py +1133 -0
- crevice/networks.py +559 -0
- crevice/parser.py +637 -0
- crevice/pdb.py +1201 -0
- crevice/presentation.py +725 -0
- crevice/radii.py +1843 -0
- crevice/region_comparison.py +262 -0
- crevice/region_definition.py +854 -0
- crevice/region_review.py +251 -0
- crevice/regional_volume.py +168 -0
- crevice/residue_dynamics.py +255 -0
- crevice/residue_evidence.py +667 -0
- crevice/residue_viewers.py +226 -0
- crevice/residues.py +108 -0
- crevice/rolling.py +663 -0
- crevice/schemas.py +55 -0
- crevice/sections.py +955 -0
- crevice/spatial.py +255 -0
- crevice/static_suite.py +686 -0
- crevice/trajectory.py +1211 -0
- crevice/tunnels.py +264 -0
- crevice/uncertainty.py +225 -0
- crevice/voids.py +1242 -0
- crevice/volume_export.py +1242 -0
- crevice/water_density.py +376 -0
- crevice/water_membership.py +881 -0
- crevice-0.1.1.dist-info/METADATA +260 -0
- crevice-0.1.1.dist-info/RECORD +63 -0
- crevice-0.1.1.dist-info/WHEEL +4 -0
- crevice-0.1.1.dist-info/entry_points.txt +2 -0
- crevice-0.1.1.dist-info/licenses/LICENSE +21 -0
crevice/__init__.py
ADDED
|
@@ -0,0 +1,296 @@
|
|
|
1
|
+
"""CREVICE public API.
|
|
2
|
+
|
|
3
|
+
CREVICE stands for Cavity and Residue Environment Visualisation, Interaction and
|
|
4
|
+
Connectivity Evaluation.
|
|
5
|
+
|
|
6
|
+
CREVICE measures empty space in protein structures and MD trajectories
|
|
7
|
+
(channel radius profiles, cavities, pockets, tunnels and cast volumes) and
|
|
8
|
+
relates it to the residues and waters around it (lining residues, contact
|
|
9
|
+
networks, hydration and typed interactions). All lengths are in ångström,
|
|
10
|
+
areas in Ų, volumes in ų and MD times in ps.
|
|
11
|
+
|
|
12
|
+
The names imported here are the supported entry points; each is documented
|
|
13
|
+
in its defining module. The main groups are:
|
|
14
|
+
|
|
15
|
+
* loading: :func:`~crevice.parser.load_structure`, :func:`~crevice.pdb.resolve_structure`,
|
|
16
|
+
:func:`~crevice.trajectory.load_trajectory`;
|
|
17
|
+
* geometry: :func:`~crevice.channels.pore_profile`, :func:`~crevice.rolling.rolling_probe_cast`,
|
|
18
|
+
:func:`~crevice.voids.void_cast`, :func:`~crevice.cavities.detect_cavities`, :func:`~crevice.tunnels.find_tunnels`;
|
|
19
|
+
* residues and networks: :func:`~crevice.analysis.annotate_residues`,
|
|
20
|
+
:func:`~crevice.networks.build_residue_network`, :func:`~crevice.networks.build_cavity_network`;
|
|
21
|
+
* trajectories and statistics: :func:`~crevice.trajectory.analyze_trajectory`,
|
|
22
|
+
:func:`~crevice.ensemble.profile_distribution`, :func:`~crevice.uncertainty.block_mean_confidence`;
|
|
23
|
+
* outputs: the ``write_*`` exporters and ``plot_*`` figure functions.
|
|
24
|
+
|
|
25
|
+
The same analyses are available from the ``crevice`` command line.
|
|
26
|
+
|
|
27
|
+
Results are geometric measurements of the supplied coordinates. They depend
|
|
28
|
+
on atomic radii, probe sizes and grid spacing, and are not by themselves
|
|
29
|
+
evidence of biological function, permeation or solvent access.
|
|
30
|
+
|
|
31
|
+
Examples
|
|
32
|
+
--------
|
|
33
|
+
>>> from crevice import Atom, StructureFrame, profile_along_path
|
|
34
|
+
>>> frame = StructureFrame((Atom(1, "CA", "ALA", "A", 1, 4.0, 0.0, 0.0, "C"),))
|
|
35
|
+
>>> round(profile_along_path(frame, [(0.0, 0.0, 0.0)]).min_radius, 2)
|
|
36
|
+
2.3
|
|
37
|
+
"""
|
|
38
|
+
|
|
39
|
+
from .benchmarks import (
|
|
40
|
+
BENCHMARK_SYSTEMS,
|
|
41
|
+
DEFAULT_BENCHMARK_IDS,
|
|
42
|
+
BenchmarkSystem,
|
|
43
|
+
DownloadRecord,
|
|
44
|
+
benchmark_path,
|
|
45
|
+
benchmark_systems,
|
|
46
|
+
fetch_all_benchmark_structures,
|
|
47
|
+
fetch_benchmark_record,
|
|
48
|
+
fetch_benchmark_structure,
|
|
49
|
+
get_benchmark_system,
|
|
50
|
+
provenance_path,
|
|
51
|
+
read_provenance,
|
|
52
|
+
verify_cached_structure,
|
|
53
|
+
)
|
|
54
|
+
from .pdb import (
|
|
55
|
+
DownloadRecord,
|
|
56
|
+
StructureSource,
|
|
57
|
+
cached_structure_path,
|
|
58
|
+
fetch_structure,
|
|
59
|
+
is_accession,
|
|
60
|
+
normalize_accession,
|
|
61
|
+
resolve_structure,
|
|
62
|
+
structure_url,
|
|
63
|
+
)
|
|
64
|
+
from .cavities import cavity_surface_points, cavity_volume, classify_voids, detect_cavities
|
|
65
|
+
from .channels import channel_volume, detect_bottlenecks, pore_profile, profile_along_path, trace_centerline
|
|
66
|
+
from .figures import (
|
|
67
|
+
plot_cavity_summary,
|
|
68
|
+
plot_network_chord,
|
|
69
|
+
plot_network_summary,
|
|
70
|
+
plot_profile_radius,
|
|
71
|
+
plot_profile_radius_with_residues,
|
|
72
|
+
plot_residue_contacts,
|
|
73
|
+
plot_trajectory_profiles,
|
|
74
|
+
write_publication_pymol_script,
|
|
75
|
+
write_static_publication_bundle,
|
|
76
|
+
)
|
|
77
|
+
from .io import (
|
|
78
|
+
export_pymol_script,
|
|
79
|
+
write_cavities_csv,
|
|
80
|
+
write_connectivity_csv,
|
|
81
|
+
write_features_csv,
|
|
82
|
+
write_network_csv,
|
|
83
|
+
write_trajectory_csv,
|
|
84
|
+
write_tunnel_points_csv,
|
|
85
|
+
write_tunnels_csv,
|
|
86
|
+
write_void_cast_csv,
|
|
87
|
+
write_cavities_json,
|
|
88
|
+
write_cavities_pdb,
|
|
89
|
+
write_profile_csv,
|
|
90
|
+
write_network_json,
|
|
91
|
+
write_profile_json,
|
|
92
|
+
write_profile_pdb,
|
|
93
|
+
write_residue_contacts_csv,
|
|
94
|
+
write_residue_contacts_json,
|
|
95
|
+
write_tunnels_json,
|
|
96
|
+
write_trajectory_json,
|
|
97
|
+
write_tunnels_pdb,
|
|
98
|
+
write_void_cast_json,
|
|
99
|
+
write_void_cast_pdb,
|
|
100
|
+
)
|
|
101
|
+
from .ml import (
|
|
102
|
+
cluster_conformations,
|
|
103
|
+
cluster_profiles,
|
|
104
|
+
extract_features,
|
|
105
|
+
profile_features,
|
|
106
|
+
reduce_dimensions,
|
|
107
|
+
representative_frames,
|
|
108
|
+
representative_profile,
|
|
109
|
+
residue_importance,
|
|
110
|
+
transition_summary,
|
|
111
|
+
)
|
|
112
|
+
from .models import (
|
|
113
|
+
Atom,
|
|
114
|
+
Cavity,
|
|
115
|
+
ChannelPoint,
|
|
116
|
+
FrameAnalysis,
|
|
117
|
+
NetworkEdge,
|
|
118
|
+
NetworkNode,
|
|
119
|
+
PoreProfile,
|
|
120
|
+
ResidueContact,
|
|
121
|
+
ResidueInteractionNetwork,
|
|
122
|
+
StructureFrame,
|
|
123
|
+
TrajectoryAnalysis,
|
|
124
|
+
Tunnel,
|
|
125
|
+
VoidCast,
|
|
126
|
+
VoidComponent,
|
|
127
|
+
)
|
|
128
|
+
from .networks import build_cavity_network, build_residue_network, compare_networks, network_metrics
|
|
129
|
+
from .parser import load_structure, load_structure_report
|
|
130
|
+
from .volume_export import write_void_cast_dx, write_volume_viewer_bundle
|
|
131
|
+
from .ensemble import profile_distribution, write_profile_distribution_csv
|
|
132
|
+
from .connectivity import persistent_network, lining_connectivity, plot_lining_connectivity
|
|
133
|
+
from .radii import RadiusSet, custom_radii_set, load_radius_file, radii_preset, use_radii
|
|
134
|
+
from .residues import annotate_residues, bottleneck_residues, lining_residues, nearest_residues, residue_contact_table
|
|
135
|
+
from .schemas import SCHEMA_VERSION, result_envelope
|
|
136
|
+
from .static_suite import run_static_benchmark_suite
|
|
137
|
+
from .trajectory import (
|
|
138
|
+
Trajectory,
|
|
139
|
+
analyze_trajectory,
|
|
140
|
+
cavity_timeseries,
|
|
141
|
+
inspect_trajectory,
|
|
142
|
+
load_static_frames,
|
|
143
|
+
load_trajectory,
|
|
144
|
+
load_trajectory_report,
|
|
145
|
+
network_timeseries,
|
|
146
|
+
profile_timeseries,
|
|
147
|
+
trajectory_from_frames,
|
|
148
|
+
)
|
|
149
|
+
from .tunnels import cluster_tunnels, find_tunnels, rank_tunnels, tunnel_profile
|
|
150
|
+
from .voids import component_profile, validate_void_cast, void_cast
|
|
151
|
+
|
|
152
|
+
__all__ = [
|
|
153
|
+
"write_void_cast_dx", "write_volume_viewer_bundle",
|
|
154
|
+
"profile_distribution", "write_profile_distribution_csv", "persistent_network",
|
|
155
|
+
"lining_connectivity", "plot_lining_connectivity",
|
|
156
|
+
"Atom",
|
|
157
|
+
"BENCHMARK_SYSTEMS",
|
|
158
|
+
"BenchmarkSystem",
|
|
159
|
+
"Cavity",
|
|
160
|
+
"ChannelPoint",
|
|
161
|
+
"DEFAULT_BENCHMARK_IDS",
|
|
162
|
+
"FrameAnalysis",
|
|
163
|
+
"NetworkEdge",
|
|
164
|
+
"NetworkNode",
|
|
165
|
+
"PoreProfile",
|
|
166
|
+
"RadiusSet",
|
|
167
|
+
"ResidueContact",
|
|
168
|
+
"ResidueInteractionNetwork",
|
|
169
|
+
"SCHEMA_VERSION",
|
|
170
|
+
"StructureFrame",
|
|
171
|
+
"Trajectory",
|
|
172
|
+
"TrajectoryAnalysis",
|
|
173
|
+
"Tunnel",
|
|
174
|
+
"VoidComponent",
|
|
175
|
+
"VoidCast",
|
|
176
|
+
"analyze_trajectory",
|
|
177
|
+
"annotate_residues",
|
|
178
|
+
"benchmark_path",
|
|
179
|
+
"benchmark_systems",
|
|
180
|
+
"bottleneck_residues",
|
|
181
|
+
"build_cavity_network",
|
|
182
|
+
"build_residue_network",
|
|
183
|
+
"cavity_surface_points",
|
|
184
|
+
"cavity_timeseries",
|
|
185
|
+
"cavity_volume",
|
|
186
|
+
"channel_volume",
|
|
187
|
+
"classify_voids",
|
|
188
|
+
"cluster_conformations",
|
|
189
|
+
"cluster_profiles",
|
|
190
|
+
"cluster_tunnels",
|
|
191
|
+
"void_cast",
|
|
192
|
+
"validate_void_cast",
|
|
193
|
+
"component_profile",
|
|
194
|
+
"compare_networks",
|
|
195
|
+
"custom_radii_set",
|
|
196
|
+
"detect_bottlenecks",
|
|
197
|
+
"detect_cavities",
|
|
198
|
+
"export_pymol_script",
|
|
199
|
+
"extract_features",
|
|
200
|
+
"fetch_all_benchmark_structures",
|
|
201
|
+
"fetch_benchmark_record",
|
|
202
|
+
"fetch_benchmark_structure",
|
|
203
|
+
"provenance_path",
|
|
204
|
+
"read_provenance",
|
|
205
|
+
"verify_cached_structure",
|
|
206
|
+
"StructureSource",
|
|
207
|
+
"cached_structure_path",
|
|
208
|
+
"fetch_structure",
|
|
209
|
+
"is_accession",
|
|
210
|
+
"normalize_accession",
|
|
211
|
+
"resolve_structure",
|
|
212
|
+
"structure_url",
|
|
213
|
+
"DownloadRecord",
|
|
214
|
+
"find_tunnels",
|
|
215
|
+
"get_benchmark_system",
|
|
216
|
+
"lining_residues",
|
|
217
|
+
"load_static_frames",
|
|
218
|
+
"load_structure_report",
|
|
219
|
+
"load_structure",
|
|
220
|
+
"load_trajectory_report",
|
|
221
|
+
"inspect_trajectory",
|
|
222
|
+
"load_trajectory",
|
|
223
|
+
"nearest_residues",
|
|
224
|
+
"network_metrics",
|
|
225
|
+
"network_timeseries",
|
|
226
|
+
"plot_cavity_summary",
|
|
227
|
+
"plot_network_chord",
|
|
228
|
+
"plot_profile_radius_with_residues",
|
|
229
|
+
"plot_network_summary",
|
|
230
|
+
"plot_profile_radius",
|
|
231
|
+
"plot_residue_contacts",
|
|
232
|
+
"plot_trajectory_profiles",
|
|
233
|
+
"write_publication_pymol_script",
|
|
234
|
+
"write_static_publication_bundle",
|
|
235
|
+
"pore_profile",
|
|
236
|
+
"profile_along_path",
|
|
237
|
+
"profile_features",
|
|
238
|
+
"profile_timeseries",
|
|
239
|
+
"radii_preset",
|
|
240
|
+
"load_radius_file",
|
|
241
|
+
"use_radii",
|
|
242
|
+
"rank_tunnels",
|
|
243
|
+
"reduce_dimensions",
|
|
244
|
+
"representative_frames",
|
|
245
|
+
"representative_profile",
|
|
246
|
+
"residue_contact_table",
|
|
247
|
+
"residue_importance",
|
|
248
|
+
"result_envelope",
|
|
249
|
+
"run_static_benchmark_suite",
|
|
250
|
+
"trace_centerline",
|
|
251
|
+
"trajectory_from_frames",
|
|
252
|
+
"transition_summary",
|
|
253
|
+
"tunnel_profile",
|
|
254
|
+
"write_cavities_json",
|
|
255
|
+
"write_cavities_pdb",
|
|
256
|
+
"write_network_json",
|
|
257
|
+
"write_trajectory_json",
|
|
258
|
+
"write_profile_csv",
|
|
259
|
+
"write_profile_json",
|
|
260
|
+
"write_profile_pdb",
|
|
261
|
+
"write_residue_contacts_csv",
|
|
262
|
+
"write_residue_contacts_json",
|
|
263
|
+
"write_tunnels_json",
|
|
264
|
+
"write_tunnels_pdb",
|
|
265
|
+
"write_void_cast_pdb",
|
|
266
|
+
"write_void_cast_json",
|
|
267
|
+
"write_cavities_csv",
|
|
268
|
+
"write_connectivity_csv",
|
|
269
|
+
"write_features_csv",
|
|
270
|
+
"write_network_csv",
|
|
271
|
+
"write_trajectory_csv",
|
|
272
|
+
"write_tunnel_points_csv",
|
|
273
|
+
"write_tunnels_csv",
|
|
274
|
+
"write_void_cast_csv",
|
|
275
|
+
]
|
|
276
|
+
|
|
277
|
+
from .rolling import rolling_probe_cast
|
|
278
|
+
__all__.append("rolling_probe_cast")
|
|
279
|
+
|
|
280
|
+
__version__ = "0.1.1"
|
|
281
|
+
|
|
282
|
+
from .residue_evidence import boundary_residue_evidence,read_binary_dx,write_residue_evidence_bundle
|
|
283
|
+
from .residue_dynamics import ResidueDynamics,write_dynamics_summary
|
|
284
|
+
from .uncertainty import block_mean_confidence
|
|
285
|
+
from .trajectory import align_frame_report
|
|
286
|
+
__all__.extend(["boundary_residue_evidence","read_binary_dx","write_residue_evidence_bundle",
|
|
287
|
+
"ResidueDynamics","write_dynamics_summary","block_mean_confidence","align_frame_report"])
|
|
288
|
+
|
|
289
|
+
from .residue_evidence import profile_constriction_evidence
|
|
290
|
+
__all__.append("profile_constriction_evidence")
|
|
291
|
+
|
|
292
|
+
from .residue_evidence import restore_viewer_identities
|
|
293
|
+
__all__.append("restore_viewer_identities")
|
|
294
|
+
|
|
295
|
+
from .residue_evidence import select_stick_residues
|
|
296
|
+
__all__.append("select_stick_residues")
|
crevice/__main__.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Run the CREVICE command line with ``python -m crevice``.
|
|
2
|
+
|
|
3
|
+
Equivalent to the ``crevice`` console script: importing this module calls
|
|
4
|
+
:func:`crevice.cli.main` and exits with its return code. It is therefore
|
|
5
|
+
excluded from the API documentation and from doctest collection.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
from .cli import main
|
|
9
|
+
|
|
10
|
+
raise SystemExit(main())
|