mole-viewer 0.2.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.
@@ -0,0 +1,98 @@
1
+ # This file is automatically @generated by Cargo.
2
+ # It is not intended for manual editing.
3
+ version = 4
4
+
5
+ [[package]]
6
+ name = "bitflags"
7
+ version = "2.13.2"
8
+ source = "registry+https://github.com/rust-lang/crates.io-index"
9
+ checksum = "3ded4057c258ba199e2d26386d3af3780957ecaee6c4ef4041c6b4b8b97c0b06"
10
+
11
+ [[package]]
12
+ name = "errno"
13
+ version = "0.3.14"
14
+ source = "registry+https://github.com/rust-lang/crates.io-index"
15
+ checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
16
+ dependencies = [
17
+ "libc",
18
+ "windows-sys",
19
+ ]
20
+
21
+ [[package]]
22
+ name = "gethostname"
23
+ version = "1.1.0"
24
+ source = "registry+https://github.com/rust-lang/crates.io-index"
25
+ checksum = "1bd49230192a3797a9a4d6abe9b3eed6f7fa4c8a8a4947977c6f80025f92cbd8"
26
+ dependencies = [
27
+ "rustix",
28
+ "windows-link",
29
+ ]
30
+
31
+ [[package]]
32
+ name = "libc"
33
+ version = "0.2.191"
34
+ source = "registry+https://github.com/rust-lang/crates.io-index"
35
+ checksum = "65cd87c9a6d60536580b316ad985726104730a5151c99845f2490428ef91240a"
36
+
37
+ [[package]]
38
+ name = "linux-raw-sys"
39
+ version = "0.12.1"
40
+ source = "registry+https://github.com/rust-lang/crates.io-index"
41
+ checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
42
+
43
+ [[package]]
44
+ name = "mole"
45
+ version = "0.2.0"
46
+ dependencies = [
47
+ "mole-core",
48
+ "x11rb",
49
+ ]
50
+
51
+ [[package]]
52
+ name = "mole-core"
53
+ version = "0.2.0"
54
+
55
+ [[package]]
56
+ name = "rustix"
57
+ version = "1.1.5"
58
+ source = "registry+https://github.com/rust-lang/crates.io-index"
59
+ checksum = "891efababe418670775f199f0d233d84843c227a0949a883ce15b37c78d6629d"
60
+ dependencies = [
61
+ "bitflags",
62
+ "errno",
63
+ "libc",
64
+ "linux-raw-sys",
65
+ "windows-sys",
66
+ ]
67
+
68
+ [[package]]
69
+ name = "windows-link"
70
+ version = "0.2.1"
71
+ source = "registry+https://github.com/rust-lang/crates.io-index"
72
+ checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
73
+
74
+ [[package]]
75
+ name = "windows-sys"
76
+ version = "0.61.2"
77
+ source = "registry+https://github.com/rust-lang/crates.io-index"
78
+ checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
79
+ dependencies = [
80
+ "windows-link",
81
+ ]
82
+
83
+ [[package]]
84
+ name = "x11rb"
85
+ version = "0.14.0"
86
+ source = "registry+https://github.com/rust-lang/crates.io-index"
87
+ checksum = "5a8885a854a8bfdf87a301e53e41b17c5f8f33639903131338b997b1eb614f44"
88
+ dependencies = [
89
+ "gethostname",
90
+ "rustix",
91
+ "x11rb-protocol",
92
+ ]
93
+
94
+ [[package]]
95
+ name = "x11rb-protocol"
96
+ version = "0.14.0"
97
+ source = "registry+https://github.com/rust-lang/crates.io-index"
98
+ checksum = "acf4d1bc32aa46eec18caa634ec3cf4c05bfa151f12b93b510b15190f69a1ca8"
@@ -0,0 +1,16 @@
1
+ [workspace]
2
+ resolver = "3"
3
+ members = ["crates/*"]
4
+
5
+ [workspace.package]
6
+ version = "0.2.0"
7
+ edition = "2024"
8
+ publish = false
9
+ authors = ["Pablo D. Alvarez-Hernandez", "Filiberto Ortiz Chi"]
10
+ license = "MIT"
11
+ repository = "https://github.com/Padalher/MOLE"
12
+
13
+ [profile.release]
14
+ strip = true
15
+ lto = true
16
+ codegen-units = 1
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Pablo D. Alvarez-Hernandez and Filiberto Ortiz Chi
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,126 @@
1
+ Metadata-Version: 2.4
2
+ Name: mole-viewer
3
+ Version: 0.2.0
4
+ Classifier: Development Status :: 4 - Beta
5
+ Classifier: Environment :: X11 Applications
6
+ Classifier: Intended Audience :: Science/Research
7
+ Classifier: Operating System :: POSIX :: Linux
8
+ Classifier: Operating System :: MacOS
9
+ Classifier: Operating System :: Microsoft :: Windows
10
+ Classifier: Programming Language :: Rust
11
+ Classifier: Topic :: Scientific/Engineering :: Chemistry
12
+ Classifier: Topic :: Scientific/Engineering :: Visualization
13
+ License-File: LICENSE
14
+ Summary: Lightweight viewer for ensembles of molecular structures with an interactive E vs n plot, fast over SSH/X11
15
+ Keywords: chemistry,computational-chemistry,molecular-visualization,xyz,orca,gaussian,x11
16
+ Author: Pablo D. Alvarez-Hernandez, Filiberto Ortiz Chi
17
+ License-Expression: MIT
18
+ Requires-Python: >=3.8
19
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
20
+ Project-URL: Changelog, https://github.com/Padalher/MOLE/blob/main/CHANGELOG.md
21
+ Project-URL: Homepage, https://github.com/Padalher/MOLE
22
+ Project-URL: Issues, https://github.com/Padalher/MOLE/issues
23
+
24
+ # MOLE
25
+
26
+ *[Versión en español](https://github.com/Padalher/MOLE/blob/main/README.es.md)*
27
+
28
+ MOLE is a lightweight viewer for ensembles of molecular structures (conformer searches, global optimization runs, geometry optimization trajectories). Launched from the terminal, it opens a window with:
29
+
30
+ - **the 3D structure**: ball and stick; rotate, move and zoom with the mouse;
31
+ - **the energy plot E vs n**: hover a point to see n, E and the label; click it to show that structure;
32
+ - **playback controls**: first, previous, play/pause, next, last, speed and loop.
33
+
34
+ MOLE is designed to run **on a remote machine (an HPC cluster or a workstation) and be viewed over `ssh -Y`**. It draws with the core X11 protocol, so only drawing commands travel over the network (a few KB per frame), and the window stays fluid even on a home connection. It only reads results; it never runs calculations.
35
+
36
+ ## Installation
37
+ MOLE is a single executable with no runtime dependencies. No administrator rights are needed.
38
+
39
+ **With pip** (Linux x86_64/aarch64, macOS, Windows):
40
+ ```bash
41
+ pip install mole-viewer # or: pip install --user mole-viewer · pipx install mole-viewer · uv tool install mole-viewer
42
+ mole # the package is called mole-viewer; the command is mole
43
+ ```
44
+
45
+ **Prebuilt binary** (Linux x86_64, static; works with any glibc):
46
+ ```bash
47
+ curl -LO https://github.com/Padalher/MOLE/releases/latest/download/mole-x86_64-linux
48
+ chmod +x mole-x86_64-linux
49
+ mkdir -p ~/.local/bin && mv mole-x86_64-linux ~/.local/bin/mole
50
+ ```
51
+
52
+ **From source** (requires [Rust](https://rustup.rs)):
53
+ ```bash
54
+ cargo install --git https://github.com/Padalher/MOLE mole
55
+ ```
56
+
57
+ ## Viewing MOLE from your computer
58
+ Install MOLE where your files are (e.g., the cluster) and connect with X11 forwarding:
59
+ ```bash
60
+ ssh -Y user@cluster
61
+ cd /path/to/results
62
+ mole structures.xyz
63
+ ```
64
+
65
+ Your computer needs an X server to display the window:
66
+
67
+ | Your computer | X server |
68
+ |---|---|
69
+ | Linux | built in (X11 or Xwayland) |
70
+ | macOS | [XQuartz](https://www.xquartz.org) (log out and back in after installing it) |
71
+ | Windows | [MobaXterm](https://mobaxterm.mobatek.net) (X server and SSH client in one), or [VcXsrv](https://github.com/marchaesen/vcxsrv) with any SSH client |
72
+
73
+ MOLE also runs locally on Linux. On macOS and Windows, it runs locally through XQuartz or VcXsrv (`set DISPLAY=localhost:0` on Windows), although this has not been tested yet.
74
+
75
+ ## Usage
76
+ ```bash
77
+ mole ensemble.xyz # XYZ file with one or more structures
78
+ mole calc_*.out # Gaussian or ORCA outputs: one structure per file
79
+ mole opt_trj.xyz # ORCA optimization trajectory (E vs step)
80
+ mole a.xyz b.xyz # several files, in the given order
81
+ mole --smooth ensemble.xyz # antialiased drawing (XRender)
82
+ mole --list ensemble.xyz # print the structure table, no window
83
+ mole --help
84
+ ```
85
+
86
+ - **Keyboard:** ← → previous/next · space play/pause · Home/End first/last · q or Esc quit.
87
+ - **Mouse (3D view):** drag to rotate · right button to move · wheel to zoom · double click to reset.
88
+
89
+ **Try it** with the example included in this repository: the geometry optimization of a distorted water molecule (ORCA 6.1.1, B3LYP-D3BJ/def2-SVP, input in [`examples/water_opt.inp`](https://github.com/Padalher/MOLE/blob/main/examples/water_opt.inp)):
90
+ ```bash
91
+ mole examples/water_opt_trj.xyz
92
+ ```
93
+
94
+ ### Formats and energies
95
+ | File | Structures | Energy |
96
+ |---|---|---|
97
+ | `.xyz` | all frames | from each comment line: a leading number (`-3219847.92 label`), `E=-76.32`, `energy=-76.32` or `… E -76.32` (ORCA `*_trj.xyz`) |
98
+ | Gaussian output (`.out`, `.log`) | last geometry | last `SCF Done` |
99
+ | ORCA output (`.out`, `.log`) | last geometry | its `FINAL SINGLE POINT ENERGY` |
100
+
101
+ The program is recognized by the file contents, not by the extension. Energies are shown as read, without unit conversion. Structures without an energy can be viewed, but they are not plotted.
102
+
103
+ Tested with XYZ files, Gaussian 16 Rev. B.01 and ORCA 6.1 outputs.
104
+
105
+ ## Citation
106
+ If you use MOLE in published work, please cite it. The metadata are in [`CITATION.cff`](https://github.com/Padalher/MOLE/blob/main/CITATION.cff), and GitHub's *Cite this repository* button turns them into APA or BibTeX.
107
+
108
+ ## Authors
109
+ - Pablo D. Alvarez-Hernandez: Universidad Juárez Autónoma de Tabasco, DACB – CICTAT, Mexico.
110
+ - Filiberto Ortiz Chi: Cinvestav Unidad Mérida, TheoChem Mérida, Mexico.
111
+
112
+ MOLE was developed with the assistance of [Claude Code](https://claude.com/claude-code) (Anthropic).
113
+
114
+ ## License
115
+ [MIT](https://github.com/Padalher/MOLE/blob/main/LICENSE).
116
+
117
+ ## Development
118
+ ```bash
119
+ cargo test # tests
120
+ cargo clippy --all-targets && cargo deny check
121
+ MOLE_SAMPLES=/path/to/files cargo test # also read your own files
122
+ MOLE_BENCH=200 mole file.xyz # play 200 frames, print the frame rate and exit
123
+ ```
124
+
125
+ `mole-core` reads the files and has no graphics dependencies; `mole` is the window (X11 via [x11rb](https://github.com/psychon/x11rb)). Releases are built and published by GitHub Actions when a `v*` tag is pushed.
126
+
@@ -0,0 +1,102 @@
1
+ # MOLE
2
+
3
+ *[Versión en español](https://github.com/Padalher/MOLE/blob/main/README.es.md)*
4
+
5
+ MOLE is a lightweight viewer for ensembles of molecular structures (conformer searches, global optimization runs, geometry optimization trajectories). Launched from the terminal, it opens a window with:
6
+
7
+ - **the 3D structure**: ball and stick; rotate, move and zoom with the mouse;
8
+ - **the energy plot E vs n**: hover a point to see n, E and the label; click it to show that structure;
9
+ - **playback controls**: first, previous, play/pause, next, last, speed and loop.
10
+
11
+ MOLE is designed to run **on a remote machine (an HPC cluster or a workstation) and be viewed over `ssh -Y`**. It draws with the core X11 protocol, so only drawing commands travel over the network (a few KB per frame), and the window stays fluid even on a home connection. It only reads results; it never runs calculations.
12
+
13
+ ## Installation
14
+ MOLE is a single executable with no runtime dependencies. No administrator rights are needed.
15
+
16
+ **With pip** (Linux x86_64/aarch64, macOS, Windows):
17
+ ```bash
18
+ pip install mole-viewer # or: pip install --user mole-viewer · pipx install mole-viewer · uv tool install mole-viewer
19
+ mole # the package is called mole-viewer; the command is mole
20
+ ```
21
+
22
+ **Prebuilt binary** (Linux x86_64, static; works with any glibc):
23
+ ```bash
24
+ curl -LO https://github.com/Padalher/MOLE/releases/latest/download/mole-x86_64-linux
25
+ chmod +x mole-x86_64-linux
26
+ mkdir -p ~/.local/bin && mv mole-x86_64-linux ~/.local/bin/mole
27
+ ```
28
+
29
+ **From source** (requires [Rust](https://rustup.rs)):
30
+ ```bash
31
+ cargo install --git https://github.com/Padalher/MOLE mole
32
+ ```
33
+
34
+ ## Viewing MOLE from your computer
35
+ Install MOLE where your files are (e.g., the cluster) and connect with X11 forwarding:
36
+ ```bash
37
+ ssh -Y user@cluster
38
+ cd /path/to/results
39
+ mole structures.xyz
40
+ ```
41
+
42
+ Your computer needs an X server to display the window:
43
+
44
+ | Your computer | X server |
45
+ |---|---|
46
+ | Linux | built in (X11 or Xwayland) |
47
+ | macOS | [XQuartz](https://www.xquartz.org) (log out and back in after installing it) |
48
+ | Windows | [MobaXterm](https://mobaxterm.mobatek.net) (X server and SSH client in one), or [VcXsrv](https://github.com/marchaesen/vcxsrv) with any SSH client |
49
+
50
+ MOLE also runs locally on Linux. On macOS and Windows, it runs locally through XQuartz or VcXsrv (`set DISPLAY=localhost:0` on Windows), although this has not been tested yet.
51
+
52
+ ## Usage
53
+ ```bash
54
+ mole ensemble.xyz # XYZ file with one or more structures
55
+ mole calc_*.out # Gaussian or ORCA outputs: one structure per file
56
+ mole opt_trj.xyz # ORCA optimization trajectory (E vs step)
57
+ mole a.xyz b.xyz # several files, in the given order
58
+ mole --smooth ensemble.xyz # antialiased drawing (XRender)
59
+ mole --list ensemble.xyz # print the structure table, no window
60
+ mole --help
61
+ ```
62
+
63
+ - **Keyboard:** ← → previous/next · space play/pause · Home/End first/last · q or Esc quit.
64
+ - **Mouse (3D view):** drag to rotate · right button to move · wheel to zoom · double click to reset.
65
+
66
+ **Try it** with the example included in this repository: the geometry optimization of a distorted water molecule (ORCA 6.1.1, B3LYP-D3BJ/def2-SVP, input in [`examples/water_opt.inp`](https://github.com/Padalher/MOLE/blob/main/examples/water_opt.inp)):
67
+ ```bash
68
+ mole examples/water_opt_trj.xyz
69
+ ```
70
+
71
+ ### Formats and energies
72
+ | File | Structures | Energy |
73
+ |---|---|---|
74
+ | `.xyz` | all frames | from each comment line: a leading number (`-3219847.92 label`), `E=-76.32`, `energy=-76.32` or `… E -76.32` (ORCA `*_trj.xyz`) |
75
+ | Gaussian output (`.out`, `.log`) | last geometry | last `SCF Done` |
76
+ | ORCA output (`.out`, `.log`) | last geometry | its `FINAL SINGLE POINT ENERGY` |
77
+
78
+ The program is recognized by the file contents, not by the extension. Energies are shown as read, without unit conversion. Structures without an energy can be viewed, but they are not plotted.
79
+
80
+ Tested with XYZ files, Gaussian 16 Rev. B.01 and ORCA 6.1 outputs.
81
+
82
+ ## Citation
83
+ If you use MOLE in published work, please cite it. The metadata are in [`CITATION.cff`](https://github.com/Padalher/MOLE/blob/main/CITATION.cff), and GitHub's *Cite this repository* button turns them into APA or BibTeX.
84
+
85
+ ## Authors
86
+ - Pablo D. Alvarez-Hernandez: Universidad Juárez Autónoma de Tabasco, DACB – CICTAT, Mexico.
87
+ - Filiberto Ortiz Chi: Cinvestav Unidad Mérida, TheoChem Mérida, Mexico.
88
+
89
+ MOLE was developed with the assistance of [Claude Code](https://claude.com/claude-code) (Anthropic).
90
+
91
+ ## License
92
+ [MIT](https://github.com/Padalher/MOLE/blob/main/LICENSE).
93
+
94
+ ## Development
95
+ ```bash
96
+ cargo test # tests
97
+ cargo clippy --all-targets && cargo deny check
98
+ MOLE_SAMPLES=/path/to/files cargo test # also read your own files
99
+ MOLE_BENCH=200 mole file.xyz # play 200 frames, print the frame rate and exit
100
+ ```
101
+
102
+ `mole-core` reads the files and has no graphics dependencies; `mole` is the window (X11 via [x11rb](https://github.com/psychon/x11rb)). Releases are built and published by GitHub Actions when a `v*` tag is pushed.
@@ -0,0 +1,12 @@
1
+ [package]
2
+ name = "mole"
3
+ version.workspace = true
4
+ edition.workspace = true
5
+ publish.workspace = true
6
+ authors.workspace = true
7
+ license.workspace = true
8
+ repository.workspace = true
9
+
10
+ [dependencies]
11
+ mole-core = { path = "../mole-core" }
12
+ x11rb = { version = "0.14", features = ["render"] }