Skip to content

Commit dad409b

Browse files
committed
multiple, see ext
- remove and warn about broken arkane test - all kinetics test now return true is pass - clarify use of setup_class, restore old behavior of running before each method where needed
1 parent 9958b79 commit dad409b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+295
-38221
lines changed

arkane/statmech.py

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -248,11 +248,6 @@ def freeRotor(pivots, top, symmetry):
248248
return [pivots, top, symmetry]
249249

250250

251-
def hinderedRotorClassicalND(calcPath, pivots, tops, sigmas, semiclassical):
252-
"""Read an N dimensional hindered rotor directive, and return the attributes in a list"""
253-
return [calcPath, pivots, tops, sigmas, semiclassical]
254-
255-
256251
class StatMechJob(object):
257252
"""
258253
A representation of a Arkane statistical mechanics job. This job is used
@@ -351,7 +346,6 @@ def create_log(log_path, check_for_errors=True):
351346
"HinderedRotor": hinderedRotor,
352347
"HinderedRotor1DArray": hinderedRotor1DArray,
353348
"FreeRotor": freeRotor,
354-
"HinderedRotorClassicalND": hinderedRotorClassicalND,
355349
"ScanLog": ScanLog,
356350
"Log": create_log, # The Log class no longer exists, so route the path to ess_factory instead
357351
"LevelOfTheory": LevelOfTheory,
@@ -747,21 +741,7 @@ def _fit_rotors(self, rotors, conformer, hessian, is_ts, linear, directory, plot
747741
elif len(q) == 8:
748742
raise RuntimeError("Support for HinderedRotor2D has been removed.")
749743
elif len(q) == 5 and isinstance(q[1][0], list):
750-
scan_dir, pivots, tops, sigmas, semiclassical = q
751-
rotor = hinderedRotorClassicalND(
752-
pivots,
753-
tops,
754-
sigmas,
755-
calc_path=os.path.join(directory, scan_dir),
756-
conformer=conformer,
757-
F=hessian,
758-
semiclassical=semiclassical,
759-
is_linear=linear,
760-
is_ts=is_ts,
761-
)
762-
rotor.run()
763-
conformer.modes.append(rotor)
764-
rotor_count += len(pivots)
744+
raise RuntimeError("Support for HinderedRotorClassicalND has been removed.")
765745
elif len(q) in [4, 5, 6]:
766746
# This is a hindered rotor
767747
if len(q) == 5 and isinstance(q[0], (ESSAdapter, ScanLog)):

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ dependencies:
6464
- pyyaml
6565
- networkx
6666
- pytest
67+
- conda-forge::pytest-check
6768
- matplotlib >=1.5
6869
- mpmath
6970
- pandas

examples/arkane/species/Toulene_Hindered_Rotor_SemiClassicalND/TolueneEnergy.log

Lines changed: 0 additions & 3860 deletions
This file was deleted.

examples/arkane/species/Toulene_Hindered_Rotor_SemiClassicalND/TolueneFreq.log

Lines changed: 0 additions & 3305 deletions
This file was deleted.

examples/arkane/species/Toulene_Hindered_Rotor_SemiClassicalND/TolueneRot1.log

Lines changed: 0 additions & 30635 deletions
This file was deleted.

examples/arkane/species/Toulene_Hindered_Rotor_SemiClassicalND/input.py

Lines changed: 0 additions & 11 deletions
This file was deleted.

examples/arkane/species/Toulene_Hindered_Rotor_SemiClassicalND/toluene_HinderedRotor.py

Lines changed: 0 additions & 21 deletions
This file was deleted.

examples/arkane/species/thermo_demo/input.py

Lines changed: 28 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -2,31 +2,37 @@
22
# encoding: utf-8
33

44
# Define the level of theory ("model chemistry"):
5-
modelChemistry = LevelOfTheory(method='CCSD(T)-F12', basis='cc-pVTZ-F12', software='molpro')
5+
modelChemistry = LevelOfTheory(method="CCSD(T)-F12", basis="cc-pVTZ-F12", software="molpro")
66
useHinderedRotors = True
77
useBondCorrections = True
88

9+
10+
# NOTE: This test has been severely cut down as part of the pytest transition (July 2023).
11+
# It seems to have gone a few years without being run, and the files that it
12+
# requires no longer exist in RMG-Py. I don't know how to fix it, and honestly the best
13+
# solution is probably to switch away from global state abuse in Arkane since this
14+
# is a monster to debug.
15+
916
# Define the species:
10-
species('methoxy', 'data/methoxy.py', structure=SMILES('C[O]'))
11-
species('1,2-butadiene', 'data/1,2-butadiene.py', structure=SMILES('C=C=CC'))
12-
species('aziridine', 'data/aziridine.py', structure=SMILES('C1NC1'))
13-
species('hydrazino', 'data/hydrazino.py', structure=SMILES('N[NH]'))
14-
species('1-propene-12-diol', 'data/1-propene-12-diol.py', structure=SMILES('CC(O)=CO'))
15-
species('hydroxyiminomethyl', 'data/hydroxyiminomethyl.py', structure=SMILES('[CH]=NO'))
16-
species('2-methyl-2-propanamine', 'data/2-methyl-2-propanamine.py', structure=SMILES('CC(C)(C)N'))
17-
species('nitrosodioxaziridine', 'data/nitrosodioxaziridine.py', structure=SMILES('O=NN1OO1'))
18-
species('ethynol', 'data/ethynol.py', structure=SMILES('C#CO'))
19-
species('2-iminoethyl', 'data/2-iminoethyl.py', structure=SMILES('[CH2]C=N'))
17+
species("methoxy", "data/methoxy.py", structure=SMILES("C[O]"))
18+
# species('1,2-butadiene', 'data/1,2-butadiene.py', structure=SMILES('C=C=CC'))
19+
# species('aziridine', 'data/aziridine.py', structure=SMILES('C1NC1'))
20+
# species('hydrazino', 'data/hydrazino.py', structure=SMILES('N[NH]'))
21+
# species('1-propene-12-diol', 'data/1-propene-12-diol.py', structure=SMILES('CC(O)=CO'))
22+
# species('hydroxyiminomethyl', 'data/hydroxyiminomethyl.py', structure=SMILES('[CH]=NO'))
23+
# species('2-methyl-2-propanamine', 'data/2-methyl-2-propanamine.py', structure=SMILES('CC(C)(C)N'))
24+
# species('nitrosodioxaziridine', 'data/nitrosodioxaziridine.py', structure=SMILES('O=NN1OO1'))
25+
# species('ethynol', 'data/ethynol.py', structure=SMILES('C#CO'))
26+
# species('2-iminoethyl', 'data/2-iminoethyl.py', structure=SMILES('[CH2]C=N'))
2027

2128
# Request thermodynamic property calculation with a NASA polynomial output:
22-
thermo('methoxy', 'NASA')
23-
thermo('1,2-butadiene', 'NASA')
24-
thermo('aziridine', 'NASA')
25-
thermo('hydrazino', 'NASA')
26-
thermo('1-propene-12-diol', 'NASA')
27-
thermo('hydroxyiminomethyl', 'NASA')
28-
thermo('2-methyl-2-propanamine', 'NASA')
29-
thermo('nitrosodioxaziridine', 'NASA')
30-
thermo('ethynol', 'NASA')
31-
thermo('2-iminoethyl', 'NASA')
32-
29+
thermo("methoxy", "NASA")
30+
# thermo('1,2-butadiene', 'NASA')
31+
# thermo('aziridine', 'NASA')
32+
# thermo('hydrazino', 'NASA')
33+
# thermo('1-propene-12-diol', 'NASA')
34+
# thermo('hydroxyiminomethyl', 'NASA')
35+
# thermo('2-methyl-2-propanamine', 'NASA')
36+
# thermo('nitrosodioxaziridine', 'NASA')
37+
# thermo('ethynol', 'NASA')
38+
# thermo('2-iminoethyl', 'NASA')

rmgpy/molecule/adjlist.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -908,6 +908,8 @@ def to_adjacency_list(atoms, multiplicity, metal="", facet="", label=None, group
908908
Convert a chemical graph defined by a list of `atoms` into a string
909909
adjacency list.
910910
"""
911+
if old_style:
912+
warnings.warn("Support for writing old style adjacency lists has been removed in RMG-Py v3.", RuntimeWarning)
911913
if not atoms:
912914
return ""
913915

test/arkane/arkaneMainTest.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,8 @@
3939
from arkane import Arkane
4040
from arkane.common import clean_dir
4141

42+
from warnings import warn
43+
4244

4345
@pytest.mark.functional
4446
class TestArkaneExamples:
@@ -58,6 +60,9 @@ def test_arkane_examples(self):
5860
for example_type in self.example_types:
5961
example_type_path = os.path.join(self.base_path, example_type)
6062
for example in sorted(os.listdir(example_type_path)):
63+
if example == "thermo_demo":
64+
warn("Skipping thermo_demo test - no longer working.", RuntimeWarning)
65+
continue
6166
path = os.path.join(example_type_path, example)
6267
arkane = Arkane(input_file=os.path.join(path, "input.py"), output_directory=path)
6368
arkane.plot = example_type != "bac" # Don't plot BAC examples because they require a lot of memory

0 commit comments

Comments
 (0)