Skip to content

Commit

Permalink
Merge branch 'master' of github.com:learningmatter-mit/surface-sampling
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaochendu committed Jul 18, 2024
2 parents a86b612 + 5e83ee2 commit 2b5f8a1
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 152 deletions.
42 changes: 42 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: Tests

on:
push:
branches: [master]
pull_request:

jobs:
build-linux:
runs-on: ubuntu-latest
strategy:
max-parallel: 5

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: '3.11'
- name: Add conda to system path
run: |
# $CONDA is an environment variable pointing to the root of the miniconda directory
echo $CONDA/bin >> $GITHUB_PATH
- name: Install conda dependencies
run: |
conda env update --file environment.yml --name base
- name: Install pip dependencies
run: |
pip install -e '.[dev]'
- name: Append LAMMPS paths
run: |
echo "LAMMPS_POTENTIALS=$GITHUB_WORKSPACE/mcmc/potentials" >> $GITHUB_ENV
echo "LAMMPS_COMMAND=$CONDA/bin/lmp" >> $GITHUB_ENV
echo "ASE_LAMMPSRUN_COMMAND=$CONDA/bin/lmp" >> $GITHUB_ENV
- name: Check LAMMPS paths
run: |
echo "LAMMPS_POTENTIALS = $LAMMPS_POTENTIALS"
echo "LAMMPS_COMMAND = $LAMMPS_COMMAND"
echo "ASE_LAMMPSRUN_COMMAND = $ASE_LAMMPSRUN_COMMAND"
- name: Test with pytest
run: |
pytest --capture=no --cov --cov-report=xml
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ dependencies = [
"ase>=3.22.1,<=3.23.0",
"pymatgen>=2024.6.4",
"numpy>=1.21.6,<2.0.0",
"nff @ git+https://github.com/learningmatter-mit/[email protected]",
"catkit @ git+https://github.com/HojeChun/CatKit.git@588f35b",
"torch>=2.1.0",
"seaborn>=0.13.1",
Expand Down
151 changes: 0 additions & 151 deletions tutorials/GaN_0001.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -151,157 +151,6 @@
"lammps_surf_calc.set(**calc_settings)"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"environ{'USER': 'dux',\n",
" 'SSH_CLIENT': '10.31.169.98 57197 22',\n",
" 'XDG_SESSION_TYPE': 'tty',\n",
" 'SHLVL': '2',\n",
" 'MOTD_SHOWN': 'pam',\n",
" 'HOME': '/home/dux',\n",
" 'OLDPWD': '/home/dux',\n",
" 'SSL_CERT_FILE': '/usr/lib/ssl/certs/ca-certificates.crt',\n",
" 'DBUS_SESSION_BUS_ADDRESS': 'unix:path=/run/user/1026/bus',\n",
" 'LOGNAME': 'dux',\n",
" '_': '/home/dux/miniforge3/envs/vssr-mc/bin/python',\n",
" 'XDG_SESSION_CLASS': 'user',\n",
" 'VSCODE_CLI_REQUIRE_TOKEN': '61fe5d2b-6e46-4619-bd57-22ab43e398a7',\n",
" 'XDG_SESSION_ID': '40473',\n",
" 'PATH': '/home/dux/miniforge3/envs/vssr-mc/bin:/home/dux/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/bin/remote-cli:/home/dux/QUIP/build/linux_x86_64_gfortran:/home/dux/miniforge3/envs/vssr-mc/bin:/home/dux/miniconda3/condabin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin',\n",
" 'VSCODE_AGENT_FOLDER': '/home/dux/.vscode-server',\n",
" 'XDG_RUNTIME_DIR': '/run/user/1026',\n",
" 'SSL_CERT_DIR': '/usr/lib/ssl/certs',\n",
" 'LANG': 'en_US.UTF-8',\n",
" 'SSH_AUTH_SOCK': '/tmp/ssh-7DLtPPwgPuO7/agent.3998',\n",
" 'SHELL': '/bin/zsh',\n",
" 'PWD': '/home/dux',\n",
" 'SSH_CONNECTION': '10.31.169.98 57197 10.82.2.145 22',\n",
" 'VSCODE_HANDLES_SIGPIPE': 'true',\n",
" 'ZSH': '/home/dux/.oh-my-zsh',\n",
" 'PAGER': 'cat',\n",
" 'LESS': '-R',\n",
" 'LSCOLORS': 'Gxfxcxdxbxegedabagacad',\n",
" 'LS_COLORS': '',\n",
" 'SSH_AGENT_PID': '4000',\n",
" 'P9K_SSH': '1',\n",
" '_P9K_SSH_TTY': '',\n",
" 'CONDA_EXE': '/home/dux/miniforge3/bin/conda',\n",
" '_CE_M': '',\n",
" '_CE_CONDA': '',\n",
" 'CONDA_PYTHON_EXE': '/home/dux/miniforge3/bin/python',\n",
" 'CONDA_SHLVL': '3',\n",
" 'CONDA_PREFIX': '/home/dux/miniforge3/envs/vssr-mc',\n",
" 'CONDA_DEFAULT_ENV': 'vssr-mc',\n",
" 'CONDA_PROMPT_MODIFIER': '(vssr-mc) ',\n",
" 'DJANGOCHEMDIR': '/home/dux/htvs/djangochem',\n",
" 'HTVSDIR': '/home/dux/htvs',\n",
" 'ADVATTDIR': '/home/dux/Atomistic-Adversarial-Attacks',\n",
" 'PYTHONPATH': '/home/dux/Atomistic-Adversarial-Attacks:/home/dux/htvs:/home/dux/htvs/djangochem:',\n",
" 'LAMMPS_COMMAND': '/home/dux/miniforge3/envs/vssr-mc/bin/lmp',\n",
" 'LAMMPS_POTENTIALS': '/home/dux/surface_sampling/mcmc/potentials',\n",
" 'ASE_LAMMPSRUN_COMMAND': '/home/dux/miniforge3/envs/vssr-mc/bin/lmp',\n",
" 'HOME2': '/mnt/data0/dux',\n",
" 'MP_API_KEY': 'AuU7jLQOeQRjZkLH28ZAgutMdfXbMl46',\n",
" 'CONDA_PREFIX_1': '/home/dux/miniconda3',\n",
" 'XML_CATALOG_FILES': 'file:///home/dux/miniforge3/envs/vssr-mc/etc/xml/catalog file:///etc/xml/catalog',\n",
" 'VSCODE_AMD_ENTRYPOINT': 'vs/workbench/api/node/extensionHostProcess',\n",
" 'VSCODE_HANDLES_UNCAUGHT_ERRORS': 'true',\n",
" 'VSCODE_NLS_CONFIG': '{\"locale\":\"en\",\"osLocale\":\"en\",\"availableLanguages\":{}}',\n",
" 'BROWSER': '/home/dux/.vscode-server/cli/servers/Stable-ea1445cc7016315d0f5728f8e8b12a45dc0a7286/server/bin/helpers/browser.sh',\n",
" 'VSCODE_CWD': '/home/dux',\n",
" 'ELECTRON_RUN_AS_NODE': '1',\n",
" 'VSCODE_IPC_HOOK_CLI': '/run/user/1026/vscode-ipc-0b7ed475-2d4f-41b1-888d-74dc1065d46a.sock',\n",
" 'APPLICATION_INSIGHTS_NO_DIAGNOSTIC_CHANNEL': '1',\n",
" 'VSCODE_L10N_BUNDLE_LOCATION': '',\n",
" 'DEBUG_FFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe',\n",
" 'GCC_RANLIB': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-ranlib',\n",
" 'PYTHONUNBUFFERED': '1',\n",
" 'build_alias': 'x86_64-conda-linux-gnu',\n",
" 'CMAKE_ARGS': '-DCMAKE_AR=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ar -DCMAKE_CXX_COMPILER_AR=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_C_COMPILER_AR=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-ar -DCMAKE_RANLIB=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ranlib -DCMAKE_CXX_COMPILER_RANLIB=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_C_COMPILER_RANLIB=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-ranlib -DCMAKE_LINKER=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ld -DCMAKE_STRIP=/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-strip -DCMAKE_BUILD_TYPE=Release',\n",
" 'GPROF': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gprof',\n",
" 'CONDA_TOOLCHAIN_BUILD': 'x86_64-conda-linux-gnu',\n",
" '_CONDA_PYTHON_SYSCONFIGDATA_NAME': '_sysconfigdata_x86_64_conda_cos6_linux_gnu',\n",
" 'STRINGS': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-strings',\n",
" 'CPP': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-cpp',\n",
" 'FFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'CONDA_ROOT': '/home/dux/miniforge3',\n",
" 'CXX': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-c++',\n",
" 'CXXFLAGS': '-fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'CONDA_TOOLCHAIN_HOST': 'x86_64-conda-linux-gnu',\n",
" 'DEBUG_CXXFLAGS': '-fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'LDFLAGS': '-Wl,-O2 -Wl,--sort-common -Wl,--as-needed -Wl,-z,relro -Wl,-z,now -Wl,--disable-new-dtags -Wl,--gc-sections -Wl,--allow-shlib-undefined -Wl,-rpath,/home/dux/miniforge3/envs/vssr-mc/lib -Wl,-rpath-link,/home/dux/miniforge3/envs/vssr-mc/lib -L/home/dux/miniforge3/envs/vssr-mc/lib',\n",
" 'MESON_ARGS': '--buildtype release',\n",
" 'DEBUG_CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fvar-tracking-assignments -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'CXX_FOR_BUILD': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-c++',\n",
" 'ELFEDIT': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-elfedit',\n",
" 'CMAKE_PREFIX_PATH': '/home/dux/miniforge3/envs/vssr-mc:/home/dux/miniforge3/envs/vssr-mc/x86_64-conda-linux-gnu/sysroot/usr',\n",
" 'CPPFLAGS': '-DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'LD': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ld',\n",
" 'READELF': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-readelf',\n",
" 'GXX': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-g++',\n",
" 'FC_FOR_BUILD': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gfortran',\n",
" 'GCC_AR': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-ar',\n",
" 'ADDR2LINE': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-addr2line',\n",
" 'GCC_NM': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc-nm',\n",
" 'SIZE': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-size',\n",
" 'F77': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gfortran',\n",
" 'HOST': 'x86_64-conda-linux-gnu',\n",
" 'CC_FOR_BUILD': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-cc',\n",
" 'PYTHONIOENCODING': 'utf-8',\n",
" 'AR': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ar',\n",
" 'AS': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-as',\n",
" 'DEBUG_CPPFLAGS': '-D_DEBUG -D_FORTIFY_SOURCE=2 -Og -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'F95': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-f95',\n",
" 'F90': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gfortran',\n",
" 'host_alias': 'x86_64-conda-linux-gnu',\n",
" 'NM': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-nm',\n",
" 'GCC': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gcc',\n",
" 'DEBUG_FORTRANFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-all -fno-plt -Og -g -Wall -Wextra -fcheck=all -fbacktrace -fimplicit-none -fvar-tracking-assignments -ffunction-sections -pipe',\n",
" 'FORTRANFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'LD_GOLD': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ld.gold',\n",
" 'GFORTRAN': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gfortran',\n",
" 'OBJCOPY': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-objcopy',\n",
" 'FC': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-gfortran',\n",
" 'STRIP': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-strip',\n",
" 'OBJDUMP': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-objdump',\n",
" 'CC': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-cc',\n",
" 'CFLAGS': '-march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/dux/miniforge3/envs/vssr-mc/include',\n",
" 'CXXFILT': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-c++filt',\n",
" 'BUILD': 'x86_64-conda-linux-gnu',\n",
" 'CONDA_PREFIX_2': '/home/dux/miniforge3',\n",
" 'RANLIB': '/home/dux/miniforge3/envs/vssr-mc/bin/x86_64-conda-linux-gnu-ranlib',\n",
" 'CONDA_BUILD_SYSROOT': '/home/dux/miniforge3/envs/vssr-mc/x86_64-conda-linux-gnu/sysroot',\n",
" 'PYDEVD_IPYTHON_COMPATIBLE_DEBUGGING': '1',\n",
" 'PYTHON_FROZEN_MODULES': 'on',\n",
" 'PYDEVD_USE_FRAME_EVAL': 'NO',\n",
" 'TERM': 'xterm-color',\n",
" 'CLICOLOR': '1',\n",
" 'FORCE_COLOR': '1',\n",
" 'CLICOLOR_FORCE': '1',\n",
" 'GIT_PAGER': 'cat',\n",
" 'MPLBACKEND': 'module://matplotlib_inline.backend_inline',\n",
" 'RDBASE': '/home/dux/miniforge3/envs/vssr-mc/lib/python3.11/site-packages/rdkit',\n",
" 'KMP_DUPLICATE_LIB_OK': 'True',\n",
" 'KMP_INIT_AT_FORK': 'FALSE'}"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import os\n",
"\n",
"os.environ"
]
},
{
"cell_type": "markdown",
"metadata": {},
Expand Down
2 changes: 1 addition & 1 deletion tutorials/Si_111_5x5.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"np.set_printoptions(precision=3, suppress=True)\n",
"# uncomment and replace with correct path if there are errors with LAMMPS\n",
"# os.environ[\"LAMMPS_POTENTIALS\"] = \"/path/to/lammps/potentials/\"\n",
"# os.environ[\"LAMMPS_COMMAND\"] = \"/home/dux/miniforge3/envs/htvs/bin/lmp_serial\"\n",
"# os.environ[\"LAMMPS_COMMAND\"] =\"/path/to/lammps/src/lmp_serial\"\n",
"# os.environ[\"ASE_LAMMPSRUN_COMMAND\"] = os.environ[\"LAMMPS_COMMAND\"]"
]
},
Expand Down

0 comments on commit 2b5f8a1

Please sign in to comment.