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

Transforms haddock3 into a python package #28

Merged
merged 6 commits into from
Jul 19, 2021
Merged
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
20 changes: 18 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

# WARNING: The `main` branch is not production-ready

The `main` branch is a prototype of newly refined architecture and it
Expand Down Expand Up @@ -27,12 +26,14 @@ cd haddock3
virtualenv-3.8 venv
source venv/bin/activate
pip install -r requirements.txt
python setup.py develop --no-deps
```

#### with `conda`
```bash
conda env create -f requirements.yml
conda activate haddock3
python setup.py develop --no-deps
```

### 1.3 Copy CNS binary to the expected path:
Expand Down Expand Up @@ -63,11 +64,26 @@ Save and exit. Source the file:
source bin/activate_haddock
```

You need to `source bin/activate_haddock` at each new terminal window
you wish to use `haddock3`.

### 1.5 Keep up to date

In the `github` folder of `haddock3` run:

```bash
git pull
```

This will pull the latest changes to your local folder and because you
installed `haddock3` with the option `develop` those changes become
available immediately.

## 2. Examples

### 2.1. Basic scoring of an ensemble of 5 structures:

```bash
cd examples/recipes/scoring/
haddock3.py scoring.toml
haddock3 scoring.toml
```
File renamed without changes.
89 changes: 89 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
#!/usr/bin/env python
# -*- encoding: utf-8 -*-
"""Setup dot py."""
from glob import glob
from os.path import basename, dirname, join, splitext

from setuptools import find_packages, setup


def read(*names, **kwargs):
"""Read description files."""
path = join(dirname(__file__), *names)
with open(path, encoding=kwargs.get('encoding', 'utf8')) as fh:
return fh.read()


# activate once added, do not remove
#long_description = '{}\n{}'.format(
# read('README.rst'),
# read(join('docs', 'CHANGELOG.rst')),
# )


setup(
name='haddock3',
version='0.0.3-alpha',
description='Haddock 3.',
long_description='',#long_description,
long_description_content_type='text/x-rst',
license='Apache License 2.0',
author='HADDOCK',
author_email='A.M.J.J.Bonvin@uu.nl',
url='https://github.com/haddocking/haddock3',
packages=find_packages('src'),
package_dir={'': 'src'},
#py_modules=[splitext(basename(i))[0] for i in glob("src/*.py")],
include_package_data=True,
zip_safe=False,
classifiers=[
# complete classifier list:
# http://pypi.python.org/pypi?%3Aaction=list_classifiers
'Development Status :: 3 - Alpha',
#'Development Status :: 4 - Beta',
'License :: OSI Approved :: Apache Software License',
'Natural Language :: English',
'Operating System :: POSIX',
'Operating System :: MacOS',
'Operating System :: Microsoft',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
],
project_urls={
'webpage': 'https://github.com/haddocking/haddock3',
'Documentation': 'https://github.com/haddocking/haddock3#readme',
'Changelog': '',
'Issue Tracker': 'https://github.com/haddocking/haddock3/issues',
'Discussion Forum': 'https://github.com/haddocking/haddock3/issues',
},
keywords=[
'Structural Biology',
'Biochemistry',
'Docking',
'Protein docking',
'Proteins',
],
python_requires='>=3.8, <4',
install_requires=[
# not added on purpose
],
extras_require={
},
setup_requires=[
],
entry_points={
'console_scripts': [
'haddock3 = haddock.clis.cli:main',
]
},
# cmdclass={'build_ext': optional_build_ext},
# ext_modules=[
# Extension(
# splitext(relpath(path, 'src').replace(os.sep, '.'))[0],
# sources=[path],
# include_dirs=[dirname(path)]
# )
# for root, _, _ in os.walk('src')
# for path in glob(join(root, '*.c'))
# ],
)
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.