Skip to content

Commit 2bc1c5b

Browse files
committed
Update readme
1 parent 4fef64b commit 2bc1c5b

File tree

2 files changed

+42
-1
lines changed

2 files changed

+42
-1
lines changed

README.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,8 @@ Show the reference:
8484
| `gui:%d` | gui (default `1`) / headless (`0`) mode |
8585
| `com:%s` | command sequence for `gui:0` |
8686
| `exitcom:%s` | command sequence to run on exit (same as for `gui:0`) |
87+
| `startcom:%s` | command sequence to run on startup |
88+
8789

8890
</details>
8991

@@ -159,6 +161,44 @@ For example,
159161
```
160162
automatically prints the last xyz coordinates when the user closes the window.
161163

164+
The symbols from the CLI option `startcom:` are executed before the main loop.
165+
For example,
166+
```
167+
./v mol/mol0001.xyz startcom:aaaaaaa
168+
```
169+
moves the molecule to the left, and
170+
```
171+
./v mol/mol0001.xyz startcom:.mq
172+
```
173+
opens the file, computes the point group, save a picture to `mol/mol0001.xyz_1.xpm` and closes the window.
174+
For other examples, see [fig/regenerate.bash](fig/regenerate.bash) for the commands used to generate the figures on this page.
175+
176+
> [!NOTE]
177+
> The size depends on my screen and window layout, you might need to adjust the number of move/zoom in commands or the window size.
178+
179+
> [!WARNING]
180+
> Currently this option is unstable. Please let me know if you encounter any problems.
181+
182+
<details><summary><strong>Click to see currently available commands</strong></summary>
183+
184+
185+
| CLI regime symbol | GUI keyboard command | | GUI (`exitcom:`/`startcom:`) | headless (`com`) |
186+
| ------------------ | --------------------- | ----------------- | ---------------------------- | ---------------- |
187+
| `w`/`a`/`s`/`d` | `w`/`a`/`s`/`d` | move | + | |
188+
| `+` / `-` | `home`/`end` | zoom | + | |
189+
| `>` | `ins` | animate | + | |
190+
| `3`/`4` | `3`/`4` | scale atom sizes | + | |
191+
| `n`/`t`/`l` | `n`/`t`/`l` | toggle atom view | + | |
192+
| `m`/`f` | `m`/`f` | saving frame(s) | + | |
193+
| `q` | `q` | quit | + | |
194+
| `1`/`2` | `1`/`2` | scale bonds | + | + |
195+
| `b`/`l` | `b`/`l` | toggle bond view | + | + |
196+
| `.` | `.` | point group | + | + |
197+
| `x`,`z`,`p`,`u` | `x`,`z`,`p`,`u` | printing | + | + |
198+
199+
200+
</details>
201+
162202

163203
### Boundary conditions
164204
Two types of boundary conditions are recognized:

src/v/man.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,10 @@ void printman(FILE * f, char * exename){
3030
shell:%%lf[,%%lf] sphere(s) radii in Å \n\
3131
center:%%d origin is geometric center (1, default) / center of mass (2) / as is (0) \n\
3232
inertia:%%d if rotate molecules wrt axis of inertia (1) or not (0, default) \n\n\
33-
gui:%%d normal (1, default) / headless (0) mode \n\
33+
gui:%%d gui (1, default) / headless (0) mode \n\
3434
com:%%s command sequence for gui:0 \n\
3535
exitcom:%%s command sequence to run on exit (same as for gui:0) \n\
36+
startcom:%%s command sequence to run on startup \n\
3637
\n\
3738
KEYBOARD REFERENCE:\n\
3839
\n\

0 commit comments

Comments
 (0)