cosmol-viewer 0.1.2.dev5__cp37-abi3-win_amd64.whl → 0.1.3.dev1__cp37-abi3-win_amd64.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.
Potentially problematic release.
This version of cosmol-viewer might be problematic. Click here for more details.
- cosmol_viewer/cosmol_viewer.pyd +0 -0
- cosmol_viewer-0.1.3.dev1.dist-info/METADATA +6 -0
- cosmol_viewer-0.1.3.dev1.dist-info/RECORD +5 -0
- {cosmol_viewer-0.1.2.dev5.dist-info → cosmol_viewer-0.1.3.dev1.dist-info}/WHEEL +1 -1
- cosmol_viewer-0.1.2.dev5.dist-info/METADATA +0 -70
- cosmol_viewer-0.1.2.dev5.dist-info/RECORD +0 -5
cosmol_viewer/cosmol_viewer.pyd
CHANGED
|
Binary file
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
cosmol_viewer-0.1.3.dev1.dist-info/METADATA,sha256=8AA5xBwZgfwJpYPfpVCsUgQgE5rhnbbaqcOlbSbBlis,208
|
|
2
|
+
cosmol_viewer-0.1.3.dev1.dist-info/WHEEL,sha256=0soGNxS0mdPBs8FuoKJYbONpQVGaEwLO8FiDqoHxqMI,94
|
|
3
|
+
cosmol_viewer/__init__.py,sha256=K33zoYpHqUVvpFdMVxmCtw4uKj9ZXrGuQD4D4DuUmjk,135
|
|
4
|
+
cosmol_viewer/cosmol_viewer.pyd,sha256=I0qwDhrSqOomlY2qKXLXOt6FY8eZ4D60LCb8QGZLcQc,14226432
|
|
5
|
+
cosmol_viewer-0.1.3.dev1.dist-info/RECORD,,
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: cosmol-viewer
|
|
3
|
-
Version: 0.1.2.dev5
|
|
4
|
-
Summary: Molecular visualization tools
|
|
5
|
-
Author-email: 95028 <wjt@cosmol.org>
|
|
6
|
-
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
7
|
-
Project-URL: Repository, https://github.com/COSMol-repl/COSMol-viewer
|
|
8
|
-
|
|
9
|
-
# COSMol-viewer
|
|
10
|
-
|
|
11
|
-
<div align="center">
|
|
12
|
-
<a href="https://crates.io/crates/cosmol_viewer">
|
|
13
|
-
<img src="https://img.shields.io/crates/v/cosmol_viewer.svg" alt="crates.io Latest Release"/>
|
|
14
|
-
</a>
|
|
15
|
-
<a href="https://pypi.org/project/cosmol_viewer/">
|
|
16
|
-
<img src="https://img.shields.io/pypi/v/cosmol_viewer.svg" alt="PyPi Latest Release"/>
|
|
17
|
-
</a>
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
A high-performance molecular visualization library built with Rust and WebGPU, designed for seamless integration into Python workflows.
|
|
21
|
-
|
|
22
|
-
- ⚡ Fast: Native-speed rendering powered by Rust and GPU acceleration
|
|
23
|
-
|
|
24
|
-
- 🧬 Flexible: Load molecules from .sdf, .pdb, and dynamically update 3D structures
|
|
25
|
-
|
|
26
|
-
- 📓 Notebook-friendly: Fully supports Jupyter and Google Colab — ideal for education, research, and live demos
|
|
27
|
-
|
|
28
|
-
- 🔁 Real-time updates: Update molecular coordinates on-the-fly for simulations or animations
|
|
29
|
-
|
|
30
|
-
- 🎨 Customizable: Control styles, camera, and rendering settings programmatically
|
|
31
|
-
|
|
32
|
-
# Installation
|
|
33
|
-
|
|
34
|
-
```sh
|
|
35
|
-
pip install cosmol-viewer
|
|
36
|
-
```
|
|
37
|
-
|
|
38
|
-
# Examples
|
|
39
|
-
|
|
40
|
-
See examples in [Google Colab](https://colab.research.google.com/drive/1Sw72QWjQh_sbbY43jGyBOfF1AQCycmIx?usp=sharing).
|
|
41
|
-
|
|
42
|
-
# Usage
|
|
43
|
-
|
|
44
|
-
```python
|
|
45
|
-
from cosmol_viewer import Scene, Viewer, parse_sdf, Molecules
|
|
46
|
-
|
|
47
|
-
# === Step 1: Load and render a molecule ===
|
|
48
|
-
with open("molecule.sdf", "r") as f:
|
|
49
|
-
sdf = f.read()
|
|
50
|
-
mol = Molecules(parse_sdf(sdf)).centered()
|
|
51
|
-
|
|
52
|
-
scene = Scene()
|
|
53
|
-
scene.scale(0.1)
|
|
54
|
-
scene.add_shape(mol, "mol")
|
|
55
|
-
|
|
56
|
-
viewer = Viewer.render(scene) # Launch the viewer
|
|
57
|
-
|
|
58
|
-
# === Step 2: Update the same molecule dynamically ===
|
|
59
|
-
import time
|
|
60
|
-
|
|
61
|
-
for i in range(1, 10): # Simulate multiple frames
|
|
62
|
-
with open(f"frames/frame_{i}.sdf", "r") as f:
|
|
63
|
-
sdf = f.read()
|
|
64
|
-
updated_mol = Molecules(parse_sdf(sdf)).centered()
|
|
65
|
-
|
|
66
|
-
scene.update_shape("mol", updated_mol)
|
|
67
|
-
viewer.update(scene)
|
|
68
|
-
|
|
69
|
-
time.sleep(0.033) # ~30 FPS
|
|
70
|
-
```
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
cosmol_viewer-0.1.2.dev5.dist-info/METADATA,sha256=qchjYXdOHaYS7JlZbV5bJ-b4pdoHbDuudJ9vtwXCkQ8,2177
|
|
2
|
-
cosmol_viewer-0.1.2.dev5.dist-info/WHEEL,sha256=w2DcmsZAr9ddjKlLMUTE23jGpzdTZ81PKXQO_ZXoN5A,94
|
|
3
|
-
cosmol_viewer/__init__.py,sha256=K33zoYpHqUVvpFdMVxmCtw4uKj9ZXrGuQD4D4DuUmjk,135
|
|
4
|
-
cosmol_viewer/cosmol_viewer.pyd,sha256=fYCYgRRwUjVUfvkePm6hjUz-u9xEIUnRY0p-yNhSu18,14172672
|
|
5
|
-
cosmol_viewer-0.1.2.dev5.dist-info/RECORD,,
|