Skip to content

Commit 128ae26

Browse files
committed
Add documentation of the structure builder
Describe the parameter file, starting geometries, planar and linear molecules, symmetry (operations, point groups, inference of missing atoms), the standard orientation of the result, the command line and Python interfaces, and common problems. The examples are files under docs/examples that are built by a test. AI-assisted
1 parent 4d7e6d5 commit 128ae26

11 files changed

Lines changed: 657 additions & 0 deletions

File tree

‎README.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@ This repository is structured in the following way:
1010
instructions.
1111
- `scripts`: This directory contains Python scripts that can be executed themselves to perform specific tasks. Some of these scripts may depend on the
1212
`koehnlab` package, so make sure you have set it up correctly.
13+
- `docs`: This directory contains documentation of the more involved tools, for example the [structure builder](docs/structure_builder.md) that
14+
generates XYZ files from structure parameters.
1315
- `tests`: This directory contains (unit) tests for the provided functionality. You are encouraged to write test cases for your code to ensure that it
1416
works correctly and future changes won't break things. See the respective [README](tests/README.md) for more information on that.
1517

‎docs/README.md‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Documentation
2+
3+
- [Structure builder](structure_builder.md): generating XYZ structures from bond lengths, angles and dihedral angles (including
4+
planar/linear molecules, symmetry and the standard orientation of the result). The example files used in the documentation are in
5+
[`examples/`](examples).

‎docs/examples/ammonia.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Ammonia (C3v). Only one N-H bond and one H-N-H angle are given, the others are equivalent by symmetry.
2+
N1 - H1 1.01
3+
N1 - H2
4+
N1 - H3
5+
H1 - N1 - H2 106.7
6+
7+
@symmetry C3(z): H1->H2->H3 # rotation by 120 degrees about z moves H1 to H2, H2 to H3 and H3 to H1
8+
@symmetry sigma(y): H2<->H3 # mirror plane xz exchanges H2 and H3 (N and H1 stay where they are)

‎docs/examples/benzyne.txt‎

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Benzyne (C2v, planar). C1 and C2 are the two dehydro carbons.
2+
# With @planar (or --planar) the molecule lies in the xy plane. The C2 axis (through the middle of C1-C2 and of C4-C5)
3+
# is the y axis, and the mirror plane perpendicular to the molecule is the yz plane (normal x).
4+
@planar
5+
6+
C1 - C2 1.27067
7+
C2 - C3 1.39887
8+
C3 - C4 1.41259
9+
C4 - C5 1.41751
10+
C5 - C6 # ring bonds without a value: equivalent to C3-C4 and C2-C3 by symmetry
11+
C6 - C1
12+
C3 - H1 1.09239
13+
C4 - H2 1.09507
14+
C5 - H3
15+
C6 - H4
16+
C1 - C2 - C3 126.41
17+
C2 - C3 - H1 126.37
18+
C3 - C4 - H2 118.85
19+
20+
# Only the atoms that are exchanged are given, "..." lets the program infer the rest from the bonds
21+
@symmetry C2(y): C1<->C2, C3<->C6, ...
22+
@symmetry sigma(x): C1<->C2, C3<->C6, ...

‎docs/examples/butadiene.txt‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# trans-1,3-butadiene: planar, with the dihedral angle between the double bonds
2+
@planar
3+
4+
C1 - C2 1.34 # double bonds
5+
C3 - C4 1.34
6+
C2 - C3 1.46 # single bond
7+
C1 - C2 - C3 123.5
8+
C2 - C3 - C4 123.5
9+
C1 - C2 - C3 - C4 180
10+
11+
# hydrogens (connectivity only: their positions follow from the defaults)
12+
C1 - H1
13+
C1 - H2
14+
C2 - H3
15+
C3 - H4
16+
C4 - H5
17+
C4 - H6

‎docs/examples/co2.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Carbon dioxide: linear
2+
@linear
3+
O1 - C1 1.16
4+
C1 - O2 1.16

‎docs/examples/ethane_d3d.txt‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Staggered ethane (D3d), to be used together with ethane_guess.xyz:
2+
# build_structure.py -i ethane_d3d.txt -g ethane_guess.xyz -o ethane.xyz
3+
# Three parameters determine the whole molecule.
4+
C1 - C2 1.53
5+
C1 - H1 1.09
6+
H1 - C1 - C2 111
7+
8+
@group D3d # all symmetry operations of D3d; the starting geometry tells which atoms they exchange

‎docs/examples/ethane_guess.xyz‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
8
2+
Rough staggered ethane in the standard frame of D3d (C3 axis along z, C2 axes along x); the labels are used by the parameter file
3+
C1 0.000000 0.000000 0.765000
4+
C2 0.000000 0.000000 -0.765000
5+
H1 0.883346 0.510000 1.160000
6+
H2 -0.883346 0.510000 1.160000
7+
H3 0.000000 -1.020000 1.160000
8+
H4 0.000000 1.020000 -1.160000
9+
H5 -0.883346 -0.510000 -1.160000
10+
H6 0.883346 -0.510000 -1.160000

‎docs/examples/water.txt‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Water: two bond lengths and the angle between them
2+
O1 - H1 0.96
3+
O1 - H2 0.96
4+
H1 - O1 - H2 104.5

0 commit comments

Comments
 (0)