Skip to content

Commit

Permalink
Docs: fix coordinates in how-tos
Browse files Browse the repository at this point in the history
After the change in unit cell coordinates, the how-tos
were not updated. Here, I also add the transformation
for the q-direction, which is referred to the reciprocal
space.
  • Loading branch information
bastonero committed Aug 26, 2023
1 parent 7452e94 commit 0d766a4
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docs/source/2_dielectric.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -588,7 +588,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.8.10"
"version": "3.8.16"
},
"orig_nbformat": 4,
"vscode": {
Expand Down
2 changes: 2 additions & 0 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,8 @@
'repository_url': 'https://github.com/bastonero/aiida-vibroscopy',
'github_url': 'https://github.com/bastonero/aiida-vibroscopy',
'use_edit_page_button': True,
'use_download_button': True,
'use_sidenotes': True,
'logo': {
'text': 'AiiDA Vibroscopy',
'image_light': '_static/vibroscopy_logo.png',
Expand Down
9 changes: 7 additions & 2 deletions docs/source/howto/postprocess.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,16 @@ snippet
```python
import numpy as np

cell = vibro.get_primitive_cell().cell
cell = vibro.get_unitcell().cell

incoming_cartesian = [0,0,1]
inv_cell = np.linalg.inv(cell)
incoming = np.dot(invcell, incoming_cartesian)
incoming = np.dot(invcell.T, incoming_cartesian)
```
For the q-direction instead you need to transform them into reciprocal space crystal coordinates, as follows
```python
q_nac_cartesian = [0,0,1]
q_nac_crystal = np.dot(cell, q_nac_cartesian)
```
:::

Expand Down

0 comments on commit 0d766a4

Please sign in to comment.