Skip to content

Implement support for helical boundary conditions in gen format#30

Merged
awvwgk merged 1 commit intogrimme-lab:mainfrom
awvwgk:helical
Feb 2, 2022
Merged

Implement support for helical boundary conditions in gen format#30
awvwgk merged 1 commit intogrimme-lab:mainfrom
awvwgk:helical

Conversation

@awvwgk
Copy link
Copy Markdown
Member

@awvwgk awvwgk commented Jan 26, 2022

@bhourahine I have a couple of questions regarding the format

  • I'm storing the helical z-axis like in DFTB+ in the first lattice vector (shape(lattice) == [3, 1]), is this the best representation?
  • formats not supporting helical boundary conditions will drop the helical axis on write (similar behavior as with lattice vectors in molecular formats)
  • helical boundary conditions only round-trip in gen format at the moment
  • Turbomole coord also supports 1D periodic boundary conditions, however the periodic dimension is always given along the x-axis (shape(lattice) == [3, 3]), probably requires rotation of the coordinate system to write this in gen format
  • FHI-aims geometry.in can define 1D periodicity as well, have to check in detail how this is supposed to work for the atom_frac keywords, but same issues as with the Turbomole coord format

Currently tested error conditions for gen format:

  Starting invalid1-gen ... (7/15)
       ... invalid1-gen [EXPECTED FAIL]
  Message: Error: Could not read number of atoms
 --> (input):1:1-2
  |
1 | -2  F
  | ^^ expected integer value
  |
  Starting invalid2-gen ... (8/15)
       ... invalid2-gen [EXPECTED FAIL]
  Message: Error: Invalid input version found
 --> (input):1:4
  |
1 | 2  X
  |    ^ unknown identifier
  |
  Starting invalid3-gen ... (9/15)
       ... invalid3-gen [EXPECTED FAIL]
  Message: Error: Cannot map symbol to atomic number
 --> (input):2:4-7
  |
2 | Ga ***As
  |    ^^^^ unknown element
  |
  Starting invalid4-gen ... (10/15)
       ... invalid4-gen [EXPECTED FAIL]
  Message: Error: Cannot read coordinates
 --> (input):2
  |
2 | 
  |^ unexpected value
  |
  Starting invalid5-gen ... (11/15)
       ... invalid5-gen [EXPECTED FAIL]
  Message: Error: Unexpected end of file
 --> (input):4
  |
4 | 
  |^ missing lattice information
  |
  Starting invalid6-gen ... (12/15)
       ... invalid6-gen [EXPECTED FAIL]
  Message: Error: Cannot read lattice vector
 --> (input):6:1-13
  |
6 | ************* ************* 0.0000000E+00
  | ^^^^^^^^^^^^^ expected real value
  |
  Starting invalid7-gen ... (13/15)
       ... invalid7-gen [EXPECTED FAIL]
  Message: Error: Cannot read lattice vector
  --> (input):16:5-9
   |
16 | 3.0 ***** 1
   |     ^^^^^ expected real value
   |
  Starting invalid8-gen ... (14/15)
       ... invalid8-gen [EXPECTED FAIL]
  Message: Error: Invalid helical axis rotation order
 --> (input):6:23-25
  |
6 | 0.2140932670E+01 18.0 -10
  |                       ^^^ expected positive value
  |
  Starting invalid9-gen ... (15/15)
       ... invalid9-gen [EXPECTED FAIL]
  Message: Error: Cannot read origin
 --> (input):5:37
  |
5 | 0.0000000000E+00    0.0000000000E+00
  |                                     ^ expected real value
  |

@codecov
Copy link
Copy Markdown

codecov bot commented Jan 26, 2022

Codecov Report

Merging #30 (01aa78b) into main (9e2ebec) will increase coverage by 0.35%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #30      +/-   ##
==========================================
+ Coverage   67.47%   67.82%   +0.35%     
==========================================
  Files          56       56              
  Lines        6020     6313     +293     
  Branches     1867     1951      +84     
==========================================
+ Hits         4062     4282     +220     
- Misses        670      671       +1     
- Partials     1288     1360      +72     
Impacted Files Coverage Δ
src/mctc/io/write/vasp.f90 76.74% <33.33%> (-4.21%) ⬇️
src/mctc/io/write/aims.f90 41.66% <50.00%> (-12.88%) ⬇️
src/mctc/io/write/genformat.f90 72.41% <50.00%> (-14.55%) ⬇️
src/mctc/io/write/turbomole.f90 78.57% <60.00%> (-12.34%) ⬇️
src/mctc/io/read/genformat.f90 71.18% <63.88%> (-3.53%) ⬇️
test/test_read_turbomole.f90 80.58% <75.00%> (-0.70%) ⬇️
test/test_read_genformat.f90 76.70% <77.98%> (+3.40%) ⬆️
test/test_read_aims.f90 76.78% <78.37%> (+0.57%) ⬆️
src/mctc/io/read/aims.f90 64.00% <100.00%> (+5.09%) ⬆️
src/mctc/io/read/turbomole.f90 76.38% <100.00%> (-0.33%) ⬇️
... and 4 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 9e2ebec...01aa78b. Read the comment docs.

- gen 1D periodicity is along the z-axis stored in the first lattice vector
- the helical angle and the order of the screw axis are stored in the second vector
@awvwgk awvwgk merged commit 5db20f9 into grimme-lab:main Feb 2, 2022
@awvwgk awvwgk deleted the helical branch February 2, 2022 23:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant