Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parsing of magres files #193

Merged
merged 35 commits into from
Feb 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
4b3abfd
Use run schema plugin
ladinesa Dec 6, 2023
4f83660
Move basic parser out of nomad
ladinesa Dec 8, 2023
bb46746
Fix import error
ladinesa Dec 8, 2023
9253315
Fix import error
ladinesa Dec 8, 2023
df8ed70
Linting fix
ladinesa Dec 8, 2023
3d1a86f
Fix import path
ladinesa Jan 21, 2024
4f9e113
Remove other ref to old run schema
ladinesa Jan 22, 2024
15227ec
Remove forgotten return
ladinesa Jan 22, 2024
66cee6c
Add metainfo import
ladinesa Jan 25, 2024
89cb080
Added initial version of magres parser
JosePizarro3 Jan 9, 2024
8d14c8b
Added NMR magres flag to CASTEP in section run
JosePizarro3 Jan 9, 2024
78bb81b
Added method to magres
JosePizarro3 Jan 9, 2024
a572ed1
Fixing bugs in magres
JosePizarro3 Jan 9, 2024
b3a401b
Added more parsing to magres
JosePizarro3 Jan 15, 2024
7422efd
Fix naming test solid_dmft
JosePizarro3 Jan 15, 2024
c39a4b6
Deleting x_castep_nmr_flag
JosePizarro3 Jan 15, 2024
510ddb4
Applying auto ruff to magres parser
JosePizarro3 Jan 15, 2024
8c6efbd
Added Ruff formatting to utils.py
JosePizarro3 Jan 15, 2024
5f98c18
Added parsing workflow for magres
JosePizarro3 Jan 15, 2024
8a226fb
Fixed input
JosePizarro3 Jan 16, 2024
b5b030c
Fixed parse_tb_workflow in utils
JosePizarro3 Jan 16, 2024
b423f04
Defined NMRMagRes workflow in magres parser
JosePizarro3 Jan 17, 2024
41a6119
Clean up NMRMagRes file format parsing
JosePizarro3 Jan 17, 2024
6585af0
Added magres_workflow to utils due to circular import problem in util…
JosePizarro3 Jan 17, 2024
49fcfe0
New naming quantities for SpinSpinCoupling
JosePizarro3 Jan 17, 2024
0c3b950
Deleted m_create
JosePizarro3 Jan 18, 2024
0cc9ccd
Added parsing of indirect spin spin coupling
JosePizarro3 Jan 18, 2024
6602502
Better conditions for automatic connection with CASTEP
JosePizarro3 Jan 18, 2024
d729d7a
Fix parser
JosePizarro3 Jan 18, 2024
daebee7
Fix paths
JosePizarro3 Jan 22, 2024
e5553f9
Forget utils in edmft
JosePizarro3 Jan 22, 2024
27dedac
Fixed mypy
JosePizarro3 Jan 22, 2024
c756bb5
Deleted indirect from SpinSpinCoupling quantities
JosePizarro3 Jan 22, 2024
aca114d
Reverting import utils changes
JosePizarro3 Jan 22, 2024
bb5eb98
Add new imports
JosePizarro3 Feb 2, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,579 changes: 963 additions & 616 deletions electronicparsers/castep/parser.py

Large diffs are not rendered by default.

19 changes: 19 additions & 0 deletions electronicparsers/magres/__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 MagresParser
31 changes: 31 additions & 0 deletions electronicparsers/magres/__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.magres import MagresParser

if __name__ == "__main__":
configure_logging(console_log_level=logging.DEBUG)
archive = EntryArchive()
MagresParser().parse(sys.argv[1], archive, logging)
json.dump(archive.m_to_dict(), sys.stdout, indent=2)
24 changes: 24 additions & 0 deletions electronicparsers/magres/metainfo/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#
# 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 magres

m_env = Environment()
m_env.m_add_sub_section(Environment.packages, magres.m_package)
27 changes: 27 additions & 0 deletions electronicparsers/magres/metainfo/magres.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()
18 changes: 18 additions & 0 deletions electronicparsers/magres/nomad_plugin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
code_category: Atomistic code
code_homepage: https://www.ccpnc.ac.uk/docs/magres
code_name: magres
metadata:
codeCategory: Atomistic code
codeLabel: magres
codeLabelStyle: all in lower case
codeName: magres
codeUrl: https://www.ccpnc.ac.uk/docs/magres
parserDirName: dependencies/electronic/electronicparsers/magres/
parserGitUrl: https://github.com/nomad-coe/electronic-parsers.git
preamble: ''
status: production
tableOfFiles: ''
name: parsers/magres
parser_class_name: electronicparsers.magres.parser.MagresParser
python_package: electronicparsers.magres
plugin_source_code_url: https://github.com/nomad-coe/electronic-parsers/tree/develop/electronicparsers/magres
Loading
Loading