Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Settings update #734

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/cont_int.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ jobs:
- name: Cache Packages
uses: actions/cache@v2
env:
CACHE_NUMBER: 0
CACHE_NUMBER: 1
with:
path: ~/conda_pkgs_dir
key:
Expand All @@ -144,7 +144,7 @@ jobs:
key: conda-${{ runner.os }}--${{ runner.arch }}-arcenv-${{ env.CACHE_NUMBER}}
env:
# Increase this value to reset cache if etc/example-environment.yml has not changed
CACHE_NUMBER: 0
CACHE_NUMBER: 1
id: cache-arc-env
- name: Update environment
run: mamba env update -n arc_env -f environment.yml
Expand Down
104 changes: 33 additions & 71 deletions arc/settings/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -285,74 +285,36 @@
# An imaginary frequency is valid if it is between the following range (in cm-1):
LOWEST_MAJOR_TS_FREQ, HIGHEST_MAJOR_TS_FREQ = 75.0, 10000.0

# default environment names for sister repos
TS_GCN_PYTHON, TANI_PYTHON, AUTOTST_PYTHON, ARC_PYTHON, XTB, OB_PYTHON = None, None, None, None, None, None
home = os.getenv("HOME") or os.path.expanduser("~")

tani_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'tani_env', 'bin', 'python')
tani_pypath_2 = os.path.join(home, 'mambaforge', 'envs', 'tani_env', 'bin', 'python')
tani_pypath_3 = os.path.join(home, 'anaconda3', 'envs', 'tani_env', 'bin', 'python')
tani_pypath_4 = os.path.join(home, 'miniconda3', 'envs', 'tani_env', 'bin', 'python')
tani_pypath_5 = os.path.join(home, '.conda', 'envs', 'tani_env', 'bin', 'python')
tani_pypath_6 = os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'tani_env', 'bin', 'python')
for tani_pypath in [tani_pypath_1, tani_pypath_2, tani_pypath_3, tani_pypath_4, tani_pypath_5, tani_pypath_6]:
if os.path.isfile(tani_pypath):
TANI_PYTHON = tani_pypath

ob_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'ob_env', 'bin', 'python')
ob_pypath_2 = os.path.join(home, 'mambaforge', 'envs', 'ob_env', 'bin', 'python')
ob_pypath_3 = os.path.join(home, 'anaconda3', 'envs', 'ob_env', 'bin', 'python')
ob_pypath_4 = os.path.join(home, 'miniconda3', 'envs', 'ob_env', 'bin', 'python')
ob_pypath_5 = os.path.join(home, '.conda', 'envs', 'ob_env', 'bin', 'python')
ob_pypath_6 = os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'ob_env', 'bin', 'python')
for ob_pypath in [ob_pypath_1, ob_pypath_2, ob_pypath_3, ob_pypath_4, ob_pypath_5, ob_pypath_6]:
if os.path.isfile(ob_pypath):
OB_PYTHON = ob_pypath
break

gcn_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'ts_gcn', 'bin', 'python')
gcn_pypath_2 = os.path.join(home, 'anaconda3', 'envs', 'ts_gcn', 'bin', 'python')
gcn_pypath_3 = os.path.join(home, 'miniconda3', 'envs', 'ts_gcn', 'bin', 'python')
gcn_pypath_4 = os.path.join(home, '.conda', 'envs', 'ts_gcn', 'bin', 'python')
gcn_pypath_5 = os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'ts_gcn', 'bin', 'python')
for gcn_pypath in [gcn_pypath_1, gcn_pypath_2, gcn_pypath_3, gcn_pypath_4, gcn_pypath_5]:
if os.path.isfile(gcn_pypath):
TS_GCN_PYTHON = gcn_pypath
break

autotst_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'tst_env', 'bin', 'python')
autotst_pypath_2 = os.path.join(home, 'anaconda3', 'envs', 'tst_env', 'bin', 'python')
autotst_pypath_3 = os.path.join(home, 'miniconda3', 'envs', 'tst_env', 'bin', 'python')
autotst_pypath_4 = os.path.join(home, '.conda', 'envs', 'tst_env', 'bin', 'python')
autotst_pypath_5 = os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'tst_env', 'bin', 'python')
for autotst_pypath in [autotst_pypath_1, autotst_pypath_2, autotst_pypath_3, autotst_pypath_4, autotst_pypath_5]:
if os.path.isfile(autotst_pypath):
AUTOTST_PYTHON = autotst_pypath
break

paths = list()
paths.append(os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'xtb_env', 'bin', 'xtb'))
paths.append(os.path.join(home, 'anaconda3', 'envs', 'xtb_env', 'bin', 'xtb'))
paths.append(os.path.join(home, 'miniconda3', 'envs', 'xtb_env', 'bin', 'xtb'))
paths.append(os.path.join(home, '.conda', 'envs', 'xtb_env', 'bin', 'xtb'))
paths.append(os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'xtb_env', 'bin', 'xtb'))
for xtb_path in paths:
if os.path.isfile(xtb_path):
XTB = xtb_path
break

arc_pypath_1 = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))),
'arc_env', 'bin', 'python')
arc_pypath_2 = os.path.join(home, 'anaconda3', 'envs', 'arc_env', 'bin', 'python')
arc_pypath_3 = os.path.join(home, 'miniconda3', 'envs', 'arc_env', 'bin', 'python')
arc_pypath_4 = os.path.join(home, '.conda', 'envs', 'arc_env', 'bin', 'python')
arc_pypath_5 = os.path.join('/Local/ce_dana', 'anaconda3', 'envs', 'arc_env', 'bin', 'python')
for arc_pypath in [arc_pypath_1, arc_pypath_2, arc_pypath_3, arc_pypath_4, arc_pypath_5]:
if os.path.isfile(arc_pypath):
ARC_PYTHON = arc_pypath
break
def find_executable_path(env_name, executable):
"""Determine the path to an executable in a conda environment.

Args:
env_name (string): The name of the conda environment.
executable (string): The name of the executable.

Returns:
string: The path to the executable.
"""
home = os.getenv("HOME") or os.path.expanduser("~")
default_path = os.path.join(os.path.dirname(os.path.dirname(os.path.dirname(sys.executable))), env_name, 'bin', executable)

alternative_paths = [
os.path.join(home, 'mambaforge', 'envs', env_name, 'bin', executable),
os.path.join(home, 'anaconda3', 'envs', env_name, 'bin', executable),
os.path.join(home, 'miniconda3', 'envs', env_name, 'bin', executable),
os.path.join(home, '.conda', 'envs', env_name, 'bin', executable),
os.path.join('/Local/ce_dana', 'anaconda3', 'envs', env_name, 'bin', executable)
]

for path in [default_path] + alternative_paths:
if os.path.isfile(path):
return path
return None

TANI_PYTHON = find_executable_path('tani_env', 'python')
OB_PYTHON = find_executable_path('ob_env', 'python')
TS_GCN_PYTHON = find_executable_path('ts_gcn', 'python')
AUTOTST_PYTHON = find_executable_path('tst_env', 'python')
XTB = find_executable_path('xtb_env', 'xtb')
ARC_PYTHON = find_executable_path('arc_env', 'python')
PYSCF_PYTHON = find_executable_path('pyscf_env', 'python')
55 changes: 28 additions & 27 deletions environment.yml
Original file line number Diff line number Diff line change
@@ -1,61 +1,62 @@
name: arc_env
channels:
- anaconda
- cantera
- conda-forge
- defaults
- rmg
- conda-forge
- cantera
- anaconda
dependencies:
- anaconda::sphinx
- anaconda::sphinx_rtd_theme
- anaconda::sphinxcontrib-jsmath
- cairo
- cairocffi
- cantera::cantera=2.6
- conda-forge::ase >=3.15.0
- conda-forge::cclib >=1.7.0
- rmg::chemprop
- conda-forge::descriptastorus
- conda-forge::ipython
- conda-forge::mopac
- conda-forge::openbabel >= 3
- conda-forge::paramiko >=2.6.0
- conda-forge::py3dmol >= 0.8.0
- conda-forge::qcelemental
- conda-forge::pytest
- conda-forge::pytest-cov
- coolprop
- coverage
- cython >=0.25.2
- ffmpeg
- rmg::gprof2dot
- graphviz
- h5py
- jinja2
- jupyter
- rmg::lpsolve55
- mako
- markupsafe
- matplotlib >=1.5
- conda-forge::mopac
- mpmath
- rmg::muq2
- networkx
- rmg::numdifftools
- numpy==1.20.1
- conda-forge::openbabel >= 3
- pandas
- psutil
- rmg::pydas >=1.0.2
- pydot
- rmg::pydqed >=1.0.1
- pymongo
- pyparsing
- rmg::pyrdl
- pymongo
- pytables
- python >=3.7
- pyyaml
- rmg::chemprop
- rmg::gprof2dot
- rmg::lpsolve55
- rmg::muq2
- rmg::numdifftools
- rmg::pydas >=1.0.2
- rmg::pydqed >=1.0.1
- rmg::pyrdl
- rmg::quantities
- rmg::rdkit >=2020.03.3.0
- rmg::symmetry
- scikit-learn
- scipy
- rmg::symmetry
- xlrd
- xlwt
- anaconda::sphinx_rtd_theme
- anaconda::paramiko >=2.6.0
- conda-forge::py3dmol >= 0.8.0
- conda-forge::ase >=3.15.0
- anaconda::ipython
- anaconda::sphinx
- anaconda::sphinxcontrib-jsmath
- conda-forge::qcelemental
- mako
- pytables
- anaconda::pytest
- conda-forge::pytest-cov
Loading