Skip to content
This repository was archived by the owner on Dec 7, 2023. It is now read-only.

Commit 1c73ff4

Browse files
committed
Initial commit
0 parents  commit 1c73ff4

File tree

8 files changed

+1079
-0
lines changed

8 files changed

+1079
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target
2+
/data_files

Cargo.lock

Lines changed: 147 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[package]
2+
name = "phrace"
3+
version = "0.1.0"
4+
edition = "2021"
5+
authors = ["Marieke Westendorp <ma3ke.cyber@gmail.com>"]
6+
repository = "https://github.com/koenwestendorp/phrace/"
7+
keywords = ["plotting", "xvg", "molecular-dynamics", "gromacs", "grace"]
8+
categories = ["science", "visualization"]
9+
license = "MIT"
10+
description = """
11+
Terminal graph viewer for xvg files.
12+
"""
13+
14+
[dependencies]
15+
terminal_size = "0.3.0"

LICENSE

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Copyright 2023 Marieke "Koen" Westendorp
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
4+
5+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6+
7+
THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

README.md

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# phrace
2+
3+
![A bunch of terminal windows showing the tool in action. A Grace window is also shown displaying the same (energy minimization) potential energy data as the terminal that sits above it, for comparison.](screenshot.png)
4+
5+
A terminal viewer for `.xvg` files.
6+
7+
Gromacs tools can output `xvg` files to inspect a range of properties of molecular dynamics trajectories (e.g. [`gmx energy`](https://manual.gromacs.org/current/onlinehelp/gmx-energy.html)).
8+
These data files are commonly viewed with the [Grace](https://plasma-gate.weizmann.ac.il/Grace/) (`xmgrace`) tool.[^grace]
9+
10+
[^grace]: By the way, insanely cool website. Check it out!
11+
12+
## Installation
13+
14+
If you don't have [Rust](https://www.rust-lang.org/) installed on your system, learn how to do it [here](https://www.rust-lang.org/learn/get-started). It is very easy.
15+
16+
To install the binary, run the following command.
17+
18+
```console
19+
cargo install --git https://github.com/koenwestendorp/phrace
20+
```
21+
22+
## Usage
23+
24+
```console
25+
phrace example_data/potential_energy_em.xvg
26+
```
27+
28+
The expected output for this command is:
29+
30+
```
31+
GROMACS Energies
32+
.
33+
34+
.
35+
36+
(
37+
k
38+
J .
39+
/ .=
40+
m .
41+
o +:
42+
l :++:
43+
) =+++.
44+
=#+#=+#+
45+
#=@++++#+++#+
46+
++#++#++#=@=#+#++++#+#=
47+
.+++#++#+++#+#++++#+#++++#+#++++#+#+#+=
48+
.
49+
Time (ps)
50+
Summary: 393 items, mean ± σ -1512.5859 ± 54.731205, min … max -1565.1497 … -1111.5247
51+
```
52+
53+
## Future work
54+
55+
If I have some time, I want to add more options to change the viewport, add axis labels, ability to plot multiple columns at once.
56+
For now, it fits my needs, and I am putting it out there for others to use in case they find it useful in its current state.
57+
58+
I am interested in adding support for more data formats.
59+
Honestly, it would be pretty cool to add the ability to graph out some weird and esoteric formats, but maybe doing like... csv is cool too I guess.
60+
Get in touch if you have a particular need, and we can see whether we can pull some programming crimes together.
61+
62+
In other words: contributions and collaboration welcome.
63+
64+
## Dependencies
65+
66+
Depends on the [`terminal_size`](https://crates.io/crates/terminal_size) crate for decoding and encoding many formats.
67+
No other dependencies.
68+
69+
---
70+
71+
By [Ma3ke](https://hachyderm.io/@ma3ke).

0 commit comments

Comments
 (0)