Skip to content

Commit

Permalink
implements the writing of ibrav in qeschema
Browse files Browse the repository at this point in the history
* reads bravais_index and use_alternative attributes from the
atomic_structure element and uses them to select an ibrav

* uses the cell vectors to compute A,B,C COSAB, COSBC and COSCA parameters

status
  • Loading branch information
pietrodelugas committed Aug 31, 2021
1 parent 4843721 commit 2c12b69
Show file tree
Hide file tree
Showing 5 changed files with 435 additions and 7 deletions.
2 changes: 2 additions & 0 deletions qeschema/cards.py
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,8 @@ def get_cell_parameters_card(name, **kwargs):
logger.error("Missing required arguments when building CELL_PARAMETERS card!")
return []
# Add cell parameters card
if atomic_structure.get('@bravais_index'):
return []
cells = atomic_structure.get('cell', {})
if cells:
lines = ['%s bohr' % name]
Expand Down
2 changes: 1 addition & 1 deletion qeschema/converters.py
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ class PwInputConverter(RawInputConverter):
'atomic_structure': {
'@nat': 'SYSTEM[nat]',
'$': [
('SYSTEM[ibrav]', options.set_ibrav_to_zero, None),
('SYSTEM[ibrav]', options.get_ibrav, None),
("ATOMIC_POSITIONS", cards.get_atomic_positions_cell_card, None),
("CELL_PARAMETERS", cards.get_cell_parameters_card, None)
],
Expand Down
Loading

0 comments on commit 2c12b69

Please sign in to comment.