Skip to content

Commit

Permalink
Revert "Merge branch 'master' into recipe"
Browse files Browse the repository at this point in the history
This reverts commit fa87c39, reversing
changes made to 95dc1ed.
  • Loading branch information
mazeau committed Dec 3, 2019
1 parent fa87c39 commit 91a80df
Show file tree
Hide file tree
Showing 33 changed files with 98 additions and 298 deletions.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
40 changes: 0 additions & 40 deletions arkane/ess/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion arkane/ess/gaussian.py → arkane/logs/gaussian.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

from arkane.common import check_conformer_energy, get_element_mass
from arkane.exceptions import LogError
from arkane.ess.log import Log
from arkane.logs.log import Log


################################################################################
Expand Down
26 changes: 13 additions & 13 deletions arkane/ess/gaussianTest.py → arkane/logs/gaussianTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
###############################################################################

"""
This module contains unit tests of the :mod:`arkane.ess.gaussian` module.
This module contains unit tests of the :mod:`arkane.logs.gaussian` module.
"""

import os
Expand All @@ -40,10 +40,11 @@
from external.wip import work_in_progress
from rmgpy.statmech import IdealGasTranslation, LinearRotor, NonlinearRotor, HarmonicOscillator, HinderedRotor

from arkane.ess.gaussian import GaussianLog
from arkane.logs.gaussian import GaussianLog
from arkane.statmech import determine_qm_software
from arkane.exceptions import LogError


################################################################################


Expand Down Expand Up @@ -90,12 +91,11 @@ def test_gaussian_energies(self):
"""
test parsing double hydride, MP2, CCSD, CCSD(T) form Gaussian log
"""
log_doublehybrid = GaussianLog(os.path.join(self.data_path, 'B2PLYP.LOG'))
log_mp2 = GaussianLog(os.path.join(self.data_path, 'UMP2_C_ATOM.LOG'))
log_ccsd = GaussianLog(os.path.join(self.data_path, 'UCCSD_C_ATOM.LOG'))
log_ccsdt = GaussianLog(os.path.join(self.data_path, 'UCCSDT_C_ATOM.LOG'))
log_qb3 = GaussianLog(os.path.join(os.path.dirname(os.path.dirname(__file__)),
'../examples/arkane/species/C2H5/', 'ethyl_cbsqb3.log'))
log_doublehybrid = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'B2PLYP.LOG'))
log_mp2 = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'UMP2_C_ATOM.LOG'))
log_ccsd = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'UCCSD_C_ATOM.LOG'))
log_ccsdt = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'UCCSDT_C_ATOM.LOG'))
log_qb3 = GaussianLog(os.path.join(os.path.dirname(__file__), '../examples/arkane/species/C2H5/', 'ethyl_cbsqb3.log'))

self.assertAlmostEqual(log_doublehybrid.load_energy() / constants.Na / constants.E_h, -0.40217794572194e+02,
delta=1e-6)
Expand Down Expand Up @@ -188,28 +188,28 @@ def test_load_scan_angle(self):
"""
Ensures proper scan angle found in Gaussian scan job
"""
log = GaussianLog(os.path.join(self.data_path, 'isobutanolQOOH_scan.log'))
log = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'isobutanolQOOH_scan.log'))
self.assertAlmostEqual(log._load_scan_angle(), 10.0)

def test_load_number_scans(self):
"""
Ensures proper scan angle found in Gaussian scan job
"""
log = GaussianLog(os.path.join(self.data_path, 'isobutanolQOOH_scan.log'))
log = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'isobutanolQOOH_scan.log'))
self.assertAlmostEqual(log._load_number_scans(), 36)

def test_determine_qm_software(self):
"""
Ensures that determine_qm_software returns a GaussianLog object
"""
log = determine_qm_software(os.path.join(self.data_path, 'oxygen.log'))
log = determine_qm_software(os.path.join(os.path.dirname(__file__), 'data', 'oxygen.log'))
self.assertIsInstance(log, GaussianLog)

def test_gaussian_log_error_termination(self):
"""
Ensures that error termination gaussian log file raises an logError
"""
file_path = os.path.join(self.data_path, 'error_termination.out')
file_path = os.path.join(os.path.dirname(__file__), 'data', 'error_termination.out')
log = GaussianLog(file_path)
with self.assertRaises(LogError) as log_error:
log.load_conformer()
Expand All @@ -219,7 +219,7 @@ def test_load_scan_with_freq(self):
"""
Ensures that the length of enegies with hr scans and freq calc is correct
"""
log = GaussianLog(os.path.join(self.data_path, 'hr_scan_with_freq.log'))
log = GaussianLog(os.path.join(os.path.dirname(__file__), 'data', 'hr_scan_with_freq.log'))
self.assertAlmostEqual(log._load_number_scans(), 36)
self.assertAlmostEqual(log._load_scan_angle(), 10.0)
vlist, _ = log.load_scan_energies()
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion arkane/ess/molpro.py → arkane/logs/molpro.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@

from arkane.common import get_element_mass
from arkane.exceptions import LogError
from arkane.ess.log import Log
from arkane.logs.log import Log

################################################################################

Expand Down
4 changes: 2 additions & 2 deletions arkane/ess/molproTest.py → arkane/logs/molproTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
###############################################################################

"""
This module contains unit tests of the :mod:`arkane.ess.molpro` module.
This module contains unit tests of the :mod:`arkane.logs.molpro` module.
"""

import unittest
Expand All @@ -39,7 +39,7 @@
import rmgpy.constants as constants
from rmgpy.statmech import IdealGasTranslation, NonlinearRotor, HarmonicOscillator, HinderedRotor

from arkane.ess.molpro import MolproLog
from arkane.logs.molpro import MolproLog

################################################################################

Expand Down
2 changes: 1 addition & 1 deletion arkane/ess/orca.py → arkane/logs/orca.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
import rmgpy.constants as constants

from arkane.common import get_element_mass
from arkane.ess.log import Log
from arkane.logs.log import Log
from arkane.exceptions import LogError

################################################################################
Expand Down
32 changes: 13 additions & 19 deletions arkane/ess/orcaTest.py → arkane/logs/orcaTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
###############################################################################

"""
This module contains unit tests of the :mod:`arkane.ess.orca` module.
This module contains unit tests of the :mod:`arkane.logs.orca` module.
"""

import os
import unittest

from arkane.ess.orca import OrcaLog
from arkane.logs.orca import OrcaLog

################################################################################

Expand All @@ -44,32 +44,26 @@ class OrcaTest(unittest.TestCase):
"""
Contains unit tests for the orca module, used for parsing Orca log files.
"""
@classmethod
def setUpClass(cls):
"""
A method that is run before all unit tests in this class.
"""
cls.data_path = os.path.join(os.path.dirname(os.path.dirname(__file__)), 'data', 'orca')

def test_number_of_atoms_from_orca_log(self):
"""
Uses a Orca log files to test that
number of atoms can be properly read.
"""
log = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_opt_freq_test.log'))
self.assertEqual(log.get_number_of_atoms(), 3)
log = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_dlpno_test.log'))
self.assertEqual(log.get_number_of_atoms(), 30)

def test_read_coordinates_from_orca_log(self):
"""
Uses a Orca log files to test that
coordinate can be properly read.
"""
log1 = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log'))
log1 = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_opt_freq_test.log'))
coord, number, mass = log1.load_geometry()
self.assertEqual(len(coord), 3)
log2 = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log'))
log2 = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_dlpno_test.log'))
coord, number, mass = log2.load_geometry()
self.assertEqual(len(coord), 30)

Expand All @@ -78,37 +72,37 @@ def test_energy_from_orca_log(self):
Uses a Orca log files to test that
molecular energies can be properly read.
"""
log = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_opt_freq_test.log'))
self.assertAlmostEqual(log.load_energy(), -200656222.56292167, delta=1e-3)
log = OrcaLog(os.path.join(self.data_path, 'Orca_TS_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_TS_test.log'))
self.assertAlmostEqual(log.load_energy(), -88913623.10592663, delta=1e-3)
log = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_dlpno_test.log'))
self.assertAlmostEqual(log.load_energy(), -1816470909.1153, delta=1e-3)

def test_load_zero_point_energy_from_orca_log(self):
"""
Uses a Orca log files to test that
molecular zero point_energy can be properly read.
"""
log = OrcaLog(os.path.join(self.data_path, 'Orca_opt_freq_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_opt_freq_test.log'))
self.assertAlmostEqual(log.load_zero_point_energy(), 55502.673180815, delta=1e-3)
log = OrcaLog(os.path.join(self.data_path, 'Orca_TS_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_TS_test.log'))
self.assertAlmostEqual(log.load_zero_point_energy(), 93500.08860598055, delta=1e-3)

def test_load_negative_frequency_from_orca_log(self):
"""
Uses a orca log file for npropyl to test that its
negative frequency can be properly read.
"""
log = OrcaLog(os.path.join(self.data_path, 'Orca_TS_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_TS_test.log'))
self.assertAlmostEqual(log.load_negative_frequency(), -503.24, delta=1e-1)

def test_T1_diagnostic_from_orca_log(self):
"""
Uses a Orca log file for npropyl to test that its
T1_diagnostic of freedom can be properly read.
"""
log = OrcaLog(os.path.join(self.data_path, 'Orca_dlpno_test.log'))
log = OrcaLog(os.path.join(os.path.dirname(__file__), 'data', 'Orca_dlpno_test.log'))
self.assertAlmostEqual(log.get_T1_diagnostic(), 0.009872238, delta=1e-3)

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion arkane/ess/qchem.py → arkane/logs/qchem.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

from arkane.common import check_conformer_energy, get_element_mass
from arkane.exceptions import LogError
from arkane.ess.log import Log
from arkane.logs.log import Log

################################################################################

Expand Down
4 changes: 2 additions & 2 deletions arkane/ess/qchemTest.py → arkane/logs/qchemTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,15 @@
###############################################################################

"""
This module contains unit tests of the :mod:`arkane.ess.qchem` module.
This module contains unit tests of the :mod:`arkane.logs.qchem` module.
"""

import os
import unittest

from rmgpy.statmech import IdealGasTranslation, LinearRotor, NonlinearRotor, HarmonicOscillator, HinderedRotor

from arkane.ess.qchem import QChemLog
from arkane.logs.qchem import QChemLog

################################################################################

Expand Down
2 changes: 1 addition & 1 deletion arkane/ess/terachem.py → arkane/logs/terachem.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

from arkane.common import check_conformer_energy, get_element_mass, symbol_by_number
from arkane.exceptions import LogError
from arkane.ess.log import Log
from arkane.logs.log import Log

################################################################################

Expand Down
22 changes: 11 additions & 11 deletions arkane/ess/terachemTest.py → arkane/logs/terachemTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
###############################################################################

"""
This module contains unit tests of the :mod:`arkane.ess.terachem` module.
This module contains unit tests of the :mod:`arkane.logs.terachem` module.
"""

import os
Expand All @@ -39,7 +39,7 @@
from rmgpy.statmech.conformer import Conformer

from arkane.exceptions import LogError
from arkane.ess.terachem import TeraChemLog
from arkane.logs.terachem import TeraChemLog

################################################################################

Expand Down Expand Up @@ -399,15 +399,15 @@ def test_load_scan_energies(self):
2.30963595e+03, 5.02046166e+03, 7.97285489e+03, 1.06923710e+04,
1.29244615e+04, 1.43422341e+04, 1.43905580e+04, 1.32047110e+04,
1.12088126e+04, 8.31162367e+03, 5.06568695e+03, 2.54966151e+03,
8.50076205e+02, 0.00000000e+00]
expected_angles = [0., 0.13962634, 0.27925268, 0.41887902, 0.55850536, 0.6981317,
0.83775804, 0.97738438, 1.11701072, 1.25663706, 1.3962634, 1.53588974,
1.67551608, 1.81514242, 1.95476876, 2.0943951, 2.23402144, 2.37364778,
2.51327412, 2.65290046, 2.7925268, 2.93215314, 3.07177948, 3.21140582,
3.35103216, 3.4906585, 3.63028484, 3.76991118, 3.90953752, 4.04916386,
4.1887902, 4.32841654, 4.46804289, 4.60766923, 4.74729557, 4.88692191,
5.02654825, 5.16617459, 5.30580093, 5.44542727, 5.58505361, 5.72467995,
5.86430629, 6.00393263, 6.14355897, 6.28318531] # radians
8.50076205e+02, 0.00000000e+00, 3.31469351e+00]
expected_angles = [0., 0.13659098, 0.27318197, 0.40977295, 0.54636394, 0.68295492,
0.81954591, 0.95613689, 1.09272788, 1.22931886, 1.36590985, 1.50250083,
1.63909182, 1.7756828, 1.91227379, 2.04886477, 2.18545576, 2.32204674,
2.45863773, 2.59522871, 2.7318197, 2.86841068, 3.00500167, 3.14159265,
3.27818364, 3.41477462, 3.55136561, 3.68795659, 3.82454758, 3.96113856,
4.09772955, 4.23432053, 4.37091152, 4.5075025, 4.64409349, 4.78068447,
4.91727546, 5.05386644, 5.19045743, 5.32704841, 5.4636394, 5.60023038,
5.73682137, 5.87341235, 6.01000334, 6.14659432, 6.28318531] # radians
np.testing.assert_almost_equal(v_list, expected_v_list, 4)
np.testing.assert_almost_equal(angles, expected_angles)

Expand Down
4 changes: 2 additions & 2 deletions arkane/outputTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
###############################################################################

"""
This module contains unit tests of the :mod:`arkane.ess.gaussian` module.
This module contains unit tests of the :mod:`arkane.logs.gaussian` module.
"""

import os
Expand All @@ -40,7 +40,7 @@

import rmgpy

from arkane.ess.gaussian import GaussianLog
from arkane.logs.gaussian import GaussianLog
from arkane.main import Arkane
from arkane.output import prettify, get_str_xyz
from rmgpy.species import Species
Expand Down
7 changes: 6 additions & 1 deletion arkane/statmech.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,12 @@

from arkane.common import ArkaneSpecies, symbol_by_number, get_principal_moments_of_inertia
from arkane.encorr.corr import get_atom_correction, get_bac
from arkane.ess import GaussianLog, Log, MolproLog, OrcaLog, QChemLog, TeraChemLog
from arkane.logs.gaussian import GaussianLog
from arkane.logs.log import Log
from arkane.logs.molpro import MolproLog
from arkane.logs.orca import OrcaLog
from arkane.logs.qchem import QChemLog
from arkane.logs.terachem import TeraChemLog
from arkane.output import prettify
from arkane.util import determine_qm_software

Expand Down
2 changes: 1 addition & 1 deletion arkane/statmechTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
from rmgpy.exceptions import InputError

from arkane import Arkane
from arkane.ess.qchem import QChemLog
from arkane.logs.qchem import QChemLog
from arkane.statmech import StatMechJob, determine_rotor_symmetry, is_linear

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion arkane/thermoTest.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

from rmgpy.species import Species

from arkane.ess.gaussian import GaussianLog
from arkane.logs.gaussian import GaussianLog
from arkane.thermo import ThermoJob

################################################################################
Expand Down
Loading

0 comments on commit 91a80df

Please sign in to comment.