From 6c826b0bd98a8e6aeb8e48751f9191ce11c7bc98 Mon Sep 17 00:00:00 2001 From: rlaplaza Date: Fri, 24 May 2024 15:17:05 +0200 Subject: [PATCH] New reader --- navicat_marc/helpers.py | 2 +- navicat_marc/molecule.py | 8 ++++++++ pyproject.toml | 2 +- setup.py | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) diff --git a/navicat_marc/helpers.py b/navicat_marc/helpers.py index 1129513..608b105 100755 --- a/navicat_marc/helpers.py +++ b/navicat_marc/helpers.py @@ -108,7 +108,7 @@ def processargs(arguments): epilog="Remember to cite the marc paper or repository - \n if they have a DOI by now\n - and enjoy!", ) mbuilder.add_argument( - "-version", "--version", action="version", version="%(prog)s 0.1.11" + "-version", "--version", action="version", version="%(prog)s 0.1.12" ) mbuilder.add_argument( "-i", diff --git a/navicat_marc/molecule.py b/navicat_marc/molecule.py index 838b834..0bf97f3 100755 --- a/navicat_marc/molecule.py +++ b/navicat_marc/molecule.py @@ -489,6 +489,14 @@ def from_file(self, filename, noh=True): title = f.readline().strip() energy = None posname = None + if "scf done:" in title and energy is None: + try: + etitle = title.replace(" ", "").split(":")[1].rstrip() + energy = float(etitle) * ha_to_kcalmol + except ValueError: + energy = None + except AttributeError: + energy = None if "energy:" in title and energy is None: try: etitle = title.split(":")[1].split(" ")[1].rstrip() diff --git a/pyproject.toml b/pyproject.toml index 822f53e..d640c15 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "navicat_marc" -version = "0.1.11" +version = "0.1.12" authors = [ { name="R. Laplaza", email="rlaplaza@duck.com" }, ] diff --git a/setup.py b/setup.py index 57b6a1e..167b61f 100755 --- a/setup.py +++ b/setup.py @@ -12,7 +12,7 @@ setup( name="marc", packages=["navicat_marc"], - version="0.1.11", + version="0.1.12", description="Modular Analysis of Representative Conformers", long_description=long_description, long_description_content_type="text/markdown",