diff --git a/aiida_gaussian/parsers/gaussian.py b/aiida_gaussian/parsers/gaussian.py index 842f885..e97e290 100644 --- a/aiida_gaussian/parsers/gaussian.py +++ b/aiida_gaussian/parsers/gaussian.py @@ -217,7 +217,7 @@ def _parse_nmr(self, log_file_string): """ if "Magnetic shielding tensor" not in log_file_string: - return + return {} sigma = [] diff --git a/examples/example_04_nmr_nics.py b/examples/example_04_nmr_nics.py index 466f207..66e26dd 100644 --- a/examples/example_04_nmr_nics.py +++ b/examples/example_04_nmr_nics.py @@ -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") @@ -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", @@ -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) diff --git a/examples/napthalene_nics.xyz b/examples/naphthalene_nics.xyz similarity index 100% rename from examples/napthalene_nics.xyz rename to examples/naphthalene_nics.xyz