Skip to content

Commit

Permalink
Merge branch 'release-1.9.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
cstein committed Dec 2, 2023
2 parents b9148f9 + 9df822e commit 66da80e
Show file tree
Hide file tree
Showing 6 changed files with 94 additions and 17 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/fragit_with_conda.yml
@@ -0,0 +1,29 @@
name: FragIt with Conda

on: [push]

jobs:
test:
name: Testing
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: fragit
environment-file: environment.yml
python-version: ${{ matrix.python-version }}
- name: Conda Information
run: |
conda info
conda list
- name: Run Testsuite
run:
pytest .

@@ -1,14 +1,14 @@
name: FragIt Tests
name: FragIt with OpenBabel Build

on: [push]

jobs:
build:

name: Testing
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.9", "3.10", "3.11"]
python-version: ["3.9", "3.10", "3.11", "3.12"]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -41,7 +41,6 @@ jobs:
cd openbabel_build
sudo make install
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -m pytest tests/*.py
- name: Run Testsuite
run: pytest .

19 changes: 19 additions & 0 deletions CHANGES.md
@@ -1,3 +1,22 @@
FragIt v1.9.1 Release Notes
===========================

This is a minor improvement release.

Updates since v1.9.0

* Documentation on installation is now up to date and
is fixed (Issue #38)
-- thanks to Anthony Nash for pointing
out the obsolete instructions.

See the README file for updated installation
instructions.

* Github actions now cover both the new installation
approach with conda and pip as well as the old
school approach with compilation of OpenBabel

FragIt v1.9.0 Release Notes
===========================

Expand Down
42 changes: 32 additions & 10 deletions README.md
Expand Up @@ -11,23 +11,45 @@ Currently, FragIt supports the [fragment molecular orbital](http://en.wikipedia.
## Obtaining FragIt

Since you found this file, it is obvious that you also found the source code. You can obtain the latest version from [github](https://www.github.com/FragIt/fragit-main) where [tagged releases](https://github.com/FragIt/fragit-main/releases) are also available.
You get the source code by cloning the repository

## Installing FragIt
git clone https://github.com/FragIt/fragit-main.git
s
## Installing FragIt in a Conda Environment With Pip
The easiest installation option is to use conda and pip.
We have supplied an `environment.yml` file for you to use.
Simply run

FragIt is a python library and installation is quite straight forward
cd fragit-main
conda env create -f environment.yml

python setup.py install
which creates an environment called fragit.
After activating the `fragit` environment

conda activate fragit

you can install fragit using `pip` with the following command

to install it in the default locations. To install it in a custom location, you can run the following
pip install .

python setup.py install --prefix=/path/to/custom/installation
## Installing FragIt Without Conda
Without conda, the installation of FragIt becomes slightly more
tedious and of course system dependent.
If you have root access, you can install all dependencies using
the system package manager, but if you don't, then you have to
install OpenBabel manually
(Github user [andersx](https://github.com/andersx) [wrote a guide](http://combichem.blogspot.dk/2013/12/compiling-open-babel-with-python.html) to how that is accomplished.)
Finally, the recommended installation method for FragIt is to use pip again

Remember to add the installation paths to your environment variables:
pip install . --user

export PATH=/path/to/custom/installation/bin:$PATH
export PYTHONPATH=/path/to/custom/installation/lib/python2.7/site-packages:$PYTHONPATH
but it is also possible using the old school approach (deprecated and not recommended)

python setup.py build
python setup.py install

shown here for a python 2.7 installation example.
remember to make sure that environment variables (`PATH` and `PYTHONPATH` at least!) are
set up correctly or else FragIt will complain that it cannot find itself.

## Running FragIt

Expand All @@ -44,6 +66,6 @@ See the [wiki](https://www.github.com/FragIt/fragit-main/wiki) for more examples
In order to run FragIt, you *need* the following installed on your system:

* The FragIt source code, look above for information on how to obtain it
* [Open Babel](http://www.openbabel.org) 2.3 or newer with [python language bindings](http://openbabel.org/docs/dev/Installation/install.html#compile-language-bindings) enabled. Github user [andersx](https://github.com/andersx) [wrote a guide](http://combichem.blogspot.dk/2013/12/compiling-open-babel-with-python.html) to how that is accomplished.
* [Open Babel](http://www.openbabel.org) 3 or newer with [python language bindings](http://openbabel.org/docs/dev/Installation/install.html#compile-language-bindings) enabled.
* [Numpy](http://numpy.scipy.org) 1.5 or newer.
* [Python](http://www.python.org) 3.9 (or later).
8 changes: 8 additions & 0 deletions environment.yml
@@ -0,0 +1,8 @@
name: fragit
channels:
- conda-forge
- defaults
dependencies:
- pytest
- numpy
- openbabel
2 changes: 1 addition & 1 deletion fragit/strings.py
Expand Up @@ -2,7 +2,7 @@
Copyright (C) 2011-2023 Casper Steinmann
"""

version = ("1", "9", "0")
version = ("1", "9", "1")
version_str = ".".join(version)

doc_str = """FragIt is a tool to fragment large molecules for use in fragment based quantum chemistry methods.
Expand Down

0 comments on commit 66da80e

Please sign in to comment.