forked from ReactionMechanismGenerator/RMG-Py
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
178 lines (152 loc) · 5.52 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
################################################################################
#
# Makefile for RMG Py
#
################################################################################
.PHONY : all minimal main solver check pycheck arkane clean install decython documentation mopac_travis
all: pycheck main solver check
minimal:
python setup.py build_ext minimal --inplace --build-temp .
main:
python setup.py build_ext main --inplace --build-temp .
solver:
@ python utilities.py check-pydas
python setup.py build_ext solver --inplace --build-temp .
arkane:
python setup.py build_ext arkane --inplace --build-temp .
check:
@ python utilities.py check-dependencies
pycheck:
@ python utilities.py check-python
documentation:
$(MAKE) -C documentation html
@ echo "Start at: documentation/build/html/index.html"
clean:
@ python utilities.py clean
clean-solver:
@ python utilities.py clean-solver
install:
@ python utilities.py check-pydas
python setup.py install
q2dtor:
@ echo -e "\nInstalling Q2DTor...\n"
@ echo -e "Q2DTor is a software for calculating the partition functions and themodynamic properties\
of molecular systems with two or more torsional modes developed by David Ferro Costas ([email protected])\
and Antonio Fernandez Ramos ([email protected]) at the Universidade de Santiago de Compostela. Arkane can\
integrate Q2DTor to compute the quantum mechanical partition function of 2D rotors. \n\nFor use of Q2DTor\
and HinderedRotor2D within Arkane please cite: \n\nD. Ferro-Costas, M. N. D. S.Cordeiro, D. G. Truhlar, A.\
Fernández-Ramos, Comput. Phys. Commun. 232, 190-205, 2018.\n"
@ read -p "Press ENTER to continue" dummy
@ git clone https://github.com/mjohnson541/Q2DTor.git external/Q2DTor --branch arkanepy3
decython:
# de-cythonize all but the 'minimal'. Helpful for debugging in "pure python" mode.
find . -name *.so ! \( -name _statmech.so -o -name quantity.so -o -regex '.*rmgpy/solver/.*' \) -exec rm -f '{}' \;
find . -name *.pyc -exec rm -f '{}' \;
test-all:
ifneq ($(OS),Windows_NT)
mkdir -p testing/coverage
rm -rf testing/coverage/*
endif
nosetests --nocapture --nologcapture --all-modules --verbose --with-coverage --cover-inclusive --cover-erase --cover-html --cover-html-dir=testing/coverage --exe rmgpy arkane
test test-unittests:
ifneq ($(OS),Windows_NT)
mkdir -p testing/coverage
rm -rf testing/coverage/*
endif
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
test-functional:
ifneq ($(OS),Windows_NT)
mkdir -p testing/coverage
rm -rf testing/coverage/*
endif
nosetests --nologcapture --all-modules -A 'functional' --verbose --exe rmgpy arkane
test-database:
nosetests --nocapture --nologcapture --verbose --detailed-errors testing/databaseTest.py
eg0: all
mkdir -p testing/eg0
rm -rf testing/eg0/*
cp examples/rmg/superminimal/input.py testing/eg0/input.py
@ echo "Running eg0: superminimal (H2 oxidation) example"
python rmg.py testing/eg0/input.py
eg1: all
mkdir -p testing/eg1
rm -rf testing/eg1/*
cp examples/rmg/minimal/input.py testing/eg1/input.py
coverage erase
@ echo "Running eg1: minimal (ethane pyrolysis) example with coverage tracking AND profiling"
coverage run rmg.py -p testing/eg1/input.py
coverage report
coverage html
eg2: all
mkdir -p testing/eg2
rm -rf testing/eg2/*
cp examples/rmg/1,3-hexadiene/input.py testing/eg2/input.py
coverage erase
@ echo "Running eg2: 1,3-hexadiene example with coverage tracking AND profiling"
coverage run rmg.py -p testing/eg2/input.py
coverage report
coverage html
eg3: all
mkdir -p testing/eg3
rm -rf testing/eg3/*
cp examples/rmg/liquid_phase/input.py testing/eg3/input.py
coverage erase
@ echo "Running eg3: liquid_phase example with coverage tracking AND profiling"
coverage run rmg.py -p testing/eg3/input.py
coverage report
coverage html
eg5: all
mkdir -p testing/eg5
rm -rf testing/eg5/*
cp examples/rmg/heptane-eg5/input.py testing/eg5/input.py
@ echo "Running eg5: heptane example"
python rmg.py testing/eg5/input.py
eg6: all
mkdir -p testing/eg6
rm -rf testing/eg6/*
cp examples/rmg/ethane-oxidation/input.py testing/eg6/input.py
@ echo "Running eg6: ethane-oxidation example"
python rmg.py testing/eg6/input.py
eg7: all
mkdir -p testing/eg7
rm -rf testing/eg7/*
cp examples/rmg/gri_mech_rxn_lib/input.py testing/eg7/input.py
@ echo "Running eg7: gri_mech_rxn_lib example"
python rmg.py testing/eg7/input.py
scoop: all
mkdir -p testing/scoop
rm -rf testing/scoop/*
cp examples/rmg/minimal/input.py testing/scoop/input.py
coverage erase
@ echo "Running minimal example with SCOOP"
python -m scoop -n 2 rmg.py -v testing/scoop/input.py
#########
# Section for setting up MOPAC calculations on the Travis-CI.org server
ifeq ($(TRAVIS),true)
ifneq ($(TRAVIS_SECURE_ENV_VARS),true)
SKIP_MOPAC=true
endif
endif
mopac_travis:
ifeq ($(TRAVIS),true)
ifneq ($(TRAVIS_SECURE_ENV_VARS),true)
@echo "Don't have MOPAC licence key on this Travis build so can't test QM"
else
@echo "Installing MOPAC key"
@yes Yes | mopac $(MOPACKEY)
endif
else
@#echo "Not in Travis build, no need to run this target"
endif
# End of MOPAC / TRAVIS stuff
#######
eg4: all mopac_travis
ifeq ($(SKIP_MOPAC),true)
@echo "Skipping eg4 (without failing) because can't run MOPAC"
else
mkdir -p testing/eg4
rm -rf testing/eg4/*
cp examples/thermoEstimator/input.py testing/eg4/input.py
@ echo "Running thermo data estimator example. This tests QM."
python scripts/thermoEstimator.py testing/eg4/input.py
endif