Skip to content

Commit 756c968

Browse files
authored
RMG-Py v3.0.0 Release
2 parents 924c193 + 9548236 commit 756c968

File tree

729 files changed

+379353
-93629
lines changed

Some content is hidden

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

729 files changed

+379353
-93629
lines changed

.conda/conda_build_config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
python:
2-
- 2.7
2+
- 3.7
33
numpy:
44
- 1.15
55

.conda/meta.yaml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,62 +12,60 @@ build:
1212
requirements:
1313
build:
1414
- {{ compiler('c') }} # [unix]
15-
- mingwpy # [win]
1615
host:
17-
- boost ==1.56.0
1816
- cython >=0.25.2
19-
- jinja2
2017
- lpsolve55
2118
- numpy
22-
- openbabel >=2.4.1
19+
- openbabel
2320
- pydas >=1.0.2
2421
- pydqed >=1.0.1
2522
- pyrdl
2623
- python
27-
- pyzmq
2824
- quantities
2925
- rdkit >=2018
3026
- scipy
3127
- setuptools
3228
run:
33-
- argparse # [py26]
3429
- cairo
3530
- cairocffi
3631
- cantera >=2.3.0
32+
- cclib
33+
- chemprop
3734
- coolprop
3835
- coverage
3936
- cython >=0.25.2
40-
- dde
4137
- ffmpeg
4238
- gprof2dot
4339
- graphviz
44-
- guppy
40+
- h5py
4541
- jinja2
42+
- jupyter
4643
- lpsolve55
4744
- markupsafe
4845
- matplotlib >=1.5
49-
- mock
5046
- mopac
5147
- mpmath
48+
- networkx
5249
- nose
50+
- numdifftools
5351
- {{ pin_compatible('numpy') }}
54-
- openbabel >=2.4.1
52+
- openbabel
5553
- psutil
5654
- pydas >=1.0.2
57-
- pydot ==1.2.2
55+
- pydot
5856
- pydqed >=1.0.1
5957
- pymongo
6058
- pyparsing
6159
- pyrdl
6260
- python
61+
- pyyaml
6362
- pyzmq
6463
- quantities
6564
- rdkit >=2018
66-
- rmgdatabase >=2.4.0
65+
- rmgdatabase >=3.0.0
6766
- scikit-learn
6867
- scipy
6968
- symmetry
70-
- textgenrnn
7169
- xlwt
7270
test:
7371
source_files:

.coveragerc

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,14 @@
33
plugins = Cython.Coverage
44
branch = True
55
source =
6+
arkane
7+
Arkane.py
68
rmgpy
79
rmg.py
8-
omit = *Test.py
10+
omit =
11+
*Test.py
12+
*/test_data/*
13+
arkane/data/*
914

1015
[report]
1116
show_missing = False
@@ -18,7 +23,13 @@ exclude_lines =
1823
raise NotImplementedError
1924
if 0:
2025
if __name__ == .__main__.:
21-
omit = *Test.py
26+
include =
27+
arkane/*
28+
rmgpy/*
29+
omit =
30+
*Test.py
31+
*/test_data/*
32+
arkane/data/*
2233

2334
[html]
2435
directory = testing/coverage

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,4 +68,7 @@ bin/symmetry
6868

6969
# ipython folder except for notebooks
7070
ipython/*
71-
!ipython/*.ipynb
71+
!ipython/*.ipynb
72+
73+
# Q2DTor
74+
external/Q2DTor

.travis.yml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
language: c
2-
sudo: false
1+
language: minimal
32

43
env:
54
global:
@@ -18,6 +17,9 @@ stages:
1817

1918
before_install:
2019
- cd ..
20+
# Display CPU and memory information on the Linux builds
21+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then lscpu; fi
22+
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then free -m; fi
2123
# Install miniconda
2224
- if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-Linux-x86_64.sh -O miniconda.sh; fi
2325
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then wget http://repo.continuum.io/miniconda/Miniconda2-latest-MacOSX-x86_64.sh -O miniconda.sh; fi
@@ -37,13 +39,17 @@ jobs:
3739
# Clone RMG-database
3840
- git clone https://github.com/ReactionMechanismGenerator/RMG-database.git
3941
- cd RMG-Py
40-
- conda env create -q -f environment_linux.yml
42+
# Create and activate environment
43+
- conda env create -q -f environment.yml
4144
- source activate rmg_env
4245
# Install codecov for coverage report
4346
- conda install -y -c conda-forge codecov
4447
- conda list
4548
# Setup MOPAC license key
4649
- yes 'Yes' | $HOME/miniconda/envs/rmg_env/bin/mopac $MOPACKEY > /dev/null
50+
# Install Q2DTor
51+
- git clone -b arkanepy3 https://github.com/mjohnson541/Q2DTor.git external/Q2DTor
52+
# Compile RMG
4753
- make
4854
script:
4955
- make test-unittests
@@ -55,13 +61,13 @@ jobs:
5561
- stage: documentation
5662
install:
5763
- cd RMG-Py
58-
- conda env create -q -f environment_linux.yml
64+
- conda env create -q -f environment.yml
5965
- source activate rmg_env
6066
# Install sphinx for building documentation
6167
- conda install -y sphinx
6268
- conda list
6369
# Modify setup.py
64-
- sed -i '/embedsignature/s/^#//g' setup.py
70+
- sed -i '/embedsignature/s/# //g' setup.py
6571
- make
6672
- cd documentation
6773
- export COMMITMESSAGE="Automatic documentation rebuild"
@@ -75,7 +81,8 @@ jobs:
7581
- conda config --append channels rmg
7682
- conda config --append channels rdkit
7783
- conda config --append channels cantera
78-
- conda config --append channels anaconda
84+
- conda config --append channels pytorch
85+
- conda config --append channels conda-forge
7986
- conda config --set anaconda_upload yes
8087
script:
8188
- conda build --token $CONDA_TOKEN --user rmg RMG-Py/.conda
@@ -87,7 +94,8 @@ jobs:
8794
- conda config --append channels rmg
8895
- conda config --append channels rdkit
8996
- conda config --append channels cantera
90-
- conda config --append channels anaconda
97+
- conda config --append channels pytorch
98+
- conda config --append channels conda-forge
9199
- conda config --set anaconda_upload yes
92100
script:
93101
- conda build --token $CONDA_TOKEN --user rmg RMG-Py/.conda

Arkane.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
1+
#!/usr/bin/env python3
32

43
###############################################################################
54
# #
@@ -33,34 +32,35 @@
3332
reaction rates and other properties used in detailed kinetics models using
3433
various methodologies and theories. To run Arkane, use the command ::
3534
36-
$ python arkane.py FILE
35+
$ python Arkane.py FILE
3736
3837
where ``FILE`` is the path to an Arkane input file describing the job to
3938
execute. Arkane will run the specified job, writing the output to
4039
``output.py`` and a log to both the console and to ``Arkane.log``, with both
4140
files appearing in the same directory as the input file. Some additional
4241
command-line arguments are available; run the command ::
4342
44-
$ python arkane.py -h
43+
$ python Arkane.py -h
4544
4645
for more information.
4746
"""
4847

4948
import os
5049
import logging
5150

52-
from arkane.main import *
51+
from arkane.main import Arkane
5352

5453
arkane = Arkane()
5554

5655
# Parse and validate the command-line arguments
57-
arkane.parseCommandLineArguments()
56+
arkane.parse_command_line_arguments()
5857

5958
# Execute the job
6059
arkane.execute()
6160

6261
try:
6362
import psutil
63+
6464
process = psutil.Process(os.getpid())
6565
memory_info = process.memory_info()
6666
logging.info('Memory used: %.2f MB' % (memory_info.rss / 1024.0 / 1024.0))

Makefile

Lines changed: 25 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -4,80 +4,54 @@
44
#
55
################################################################################
66

7-
DASPK=$(shell python -c 'import pydas.daspk; print pydas.daspk.__file__')
8-
DASSL=$(shell python -c 'import pydas.dassl; print pydas.dassl.__file__')
7+
.PHONY : all minimal main solver check pycheck arkane clean install decython documentation mopac_travis
98

10-
.PHONY : all minimal main solver check cantherm clean install decython documentation mopac_travis
11-
12-
all: main solver check
9+
all: pycheck main solver check
1310

1411
minimal:
15-
python setup.py build_ext minimal --build-lib . --build-temp build --pyrex-c-in-temp
12+
python setup.py build_ext minimal --inplace --build-temp .
1613

1714
main:
18-
@ echo "Checking you have PyDQED..."
19-
@ python -c 'import pydqed; print pydqed.__file__'
20-
python setup.py build_ext main --build-lib . --build-temp build --pyrex-c-in-temp
15+
python setup.py build_ext main --inplace --build-temp .
2116

2217
solver:
23-
24-
ifneq ($(DASPK),)
25-
@ echo "DASPK solver found. Compiling with DASPK and sensitivity analysis capability..."
26-
@ (echo DEF DASPK = 1) > rmgpy/solver/settings.pxi
27-
else ifneq ($(DASSL),)
28-
@ echo "DASSL solver found. Compiling with DASSL. Sensitivity analysis capabilities are off..."
29-
@ (echo DEF DASPK = 0) > rmgpy/solver/settings.pxi
30-
else
31-
@ echo 'No PyDAS solvers found. Please check if you have the latest version of PyDAS.'
32-
@ python -c 'import pydas.dassl'
33-
endif
34-
python setup.py build_ext solver --build-lib . --build-temp build --pyrex-c-in-temp
18+
@ python utilities.py check-pydas
19+
python setup.py build_ext solver --inplace --build-temp .
3520

3621
arkane:
37-
python setup.py build_ext arkane --build-lib . --build-temp build --pyrex-c-in-temp
22+
python setup.py build_ext arkane --inplace --build-temp .
3823

3924
check:
4025
@ python utilities.py check-dependencies
4126

27+
pycheck:
28+
@ python utilities.py check-python
29+
4230
documentation:
4331
$(MAKE) -C documentation html
4432
@ echo "Start at: documentation/build/html/index.html"
4533

4634
clean:
47-
@ echo "Removing build directory..."
48-
@ python setup.py clean --build-temp build
49-
@ echo "Removing compiled files..."
5035
@ python utilities.py clean
51-
@ echo "Cleanup completed."
5236

5337
clean-solver:
54-
@ echo "Removing solver build directories..."
55-
ifeq ($(OS),Windows_NT)
56-
@ -rd /s /q build\pyrex\rmgpy\solver
57-
@ -rd /s /q build\build\pyrex\rmgpy\solver
58-
else
59-
@ -rm -r build/pyrex/rmgpy/solver/
60-
@ -rm -r build/build/pyrex/rmgpy/solver/
61-
endif
62-
@ echo "Removing compiled files..."
6338
@ python utilities.py clean-solver
64-
@ echo "Cleanup completed."
6539

6640
install:
67-
@ echo "Checking you have PyDQED..."
68-
@ python -c 'import pydqed; print pydqed.__file__'
69-
ifneq ($(DASPK),)
70-
@ echo "DASPK solver found. Compiling with DASPK and sensitivity analysis capability..."
71-
@ (echo DEF DASPK = 1) > rmgpy/solver/settings.pxi
72-
else ifneq ($(DASSL),)
73-
@ echo "DASSL solver found. Compiling with DASSL. Sensitivity analysis capabilities are off..."
74-
@ (echo DEF DASPK = 0) > rmgpy/solver/settings.pxi
75-
else
76-
@ echo 'No PyDAS solvers found. Please check if you have the latest version of PyDAS.'
77-
@ python -c 'import pydas.dassl'
78-
endif
41+
@ python utilities.py check-pydas
7942
python setup.py install
8043

44+
q2dtor:
45+
@ echo "\nInstalling Q2DTor...\n"
46+
@ echo "Q2DTor is a software for calculating the partition functions and themodynamic properties\
47+
of molecular systems with two or more torsional modes developed by David Ferro Costas ([email protected])\
48+
and Antonio Fernandez Ramos ([email protected]) at the Universidade de Santiago de Compostela. Arkane can\
49+
integrate Q2DTor to compute the quantum mechanical partition function of 2D rotors. \n\nFor use of Q2DTor\
50+
and HinderedRotor2D within Arkane please cite: \n\nD. Ferro-Costas, M. N. D. S.Cordeiro, D. G. Truhlar, A.\
51+
Fernández-Ramos, Comput. Phys. Commun. 232, 190-205, 2018.\n"
52+
@ read -p "Press ENTER to continue" dummy
53+
@ git clone https://github.com/mjohnson541/Q2DTor.git external/Q2DTor --branch arkanepy3
54+
8155
decython:
8256
# de-cythonize all but the 'minimal'. Helpful for debugging in "pure python" mode.
8357
find . -name *.so ! \( -name _statmech.so -o -name quantity.so -o -regex '.*rmgpy/solver/.*' \) -exec rm -f '{}' \;
@@ -88,21 +62,21 @@ ifneq ($(OS),Windows_NT)
8862
mkdir -p testing/coverage
8963
rm -rf testing/coverage/*
9064
endif
91-
nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy arkane
65+
nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy arkane
9266

9367
test test-unittests:
9468
ifneq ($(OS),Windows_NT)
9569
mkdir -p testing/coverage
9670
rm -rf testing/coverage/*
9771
endif
98-
nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-package=rmgpy --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy arkane
72+
nosetests --nocapture --nologcapture --all-modules -A 'not functional' --verbose --with-coverage --cover-inclusive --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy arkane
9973

10074
test-functional:
10175
ifneq ($(OS),Windows_NT)
10276
mkdir -p testing/coverage
10377
rm -rf testing/coverage/*
10478
endif
105-
nosetests --nocapture --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy arkane
79+
nosetests --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy arkane
10680

10781
test-database:
10882
nosetests --nocapture --nologcapture --verbose --detailed-errors testing/databaseTest.py

arkane/__init__.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
#!/usr/bin/env python
2-
# -*- coding: utf-8 -*-
3-
4-
"""
5-
initialize imports
6-
"""
1+
#!/usr/bin/env python3
72

83
###############################################################################
94
# #
@@ -32,9 +27,14 @@
3227
# #
3328
###############################################################################
3429

30+
"""
31+
initialize imports
32+
"""
33+
34+
from arkane.common import ArkaneSpecies
35+
from arkane.explorer import ExplorerJob
36+
from arkane.kinetics import KineticsJob
3537
from arkane.main import Arkane
38+
from arkane.pdep import PressureDependenceJob
3639
from arkane.statmech import StatMechJob
3740
from arkane.thermo import ThermoJob
38-
from arkane.kinetics import KineticsJob
39-
from arkane.pdep import PressureDependenceJob
40-
from arkane.common import ArkaneSpecies

0 commit comments

Comments
 (0)