Skip to content

Commit

Permalink
bug fix nmr_parsing return None
Browse files Browse the repository at this point in the history
  • Loading branch information
cpignedoli committed Sep 25, 2024
1 parent ef3cc1a commit 6a7a3bf
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion aiida_gaussian/parsers/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def _parse_nmr(self, log_file_string):
"""

if "Magnetic shielding tensor" not in log_file_string:
return
return {}

sigma = []

Expand Down
8 changes: 4 additions & 4 deletions examples/example_04_nmr_nics.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
import click
from aiida.common import NotExistent
from aiida.engine import run_get_node
from aiida.orm import Code, Dict, StructureData
from aiida import orm
from aiida.plugins import CalculationFactory

GaussianCalculation = CalculationFactory("gaussian")
Expand All @@ -22,12 +22,12 @@ def example_nmr_nics(gaussian_code):
"""

# structure
structure = StructureData(ase=ase.io.read("./napthalene_nics.xyz"))
structure = orm.StructureData(ase=ase.io.read("./naphthalene_nics.xyz"))

num_cores = 1
memory_mb = 300

parameters = Dict(
parameters = orm.Dict(
{
"link0_parameters": {
"%chk": "aiida.chk",
Expand Down Expand Up @@ -79,7 +79,7 @@ def example_nmr_nics(gaussian_code):
def cli(codelabel):
"""Click interface"""
try:
code = Code.get_from_string(codelabel)
code = orm.load_code(codelabel)
except NotExistent:
print(f"The code '{codelabel}' does not exist")
sys.exit(1)
Expand Down
File renamed without changes.

0 comments on commit 6a7a3bf

Please sign in to comment.