Skip to content

Commit

Permalink
TBStudio parser (#154)
Browse files Browse the repository at this point in the history
* Initial commit TBS parser

* Changed name from TBS to TBStudio

* Added tight binding studio parser

* parse SK method

* fix bugs

* fix bugs

* added program name

* Initial commit TBS parser

* Changed name from TBS to TBStudio

* Added tight binding studio parser

* parse SK method

* fix bugs

* fix bugs

* Added dft-to-tb workflow

* compatiblity with the newest version

* Initial commit TBS parser

* Changed name from TBS to TBStudio

* Added tight binding studio parser

* parse SK method

* fix bugs

* fix bugs

* added program name

* Initial commit TBS parser

* Changed name from TBS to TBStudio

* Added dft-to-tb workflow

* compatiblity with the newest version

* Fixed workflow import after rebasing

* fix bug

* refactor TightBinding to TB in tbstudio and wannier90

* parse sk integrals and orbitals

* fix parser and the model

* show the tight-binding band-structure and the dft band-structure in workflow

* fix the band-structures in workflow and SinglePoint

* added firstPrinciples-TB workflow

* added fermi level

* fixed Tight-Binding BZ

* Added the new workflow implementation

* Added a test for parser

* remove the middle parsed dictionary

* Harmonized the workflow name with the method name

* sec_atoms.labels is the correct atomic types
get the labels from atomic numbers using ase library

* correct the name of the tasks to be consistent

* test the labels instead of species

use units converter instead of multiplying by numbers

* add a default empty array for protection

* fix lint

* Added test tbstudio file

* Rafactor and Added error handling

* Remove unused import

* Fix Wannier90 method.tb

* fix ruff

---------

Co-authored-by: mohammad <[email protected]>
  • Loading branch information
JosePizarro3 and mohammadnakhaee authored Nov 20, 2023
1 parent 01a2139 commit 4f54eef
Show file tree
Hide file tree
Showing 11 changed files with 31,243 additions and 6 deletions.
19 changes: 19 additions & 0 deletions electronicparsers/tbstudio/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from .parser import TBStudioParser
31 changes: 31 additions & 0 deletions electronicparsers/tbstudio/__main__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import sys
import json
import logging

from nomad.utils import configure_logging
from nomad.datamodel import EntryArchive
from electronicparsers.tbstudio import TBStudioParser

if __name__ == "__main__":
configure_logging(console_log_level=logging.DEBUG)
archive = EntryArchive()
TBStudioParser().parse(sys.argv[1], archive, logging)
json.dump(archive.m_to_dict(), sys.stdout, indent=2)
25 changes: 25 additions & 0 deletions electronicparsers/tbstudio/metainfo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
from nomad.metainfo import Environment

from . import tbstudio


m_env = Environment()
m_env.m_add_sub_section(Environment.packages, tbstudio.m_package)
27 changes: 27 additions & 0 deletions electronicparsers/tbstudio/metainfo/tbstudio.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#
# Copyright The NOMAD Authors.
#
# This file is part of NOMAD.
# See https://nomad-lab.eu for further info.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
import numpy as np # pylint: disable=unused-import
import typing # pylint: disable=unused-import
from nomad.metainfo import ( # pylint: disable=unused-import
MSection, MCategory, Category, Package, Quantity, Section, SubSection, SectionProxy,
Reference
)


m_package = Package()
24 changes: 24 additions & 0 deletions electronicparsers/tbstudio/nomad_plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
code_category: Atomistic code
code_homepage: https://tight-binding.com/
code_name: TBStudio
metadata:
codeCategory: Atomistic code
codeLabel: TBStudio
codeLabelStyle: All in capitals
codeName: tbstudio
codeUrl: https://tight-binding.com/
parserDirName: dependencies/electronic/electronicparsers/tbstudio/
parserGitUrl: https://github.com/nomad-coe/electronic-parsers.git
parserSpecific: ''
preamble: ''
status: production
tableOfFiles: '| Input Filename | Description |
| --- | --- |
| `*.tbm` | **Mainfile**: output binary file |
'
name: parsers/tbstudio
parser_class_name: electronicparsers.tbstudio.parser.TBStudioParser
python_package: electronicparsers.tbstudio
Loading

0 comments on commit 4f54eef

Please sign in to comment.