Skip to content

Commit 57f2220

Browse files
authored
Merge pull request #203 from ATOMScience-org/1.5.0
1.5.0
2 parents 664d0f7 + 0fd5a9c commit 57f2220

File tree

153 files changed

+8823
-15952
lines changed

Some content is hidden

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

153 files changed

+8823
-15952
lines changed

.github/workflows/pkg_conda_pytest_integrative.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Run Conda Env, Pytest for integegrative test
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ 1.5.0 ]
66
paths: # the job will run when these files pushed
77
- '**.py'
88
- '**.sh'
99
- '**.yml'
10-
10+
- 'conda/**'
1111
jobs:
1212
test-integration-default:
1313
name: Default settings

.github/workflows/pkg_conda_pytest_unit.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ name: Run Conda Env, Pytest for unit tests
22

33
on:
44
push:
5-
branches: [ master ]
5+
branches: [ 1.5.0 ]
66
paths: # the job will run when these files pushed
77
- '**.py'
88
- '**.sh'
99
- '**.yml'
10-
10+
- 'conda/**'
1111
jobs:
1212
test-integration-default:
1313
name: Default settings

README.md

Lines changed: 110 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ Documentation in readthedocs format is available [here](https://ampl.readthedocs
2424
---
2525
## Table of contents
2626
- [Getting started](#Getting-started)
27-
- [Prerequisites](#Prerequisites)
2827
- [Install](#Install)
2928
- [Clone the git repository](#clone-repo)
30-
- [Create conda environment](#create-conda-env)
29+
- [Create pip environment](#create-pip-env)
3130
- [dgl and CUDA (**optional**)](#Install-dgl)
31+
- [Installation quick summary](#install-summary)
3232
- [Install with Docker](#Install-docker)
3333
- [Tutorials](#AMPL-tutorials)
3434
- [Tests](#Tests)
@@ -55,84 +55,133 @@ Documentation in readthedocs format is available [here](https://ampl.readthedocs
5555
Welcome to the ATOM Modeling PipeLine (AMPL) for Drug Discovery! These instructions will explain how to install this pipeline for model fitting and prediction.
5656
 
5757

58-
<a name="Prerequisites"></a>
59-
### Prerequisites
60-
AMPL is a Python 3 package that has been developed and run in a specific conda environment. The following prerequisites are necessary to install AMPL:
61-
62-
- conda (Anaconda 3 or Miniconda 3, Python 3)
63-
&nbsp;
64-
6558
<a name="Install"></a>
6659
### Install
60+
61+
For a quick install summary, see [here](#install-summary).
62+
6763
<a name="clone-repo"></a>
6864
#### Clone the git repository
6965

7066
`git clone https://github.com/ATOMScience-org/AMPL.git`
7167
&nbsp;
7268

73-
#### Create conda environment
74-
<a name="create-conda-env"></a>
69+
#### Create pip environment
70+
<a name="create-pip-env"></a>
7571

76-
There are two options:
77-
##### Option 1: do it manually.
72+
##### Create a virtual env.
7873

79-
> ***Note***: *`atomsci` is an example Conda environment name used here*.
74+
> ***Note***:
75+
> *We use `atomsci `as an example here.*
8076
77+
1. Go to the directory that will be the parent of the installation directory.
78+
79+
1.1 Define an environment variable - `ENVROOT`. For example:
80+
81+
```bash
82+
export ENVROOT=~/workspace # for LLNL LC users, use your workspace
83+
or
84+
export ENVROOT=~ # for other users
85+
cd $ENVROOT
8186
```
82-
cd conda
8387

84-
conda create -y -n atomsci --file conda_package_list.txt
88+
2. Use python 3.8 (required)
89+
90+
2.1 Install python 3.8 *WITHOUT* using `conda`; or
91+
92+
2.2 Point your PATH to an existing python 3.8 installation.
93+
94+
> ***Note***:
95+
> For LLNL users, put python 3.8 in your PATH. For example:
8596
86-
conda activate atomsci
97+
```bash
98+
module load python/3.8.2
99+
```
87100

88-
pip install -r pip_requirements.txt
101+
3. Create the virtual environment:
89102

90-
# This is to fix the error:
91-
#
92-
# 'tensorflow.python.training.experimental.mixed_precision' has no attribute '_register_wrapper_optimizer_cls'
103+
> ***Note***:
104+
> Only use `--system-site-packages` if you need to allow overriding packages with local versions (see below).
93105
94-
pip uninstall -y keras
106+
If you are going to install/modify packages within the virtualenv, you __do not__ need this flag.
95107

96-
pip install -U tensorflow==2.8.0 keras==2.8.0
108+
For example:
109+
```bash
110+
python3 -m venv atomsci
97111
```
98112

99-
##### Option 2: use a script.
100-
There is a script `create_ampl_env.sh` that will automate the conda env creation and the packages install for you.
113+
4. Activate the environment
114+
```bash
115+
source $ENVROOT/atomsci/bin/activate
116+
```
117+
5. Setup `PYTHONUSERBASE` environment variable
101118

119+
```bash
120+
export PYTHONUSERBASE=$ENVROOT/atomsci
102121
```
103-
$ source create_ampl_env.sh
122+
123+
6. Update pip, then use pip to install AMPL dependencies
124+
```bash
125+
python3 -m pip install pip --upgrade
104126
```
105127

106-
It will
128+
7. Clone AMPL repository if you have not done so. See [instruction](#Install)
107129

108-
- Prompt for a new conda environment name
109-
- Then run
110-
- conda create
111-
- conda activate
112-
- and pip install and other fixes
130+
8. Go to $AMPL_HOME/pip directory
113131

114-
> ***Note***: *Depending on system performance, creating the environment can take some time.*
115-
&nbsp;
132+
There are two install options.
116133

117-
#### Install AMPL
118-
Go to the `AMPL` root directory and install the AMPL package:
134+
* For the LLNL developers,
135+
136+
```bash
137+
cd $AMPL_HOME/pip
138+
pip3 install --force-reinstall --no-use-pep517 -r clients_requirements.txt # install atomsci.clients
139+
pip3 install --force-reinstall --no-use-pep517 -r requirements.txt # install library packages
119140
```
120-
conda activate atomsci
121141

122-
cd ..
142+
* For the external developers,
123143

124-
./build.sh && ./install.sh system
144+
```bash
145+
cd $AMPL_HOME/pip
146+
pip3 install --force-reinstall --no-use-pep517 -r requirements.txt
125147
```
126148

127-
#### Create jupyter notebook kernel (optional)
128-
With your environment activated:
149+
> ***Note***: *Depending on system performance, creating the environment can take some time.*
150+
&nbsp;
151+
152+
#### Install AMPL
153+
If you're an `AMPL` developer and want the installed `AMPL` package to link back to your cloned git repo, Run the following to build.
154+
155+
Here `$GITHOME` refers to the parent of your `AMPL` git working directory.
156+
157+
```bash
158+
cd $GITHOME/AMPL
159+
./build.sh
160+
pip3 install -e .
129161
```
130-
python -m ipykernel install --user --name atomsci
162+
<a name="install-summary"></a>
163+
#### Installation Quick Summary
164+
```bash
165+
export ENVROOT=~/workspace # set ENVROOT example
166+
cd $ENVROOT
167+
module load python/3.8.2 # use python 3.8.2
168+
python3 -m venv atomsci # create a new pip env
169+
source $ENVROOT/atomsci/bin/activate # activate the environemt
170+
171+
export PYTHONUSERBASE=$ENVROOT/atomsci # set PYTHONUSERBASE
172+
173+
python3 -m pip install pip --upgrade
174+
cd $AMPL_HOME/pip # cd to AMPL repo's pip directory
175+
176+
pip3 install --force-reinstall --no-use-pep517 -r clients_requirements.txt # (Optional) for LLNL developers only
177+
pip3 install --force-reinstall --no-use-pep517 -r requirements.txt
178+
179+
module load cuda/11.3 # setup for cuda
180+
export LD_LIBRARY_PATH=$ENVROOT/atomsci/lib:$LD_LIBRARY_PATH # add your env/lib to LD_LIBRARY_PATH
181+
cd .. # go to AMPL repo directory and run build
182+
./build.sh
183+
pip3 install -e .
131184
```
132-
- The `install.sh system` command installs AMPL directly in the conda environment. If `install.sh` alone is used, then AMPL is installed in the `$HOME/.local` directory.
133-
134-
- After this process, you will have an `atomsci` conda environment with all dependencies installed. The name of the AMPL package is `atomsci-ampl` and is installed in the `install.sh` script to the environment with conda's `pip`.
135-
&nbsp;
136185

137186
#### More installation information
138187
- More details on installation can be found in [Advanced installation](#Advanced-installation).
@@ -154,18 +203,20 @@ $ export CUDA_VISIBLE_DEVICES=''
154203

155204
##### If your machine has CUDA,
156205

157-
Go to the `AMPL` root directory and install the AMPL package:
158206
```
159-
conda activate atomsci
160-
161207
# load cuda, if on LC machine
162-
module load cuda/11.1
208+
module load cuda/11.3
209+
```
163210

164-
# add your conda/envs path to LD_LIBRARY_PATH
165-
export LD_LIBRARY_PATH=$HOME/.conda/envs/$test_env/lib:$LD_LIBRARY_PATH
211+
#### Create jupyter notebook kernel (optional)
212+
With your environment activated:
166213
```
214+
python -m ipykernel install --user --name atomsci
215+
```
216+
- The `install.sh system` command installs AMPL directly in the pip environment. If `install.sh` alone is used, then AMPL is installed in the `$HOME/.local` directory.
167217

168-
where `$test_env` is the name of the your current Conda environment to run [dgl](https://www.dgl.ai/) in.
218+
- After this process, you will have an `atomsci` pip environment with all dependencies installed. The name of the AMPL package is `atomsci-ampl` and is installed in the `install.sh` script to the environment.
219+
&nbsp;
169220

170221
<a name="Install-docker"></a>
171222
### Install with Docker
@@ -204,7 +255,7 @@ AMPL includes a suite of software tests. This section explains how to run a very
204255

205256
To run the Delaney Python script that curates a dataset, fits a model, and makes predictions, run the following commands:
206257
```
207-
conda activate atomsci
258+
source $ENVROOT/atomsci/bin/activate # activate your pip environment. `atomcsi` is an example here.
208259
209260
cd atomsci/ddm/test/integrative/delaney_RF
210261
@@ -386,19 +437,11 @@ AMPL has been developed and tested on the following Linux systems:
386437
&nbsp;
387438
388439
### Uninstallation
389-
To remove AMPL from a conda environment use:
440+
To remove AMPL from a pip environment use:
390441
```
391-
conda activate atomsci
392442
pip uninstall atomsci-ampl
393443
```
394444
&nbsp;
395-
396-
To remove the atomsci conda environment entirely from a system use:
397-
```
398-
conda deactivate
399-
conda remove --name atomsci --all
400-
```
401-
&nbsp;
402445
&nbsp;
403446
404447
@@ -408,7 +451,7 @@ conda remove --name atomsci --all
408451
### Running all tests
409452
To run the full set of tests, use Pytest from the test directory:
410453
```
411-
conda activate atomsci
454+
source $ENVROOT/atomsci/bin/activate # activate your pip environment. `atomsci` is an example here.
412455

413456
cd atomsci/ddm/test
414457

@@ -420,7 +463,7 @@ pytest
420463
Several of the tests take some time to fit. These tests can be submitted to a SLURM cluster as a batch job. Example general SLURM submit scripts are included as `pytest_slurm.sh`.
421464
422465
```
423-
conda activate atomsci
466+
source $ENVROOT/atomsci/bin/activate # activate your pip environment. `atomsci` is an example here.
424467

425468
cd atomsci/ddm/test/integrative/delaney_NN
426469

@@ -459,12 +502,12 @@ cd ../../..
459502
### Installing the AMPL for development
460503
To install the AMPL for development, use the following commands instead:
461504
```
462-
conda activate atomsci
505+
source $ENVROOT/atomsci/bin/activate # activate your pip environment. `atomsci` is an example here.
463506
./build.sh && ./install_dev.sh
464507
```
465508
&nbsp;
466509
467-
This will create a namespace package in your conda directory that points back to your git working directory, so every time you reimport a module you'll be in sync with your working code. Since site-packages is already in your sys.path, you won't have to fuss with PYTHONPATH or setting sys.path in your notebooks.
510+
This will create a namespace package in your environment directory that points back to your git working directory, so every time you reimport a module you'll be in sync with your working code. Since site-packages is already in your sys.path, you won't have to fuss with PYTHONPATH or setting sys.path in your notebooks.
468511
&nbsp;
469512
470513
### Versioning

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.4.2
1+
1.5.0
-16 Bytes
Binary file not shown.
-593 Bytes
Binary file not shown.
-778 Bytes
Binary file not shown.
3.85 MB
Binary file not shown.
-366 Bytes
Binary file not shown.
-239 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)