diff --git a/.codecov.yml b/.codecov.yml deleted file mode 100644 index a3ed7f4..0000000 --- a/.codecov.yml +++ /dev/null @@ -1,14 +0,0 @@ -# Codecov configuration to make it a bit less noisy -coverage: - status: - patch: false - project: - default: - threshold: 50% -comment: - layout: "header" - require_changes: false - branches: null - behavior: default - flags: null - paths: null \ No newline at end of file diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md deleted file mode 100644 index 3203437..0000000 --- a/.github/CONTRIBUTING.md +++ /dev/null @@ -1,42 +0,0 @@ -# How to contribute - -We welcome contributions from external contributors, and this document -describes how to merge code changes into this qupkake. - -## Getting Started - -* Make sure you have a [GitHub account](https://github.com/signup/free). -* [Fork](https://help.github.com/articles/fork-a-repo/) this repository on GitHub. -* On your local machine, - [clone](https://help.github.com/articles/cloning-a-repository/) your fork of - the repository. - -## Making Changes - -* Add some really awesome code to your local fork. It's usually a [good - idea](http://blog.jasonmeridth.com/posts/do-not-issue-pull-requests-from-your-master-branch/) - to make changes on a - [branch](https://help.github.com/articles/creating-and-deleting-branches-within-your-repository/) - with the branch name relating to the feature you are going to add. -* When you are ready for others to examine and comment on your new feature, - navigate to your fork of qupkake on GitHub and open a [pull - request](https://help.github.com/articles/using-pull-requests/) (PR). Note that - after you launch a PR from one of your fork's branches, all - subsequent commits to that branch will be added to the open pull request - automatically. Each commit added to the PR will be validated for - mergability, compilation and test suite compliance; the results of these tests - will be visible on the PR page. -* If you're providing a new feature, you must add test cases and documentation. -* When the code is ready to go, make sure you run the test suite using pytest. -* When you're ready to be considered for merging, check the "Ready to go" - box on the PR page to let the qupkake devs know that the changes are complete. - The code will not be merged until this box is checked, the continuous - integration returns checkmarks, - and multiple core developers give "Approved" reviews. - -# Additional Resources - -* [General GitHub documentation](https://help.github.com/) -* [PR best practices](http://codeinthehole.com/writing/pull-requests-and-other-good-practices-for-teams-using-github/) -* [A guide to contributing to software packages](http://www.contribution-guide.org) -* [Thinkful PR example](http://www.thinkful.com/learn/github-pull-request-tutorial/#Time-to-Submit-Your-First-PR) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md deleted file mode 100644 index c772b96..0000000 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ /dev/null @@ -1,12 +0,0 @@ -## Description -Provide a brief description of the PR's purpose here. - -## Todos -Notable points that this PR has either accomplished or will accomplish. - - [ ] TODO 1 - -## Questions -- [ ] Question1 - -## Status -- [ ] Ready to go \ No newline at end of file diff --git a/.github/workflows/CI.yaml b/.github/workflows/CI.yaml deleted file mode 100644 index 86072b9..0000000 --- a/.github/workflows/CI.yaml +++ /dev/null @@ -1,64 +0,0 @@ -name: CI - -on: - # GitHub has started calling new repo's first branch "main" https://github.com/github/renaming - # The cookiecutter uses the "--initial-branch" flag when it runs git-init - push: - branches: - - "main" - pull_request: - branches: - - "main" - schedule: - # Weekly tests run on main by default: - # Scheduled workflows run on the latest commit on the default or base branch. - # (from https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule) - - cron: "0 0 * * 0" - -jobs: - test: - name: Test on ${{ matrix.os }}, Python ${{ matrix.python-version }} - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest] - python-version: [3.9, "3.10"] - - steps: - - uses: actions/checkout@v3 - - - name: Additional info about the build - shell: bash - run: | - uname -a - df -h - ulimit -a - - # More info on options: https://github.com/marketplace/actions/provision-with-micromamba - - uses: mamba-org/provision-with-micromamba@main - with: - environment-file: devtools/conda-envs/test_env.yaml - environment-name: test - channels: conda-forge,defaults - extra-specs: | - python=${{ matrix.python-version }} - - - name: Install package - # conda setup requires this special shell - shell: bash -l {0} - run: | - python -m pip install . --no-deps - micromamba list - - - name: Run tests - # conda setup requires this special shell - shell: bash -l {0} - run: | - pytest -v --cov=qupkake --cov-report=xml --color=yes qupkake/tests/ - - - name: CodeCov - uses: codecov/codecov-action@v1 - with: - file: ./coverage.xml - flags: unittests - name: codecov-${{ matrix.os }}-py${{ matrix.python-version }} diff --git a/.lgtm.yml b/.lgtm.yml deleted file mode 100644 index 9b8bd44..0000000 --- a/.lgtm.yml +++ /dev/null @@ -1,12 +0,0 @@ -# Configure LGTM for this package - -extraction: - python: # Configure Python - python_setup: # Configure the setup - version: 3 # Specify Version 3 -path_classifiers: - library: - - versioneer.py # Set Versioneer.py to an external "library" (3rd party code) - - devtools/* - generated: - - qupkake/_version.py diff --git a/MANIFEST.in b/MANIFEST.in deleted file mode 100644 index 48e8e1a..0000000 --- a/MANIFEST.in +++ /dev/null @@ -1,8 +0,0 @@ -include CODE_OF_CONDUCT.md -include LICENSE -include MANIFEST.in -include versioneer.py -include qupkake/xtb-641/* - -graft qupkake -global-exclude *.py[cod] __pycache__ *.so diff --git a/qupkake/models/__init__.py b/data/logs/error_log.txt similarity index 100% rename from qupkake/models/__init__.py rename to data/logs/error_log.txt diff --git a/data/output/qupkake_output.sdf b/data/output/qupkake_output.sdf new file mode 100644 index 0000000..82b4a57 --- /dev/null +++ b/data/output/qupkake_output.sdf @@ -0,0 +1,548 @@ +molecule + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.7978 -2.2754 -0.3821 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2904 -3.2041 -0.4346 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4367 -4.7419 -0.3793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.0637 -4.1707 1.8950 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3113 -4.0878 1.7509 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3953 -1.6099 1.6470 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1484 -2.2442 3.1000 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6162 -1.1848 0.6329 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.4193 -1.9797 2.0043 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5438 -0.4597 2.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8131 -2.9704 -2.9247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1723 -1.9023 -4.8562 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4844 -1.7511 -4.2499 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7863 0.2039 -4.0793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9490 0.5254 -4.2453 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3666 -0.0372 -1.9287 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0805 0.9428 -1.8456 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2882 -1.0140 -2.5769 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0572 -2.3682 0.1861 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.1154 -3.2497 -1.3273 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3637 -2.2708 -1.8346 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3178 -3.2501 -0.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3562 -1.4889 -0.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6721 2.9139 2.3697 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4866 1.2629 2.9154 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3096 0.4364 3.5872 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0621 0.8888 4.0356 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1348 2.1410 3.1270 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6494 3.3933 4.3020 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.9385 3.8138 2.5994 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7678 4.6085 1.8777 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6059 4.1658 1.4309 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (1) +11 + +> (1) +basic + +> (1) +4.975102 + +$$$$ +molecule + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.7978 -2.2754 -0.3821 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2904 -3.2041 -0.4346 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4367 -4.7419 -0.3793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.0637 -4.1707 1.8950 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3113 -4.0878 1.7509 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3953 -1.6099 1.6470 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1484 -2.2442 3.1000 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6162 -1.1848 0.6329 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.4193 -1.9797 2.0043 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5438 -0.4597 2.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8131 -2.9704 -2.9247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1723 -1.9023 -4.8562 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4844 -1.7511 -4.2499 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7863 0.2039 -4.0793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9490 0.5254 -4.2453 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3666 -0.0372 -1.9287 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0805 0.9428 -1.8456 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2882 -1.0140 -2.5769 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0572 -2.3682 0.1861 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.1154 -3.2497 -1.3273 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3637 -2.2708 -1.8346 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3178 -3.2501 -0.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3562 -1.4889 -0.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6721 2.9139 2.3697 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4866 1.2629 2.9154 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3096 0.4364 3.5872 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0621 0.8888 4.0356 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1348 2.1410 3.1270 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6494 3.3933 4.3020 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.9385 3.8138 2.5994 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7678 4.6085 1.8777 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6059 4.1658 1.4309 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (2) +16 + +> (2) +basic + +> (2) +5.674585 + +$$$$ +molecule + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.7978 -2.2754 -0.3821 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2904 -3.2041 -0.4346 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4367 -4.7419 -0.3793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.0637 -4.1707 1.8950 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3113 -4.0878 1.7509 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3953 -1.6099 1.6470 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1484 -2.2442 3.1000 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6162 -1.1848 0.6329 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.4193 -1.9797 2.0043 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5438 -0.4597 2.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8131 -2.9704 -2.9247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1723 -1.9023 -4.8562 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4844 -1.7511 -4.2499 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7863 0.2039 -4.0793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9490 0.5254 -4.2453 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3666 -0.0372 -1.9287 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0805 0.9428 -1.8456 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2882 -1.0140 -2.5769 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0572 -2.3682 0.1861 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.1154 -3.2497 -1.3273 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3637 -2.2708 -1.8346 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3178 -3.2501 -0.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3562 -1.4889 -0.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6721 2.9139 2.3697 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4866 1.2629 2.9154 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3096 0.4364 3.5872 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0621 0.8888 4.0356 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1348 2.1410 3.1270 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6494 3.3933 4.3020 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.9385 3.8138 2.5994 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7678 4.6085 1.8777 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6059 4.1658 1.4309 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (3) +17 + +> (3) +basic + +> (3) +5.193641 + +$$$$ +molecule + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.7978 -2.2754 -0.3821 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2904 -3.2041 -0.4346 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4367 -4.7419 -0.3793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.0637 -4.1707 1.8950 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3113 -4.0878 1.7509 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3953 -1.6099 1.6470 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1484 -2.2442 3.1000 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6162 -1.1848 0.6329 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.4193 -1.9797 2.0043 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5438 -0.4597 2.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8131 -2.9704 -2.9247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1723 -1.9023 -4.8562 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4844 -1.7511 -4.2499 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7863 0.2039 -4.0793 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9490 0.5254 -4.2453 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3666 -0.0372 -1.9287 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0805 0.9428 -1.8456 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2882 -1.0140 -2.5769 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0572 -2.3682 0.1861 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.1154 -3.2497 -1.3273 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3637 -2.2708 -1.8346 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3178 -3.2501 -0.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3562 -1.4889 -0.2394 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6721 2.9139 2.3697 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4866 1.2629 2.9154 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3096 0.4364 3.5872 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0621 0.8888 4.0356 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1348 2.1410 3.1270 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6494 3.3933 4.3020 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.9385 3.8138 2.5994 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7678 4.6085 1.8777 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6059 4.1658 1.4309 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (4) +2 + +> (4) +acidic + +> (4) +11.654716 + +$$$$ diff --git a/data/output/qupkake_output_1.sdf b/data/output/qupkake_output_1.sdf new file mode 100644 index 0000000..cac0974 --- /dev/null +++ b/data/output/qupkake_output_1.sdf @@ -0,0 +1,548 @@ +molecule_t1 + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5106 -2.6358 -0.2234 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4507 -4.7489 -0.3642 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2758 -3.1273 -0.3686 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2940 -4.0740 1.7285 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.1283 -4.1069 1.8553 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4083 -1.6241 1.5862 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1944 -2.2679 3.1051 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.0242 -1.1176 2.6404 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.2142 -2.0512 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2894 -0.5112 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8387 -2.9494 -2.9169 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4906 -1.7728 -4.2247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1446 -1.9281 -4.8712 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9841 0.5103 -4.2235 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7488 0.2708 -4.1286 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3652 0.0229 -1.9160 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1593 0.9145 -1.8464 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2366 -1.0044 -2.5995 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0838 -3.2272 -1.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0843 -2.2789 0.1980 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3053 -2.3267 0.2227 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3351 -1.4286 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3271 -3.2249 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6647 2.9266 2.3431 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4212 1.2033 2.8888 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3279 0.4306 3.5860 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0744 0.8881 4.0448 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6899 3.0760 4.3587 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1556 2.2500 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.8216 4.0150 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7827 4.6169 1.8807 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6226 4.1672 1.4280 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (1) +11 + +> (1) +basic + +> (1) +5.031635 + +$$$$ +molecule_t1 + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5106 -2.6358 -0.2234 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4507 -4.7489 -0.3642 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2758 -3.1273 -0.3686 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2940 -4.0740 1.7285 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.1283 -4.1069 1.8553 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4083 -1.6241 1.5862 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1944 -2.2679 3.1051 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.0242 -1.1176 2.6404 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.2142 -2.0512 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2894 -0.5112 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8387 -2.9494 -2.9169 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4906 -1.7728 -4.2247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1446 -1.9281 -4.8712 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9841 0.5103 -4.2235 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7488 0.2708 -4.1286 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3652 0.0229 -1.9160 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1593 0.9145 -1.8464 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2366 -1.0044 -2.5995 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0838 -3.2272 -1.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0843 -2.2789 0.1980 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3053 -2.3267 0.2227 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3351 -1.4286 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3271 -3.2249 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6647 2.9266 2.3431 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4212 1.2033 2.8888 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3279 0.4306 3.5860 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0744 0.8881 4.0448 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6899 3.0760 4.3587 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1556 2.2500 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.8216 4.0150 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7827 4.6169 1.8807 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6226 4.1672 1.4280 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (2) +16 + +> (2) +basic + +> (2) +5.714823 + +$$$$ +molecule_t1 + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5106 -2.6358 -0.2234 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4507 -4.7489 -0.3642 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2758 -3.1273 -0.3686 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2940 -4.0740 1.7285 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.1283 -4.1069 1.8553 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4083 -1.6241 1.5862 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1944 -2.2679 3.1051 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.0242 -1.1176 2.6404 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.2142 -2.0512 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2894 -0.5112 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8387 -2.9494 -2.9169 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4906 -1.7728 -4.2247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1446 -1.9281 -4.8712 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9841 0.5103 -4.2235 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7488 0.2708 -4.1286 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3652 0.0229 -1.9160 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1593 0.9145 -1.8464 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2366 -1.0044 -2.5995 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0838 -3.2272 -1.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0843 -2.2789 0.1980 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3053 -2.3267 0.2227 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3351 -1.4286 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3271 -3.2249 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6647 2.9266 2.3431 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4212 1.2033 2.8888 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3279 0.4306 3.5860 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0744 0.8881 4.0448 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6899 3.0760 4.3587 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1556 2.2500 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.8216 4.0150 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7827 4.6169 1.8807 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6226 4.1672 1.4280 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (3) +17 + +> (3) +basic + +> (3) +5.245088 + +$$$$ +molecule_t1 + RDKit 3D + + 60 62 0 0 0 0 0 0 0 0999 V2000 + 1.8700 -3.8659 -2.8457 O 0 0 0 0 0 0 0 0 0 0 0 0 + 1.1543 -3.1577 -2.1437 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2512 -3.1024 -0.7663 N 0 0 0 0 0 0 0 0 0 0 0 0 + 2.3760 -3.6894 -0.0781 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2442 -3.6007 1.4403 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.2588 -2.1778 2.0107 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5349 -1.4115 1.7001 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.0118 -2.2830 -2.7106 C 0 0 2 0 0 0 0 0 0 0 0 0 + 0.4314 -1.5755 -4.0029 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.2095 -0.0998 -3.7358 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.3111 -0.0031 -2.2295 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3527 -1.2181 -1.7111 N 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8376 -1.0803 -1.5772 C 0 0 1 0 0 0 0 0 0 0 0 0 + -2.4296 -2.3182 -0.8456 C 0 0 0 0 0 0 0 0 0 0 0 0 + -3.9559 -2.3251 -0.8203 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2390 0.1597 -0.8192 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9273 1.2030 -1.2360 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.9929 2.0764 -0.1704 N 0 0 0 0 0 0 0 0 0 0 0 0 + -2.3379 1.5059 0.8197 C 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0969 1.9957 2.1982 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6388 2.2725 2.4835 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1331 1.3561 3.2104 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4833 1.6094 3.4614 C 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0903 2.7733 2.9768 C 0 0 0 0 0 0 0 0 0 0 0 0 + 3.5357 3.0468 3.2699 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3205 3.6913 2.2546 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.0308 3.4412 2.0049 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.8400 0.2736 0.4882 O 0 0 0 0 0 0 0 0 0 0 0 0 + 0.5106 -2.6358 -0.2234 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.4507 -4.7489 -0.3642 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2758 -3.1273 -0.3686 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.2940 -4.0740 1.7285 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.1283 -4.1069 1.8553 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4083 -1.6241 1.5862 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1944 -2.2679 3.1051 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.0242 -1.1176 2.6404 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.2142 -2.0512 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.2894 -0.5112 1.1176 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.8387 -2.9494 -2.9169 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4906 -1.7728 -4.2247 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1446 -1.9281 -4.8712 H 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9841 0.5103 -4.2235 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.7488 0.2708 -4.1286 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.3652 0.0229 -1.9160 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1593 0.9145 -1.8464 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.2366 -1.0044 -2.5995 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0838 -3.2272 -1.3597 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0843 -2.2789 0.1980 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3053 -2.3267 0.2227 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3351 -1.4286 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -4.3271 -3.2249 -1.3327 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.6647 2.9266 2.3431 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.4212 1.2033 2.8888 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.3279 0.4306 3.5860 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.0744 0.8881 4.0448 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.6899 3.0760 4.3587 H 0 0 0 0 0 0 0 0 0 0 0 0 + 4.1556 2.2500 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.8216 4.0150 2.8330 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1.7827 4.6169 1.8807 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6226 4.1672 1.4280 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 2 0 + 2 3 1 0 + 3 4 1 0 + 4 5 1 0 + 5 6 1 0 + 6 7 1 0 + 2 8 1 0 + 8 9 1 0 + 9 10 1 0 + 10 11 1 0 + 8 12 1 0 + 12 13 1 0 + 13 14 1 0 + 14 15 1 0 + 13 16 1 0 + 16 17 2 0 + 17 18 1 0 + 18 19 2 0 + 19 20 1 0 + 20 21 1 0 + 21 22 2 0 + 22 23 1 0 + 23 24 2 0 + 24 25 1 0 + 24 26 1 0 + 26 27 2 0 + 19 28 1 0 + 12 11 1 0 + 28 16 1 0 + 27 21 1 0 + 3 29 1 0 + 4 30 1 0 + 4 31 1 0 + 5 32 1 0 + 5 33 1 0 + 6 34 1 0 + 6 35 1 0 + 7 36 1 0 + 7 37 1 0 + 7 38 1 0 + 8 39 1 6 + 9 40 1 0 + 9 41 1 0 + 10 42 1 0 + 10 43 1 0 + 11 44 1 0 + 11 45 1 0 + 13 46 1 6 + 14 47 1 0 + 14 48 1 0 + 15 49 1 0 + 15 50 1 0 + 15 51 1 0 + 20 52 1 0 + 20 53 1 0 + 22 54 1 0 + 23 55 1 0 + 25 56 1 0 + 25 57 1 0 + 25 58 1 0 + 26 59 1 0 + 27 60 1 0 +M END +> (4) +2 + +> (4) +acidic + +> (4) +11.664512 + +$$$$ diff --git a/data/processed/molecule.pt b/data/processed/molecule.pt new file mode 100644 index 0000000..93b86c5 Binary files /dev/null and b/data/processed/molecule.pt differ diff --git a/data/processed/pre_filter.pt b/data/processed/pre_filter.pt new file mode 100644 index 0000000..1af571b Binary files /dev/null and b/data/processed/pre_filter.pt differ diff --git a/data/processed/pre_transform.pt b/data/processed/pre_transform.pt new file mode 100644 index 0000000..1af571b Binary files /dev/null and b/data/processed/pre_transform.pt differ diff --git a/data/raw/molecule.sdf b/data/raw/molecule.sdf new file mode 100644 index 0000000..06b8a5e --- /dev/null +++ b/data/raw/molecule.sdf @@ -0,0 +1,54 @@ +molecule + RDKit 3D + + 21 21 0 0 0 0 0 0 0 0999 V2000 + -2.5960 -2.2696 0.0648 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7187 -1.1363 -0.3760 C 0 0 0 0 0 0 0 0 0 0 0 0 + -1.5694 -0.7889 -1.5405 O 0 0 0 0 0 0 0 0 0 0 0 0 + -1.1424 -0.5510 0.7460 O 0 0 0 0 0 0 0 0 0 0 0 0 + -0.2349 0.4604 0.4178 C 0 0 0 0 0 0 0 0 0 0 0 0 + -0.6980 1.7768 0.5130 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.1642 2.8335 0.2273 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.4846 2.5754 -0.1395 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.9497 1.2583 -0.2153 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.0950 0.1821 0.0702 C 0 0 0 0 0 0 0 0 0 0 0 0 + 1.5903 -1.2187 0.0199 C 0 0 0 0 0 0 0 0 0 0 0 0 + 0.9771 -2.2262 0.3208 O 0 0 0 0 0 0 0 0 0 0 0 0 + 2.8642 -1.3007 -0.4107 O 0 0 0 0 0 0 0 0 0 0 0 0 + -3.0065 -2.7726 -0.8155 H 0 0 0 0 0 0 0 0 0 0 0 0 + -3.4223 -1.8851 0.6675 H 0 0 0 0 0 0 0 0 0 0 0 0 + -2.0086 -2.9949 0.6336 H 0 0 0 0 0 0 0 0 0 0 0 0 + -1.7266 1.9769 0.7996 H 0 0 0 0 0 0 0 0 0 0 0 0 + -0.1930 3.8587 0.2884 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.1566 3.4003 -0.3651 H 0 0 0 0 0 0 0 0 0 0 0 0 + 2.9861 1.0849 -0.4964 H 0 0 0 0 0 0 0 0 0 0 0 0 + 3.0487 -2.2633 -0.4100 H 0 0 0 0 0 0 0 0 0 0 0 0 + 1 2 1 0 + 2 3 2 0 + 2 4 1 0 + 4 5 1 0 + 5 6 2 0 + 6 7 1 0 + 7 8 2 0 + 8 9 1 0 + 9 10 2 0 + 10 11 1 0 + 11 12 2 0 + 11 13 1 0 + 10 5 1 0 + 1 14 1 0 + 1 15 1 0 + 1 16 1 0 + 6 17 1 0 + 7 18 1 0 + 8 19 1 0 + 9 20 1 0 + 13 21 1 0 +M END +> (1) +molecule + +> (1) +[H]OC(=O)c1c([H])c([H])c([H])c([H])c1OC(=O)C([H])([H])[H] + +$$$$ diff --git a/devtools/README.md b/devtools/README.md deleted file mode 100644 index f415a49..0000000 --- a/devtools/README.md +++ /dev/null @@ -1,56 +0,0 @@ -# Development, testing, and deployment tools - -This directory contains a collection of tools for running Continuous Integration (CI) tests, -conda installation, and other development tools not directly related to the coding process. - - -## Manifest - -### Continuous Integration - -You should test your code, but do not feel compelled to use these specific programs. You also may not need Unix and -Windows testing if you only plan to deploy on specific platforms. These are just to help you get started. - -### Conda Environment: - -This directory contains the files to setup the Conda environment for testing purposes - -* `conda-envs`: directory containing the YAML file(s) which fully describe Conda Environments, their dependencies, and those dependency provenance's - * `test_env.yaml`: Simple test environment file with base dependencies. Channels are not specified here and therefore respect global Conda configuration - -### Additional Scripts: - -This directory contains OS agnostic helper scripts which don't fall in any of the previous categories -* `scripts` - * `create_conda_env.py`: Helper program for spinning up new conda environments based on a starter file with Python Version and Env. Name command-line options - - -## How to contribute changes -- Clone the repository if you have write access to the main repo, fork the repository if you are a collaborator. -- Make a new branch with `git checkout -b {your branch name}` -- Make changes and test your code -- Ensure that the test environment dependencies (`conda-envs`) line up with the build and deploy dependencies (`conda-recipe/meta.yaml`) -- Push the branch to the repo (either the main or your fork) with `git push -u origin {your branch name}` - * Note that `origin` is the default name assigned to the remote, yours may be different -- Make a PR on GitHub with your changes -- We'll review the changes and get your code into the repo after lively discussion! - - -## Checklist for updates -- [ ] Make sure there is an/are issue(s) opened for your specific update -- [ ] Create the PR, referencing the issue -- [ ] Debug the PR as needed until tests pass -- [ ] Tag the final, debugged version - * `git tag -a X.Y.Z [latest pushed commit] && git push --follow-tags` -- [ ] Get the PR merged in - -## Versioneer Auto-version -[Versioneer](https://github.com/warner/python-versioneer) will automatically infer what version -is installed by looking at the `git` tags and how many commits ahead this version is. The format follows -[PEP 440](https://www.python.org/dev/peps/pep-0440/) and has the regular expression of: -```regexp -\d+.\d+.\d+(?\+\d+-[a-z0-9]+) -``` -If the version of this commit is the same as a `git` tag, the installed version is the same as the tag, -e.g. `qupkake-0.1.2`, otherwise it will be appended with `+X` where `X` is the number of commits -ahead from the last tag, and then `-YYYYYY` where the `Y`'s are replaced with the `git` commit hash. diff --git a/devtools/conda-envs/test_env.yaml b/devtools/conda-envs/test_env.yaml deleted file mode 100644 index 25d6fec..0000000 --- a/devtools/conda-envs/test_env.yaml +++ /dev/null @@ -1,30 +0,0 @@ -name: qupkake -channels: - - pytorch - - conda-forge - - defaults -dependencies: - # Base depends - - python - - pip - - pytorch::pytorch==2.1 - - torchmetrics - - torchvision - - pytorch-lightning=2.1.0 - # - pyg=2.4 - - pandas - - numpy - - scipy - - rdkit=2022.03.03 - # Testing - - pytest - - pytest-cov - #- codecov - - # Pip-only installs - - pip: - - torch_geometric==2.4 - # - torch-sparse - # - torch-scatter - - codecov - diff --git a/devtools/scripts/create_conda_env.py b/devtools/scripts/create_conda_env.py deleted file mode 100644 index 9ece84a..0000000 --- a/devtools/scripts/create_conda_env.py +++ /dev/null @@ -1,95 +0,0 @@ -import argparse -import os -import re -import glob -import shutil -import subprocess as sp -from tempfile import TemporaryDirectory -from contextlib import contextmanager -# YAML imports -try: - import yaml # PyYAML - loader = yaml.safe_load -except ImportError: - try: - import ruamel_yaml as yaml # Ruamel YAML - except ImportError: - try: - # Load Ruamel YAML from the base conda environment - from importlib import util as import_util - CONDA_BIN = os.path.dirname(os.environ['CONDA_EXE']) - ruamel_yaml_path = glob.glob(os.path.join(CONDA_BIN, '..', - 'lib', 'python*.*', 'site-packages', - 'ruamel_yaml', '__init__.py'))[0] - # Based on importlib example, but only needs to load_module since its the whole package, not just - # a module - spec = import_util.spec_from_file_location('ruamel_yaml', ruamel_yaml_path) - yaml = spec.loader.load_module() - except (KeyError, ImportError, IndexError): - raise ImportError("No YAML parser could be found in this or the conda environment. " - "Could not find PyYAML or Ruamel YAML in the current environment, " - "AND could not find Ruamel YAML in the base conda environment through CONDA_EXE path. " - "Environment not created!") - loader = yaml.YAML(typ="safe").load # typ="safe" avoids odd typing on output - - -@contextmanager -def temp_cd(): - """Temporary CD Helper""" - cwd = os.getcwd() - with TemporaryDirectory() as td: - try: - os.chdir(td) - yield - finally: - os.chdir(cwd) - - -# Args -parser = argparse.ArgumentParser(description='Creates a conda environment from file for a given Python version.') -parser.add_argument('-n', '--name', type=str, - help='The name of the created Python environment') -parser.add_argument('-p', '--python', type=str, - help='The version of the created Python environment') -parser.add_argument('conda_file', - help='The file for the created Python environment') - -args = parser.parse_args() - -# Open the base file -with open(args.conda_file, "r") as handle: - yaml_script = loader(handle.read()) - -python_replacement_string = "python {}*".format(args.python) - -try: - for dep_index, dep_value in enumerate(yaml_script['dependencies']): - if re.match('python([ ><=*]+[0-9.*]*)?$', dep_value): # Match explicitly 'python' and its formats - yaml_script['dependencies'].pop(dep_index) - break # Making the assumption there is only one Python entry, also avoids need to enumerate in reverse -except (KeyError, TypeError): - # Case of no dependencies key, or dependencies: None - yaml_script['dependencies'] = [] -finally: - # Ensure the python version is added in. Even if the code does not need it, we assume the env does - yaml_script['dependencies'].insert(0, python_replacement_string) - -# Figure out conda path -if "CONDA_EXE" in os.environ: - conda_path = os.environ["CONDA_EXE"] -else: - conda_path = shutil.which("conda") -if conda_path is None: - raise RuntimeError("Could not find a conda binary in CONDA_EXE variable or in executable search path") - -print("CONDA ENV NAME {}".format(args.name)) -print("PYTHON VERSION {}".format(args.python)) -print("CONDA FILE NAME {}".format(args.conda_file)) -print("CONDA PATH {}".format(conda_path)) - -# Write to a temp directory which will always be cleaned up -with temp_cd(): - temp_file_name = "temp_script.yaml" - with open(temp_file_name, 'w') as f: - f.write(yaml.dump(yaml_script)) - sp.call("{} env create -n {} -f {}".format(conda_path, args.name, temp_file_name), shell=True) diff --git a/pyproject.toml b/pyproject.toml index fe3b7b0..c1582c7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,113 +1,39 @@ [build-system] -#requires = ["setuptools>=61.0", "versioneer[toml]==0.29"] -requires = ["setuptools>=61.0", "versioningit~=2.0", "versioneer[toml]==0.29"] -#requires = ["setuptools>=61.0", "versioningit~=2.0"] +requires = ["setuptools>=68"] build-backend = "setuptools.build_meta" -# Self-descriptive entries which should always be present -# https://packaging.python.org/en/latest/specifications/declaring-project-metadata/ [project] name = "qupkake" -description = "Predict micro-pKa of organic molecules" dynamic = ["version"] -readme = "README.md" -authors = [ - { name = "Omri D Abarbanel", email = "oda6@pitt.edu" } -] -license = { text = "BSD-3-Clause" } -# See https://pypi.org/classifiers/ -classifiers = [ - "License :: OSI Approved :: BSD License", - "Programming Language :: Python :: 3", -] -requires-python = ">=3.9" -# Declare any run-time dependencies that should be installed with the package. +requires-python = ">=3.12" dependencies = [ - "importlib-resources;python_version<'3.10'", - "tomli; python_version < '3.11'", "torch>=2.0", + "torch-geometric>=2.3", "pytorch-lightning>=2.0.2", - "torchmetrics; python_version>='3.9'", - "torchvision; python_version>='3.9'", + "torchmetrics", "numpy>=1.25", "pandas>=2.1", "rdkit>=2022.03.3", "scipy>=1.11", - "torch-geometric>=2.3", -] - +] +description = "Predict micro-pKa of organic molecules" +readme = "README.md" +authors = [{ name = "Omri D Abarbanel", email = "oda6@pitt.edu" },] +license ="BSD-3-Clause" +classifiers = ["Programming Language :: Python :: 3"] -# Update the urls once the hosting is set up. [project.urls] "Source" = "https://github.com/shualdon/qupkake/" "Documentation" = "https://qupkake.readthedocs.io/" -[project.optional-dependencies] -test = [ - "pytest>=6.1.2", -# "pytest-runner" -] - -[tool.setuptools] -# This subkey is a beta stage development and keys may change in the future, see https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html for more details -# -# As of version 0.971, mypy does not support type checking of installed zipped -# packages (because it does not actually import the Python packages). -# We declare the package not-zip-safe so that our type hints are also available -# when checking client code that uses our (installed) package. -# Ref: -# https://mypy.readthedocs.io/en/stable/installed_packages.html?highlight=zip#using-installed-packages-with-mypy-pep-561 -zip-safe = false -# Let setuptools discover the package in the current directory, -# but be explicit about non-Python files. -# See also: -# https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html#setuptools-specific-configuration -# Note that behavior is currently evolving with respect to how to interpret the -# "data" and "tests" subdirectories. As of setuptools 63, both are automatically -# included if namespaces is true (default), even if the package is named explicitly -# (instead of using 'find'). With 'find', the 'tests' subpackage is discovered -# recursively because of its __init__.py file, but the data subdirectory is excluded -# with include-package-data = false and namespaces = false. -include-package-data = true [tool.setuptools.packages.find] -namespaces = false -where = ["."] +where = ["src"] -# Ref https://setuptools.pypa.io/en/latest/userguide/datafiles.html#package-data [tool.setuptools.package-data] -qupkake = [ - "py.typed", - "xtb-641" -] - -#[tool.setuptools.dynamic] -#version = {attr = "package.__version__"} - -[tool.versioningit] -default-version = "1+unknown" - -[tool.versioningit.format] -distance = "{base_version}+{distance}.{vcs}{rev}" -dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" -distance-dirty = "{base_version}+{distance}.{vcs}{rev}.dirty" - -[tool.versioningit.vcs] -# The method key: -method = "git" # <- The method name -# Parameters to pass to the method: -match = ["*"] -default-tag = "1.0.0" - -#[tool.versioningit.write] -#file = "qupkake/_version.py" +"qupkake" = ["models/*.ckpt", "xtb/bin/*", "smirks/*.txt"] -[tool.versioneer] -VCS = "git" -style = "pep440" -versionfile_source = "qupkake/_version.py" -versionfile_build = "qupkake/_version.py" -tag_prefix = "" -parentdir_prefix = "qupkake-" +[tool.setuptools.dynamic] +version = {attr = "qupkake.__version__"} [project.scripts] -qupkake = "qupkake.cli:main" +qupkake = "qupkake.cli:main" \ No newline at end of file diff --git a/qupkake/__init__.py b/qupkake/__init__.py deleted file mode 100644 index f155fa5..0000000 --- a/qupkake/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -"""Predict micro-pKa of organic molecules""" - -# Add imports here -from ._version import get_versions -from .qupkake import * - -__version__ = get_versions()["version"] - -import os -import subprocess - -try: - check_package = subprocess.run(["conda", "list", "xtb"], stdout=subprocess.PIPE) - check_package_decoded = check_package.stdout.decode("utf-8").split() - assert "xtb" in check_package_decoded - assert "6.4.1" in check_package_decoded - - XTB_LOCATION = os.environ.get("XTBPATH") or "xtb" -except AssertionError: - XTB_LOCATION = os.environ.get("XTBPATH") or os.path.join( - os.path.dirname(__file__), "xtb-641/bin/xtb" - ) -finally: - if XTB_LOCATION != "xtb": - if not os.path.exists(XTB_LOCATION): - raise RuntimeError(f'xTB exectuable in: "{XTB_LOCATION}" does not exists.') - else: - raise RuntimeError( - 'Conda version of xTB is currently not supported.\nPlease compile it from source and export the path manually to "XTBPATH" environment variable.' - ) diff --git a/qupkake/_version.py b/qupkake/_version.py deleted file mode 100644 index 5defbf8..0000000 --- a/qupkake/_version.py +++ /dev/null @@ -1,683 +0,0 @@ - -# This file helps to compute a version number in source trees obtained from -# git-archive tarball (such as those provided by githubs download-from-tag -# feature). Distribution tarballs (built by setup.py sdist) and build -# directories (produced by setup.py build) will contain a much shorter file -# that just contains the computed version number. - -# This file is released into the public domain. -# Generated by versioneer-0.29 -# https://github.com/python-versioneer/python-versioneer - -"""Git implementation of _version.py.""" - -import errno -import os -import re -import subprocess -import sys -from typing import Any, Callable, Dict, List, Optional, Tuple -import functools - - -def get_keywords() -> Dict[str, str]: - """Get the keywords needed to look up the version information.""" - # these strings will be replaced by git during git-archive. - # setup.py/versioneer.py will grep for the variable names, so they must - # each be defined on a line of their own. _version.py will just call - # get_keywords(). - git_refnames = "$Format:%d$" - git_full = "$Format:%H$" - git_date = "$Format:%ci$" - keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} - return keywords - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - VCS: str - style: str - tag_prefix: str - parentdir_prefix: str - versionfile_source: str - verbose: bool - - -def get_config() -> VersioneerConfig: - """Create, populate and return the VersioneerConfig() object.""" - # these strings are filled in when 'setup.py versioneer' creates - # _version.py - cfg = VersioneerConfig() - cfg.VCS = "git" - cfg.style = "pep440" - cfg.tag_prefix = "" - cfg.parentdir_prefix = "qupkake-" - cfg.versionfile_source = "qupkake/_version.py" - cfg.verbose = False - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -LONG_VERSION_PY: Dict[str, str] = {} -HANDLERS: Dict[str, Dict[str, Callable]] = {} - - -def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator - """Create decorator to mark a method as the handler of a VCS.""" - def decorate(f: Callable) -> Callable: - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - return decorate - - -def run_command( - commands: List[str], - args: List[str], - cwd: Optional[str] = None, - verbose: bool = False, - hide_stderr: bool = False, - env: Optional[Dict[str, str]] = None, -) -> Tuple[Optional[str], Optional[int]]: - """Call the given command(s).""" - assert isinstance(commands, list) - process = None - - popen_kwargs: Dict[str, Any] = {} - if sys.platform == "win32": - # This hides the console window if pythonw.exe is used - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - popen_kwargs["startupinfo"] = startupinfo - - for command in commands: - try: - dispcmd = str([command] + args) - # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) - break - except OSError as e: - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %s" % dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %s" % (commands,)) - return None, None - stdout = process.communicate()[0].strip().decode() - if process.returncode != 0: - if verbose: - print("unable to run %s (error)" % dispcmd) - print("stdout was %s" % stdout) - return None, process.returncode - return stdout, process.returncode - - -def versions_from_parentdir( - parentdir_prefix: str, - root: str, - verbose: bool, -) -> Dict[str, Any]: - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for _ in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print("Tried directories %s but none started with prefix %s" % - (str(rootdirs), parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords: Dict[str, str] = {} - try: - with open(versionfile_abs, "r") as fobj: - for line in fobj: - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - except OSError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords( - keywords: Dict[str, str], - tag_prefix: str, - verbose: bool, -) -> Dict[str, Any]: - """Get version information from git keywords.""" - if "refnames" not in keywords: - raise NotThisMethod("Short version file found") - date = keywords.get("date") - if date is not None: - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - - # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = {r.strip() for r in refnames.strip("()").split(",")} - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} - if verbose: - print("discarding '%s', no digits" % ",".join(refs - tags)) - if verbose: - print("likely tags: %s" % ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - # Filter out refs that exactly match prefix or that don't start - # with a number once the prefix is stripped (mostly a concern - # when prefix is '') - if not re.match(r'\d', r): - continue - if verbose: - print("picking %s" % r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs( - tag_prefix: str, - root: str, - verbose: bool, - runner: Callable = run_command -) -> Dict[str, Any]: - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - # GIT_DIR can interfere with correct operation of Versioneer. - # It may be intended to be passed to the Versioneer-versioned project, - # but that should not change where we get our version from. - env = os.environ.copy() - env.pop("GIT_DIR", None) - runner = functools.partial(runner, env=env) - - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=not verbose) - if rc != 0: - if verbose: - print("Directory %s not under git control" % root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, [ - "describe", "--tags", "--dirty", "--always", "--long", - "--match", f"{tag_prefix}[[:digit:]]*" - ], cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces: Dict[str, Any] = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) - # --abbrev-ref was added in git-1.6.3 - if rc != 0 or branch_name is None: - raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") - branch_name = branch_name.strip() - - if branch_name == "HEAD": - # If we aren't exactly on a branch, pick a branch which represents - # the current commit. If all else fails, we are on a branchless - # commit. - branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) - # --contains was added in git-1.5.4 - if rc != 0 or branches is None: - raise NotThisMethod("'git branch --contains' returned error") - branches = branches.split("\n") - - # Remove the first line if we're running detached - if "(" in branches[0]: - branches.pop(0) - - # Strip off the leading "* " from the list of branches. - branches = [branch[2:] for branch in branches] - if "master" in branches: - branch_name = "master" - elif not branches: - branch_name = None - else: - # Pick the first branch that is returned. Good or bad. - branch_name = branches[0] - - pieces["branch"] = branch_name - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%s'" - % describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%s' doesn't start with prefix '%s'" - print(fmt % (full_tag, tag_prefix)) - pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" - % (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) - pieces["distance"] = len(out.split()) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def plus_or_dot(pieces: Dict[str, Any]) -> str: - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces: Dict[str, Any]) -> str: - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_branch(pieces: Dict[str, Any]) -> str: - """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . - - The ".dev0" means not master branch. Note that .dev0 sorts backwards - (a feature branch will appear "older" than the master branch). - - Exceptions: - 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0" - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: - """Split pep440 version string at the post-release segment. - - Returns the release segments before the post-release and the - post-release version number (or -1 if no post-release segment is present). - """ - vc = str.split(ver, ".post") - return vc[0], int(vc[1] or 0) if len(vc) == 2 else None - - -def render_pep440_pre(pieces: Dict[str, Any]) -> str: - """TAG[.postN.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post0.devDISTANCE - """ - if pieces["closest-tag"]: - if pieces["distance"]: - # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) - rendered = tag_version - if post_version is not None: - rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) - else: - rendered += ".post0.dev%d" % (pieces["distance"]) - else: - # no commits, use the tag as the version - rendered = pieces["closest-tag"] - else: - # exception #1 - rendered = "0.post0.dev%d" % pieces["distance"] - return rendered - - -def render_pep440_post(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - return rendered - - -def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . - - The ".dev0" means not master branch. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_old(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces: Dict[str, Any]) -> str: - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces: Dict[str, Any]) -> str: - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-branch": - rendered = render_pep440_branch(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-post-branch": - rendered = render_pep440_post_branch(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%s'" % style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} - - -def get_versions() -> Dict[str, Any]: - """Get version information or return default if unable to do so.""" - # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have - # __file__, we can work backwards from there to the root. Some - # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which - # case we can only use expanded keywords. - - cfg = get_config() - verbose = cfg.verbose - - try: - return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, - verbose) - except NotThisMethod: - pass - - try: - root = os.path.realpath(__file__) - # versionfile_source is the relative path from the top of the source - # tree (where the .git directory might live) to this file. Invert - # this to find the root from __file__. - for _ in cfg.versionfile_source.split('/'): - root = os.path.dirname(root) - except NameError: - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree", - "date": None} - - try: - pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) - return render(pieces, cfg.style) - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - except NotThisMethod: - pass - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", "date": None} diff --git a/qupkake/py.typed b/qupkake/py.typed deleted file mode 100644 index 6e3cdd2..0000000 --- a/qupkake/py.typed +++ /dev/null @@ -1 +0,0 @@ -# PEP 561 marker file. See https://peps.python.org/pep-0561/ diff --git a/qupkake/qupkake.py b/qupkake/qupkake.py deleted file mode 100644 index b062e21..0000000 --- a/qupkake/qupkake.py +++ /dev/null @@ -1,29 +0,0 @@ -"""Provide the primary functions.""" - - -def canvas(with_attribution=True): - """ - Placeholder function to show example docstring (NumPy format). - - Replace this function and doc string for your own project. - - Parameters - ---------- - with_attribution : bool, Optional, default: True - Set whether or not to display who the quote is from. - - Returns - ------- - quote : str - Compiled string including quote and optional attribution. - """ - - quote = "The code is but a canvas to our imagination." - if with_attribution: - quote += "\n\t- Adapted from Henry David Thoreau" - return quote - - -if __name__ == "__main__": - # Do something if this file is invoked on its own - print(canvas()) diff --git a/setup.cfg b/setup.cfg deleted file mode 100644 index 3cd953f..0000000 --- a/setup.cfg +++ /dev/null @@ -1,35 +0,0 @@ -# Helper file to handle all configs - -[coverage:run] -# .coveragerc to control coverage.py and pytest-cov -omit = - # Omit the tests - */tests/* - # Omit generated versioneer - qupkake/_version.py - -[yapf] -# YAPF, in .style.yapf files this shows up as "[style]" header -COLUMN_LIMIT = 119 -INDENT_WIDTH = 4 -USE_TABS = False - -[flake8] -# Flake8, PyFlakes, etc -max-line-length = 119 - -[aliases] -test = pytest - -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. - -[versioneer] -VCS = git -style = pep440 -versionfile_source = qupkake/_version.py -versionfile_build = qupkake/_version.py -tag_prefix = -parentdir_prefix = qupkake- - diff --git a/setup.py b/setup.py deleted file mode 100644 index 9a087b0..0000000 --- a/setup.py +++ /dev/null @@ -1,53 +0,0 @@ -""" -qupkake -Predict micro-pKa of organic molecules -""" -import sys - -import versioneer -from setuptools import find_packages, setup - -short_description = __doc__.split("\n") - -# from https://github.com/pytest-dev/pytest-runner#conditional-requirement -needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv) -pytest_runner = ["pytest-runner"] if needs_pytest else [] - -try: - with open("README.md", "r") as handle: - long_description = handle.read() -except: - long_description = "\n".join(short_description[2:]) - -setup( - # Self-descriptive entries which should always be present - name="qupkake", - author="Omri D Abarbanel", - author_email="oda6@pitt.edu", - description=short_description[0], - long_description=long_description, - long_description_content_type="text/markdown", - version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), - license="BSD 3-Clause", - # Which Python importable modules should be included when your package is installed - # Handled automatically by setuptools. Use 'exclude' to prevent some specific - # subpackage(s) from being added, if needed - packages=find_packages(), - # Optional include package data to ship with your package - # Customize MANIFEST.in if the general case does not suit your needs - # Comment out this line to prevent the files from being packaged with your software - include_package_data=True, - # Allows `setup.py test` to work correctly with pytest - # setup_requires=[] + pytest_runner, - # Additional entries you may want simply uncomment the lines you want and fill in the data - # url='http://www.my_package.com', # Website - # install_requires=[], # Required packages, pulls from pip if needed; do not use for Conda deployment - # platforms=['Linux', - # 'Mac OS-X', - # 'Unix', - # 'Windows'], # Valid platforms your code works on, adjust to your flavor - # python_requires=">=3.5", # Python version restrictions - # Manual control if final package is compressible or not, set False to prevent the .egg from being made - # zip_safe=False, -) diff --git a/src/qupkake/__init__.py b/src/qupkake/__init__.py new file mode 100644 index 0000000..1c37bbd --- /dev/null +++ b/src/qupkake/__init__.py @@ -0,0 +1,9 @@ +from importlib.resources import files, as_file + + +__version__ = "1.0.0" + +XTB_VERSION = '6.4.1' + +with as_file(files("qupkake") / "xtb/bin/xtb") as path: + XTB_LOCATION = path.as_posix() diff --git a/qupkake/cli.py b/src/qupkake/cli.py similarity index 97% rename from qupkake/cli.py rename to src/qupkake/cli.py index 9ca1772..29604b3 100644 --- a/qupkake/cli.py +++ b/src/qupkake/cli.py @@ -2,11 +2,6 @@ import logging import sys -from ._version import get_versions - -__version__ = get_versions()["version"] - -del get_versions logger = logging.getLogger(__name__) @@ -328,9 +323,6 @@ def parse_arguments(args): metavar="N", help="Use Multiprocessing. True if used alone. If followed by a number, its will use that number of suprocesses.", ) - gen_parser.add_argument( - "-v", "--version", action="version", version="%(prog)s " + __version__ - ) parser = MyParser( prog="qupkake", diff --git a/qupkake/featurizer.py b/src/qupkake/featurizer.py similarity index 99% rename from qupkake/featurizer.py rename to src/qupkake/featurizer.py index a221a50..217acae 100755 --- a/qupkake/featurizer.py +++ b/src/qupkake/featurizer.py @@ -12,7 +12,7 @@ from rdkit.Chem.rdmolops import GetAdjacencyMatrix from torch_geometric.data import Data -from .xtbp import XTBP, RunXTB +from qupkake.xtbp import XTBP, RunXTB logger = logging.getLogger(__name__) diff --git a/src/qupkake/models/__init__.py b/src/qupkake/models/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/qupkake/models/deprotonation_model.ckpt b/src/qupkake/models/deprotonation_model.ckpt similarity index 100% rename from qupkake/models/deprotonation_model.ckpt rename to src/qupkake/models/deprotonation_model.ckpt diff --git a/qupkake/models/pka_model.ckpt b/src/qupkake/models/pka_model.ckpt similarity index 100% rename from qupkake/models/pka_model.ckpt rename to src/qupkake/models/pka_model.ckpt diff --git a/qupkake/models/protonation_model.ckpt b/src/qupkake/models/protonation_model.ckpt similarity index 100% rename from qupkake/models/protonation_model.ckpt rename to src/qupkake/models/protonation_model.ckpt diff --git a/qupkake/mol_dataset.py b/src/qupkake/mol_dataset.py similarity index 97% rename from qupkake/mol_dataset.py rename to src/qupkake/mol_dataset.py index bbe84aa..c5d10ce 100644 --- a/qupkake/mol_dataset.py +++ b/src/qupkake/mol_dataset.py @@ -13,10 +13,9 @@ from rdkit import Chem, RDLogger from rdkit.Chem import AllChem, PandasTools from torch_geometric.data import Data, Dataset -from tqdm import tqdm -from .featurizer import Featurizer -from .mol_utils import Tautomerize +from qupkake.featurizer import Featurizer +from qupkake.mol_utils import Tautomerize RDLogger.DisableLog("rdApp.*") @@ -230,7 +229,7 @@ def _save_processed_data(self, file_name, data): def _load_processed_data(self, file_name): """Load processed data from file""" file_path = os.path.join(self.processed_dir, file_name) - return torch.load(file_path) + return torch.load(file_path, weights_only=False) # PyTorch 2.6 changes @abstractmethod def _process_chunk(self, chunk): @@ -345,9 +344,8 @@ def processed_file_names(self) -> list[str]: def _process_chunk(self, chunk, chunk_pos) -> pd.DataFrame: """Processing a chunk of data from the dataframe""" bad_idx = [] - pbar = tqdm(chunk.iterrows(), total=len(chunk), position=chunk_pos) - for index, row in pbar: - pbar.set_description("Processing %s" % row[self.name_col]) + for index, row in chunk.iterrows(): + # pbar.set_description("Processing %s" % row[self.name_col]) file_name = ( f"{row[self.name_col]}_{row[self.idx_col]}_{row[self.type_col]}_pair.pt" @@ -506,7 +504,8 @@ def get(self, idx): atom_idx = self.data.loc[idx, self.idx_col] conjugate = self.data.loc[idx, self.type_col] data = torch.load( - os.path.join(self.processed_dir, f"{name}_{atom_idx}_{conjugate}_pair.pt") + os.path.join(self.processed_dir, f"{name}_{atom_idx}_{conjugate}_pair.pt"), + weights_only=False, # PyTorch 2.6 changes ) return data @@ -663,9 +662,7 @@ def _get_graph(self, row): def _process_chunk(self, chunk, chunk_pos) -> pd.DataFrame: self.data_list = [] bad_idx = [] - pbar = tqdm(chunk.iterrows(), total=len(chunk), position=chunk_pos) - for index, row in pbar: - pbar.set_description("Processing %s" % row[self.name_col]) + for index, row in chunk.iterrows(): if self.data_name: file_name = f"{row[self.name_col]}_{self.data_name}.pt" else: diff --git a/qupkake/mol_utils.py b/src/qupkake/mol_utils.py similarity index 97% rename from qupkake/mol_utils.py rename to src/qupkake/mol_utils.py index afa43d7..3f2c373 100755 --- a/qupkake/mol_utils.py +++ b/src/qupkake/mol_utils.py @@ -11,7 +11,7 @@ from rdkit.Chem import AllChem from rdkit.Chem.MolStandardize import rdMolStandardize -from .xtbp import XTBP, RunXTB +from qupkake.xtbp import XTBP, RunXTB class Tautomerize: @@ -154,19 +154,12 @@ def make_tautomer_files(self) -> None: self.lowest_tautomer_name = f"{self.name}_t{self.lowest_tautomer_num}" return - from tqdm import tqdm # os.makedirs(self.mol_dir, exist_ok=True) tautomer_energy = [] with tempfile.TemporaryDirectory() as tmpdirname: - pbar = tqdm( - enumerate(self.tautomers), - total=len(self.tautomers), - leave=False, - position=1, - ) - for i, taut in pbar: - pbar.set_description(f"Processing {self.name} tautomer {i}") + for i, taut in enumerate(self.tautomers): + # pbar.set_description(f"Processing {self.name} tautomer {i}") taut_file = f"{tmpdirname}/{self.name}_t{i}.mol" Chem.MolToMolFile(taut, taut_file) xtb_out = RunXTB( diff --git a/qupkake/pka_models.py b/src/qupkake/pka_models.py similarity index 100% rename from qupkake/pka_models.py rename to src/qupkake/pka_models.py diff --git a/qupkake/predict.py b/src/qupkake/predict.py similarity index 88% rename from qupkake/predict.py rename to src/qupkake/predict.py index f33dbfd..034e907 100644 --- a/qupkake/predict.py +++ b/src/qupkake/predict.py @@ -6,21 +6,32 @@ import pandas as pd import pytorch_lightning as pl + import torch -from rdkit.Chem import PandasTools + from torch_geometric.loader import DataLoader from torch_geometric.transforms import Compose, NormalizeFeatures -from .mol_dataset import MolDataset, MolPairDataset -from .pka_models import PredictpKa -from .sites_models import SitesPrediction -from .transforms import IncludeEnergy, ToTensor +from rdkit.Chem import PandasTools + +from qupkake.mol_dataset import MolDataset, MolPairDataset +from qupkake.pka_models import PredictpKa +from qupkake.sites_models import SitesPrediction +from qupkake.transforms import IncludeEnergy, ToTensor warnings.filterwarnings( - "ignore", ".*Consider increasing the value of the `num_workers` argument*" + "ignore", + message=".*Consider increasing the value of the `num_workers` argument*" ) -warnings.filterwarnings("ignore", ".*If your intention is to run Lightning on SLURM*") +warnings.filterwarnings( + "ignore", + message=".*If your intention is to run Lightning on SLURM*") + +warnings.filterwarnings( + "ignore", + message="GPU available but not used. You can set it by doing `Trainer(accelerator='gpu')`.") + warnings.simplefilter(action="ignore", category=FutureWarning) log = logging.getLogger("pytorch_lightning") @@ -28,6 +39,11 @@ log.setLevel(logging.ERROR) + +device = "cuda" if torch.cuda.is_available() else "cpu" +accelerator = "auto" + + def load_mol_dataset( root: str, filename: str, @@ -118,11 +134,11 @@ def load_models() -> Tuple[SitesPrediction, SitesPrediction, PredictpKa]: models_path = impresources.files(models) prot_model = SitesPrediction.load_from_checkpoint( os.path.join(models_path, "protonation_model.ckpt"), - map_location=torch.device("cpu"), + map_location=torch.device(device), ) deprot_model = SitesPrediction.load_from_checkpoint( os.path.join(models_path, "deprotonation_model.ckpt"), - map_location=torch.device("cpu"), + map_location=torch.device(device), ) pka_model = PredictpKa.load_from_checkpoint( os.path.join(models_path, "pka_model.ckpt"), map_location=torch.device("cpu") @@ -145,7 +161,7 @@ def predict_sites(dataset: MolDataset, model: SitesPrediction) -> list: logger=False, enable_progress_bar=False, enable_model_summary=False, - accelerator="cpu", + accelerator=accelerator, devices=1, ) @@ -171,7 +187,7 @@ def predict_pka(dataset: MolPairDataset, model: PredictpKa) -> torch.Tensor: logger=False, enable_progress_bar=False, enable_model_summary=False, - accelerator="cpu", + accelerator=accelerator, devices=1, ) pka_predictions = trainer.predict( @@ -263,6 +279,7 @@ def run_prediction_pipeline( ) pka_predictions = predict_pka(pair_dataset, pka_model) + df = PandasTools.LoadSDF( f"{root}/raw/{output}", embedProps=True, @@ -270,7 +287,11 @@ def run_prediction_pipeline( includeFingerprints=False, molColName="ROMol", ) - df["pka"] = pka_predictions + + if pka_predictions.nelement() == 1: + df["pka"] = pka_predictions.item() + elif pka_predictions.nelement() > 1: + df["pka"] = pka_predictions.to(torch.float32) PandasTools.WriteSDF( df, @@ -280,4 +301,4 @@ def run_prediction_pipeline( properties=["idx", "pka_type", "pka"], ) os.remove(f"{root}/raw/{output}") - print(f"Predictions saved to {root}/output/{output}") + # print(f"Predictions saved to {root}/output/{output}") diff --git a/qupkake/sites_models.py b/src/qupkake/sites_models.py similarity index 100% rename from qupkake/sites_models.py rename to src/qupkake/sites_models.py diff --git a/qupkake/data/README.md b/src/qupkake/smirks/README.md similarity index 100% rename from qupkake/data/README.md rename to src/qupkake/smirks/README.md diff --git a/src/qupkake/smirks/smirks_transform_all.txt b/src/qupkake/smirks/smirks_transform_all.txt new file mode 100644 index 0000000..62e2eb4 --- /dev/null +++ b/src/qupkake/smirks/smirks_transform_all.txt @@ -0,0 +1,108 @@ +[O,S,Se,Te;X1:1]=[Cz1H0:2][C:5]=[C:6][CX4z0,NX3:3][#1:4]>>[#1:0][O,S,Se,Te;X2:1][Cz1:2]=[C:5][C:6]=[Cz0,N:3] PT_02_00 +[#1:0][O,S,Se,Te;X2:1][Cz1:2]=[C:5][C:6]=[Cz0,N:3]>>[O,S,Se,Te;X1:1]=[Cz1H0:2][C:5]=[C:6][CX4z0,NX3:3][#1:4] PT_02_00 +[#1,a,O:5][NX2:1]=[Cz{1-2}:2][CX4R{0-2}:3][#1:4]>>[#1,a,O:5][NX3;H1:1]([#1:4])[Cz:2]=[C:3] PT_03_00 +[#1,a,O:5][NX3:1]([#1:4])[Cz:2]=[C:3]>>[#1,a,O:5][NX2:1]=[Cz{1-2}:2][CX4R{0-2}:3][#1:4] PT_03_00 +[Cz0R0X3:1]([C:5])=[C:2][Nz0:3][#1:4]>>[#1:4][Cz0R0X4:1]([C:5])[c:2]=[nz0:3] PT_04_00 +[#1:4][Cz0R0X4:1]([C:5])[c:2]=[nz0:3]>>[Cz0R0X3:1]([C:5])=[C:2][Nz0:3][#1:4] PT_04_00 +[#1:4][N:1][C:2]=[O,NX2:3]>>[NX2,nX2:1]=[C,c:2][O,N:3][#1:4] PT_05_00 +[NX2,nX2:1]=[C,c:2][O,N:3][#1:4]>>[#1:4][N:1][C:2]=[O,NX2:3] PT_05_00 +[CX{2-3},N,n,S,s,O,o,Se,Te:1]=[NX2,nX2,CX3,c,P,p:2][N,n,S,O,Se,Te:3][#1:4]>>[#1:4][CX4,N,n,S,O,Se,Te:1][NX2,nX2,CX3,c,P,p:2]=[N,n,S,s,O,o,Se,Te:3] PT_06_00 +[#1:4][CX4,N,n,S,O,Se,Te:1][NX2,nX2,CX3,c,P,p:2]=[N,n,S,s,O,o,Se,Te:3]>>[CX{2-3},N,n,S,s,O,o,Se,Te:1]=[NX2,nX2,CX3,c,P,p:2][N,n,S,O,Se,Te:3][#1:4] PT_06_00 +[nX2,NX2,S,O,Se,Te:1]=[C,c,nX2,NX2:6][C,c:5]=[C,c,nX2:2][N,n,S,s,O,o,Se,Te:3][#1:4]>>[#1:4][N,n,S,O,Se,Te:1][C,c,nX2,NX2:6]=[C,c:5][C,c,nX2:2]=[NX2,S,O,Se,Te:3] PT_07_00 +[#1:4][N,n,S,O,Se,Te:1][C,c,nX2,NX2:6]=[C,c:5][C,c,nX2:2]=[NX2,S,O,Se,Te:3]>>[nX2,NX2,S,O,Se,Te:1]=[C,c,nX2,NX2:6][C,c:5]=[C,c,nX2:2][N,n,S,s,O,o,Se,Te:3][#1:4] PT_07_00 +[n,s,o:1]=[c,n:6][c:5]=[c,n:2][n,s,o:3][#1:4]>>[#1:4][n,s,o:1][c,n:6]=[c:5][c,n:2]=[n,s,o:3] PT_08_00 +[#1:4][n,s,o:1][c,n:6]=[c:5][c,n:2]=[n,s,o:3]>>[n,s,o:1]=[c,n:6][c:5]=[c,n:2][n,s,o:3][#1:4] PT_08_00 +[nX2,NX2,S,O,Se,Te,Cz0X3:1]=[c,C,NX2,nX2:6][C,c,NX2,nX2:5]=[C,c,NX2,nX2:2][C,c,NX2,nX2:7]=[C,c,NX2,nX2:8][N,n,S,s,O,o,Se,Te,CX4z0:3][#1:4]>>[#1:4][N,n,S,O,Se,Te,Cz0X4:1][C,c,NX2,nX2:6]=[C,c:5][C,c,NX2,nX2:2]=[C,c,NX2,nX2:7][C,c,NX2,nX2:8]=[NX2,S,O,Se,Te,CX3z0:3] PT_09_00 +[#1:4][N,n,S,O,Se,Te,Cz0X4:1][C,c,NX2,nX2:6]=[C,c:5][C,c,NX2,nX2:2]=[C,c,NX2,nX2:7][C,c,NX2,nX2:8]=[NX2,S,O,Se,Te,CX3z0:3]>>[nX2,NX2,S,O,Se,Te,Cz0X3:1]=[c,C,NX2,nX2:6][C,c,NX2,nX2:5]=[C,c,NX2,nX2:2][C,c,NX2,nX2:7]=[C,c,NX2,nX2:8][N,n,S,s,O,o,Se,Te,CX4z0:3][#1:4] PT_09_00 +[#1:1][n,N,O;H1,H2:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2:5]=[c,nX2:6][c,nX2:7]=[c,nX2:8][c,nX2,C:9]=[n,N,O:10]>>[N,n,O:2]=[C,c,nX2:3][c,nX2:4]=[c,nX2:5][c,nX2:6]=[c,nX2:7][c,nX2:8]=[c,nX2:9][n,O:10][#1:1] PT_10_00 +[N,n,O:2]=[C,c,nX2:3][c,nX2:4]=[c,nX2:5][c,nX2:6]=[c,nX2:7][c,nX2:8]=[c,nX2:9][n,O:10][#1:1]>>[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2:5]=[c,nX2:6][c,nX2:7]=[c,nX2:8][c,nX2,C:9]=[n,N,O:10] PT_10_00 +[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2:5]=[c,C,nX2:6][c,C,nX2:7]=[c,C,nX2:8][c,nX2,C:9]=[c,C,nX2:10][c,C,nX2:11]=[nX2,NX2,O:12]>>[NX2,nX2,O:2]=[C,c,nX2:3][c,C,nX2:4]=[c,C,nX2:5][c,C,nX2:6]=[c,C,nX2:7][c,C,nX2:8]=[c,C,nX2:9][c,C,nX2:10]=[c,C,nX2:11][nX2,O:12][#1:1] PT_11_00 +[NX2,nX2,O:2]=[C,c,nX2:3][c,C,nX2:4]=[c,C,nX2:5][c,C,nX2:6]=[c,C,nX2:7][c,C,nX2:8]=[c,C,nX2:9][c,C,nX2:10]=[c,C,nX2:11][nX2,O:12][#1:1]>>[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2:5]=[c,C,nX2:6][c,C,nX2:7]=[c,C,nX2:8][c,nX2,C:9]=[c,C,nX2:10][c,C,nX2:11]=[nX2,NX2,O:12] PT_11_00 +[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[nX2,NX2,O:14]>>[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][nX2,O:14][#1:1] PT_11_01 +[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][nX2,O:14][#1:1]>>[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[nX2,NX2,O:14] PT_11_01 +[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C,NX2:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2,NX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[c,C,nX2:14][c,C,nX2,NX2:15]=[nX2,NX2,O:16]>>[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2,NX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2,NX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][c,C,nX2:14]=[c,C,nX2,NX2:15][nX2,O,N:16][#1:1] PT_11_02 +[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2,NX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2,NX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][c,C,nX2:14]=[c,C,nX2,NX2:15][nX2,O,N:16][#1:1]>>[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C,NX2:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2,NX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[c,C,nX2:14][c,C,nX2,NX2:15]=[nX2,NX2,O:16] PT_11_02 +[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[c,C,nX2:14][c,C,nX2:15]=[c,C,nX2:16][c,C,nX2:17]=[nX2,NX2,O:18]>>[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][c,C,nX2:14]=[c,C,nX2:15][c,C,nX2:16]=[c,C,nX2:17][nX2,O:18][#1:1] PT_11_03 +[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][c,C,nX2:14]=[c,C,nX2:15][c,C,nX2:16]=[c,C,nX2:17][nX2,O;H1:18][#1:1]>>[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[c,C,nX2:14][c,C,nX2:15]=[c,C,nX2:16][c,C,nX2:17]=[nX2,NX2,O:18] PT_11_03 +[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C,NX2:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2,NX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[c,C,nX2:14][c,C,nX2,NX2:15]=[c,C,nX2:16][c,C,nX2:17]=[c,C,nX2:18][c,C,nX2:19]=[nX2,NX2,O:20]>>[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2,NX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2,NX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][c,C,nX2:14]=[c,C,nX2,NX2:15][c,C,nX2:16]=[c,C,nX2:17][c,C,nX2:18]=[c,C,nX2:19][nX2,O:20][#1:1] PT_11_04 +[NX2,nX2,O:2]=[c,nX2,C:3][c,nX2,C:4]=[C,c,nX2:5][c,C,nX2,NX2:6]=[c,C,nX2,NX2:7][c,C,nX2:8]=[c,C,nX2,NX2:9][c,C,nX2,NX2:10]=[c,C,nX2:11][c,C,nX2:12]=[c,C,nX2:13][c,C,nX2:14]=[c,C,nX2,NX2:15][c,C,nX2:16]=[c,C,nX2:17][c,C,nX2:18]=[c,C,nX2:19][nX2,O:20][#1:1]>>[#1:1][n,N,O:2][c,nX2,C:3]=[c,nX2,C:4][c,nX2,C:5]=[c,nX2,C,NX2:6][c,nX2:7]=[c,C,nX2:8][c,C,nX2,NX2:9]=[c,C,nX2,NX2:10][c,nX2,C:11]=[c,C,nX2:12][c,C,nX2:13]=[c,C,nX2:14][c,C,nX2,NX2:15]=[c,C,nX2:16][c,C,nX2:17]=[c,C,nX2:18][c,C,nX2:19]=[nX2,NX2,O:20] PT_11_04 +[#1:1][O,S,N:2][c,C;z2;r5:3]=[C,c;r5:4][c,C;r5:5]>>[O,S,N:2]=[Cz2r5:3][C&r5R{0-2}:4]([#1:1])[C,c;r5:5] PT_12_00 +[O,S,N:2]=[Cz2r5:3][C&r5R{0-2}:4]([#1:1])[C,c;r5:5]>>[#1:1][O,S,N:2][c,C;z2;r5:3]=[C,c;r5:4][c,C;r5:5] PT_12_00 +[O,S,Se,Te;X1:1]=[C:2]=[C:3][#1:4]>>[#1:4][O,S,Se,Te;X2:1][C:2]#[C:3] PT_13_00 +[#1:4][O,S,Se,Te;X2:1][C:2]#[C:3]>>[O,S,Se,Te;X1:1]=[C:2]=[C:3][#1:4] PT_13_00 +[#1:1][C:2][N+:3]([O-:5])=[O:4]>>[C:2]=[N+:3]([O-:5])[O:4][#1:1] PT_14_00 +[C:2]=[N+:3]([O-:5])[O:4][#1:1]>>[#1:1][C:2][N+:3]([O-:5])=[O:4] PT_14_00 +[#1:1][C:2][N:3](=[O:5])=[O:4]>>[C:2]=[N:3](=[O:5])[O:4][#1:1] PT_15_00 +[C:2]=[N:3](=[O:5])[O:4][#1:1]>>[#1:1][C:2][N:3](=[O:5])=[O:4] PT_15_00 +[#1:1][O;!R:2][N+0z1:3]=[CX3:4]>>[O;!R:2]=[N+0z1:3][CX4:4][#1:1] PT_16_00 +[O;!R:2]=[N+0z1:3][CX4:4][#1:1]>>[#1:1][O;!R:2][N+0z1:3]=[CX3:4] PT_16_00 +[#1:1][O:2][Nz1:3]=[C:4][C:5]=[C:6][C:7]=[O:8]>>[O:2]=[Nz1:3][c:4]=[c:5][c:6]=[c:7][O:8][#1:1] PT_17_00 +[O:2]=[Nz1:3][c:4]=[c:5][c:6]=[c:7][O:8][#1:1]>>[#1:1][O:2][Nz1:3]=[C:4][C:5]=[C:6][C:7]=[O:8] PT_17_00 +[#1:1][O:2][C:3]#[N:4]>>[O:2]=[C:3]=[N:4][#1:1] PT_18_00 +[O:2]=[C:3]=[N:4][#1:1]>>[#1:1][O:2][C:3]#[N:4] PT_18_00 +[#1:1][O,N:2][C:3]=[S,Se,Te:4]=[O:5]>>[O,N:2]=[C:3][S,Se,Te;v{2-4}:4][O:5][#1:1] PT_19_00 +[O,N:2]=[C:3][S,Se,Te;v{2-4}:4][O:5][#1:1]>>[#1:1][O,N:2][C:3]=[S,Se,Te:4]=[O:5] PT_19_00 +[#1:1][C0:2]#[N0:3]>>[C-:2]#[N+:3][#1:1] PT_20_00 +[C-:2]#[N+:3][#1:1]>>[#1:1][C0:2]#[N0:3] PT_20_00 +[#1:1][O,NX3:2][P;v3:3]>>[O,NX2:2]=[P;v5:3][#1:1] PT_21_00 +[O,NX2:2]=[P;v5:3][#1:1]>>[#1:1][O,NX3:2][P;v3:3] PT_21_00 +[#1:1][CX4:2][NX2:3]=[CX3:4]>>[CX3:2]=[NX2:3][CX4:4][#1:1] PT_22_00 +[CX3:2]=[NX2:3][CX4:4][#1:1]>>[#1:1][CX4:2][NX2:3]=[CX3:4] PT_22_00 +[#1:1][O,S,NX3:2][cX3;z2;r5:3]=[c;r5:4][c;r5:5]=[c;z{1-2};r5;R{1-2}:6]>>[O,S,NX2:2]=[CX3;z2;r5:3][C;r5:4]=[C;r5:5][Cz{1-2};r5;R{1-2}:6][#1:1] PT_23_00 +[O,S,NX2:2]=[CX3;z2;r5:3][C;r5:4]=[C;r5:5][Cz{1-2};r5;R{1-2}:6][#1:1]>>[#1:1][O,S,NX3:2][cX3;z2;r5:3]=[c;r5:4][c;r5:5]=[c;z{1-2};r5;R{1-2}:6] PT_23_00 +[#1:1][OX2:2][N;z{1-2};X3!$(N=O);H0:3][CX3,c,n,NX2;r5:4]=[n,NX2,CX3;r5:5]>>[O&-:2][N+;z{1-2};X3;H0:3]=[c,CX3,n,NX2;r5:4][n,NX3,CX4;r5:5][#1:1] PT_24_00 +[O&-:2][N+;z{1-2};X3;H0:3]=[c,CX3,n,NX2;r5:4][n,NX3,CX4;r5:5][#1:1]>>[#1:1][OX2:2][N;z{1-2};X3!$(N=O);H0:3][CX3,c,n,NX2;r5:4]=[n,NX2,CX3;r5:5] PT_24_00 +[#1:1][OX2:2][NX3r5:3][c,C;r5:4]=[c,C;r5:5][CX3,NX2r5:6]=[NX2:7]>>[O&-&H0:2][NX3z2&+;r5:3]=[c,C;r5:4][c,C;r5:5]=[CX3,NX2r5:6][NX3:7][#1:1] PT_25_00 +[O&-&H0:2][NX3z2&+;r5:3]=[c,C;r5:4][c,C;r5:5]=[CX3,NX2r5:6][NX3:7][#1:1]>>[#1:1][OX2:2][NX3r5:3][c,C;r5:4]=[c,C;r5:5][CX3,NX2r5:6]=[NX2:7] PT_25_00 +[#1:1][O:2][NX3r6:3][C;r6:4]=[C;r6:5][C;z1;r6:6]=[O,NX2,S:7]>>[O&-&H0:2][n&+,N&+;X3;z1;r6:3]=[c,C;r6:4][c,C;r6:5]=[c,C;z1;r6:6][O,NX3,S:7][#1:1] PT_26_00 +[O&-&H0:2][n&+,N&+;X3;z1;r6:3]=[c,C;r6:4][c,C;r6:5]=[c,C;z1;r6:6][O,NX3,S:7][#1:1]>>[#1:1][O:2][NX3r6:3][C;r6:4]=[C;r6:5][C;z1;r6:6]=[O,NX2,S:7] PT_26_00 +[#1:12][OX2,CX4:1][c:2]1=[cR{2-}a3:3]([c:4])[cR{2-}a3:6]([c:5])=[c:7][cR{2-}a3:8](=[c:9])[cR{2-}a3:11]1=[c:10]>>[#1:12][C:7]1[cR{2-}:6]([c:5])=[cR{2-}:3]([c:4])[C:2](=[O,CX3:1])[cR{2-}:11](=[c:10])[cR{2-}:8]1=[c:9] PT_27_00 +[#1:12][C:7]1[cR{2-}:6]([c:5])=[cR{2-}:3]([c:4])[C:2](=[O,CX3:1])[cR{2-}:11](=[c:10])[cR{2-}:8]1=[c:9]>>[#1:12][OX2,CX4:1][c:2]1=[cR{2-}a3:3]([c:4])[cR{2-}a3:6]([c:5])=[c:7][cR{2-}a3:8](=[c:9])[cR{2-}a3:11]1=[c:10] PT_27_00 +[#1:12][O:11][c:10]1=[c;a3;r5:9]([c,s;r5:6])[c;a3;r5:8]([c,s;r5:7])=[c:5][c;a3:4]([c,s:1])=[c;a3:3]1[c,s:2]>>[#1:12][C:5]1[c;a2:4]([c,s:1])=[c;a2:3]([c,s:2])[C:10](=[O:11])[c;a2;r5:9]([c,s;r5:6])=[c;a2;r5:8]1[c,s;r5:7] PT_27_01 +[#1:12][C:5]1[c;a2:4]([c,s:1])=[c;a2:3]([c,s:2])[C:10](=[O:11])[c;a2;r5:9]([c,s;r5:6])=[c;a2;r5:8]1[c,s;r5:7]>>[#1:12][O:11][c:10]1=[c;a3;r5:9]([c,s;r5:6])[c;a3;r5:8]([c,s;r5:7])=[c:5][c;a3:4]([c,s:1])=[c;a3:3]1[c,s:2] PT_27_01 +[#1:1][CX4:2][c;r6:3]=[c;r6:4][c;r6:5]=[c;r6:6][N+:7]([O-:9])=[O:8]>>[CX3:2]=[C;r6:3][C;r6:4]=[C;r6:5][C;r6:6]=[N+:7]([O-:9])[O:8][#1:1] PT_28_00 +[CX3:2]=[C;r6:3][C;r6:4]=[C;r6:5][C;r6:6]=[N+:7]([O-:9])[O:8][#1:1]>>[#1:1][CX4:2][c;r6:3]=[c;r6:4][c;r6:5]=[c;r6:6][N+:7]([O-:9])=[O:8] PT_28_00 +[#1:1][CX4:2][c;r6:3]=[c;r6:4][NX3+:5]([O-:7])=[O:6]>>[CX3:2]=[C;r6:3][C;r6:4]=[NX3+:5]([O-:7])[O:6][#1:1] PT_29_00 +[CX3:2]=[C;r6:3][C;r6:4]=[NX3+:5]([O-:7])[O:6][#1:1]>>[#1:1][CX4:2][c;r6:3]=[c;r6:4][NX3+:5]([O-:7])=[O:6] PT_29_00 +[#1:1][CX4:2][c;r6:3]=[c;r6:4][CX3:5]([#1:7])=[OX1:6]>>[CX3:2]=[C;r6:3][C;r6:4]=[CX3:5]([#1:7])[OX2:6][#1:1] PT_29_01 +[CX3:2]=[C;r6:3][C;r6:4]=[CX3:5]([#1:7])[OX2:6][#1:1]>>[#1:1][CX4:2][c;r6:3]=[c;r6:4][CX3:5]([#1:7])=[OX1:6] PT_29_01 +[#1:1][N:2][N+:3]([O-:5])=[O:4]>>[N:2]=[N+:3]([O-:5])[O:4][#1:1] PT_30_00 +[N:2]=[N+:3]([O-:5])[O:4][#1:1]>>[#1:1][N:2][N+:3]([O-:5])=[O:4] PT_30_00 +[#1:1][CX4z1:2]1[CX3:3]=[CX3:4][CX3:5]=[CX3;!a:6][SX4:7]1(=[O])(=[O])>>[CX3z1;!a:2]1=[CX3:3][CX3:4]=[CX3:5][CX4:6]([#1:1])[SX4:7]1(=[O])(=[O]) PT_31_00 +[CX3z1;!a:2]1=[CX3:3][CX3:4]=[CX3:5][CX4:6]([#1:1])[SX4:7]1(=[O])(=[O])>>[#1:1][CX4z1:2]1[CX3:3]=[CX3:4][CX3:5]=[CX3;!a:6][SX4:7]1(=[O])(=[O]) PT_31_00 +[#1:1][CX4;$([C][CX{3-4}]=,-[OX{1-2}]):2][CX2:3]#[NX1:4]>>[CX3;$([C][CX{3-4}]=,-[OX{1-2}]):2]=[C:3]=[NX2:4][#1:1] PT_32_00 +[CX3;$([C][CX{3-4}]=,-[OX{1-2}]):2]=[C:3]=[NX2:4][#1:1]>>[#1:1][CX4;$([C][CX{3-4}]=,-[OX{1-2}]):2][CX2:3]#[NX1:4] PT_32_00 +[#1:1][CX4:2][CX3:3]=[C;$([CX3][CX{2-3}]=,#[N,O]):4][CX2:5]#[NX1:6]>>[CX3:2]=[CX3:3][C;$([CX3][CX{2-3}]=,#[N,O]):4]=[C:5]=[NX2:6][#1:1] PT_33_00 +[CX3:2]=[CX3:3][C;$([CX3][CX{2-3}]=,#[N,O]):4]=[C:5]=[NX2:6][#1:1]>>[#1:1][CX4:2][CX3:3]=[C;$([CX3][CX{2-3}]=,#[N,O]):4][CX2:5]#[NX1:6] PT_33_00 +[#1:1][CX4:2][PX4:3]=[C;$([CX{2-3}z2]~[PX{3-4}]):4]>>[CX3:2]=[PX4:3][C;$([CX{3-4}z2]~[PX{3-4}]):4][#1:1] PT_34_00 +[CX3:2]=[PX4:3][C;$([CX{3-4}z2]~[PX{3-4}]):4][#1:1]>>[#1:1][CX4:2][PX4:3]=[C;$([CX{2-3}z2]~[PX{3-4}]):4] PT_34_00 +[Sv2X2:1][OX2:2][#1:3]>>[#1:3][Sv4X3:1]=[OX1:2] PT_35_00 +[#1:3][Sv4X3:1]=[OX1:2]>>[Sv2X2:1][OX2:2][#1:3] PT_35_00 +[CX3:1]=[NX2:2][OX2:3][#1:4]>>[CX3:1]=[NX3+:2]([OX1-:3])[#1:4] PT_36_00 +[CX3:1]=[NX3+:2]([OX1-:3])[#1:4]>>[CX3:1]=[NX2:2][OX2:3][#1:4] PT_36_00 +[NX2:1]=[CX3z{2-3}:2][SX2:3][OX2:4][#1:5]>>[#1:5][NX3:1][CX3z{2-3}:2]=[SX2+:3][OX-:4] PT_37_00 +[#1:5][NX3:1][CX3z{2-3}:2]=[SX2+:3][OX-:4]>>[NX2:1]=[CX3z{2-3}:2][SX2:3][OX2:4][#1:5] PT_37_00 +[#1:1][CX4;!a:2][CX3;!a:3]=[NX3+:4][SiX4-:5]([NX3:7])([NX3:8])=[O:6]>>[CX3;!a:2]=[CX3;!a:3][NX3:4][SiX4:5]([NX3:7])([NX3:8])[OX2:6][#1:1] PT_38_00 +[CX3;!a:2]=[CX3;!a:3][NX3:4][SiX4:5]([NX3:7])([NX3:8])[OX2:6][#1:1]>>[#1:1][CX4;!a:2][CX3;!a:3]=[NX3+:4][SiX4-:5]([NX3:7])([NX3:8])=[O:6] PT_38_00 +[CX3,NX2:1]=[NX3+:2]([O-:3])[CX4:4][#1:5]>>[#1:5][CX4,NX3:1][NX3+:2]([O-:3])=[CX3:4] PT_39_00 +[#1:5][CX4,NX3:1][NX3+:2]([O-:3])=[CX3:4]>>[CX3,NX2:1]=[NX3+:2]([O-:3])[CX4:4][#1:5] PT_39_00 +[#1:1][PX4:2]=[C;$([CX3][PX4+]):3][CX3z1:4]=[O:5]>>[PX3:2][C;$([CX3][PX4+]):3]=[CX3z1:4][OX2:5][#1:1] PT_40_00 +[PX3:2][C;$([CX3][PX4+]):3]=[CX3z1:4][OX2:5][#1:1]>>[#1:1][PX4:2]=[C;$([CX3][PX4+]):3][CX3z1:4]=[O:5] PT_40_00 +[#1:1][SX2,NX3,OX2;!R:2][CX3,c;r{5-6}:3]=[NX3+r{5-6}:4][OX1-:5]>>[SX1,NX2,OX1;!R:2]=[CX3,c;r{5-6}:3][NX3r{5-6}:4][OX2;H1:5][#1:1] PT_41_00 +[SX1,NX2,OX1;!R:2]=[CX3,c;r{5-6}:3][NX3r{5-6}:4][OX2:5][#1:1]>>[#1:1][SX2,NX3,OX2;!R:2][CX3,c;r{5-6}:3]=[NX3+r{5-6}:4][OX1-:5] PT_41_00 +[#1:1][CX4:4]1[NX3,O,S,Se:5][CX3:6](=[O:7])[CX3:2]=[CX3;a0:3]1>>[#1:1][CX4:2]1[CX3;a0:3]=[CX3:4][NX3,O,S,Se:5][CX3:6]1=[O:7] PT_42_00 +[#1:1][CX4:2]1[CX3;a0:3]=[CX3:4][NX3,O,S,Se:5][CX3:6]1=[O:7]>>[#1:1][CX4:4]1[NX3,O,S,Se:5][CX3:6](=[O:7])[CX3:2]=[CX3;a0:3]1 PT_42_00 +[#1:1][CX4:2][c:5]1=[c:9]2[c:8]=[c:7][c:6]=[c:11][c:10]2=[c:4][#8:3]1>>[#1:1][CX4:4]1[#8:3][CX3:5](=[CX3!c:2])[c:9]2=[c:10]1[c:11]=[c:6][c:7]=[c:8]2 PT_43_00 +[#1:1][CX4:4]1[#8:3][CX3:5](=[CX3!c:2])[c:9]2=[c:10]1[c:11]=[c:6][c:7]=[c:8]2>>[#1:1][CX4:2][c:5]1=[c:9]2[c:8]=[c:7][c:6]=[c:11][c:10]2=[c:4][#8:3]1 PT_43_00 +[#1:7][CX4;$([C][C]#[N]),$([C][C](=[O])[O]):6][c:5]1=[cR1:4][c:3]=[c:2][nX3:1]1>>[#1:7][CX4R1:4]1[CX3:3]=[CX3:2][NX3:1][CX3:5]1=[CX3;$([C][C]#[N]),$([C][C](=[O])[O]):6] PT_44_00 +[#1:7][CX4R1:4]1[CX3:3]=[CX3:2][NX3:1][CX3:5]1=[CX3;$([C][C]#[N]),$([C][C](=[O])[O]):6]>>[#1:7][CX4;$([C][C]#[N]),$([C][C](=[O])[O]):6][c:5]1=[cR1:4][c:3]=[c:2][nX3:1]1 PT_44_00 +[#1:1][CX4:2]([CH3:3])([CH3:4])[CX3R1r{5-8}!c;z0:5]=[CX3R1r{5-8}!c:6][CR{1-};!c:7]>>[CX3:2]([CH3:3])([CH3:4])=[CX3R1r{5-8};z0:5][CX4R1r{5-8}:6]([CR{1-}:7])[#1:1] PT_45_00 +[CX3:2]([CH3:3])([CH3:4])=[CX3R1r{5-8};z0:5][CX4R1r{5-8}:6]([CR{1-}:7])[#1:1]>>[#1:1][CX4:2]([CH3:3])([CH3:4])[CX3R1r{5-8}!c;z0:5]=[CX3R1r{5-8}!c:6][CR{1-};!c:7] PT_45_00 +[#1:8][CX4;$(C[S](=[O])[O]):7][C:1]1=[C:6][C:5]=[NX2+0:4][C:3]=[C:2]1>>[#1:8][N:4]1[C:3]=[C:2][C:1](=[CX3;$(C[S](=[O])[O]):7])[C:6]=[C:5]1 PT_46_00 +[#1:8][N;H1,H2,H3:4]1[C:3]=[C:2][C:1](=[CX3;$(C[S](=[O])[O]):7])[C:6]=[C:5]1>>[#1:8][CX4;$(C[S](=[O])[O]):7][C:1]1=[C:6][C:5]=[NX2+0:4][C:3]=[C:2]1 PT_46_00 +[#1:10][CX4:8]1[#7X2:9]=[CX3:7][c:6]2=[c:5]1[c:4]=[c:3][c:2]=[c:1]2>>[#1:10][#7X3:9]1[c:7]=[c:6]2[c:1]=[c:2][c:3]=[c:4][c:5]2=[c:8]1 PT_47_00 +[#1:10][#7X3:9]1[c:7]=[c:6]2[c:1]=[c:2][c:3]=[c:4][c:5]2=[c:8]1>>[#1:10][CX4:8]1[#7X2:9]=[CX3:7][c:6]2=[c:5]1[c:4]=[c:3][c:2]=[c:1]2 PT_47_00 +[#1:12][OX2:10][c:2]1=[c:3][c:4]=[c:5][c:6]2=[c:1]1[C:8](=[O:11])[O:7][C:9]2>>[OX1:10]=[C:2]1[C:3]=[C:4][CX4:5]([#1:12])[C:6]2=[C:1]1[C:8](=[O:11])[O:7][C:9]2 PT_48_00 +[OX1:10]=[C:2]1[C:3]=[C:4][CX4:5]([#1:12])[C:6]2=[C:1]1[C:8](=[O:11])[O:7][C:9]2>>[#1:12][OX2:10][c:2]1=[c:3][c:4]=[c:5][c:6]2=[c:1]1[C:8](=[O:11])[O:7][C:9]2 PT_48_00 +[#1:9][OX2:8][NX3R1r5:1]([aR{1-}r{5-}:2])[cR1r5:5]=[cR1r5:4]([aR{1-}r{5-}:3])[CX3:6]=[O:7]>>[OX1-:8][NX3+R1r5:1]([a,AR{1-}r{5-}:2])=[CR1r5:5][CX3R1r5:4]([a,AR{1-}r{5-}:3])=[CX3:6][OX2:7][#1:9] PT_49_00 +[OX1-:8][NX3+R1r5:1]([a,AR{1-}r{5-}:2])=[CR1r5:5][CX3R1r5:4]([a,AR{1-}r{5-}:3])=[CX3:6][OX2:7][#1:9]>>[#1:9][OX2:8][NX3R1r5:1]([aR{1-}r{5-}:2])[cR1r5:5]=[cR1r5:4]([aR{1-}r{5-}:3])[CX3:6]=[O:7] PT_49_00 diff --git a/src/qupkake/tautomerism.py b/src/qupkake/tautomerism.py new file mode 100644 index 0000000..3f2871b --- /dev/null +++ b/src/qupkake/tautomerism.py @@ -0,0 +1,184 @@ +""" +Reference: + +D. K. Dhaked, W.-D. Ihlenfeldt, H. Patel, V. Delannée, M. C. Nicklaus, +Toward a Comprehensive Treatment of Tautomerism in Chemoinformatics Including in InChI V2. +J. Chem. Inf. Model. (2020). https://doi.org/10.1021/acs.jcim.9b01080. + +https://github.com/xundrug/moltaut + +""" + +from importlib.resources import files, as_file + +from collections import defaultdict + +from rdkit import RDLogger +from rdkit import Chem +from rdkit.Chem import AllChem +from rdkit.Chem.MolStandardize import rdMolStandardize + +RDLogger.DisableLog('rdApp.*') + + +class ComprehensiveTautomer: + """Comprehensive tautomer enumeration based on MolTaut implementation""" + + ps = Chem.SmilesParserParams() + ps.removeHs = False + + uncharger = rdMolStandardize.Uncharger() + + forbidden = [ "O=[N+]([O-])", ] + forbidden_patterns = [Chem.MolFromSmarts(_) for _ in forbidden] + + def __init__(self, smiles: str): + self.smiles : str = smiles + self.rdmol : Chem.Mol = Chem.MolFromSmiles(smiles) + # self.rdmol = self.uncharger.uncharge(self.rdmol) + self.dict : dict[str,list[str]] = {'self' : [self.smiles]} # transform dictionary + self.smirks : list[tuple[str,str]] = [] + self.revdict = defaultdict(list) # reverse dictionary + # SMIRKS (SMILES ReaKtion Specification) + with as_file(files('qupkake') / "smirks/smirks_transform_all.txt") as path: + with open(path, 'r') as f: + # ex. [#1:1][C0:2]#[N0:3]>>[C-:2]#[N+:3][#1:1] PT_20_00 + contents = f.readlines() + self.smirks = [line.strip().split("\t") for line in contents] + # initialize + for idx, (smrk, name) in enumerate(self.smirks): + self.dict[str(idx) + "_" + name] = [] + + self.enumerated : list[str] = [] # enumerated tautomers (SMILES) + self.num_confs = None + self.optimizer = None + self.device = None + self.nmodel = None + self.imodel = None + self.ordered : list = [] + self.popular : list = [] + self.states : list[tuple[str, str]] = [] + self.microstates : list = [] + + + def _contains_phosphorus(self) -> bool: + return any([at.GetAtomicNum() == 15 for at in self.rdmol.GetAtoms()]) + + + def _acceptable(self, rom: Chem.Mol) -> bool: + if not rom: + return False + # more robust way to check substructure match + # than using Chem.Mol.HasSubstructMatch + for pattern in self.forbidden_patterns: + matches = sum(rom.GetSubstructMatches(pattern), ()) + for at in rom.GetAtoms(): + if (at.GetFormalCharge() != 0) and (at.GetIdx() not in matches): + return False + return True + + + def _kekulized(self, rwm: Chem.Mol) -> list[Chem.Mol]: + rwm = Chem.AddHs(rwm) + mols = Chem.ResonanceMolSupplier(rwm, Chem.KEKULE_ALL) + # _kekulized = [_ for _ in mols if self._acceptable(_)] + _kekulized = [] + for _ in mols: + if not self._acceptable(_): + continue + try: + smi = Chem.MolToSmiles(_, kekuleSmiles=True) + except: + print("Kekulize error:", Chem.MolToSmiles(_)) + continue + _kekulized.append(Chem.MolFromSmiles(smi, ComprehensiveTautomer.ps)) + return _kekulized + + + def _transform(self, rwm: Chem.Mol, protect_dummy: bool = True): + if protect_dummy: + # mark dummy atoms for protection + # RDKit recognizes the special property key _protected. + # If this property is set to a "truthy" value (like '1'), + # RDKit will ignore this atom when matching the reactant patterns + # of the chemical reaction. + for atom in rwm.GetAtoms(): + if atom.GetAtomicNum() == 0: # if atom == "*": # dummy atom + atom.SetProp('_protected', '1') + + # Kekule form of the SMILES + Chem.Kekulize(rwm, clearAromaticFlags=True) + + for idx, (smrk, name) in enumerate(self.smirks): + rxn = AllChem.ReactionFromSmarts(smrk) + new_molecules = rxn.RunReactants((rwm,)) + if len(new_molecules) > 0: + for unit in new_molecules: + _ = Chem.MolToSmiles(unit[0]) + _mol = Chem.MolFromSmiles(_, sanitize=True) + _smi = None + if _mol: + _smi = Chem.MolToSmiles(_mol) + if _smi: + self.dict[str(idx)+"_"+name].append(_smi) + + + def _collect(self): + for rule, smis in self.dict.items(): + for _ in set(smis): + self.revdict[_].append(rule) + return [smi for smi, rules in self.revdict.items()] + + + def enumerate(self): + m = Chem.Mol(self.rdmol) # copy + if self._contains_phosphorus(): + self.enumarated = [self.smiles] + else: + kms = self._kekulized(m) + for km in kms: # can be parallel + self._transform(km) + + for i in range(5): + transformed_smis = [] + for rule, smis in self.dict.items(): + transformed_smis += smis # list + transformed_smis = set(transformed_smis) + transformed_mols = [Chem.MolFromSmiles(_) for _ in transformed_smis] + for tm in transformed_mols: # can be parallel + kms = self._kekulized(tm) + for km in kms: + self._transform(km) + + self.enumerated = self._collect() + + return self + + + +if __name__ == '__main__': + for smi in [ + "Oc1ccccc1", + "COC(=O)c1ccc(O)cc1", + "N#CC1=C(N)Oc2[nH]ncc2C1", + "OSc1ncc[nH]1", + "O=C(Cc1ccccc1)c1cccs1", + "Oc1nc2ccccc2nc1", + "O=C1NN=CN1", + "OC(=O)COC(=O)N[C@]12CC[C@H](CC1)[C@@H]1[C@H]2C(=O)N(C1=O)c1ccc(cc1)NC(=O)C", + "OCc(n1)cnc(c12)nc(N)[nH]c2=O", + "O=[N+]([O-])c1ccc2cn[nH]c2c1", + "c1ccc2cn[nH]c2c1", + "CN(C)CCCN1C2=CC=CC=C2SC2=C1C=C(C=C2)C(C)=O", + "Nc1cc(C(F)(F)F)c(-c2cc(N3CCCC3)nc(N3CCOCC3)n2)cn1" + ]: + m = Chem.MolFromSmiles(smi) + smi = Chem.MolToSmiles(m) + + t = ComprehensiveTautomer(smi).enumerate() + + print("SMILES=", t.smiles) + print("enumerated=") + for i, smiles in enumerate(t.enumerated, start=1): + print(i, smiles) + print() diff --git a/qupkake/transforms.py b/src/qupkake/transforms.py similarity index 100% rename from qupkake/transforms.py rename to src/qupkake/transforms.py diff --git a/qupkake/xtb-641/bin/crest b/src/qupkake/xtb/bin/crest similarity index 100% rename from qupkake/xtb-641/bin/crest rename to src/qupkake/xtb/bin/crest diff --git a/qupkake/xtb-641/bin/xtb b/src/qupkake/xtb/bin/xtb similarity index 100% rename from qupkake/xtb-641/bin/xtb rename to src/qupkake/xtb/bin/xtb diff --git a/qupkake/xtb-641/include/xtb/xtb.h b/src/qupkake/xtb/include/xtb/xtb.h similarity index 100% rename from qupkake/xtb-641/include/xtb/xtb.h rename to src/qupkake/xtb/include/xtb/xtb.h diff --git a/qupkake/xtb-641/share/modules/modulefiles/xtb/6.4.1 b/src/qupkake/xtb/share/modules/modulefiles/xtb/6.4.1 similarity index 100% rename from qupkake/xtb-641/share/modules/modulefiles/xtb/6.4.1 rename to src/qupkake/xtb/share/modules/modulefiles/xtb/6.4.1 diff --git a/qupkake/xtb-641/share/xtb/.param_gfnff.xtb b/src/qupkake/xtb/share/xtb/.param_gfnff.xtb similarity index 100% rename from qupkake/xtb-641/share/xtb/.param_gfnff.xtb rename to src/qupkake/xtb/share/xtb/.param_gfnff.xtb diff --git a/qupkake/xtb-641/share/xtb/config_env.bash b/src/qupkake/xtb/share/xtb/config_env.bash similarity index 100% rename from qupkake/xtb-641/share/xtb/config_env.bash rename to src/qupkake/xtb/share/xtb/config_env.bash diff --git a/qupkake/xtb-641/share/xtb/config_env.csh b/src/qupkake/xtb/share/xtb/config_env.csh similarity index 100% rename from qupkake/xtb-641/share/xtb/config_env.csh rename to src/qupkake/xtb/share/xtb/config_env.csh diff --git a/qupkake/xtb-641/share/xtb/param_gfn0-xtb.txt b/src/qupkake/xtb/share/xtb/param_gfn0-xtb.txt similarity index 100% rename from qupkake/xtb-641/share/xtb/param_gfn0-xtb.txt rename to src/qupkake/xtb/share/xtb/param_gfn0-xtb.txt diff --git a/qupkake/xtb-641/share/xtb/param_gfn1-xtb.txt b/src/qupkake/xtb/share/xtb/param_gfn1-xtb.txt similarity index 100% rename from qupkake/xtb-641/share/xtb/param_gfn1-xtb.txt rename to src/qupkake/xtb/share/xtb/param_gfn1-xtb.txt diff --git a/qupkake/xtb-641/share/xtb/param_gfn2-xtb.txt b/src/qupkake/xtb/share/xtb/param_gfn2-xtb.txt similarity index 100% rename from qupkake/xtb-641/share/xtb/param_gfn2-xtb.txt rename to src/qupkake/xtb/share/xtb/param_gfn2-xtb.txt diff --git a/qupkake/xtb-641/share/xtb/param_ipea-xtb.txt b/src/qupkake/xtb/share/xtb/param_ipea-xtb.txt similarity index 100% rename from qupkake/xtb-641/share/xtb/param_ipea-xtb.txt rename to src/qupkake/xtb/share/xtb/param_ipea-xtb.txt diff --git a/qupkake/xtb-641/v6.4.1.tar b/src/qupkake/xtb/v6.4.1.tar similarity index 100% rename from qupkake/xtb-641/v6.4.1.tar rename to src/qupkake/xtb/v6.4.1.tar diff --git a/qupkake/xtb-641/xtb-6.4.1/.github/ISSUE_TEMPLATE/bug_report.md b/src/qupkake/xtb/xtb-6.4.1/.github/ISSUE_TEMPLATE/bug_report.md similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.github/ISSUE_TEMPLATE/bug_report.md rename to src/qupkake/xtb/xtb-6.4.1/.github/ISSUE_TEMPLATE/bug_report.md diff --git a/qupkake/xtb-641/xtb-6.4.1/.github/ISSUE_TEMPLATE/feature_request.md b/src/qupkake/xtb/xtb-6.4.1/.github/ISSUE_TEMPLATE/feature_request.md similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.github/ISSUE_TEMPLATE/feature_request.md rename to src/qupkake/xtb/xtb-6.4.1/.github/ISSUE_TEMPLATE/feature_request.md diff --git a/qupkake/xtb-641/xtb-6.4.1/.github/dco.yml b/src/qupkake/xtb/xtb-6.4.1/.github/dco.yml similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.github/dco.yml rename to src/qupkake/xtb/xtb-6.4.1/.github/dco.yml diff --git a/qupkake/xtb-641/xtb-6.4.1/.github/workflows/fortran-build.yml b/src/qupkake/xtb/xtb-6.4.1/.github/workflows/fortran-build.yml similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.github/workflows/fortran-build.yml rename to src/qupkake/xtb/xtb-6.4.1/.github/workflows/fortran-build.yml diff --git a/qupkake/xtb-641/xtb-6.4.1/.gitignore b/src/qupkake/xtb/xtb-6.4.1/.gitignore similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.gitignore rename to src/qupkake/xtb/xtb-6.4.1/.gitignore diff --git a/qupkake/xtb-641/xtb-6.4.1/.gitmodules b/src/qupkake/xtb/xtb-6.4.1/.gitmodules similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.gitmodules rename to src/qupkake/xtb/xtb-6.4.1/.gitmodules diff --git a/qupkake/xtb-641/xtb-6.4.1/.param_gfnff.xtb b/src/qupkake/xtb/xtb-6.4.1/.param_gfnff.xtb similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.param_gfnff.xtb rename to src/qupkake/xtb/xtb-6.4.1/.param_gfnff.xtb diff --git a/qupkake/xtb-641/xtb-6.4.1/.xtbrc b/src/qupkake/xtb/xtb-6.4.1/.xtbrc similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.xtbrc rename to src/qupkake/xtb/xtb-6.4.1/.xtbrc diff --git a/qupkake/xtb-641/xtb-6.4.1/.zenodo.json b/src/qupkake/xtb/xtb-6.4.1/.zenodo.json similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/.zenodo.json rename to src/qupkake/xtb/xtb-6.4.1/.zenodo.json diff --git a/qupkake/xtb-641/xtb-6.4.1/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/CONTRIBUTING.md b/src/qupkake/xtb/xtb-6.4.1/CONTRIBUTING.md similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/CONTRIBUTING.md rename to src/qupkake/xtb/xtb-6.4.1/CONTRIBUTING.md diff --git a/qupkake/xtb-641/xtb-6.4.1/COPYING b/src/qupkake/xtb/xtb-6.4.1/COPYING similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/COPYING rename to src/qupkake/xtb/xtb-6.4.1/COPYING diff --git a/qupkake/xtb-641/xtb-6.4.1/COPYING.LESSER b/src/qupkake/xtb/xtb-6.4.1/COPYING.LESSER similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/COPYING.LESSER rename to src/qupkake/xtb/xtb-6.4.1/COPYING.LESSER diff --git a/qupkake/xtb-641/xtb-6.4.1/README.md b/src/qupkake/xtb/xtb-6.4.1/README.md similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/README.md rename to src/qupkake/xtb/xtb-6.4.1/README.md diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/assertion.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/assertion.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/assertion.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/assertion.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/c_api_example.c b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/c_api_example.c similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/c_api_example.c rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/c_api_example.c diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/coordinationnumber.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/coordinationnumber.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/coordinationnumber.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/coordinationnumber.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/coulomb.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/coulomb.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/coulomb.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/coulomb.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/dftd3.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/dftd3.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/dftd3.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/dftd3.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/dftd4.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/dftd4.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/dftd4.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/dftd4.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/eeq.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/eeq.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/eeq.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/eeq.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/eeq_model.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/eeq_model.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/eeq_model.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/eeq_model.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/geometry_reader.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/geometry_reader.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/geometry_reader.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/geometry_reader.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfn0.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfn0.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfn0.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfn0.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfn1.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfn1.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfn1.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfn1.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfn2.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfn2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfn2.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfn2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfnff.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfnff.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/gfnff.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/gfnff.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/hessian.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/hessian.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/hessian.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/hessian.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/latticepoint.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/latticepoint.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/latticepoint.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/latticepoint.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/meson.build b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/meson.build rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/molstock.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/molstock.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/molstock.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/molstock.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/pbc_tools.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/pbc_tools.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/pbc_tools.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/pbc_tools.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/peeq.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/peeq.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/peeq.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/peeq.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/relaxation_engine.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/relaxation_engine.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/relaxation_engine.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/relaxation_engine.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/repulsion.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/repulsion.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/repulsion.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/repulsion.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/symmetry.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/symmetry.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/symmetry.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/symmetry.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tbdef_atomlist.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tbdef_atomlist.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tbdef_atomlist.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tbdef_atomlist.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tbdef_molecule.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tbdef_molecule.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tbdef_molecule.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tbdef_molecule.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tbdef_wsc.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tbdef_wsc.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tbdef_wsc.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tbdef_wsc.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tests_peeq.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tests_peeq.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/tests_peeq.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/tests_peeq.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/TESTSUITE/thermo.f90 b/src/qupkake/xtb/xtb-6.4.1/TESTSUITE/thermo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/TESTSUITE/thermo.f90 rename to src/qupkake/xtb/xtb-6.4.1/TESTSUITE/thermo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/inputs/coord/caffeine.coord b/src/qupkake/xtb/xtb-6.4.1/assets/inputs/coord/caffeine.coord similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/inputs/coord/caffeine.coord rename to src/qupkake/xtb/xtb-6.4.1/assets/inputs/coord/caffeine.coord diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/inputs/coord/quartz.3d.coord b/src/qupkake/xtb/xtb-6.4.1/assets/inputs/coord/quartz.3d.coord similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/inputs/coord/quartz.3d.coord rename to src/qupkake/xtb/xtb-6.4.1/assets/inputs/coord/quartz.3d.coord diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/inputs/vasp/ammonia.vasp b/src/qupkake/xtb/xtb-6.4.1/assets/inputs/vasp/ammonia.vasp similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/inputs/vasp/ammonia.vasp rename to src/qupkake/xtb/xtb-6.4.1/assets/inputs/vasp/ammonia.vasp diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/inputs/xyz/taxol.xyz b/src/qupkake/xtb/xtb-6.4.1/assets/inputs/xyz/taxol.xyz similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/inputs/xyz/taxol.xyz rename to src/qupkake/xtb/xtb-6.4.1/assets/inputs/xyz/taxol.xyz diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/logo/README.md b/src/qupkake/xtb/xtb-6.4.1/assets/logo/README.md similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/logo/README.md rename to src/qupkake/xtb/xtb-6.4.1/assets/logo/README.md diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/logo/xtb.svg b/src/qupkake/xtb/xtb-6.4.1/assets/logo/xtb.svg similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/logo/xtb.svg rename to src/qupkake/xtb/xtb-6.4.1/assets/logo/xtb.svg diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/logo/xtb_alt.svg b/src/qupkake/xtb/xtb-6.4.1/assets/logo/xtb_alt.svg similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/logo/xtb_alt.svg rename to src/qupkake/xtb/xtb-6.4.1/assets/logo/xtb_alt.svg diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/meson.build b/src/qupkake/xtb/xtb-6.4.1/assets/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/meson.build rename to src/qupkake/xtb/xtb-6.4.1/assets/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/references.bib b/src/qupkake/xtb/xtb-6.4.1/assets/references.bib similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/references.bib rename to src/qupkake/xtb/xtb-6.4.1/assets/references.bib diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/templates/config_env.bash b/src/qupkake/xtb/xtb-6.4.1/assets/templates/config_env.bash similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/templates/config_env.bash rename to src/qupkake/xtb/xtb-6.4.1/assets/templates/config_env.bash diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/templates/config_env.csh b/src/qupkake/xtb/xtb-6.4.1/assets/templates/config_env.csh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/templates/config_env.csh rename to src/qupkake/xtb/xtb-6.4.1/assets/templates/config_env.csh diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/templates/env-module.tcl b/src/qupkake/xtb/xtb-6.4.1/assets/templates/env-module.tcl similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/templates/env-module.tcl rename to src/qupkake/xtb/xtb-6.4.1/assets/templates/env-module.tcl diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/templates/version.f90 b/src/qupkake/xtb/xtb-6.4.1/assets/templates/version.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/templates/version.f90 rename to src/qupkake/xtb/xtb-6.4.1/assets/templates/version.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/templates/xtb.pc b/src/qupkake/xtb/xtb-6.4.1/assets/templates/xtb.pc similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/templates/xtb.pc rename to src/qupkake/xtb/xtb-6.4.1/assets/templates/xtb.pc diff --git a/qupkake/xtb-641/xtb-6.4.1/assets/xtb.wrap b/src/qupkake/xtb/xtb-6.4.1/assets/xtb.wrap similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/assets/xtb.wrap rename to src/qupkake/xtb/xtb-6.4.1/assets/xtb.wrap diff --git a/qupkake/xtb-641/xtb-6.4.1/cmake/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/cmake/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/cmake/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/cmake/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/cmake/README.adoc b/src/qupkake/xtb/xtb-6.4.1/cmake/README.adoc similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/cmake/README.adoc rename to src/qupkake/xtb/xtb-6.4.1/cmake/README.adoc diff --git a/qupkake/xtb-641/xtb-6.4.1/cmake/config.cmake.in b/src/qupkake/xtb/xtb-6.4.1/cmake/config.cmake.in similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/cmake/config.cmake.in rename to src/qupkake/xtb/xtb-6.4.1/cmake/config.cmake.in diff --git a/qupkake/xtb-641/xtb-6.4.1/include/grida38.fh b/src/qupkake/xtb/xtb-6.4.1/include/grida38.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/grida38.fh rename to src/qupkake/xtb/xtb-6.4.1/include/grida38.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/grida86.fh b/src/qupkake/xtb/xtb-6.4.1/include/grida86.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/grida86.fh rename to src/qupkake/xtb/xtb-6.4.1/include/grida86.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_acetone.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_acetone.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_acetone.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_acetone.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_acetonitrile.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_acetonitrile.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_acetonitrile.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_acetonitrile.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_aniline.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_aniline.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_aniline.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_aniline.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_benzaldehyde.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_benzaldehyde.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_benzaldehyde.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_benzaldehyde.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_benzene.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_benzene.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_benzene.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_benzene.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ch2cl2.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ch2cl2.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ch2cl2.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ch2cl2.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_chcl3.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_chcl3.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_chcl3.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_chcl3.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_cs2.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_cs2.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_cs2.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_cs2.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_dioxane.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_dioxane.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_dioxane.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_dioxane.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_dmf.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_dmf.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_dmf.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_dmf.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_dmso.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_dmso.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_dmso.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_dmso.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ethanol.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ethanol.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ethanol.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ethanol.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ether.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ether.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ether.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ether.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ethylacetate.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ethylacetate.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_ethylacetate.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_ethylacetate.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_furane.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_furane.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_furane.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_furane.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_hexadecane.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_hexadecane.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_hexadecane.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_hexadecane.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_hexane.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_hexane.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_hexane.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_hexane.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_methanol.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_methanol.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_methanol.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_methanol.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_nitromethane.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_nitromethane.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_nitromethane.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_nitromethane.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_octanol.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_octanol.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_octanol.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_octanol.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_phenol.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_phenol.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_phenol.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_phenol.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_thf.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_thf.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_thf.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_thf.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_toluene.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_toluene.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_toluene.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_toluene.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_water.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_water.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_water.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_water.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_alpb_woctanol.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_alpb_woctanol.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_alpb_woctanol.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_alpb_woctanol.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_acetone.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_acetone.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_acetone.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_acetone.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_acetonitrile.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_acetonitrile.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_acetonitrile.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_acetonitrile.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_benzene.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_benzene.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_benzene.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_benzene.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_ch2cl2.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_ch2cl2.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_ch2cl2.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_ch2cl2.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_chcl3.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_chcl3.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_chcl3.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_chcl3.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_cs2.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_cs2.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_cs2.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_cs2.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_dmf.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_dmf.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_dmf.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_dmf.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_dmso.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_dmso.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_dmso.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_dmso.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_ether.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_ether.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_ether.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_ether.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_h2o.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_h2o.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_h2o.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_h2o.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_methanol.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_methanol.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_methanol.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_methanol.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_nhexan.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_nhexan.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_nhexan.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_nhexan.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_thf.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_thf.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_thf.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_thf.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_toluene.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_toluene.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_gbsa_toluene.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_gbsa_toluene.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/param_ref.fh b/src/qupkake/xtb/xtb-6.4.1/include/param_ref.fh similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/param_ref.fh rename to src/qupkake/xtb/xtb-6.4.1/include/param_ref.fh diff --git a/qupkake/xtb-641/xtb-6.4.1/include/xtb.h b/src/qupkake/xtb/xtb-6.4.1/include/xtb.h similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/include/xtb.h rename to src/qupkake/xtb/xtb-6.4.1/include/xtb.h diff --git a/qupkake/xtb-641/xtb-6.4.1/man/Makefile b/src/qupkake/xtb/xtb-6.4.1/man/Makefile similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/man/Makefile rename to src/qupkake/xtb/xtb-6.4.1/man/Makefile diff --git a/qupkake/xtb-641/xtb-6.4.1/man/xcontrol.7.adoc b/src/qupkake/xtb/xtb-6.4.1/man/xcontrol.7.adoc similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/man/xcontrol.7.adoc rename to src/qupkake/xtb/xtb-6.4.1/man/xcontrol.7.adoc diff --git a/qupkake/xtb-641/xtb-6.4.1/man/xtb.1.adoc b/src/qupkake/xtb/xtb-6.4.1/man/xtb.1.adoc similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/man/xtb.1.adoc rename to src/qupkake/xtb/xtb-6.4.1/man/xtb.1.adoc diff --git a/qupkake/xtb-641/xtb-6.4.1/meson.build b/src/qupkake/xtb/xtb-6.4.1/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/meson.build rename to src/qupkake/xtb/xtb-6.4.1/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/meson/README.adoc b/src/qupkake/xtb/xtb-6.4.1/meson/README.adoc similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/meson/README.adoc rename to src/qupkake/xtb/xtb-6.4.1/meson/README.adoc diff --git a/qupkake/xtb-641/xtb-6.4.1/meson/meson.build b/src/qupkake/xtb/xtb-6.4.1/meson/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/meson/meson.build rename to src/qupkake/xtb/xtb-6.4.1/meson/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/meson/openblas_lapack_test.f90 b/src/qupkake/xtb/xtb-6.4.1/meson/openblas_lapack_test.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/meson/openblas_lapack_test.f90 rename to src/qupkake/xtb/xtb-6.4.1/meson/openblas_lapack_test.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/meson_options.txt b/src/qupkake/xtb/xtb-6.4.1/meson_options.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/meson_options.txt rename to src/qupkake/xtb/xtb-6.4.1/meson_options.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/param_gfn0-xtb.txt b/src/qupkake/xtb/xtb-6.4.1/param_gfn0-xtb.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/param_gfn0-xtb.txt rename to src/qupkake/xtb/xtb-6.4.1/param_gfn0-xtb.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/param_gfn1-xtb.txt b/src/qupkake/xtb/xtb-6.4.1/param_gfn1-xtb.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/param_gfn1-xtb.txt rename to src/qupkake/xtb/xtb-6.4.1/param_gfn1-xtb.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/param_gfn2-xtb.txt b/src/qupkake/xtb/xtb-6.4.1/param_gfn2-xtb.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/param_gfn2-xtb.txt rename to src/qupkake/xtb/xtb-6.4.1/param_gfn2-xtb.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/param_ipea-xtb.txt b/src/qupkake/xtb/xtb-6.4.1/param_ipea-xtb.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/param_ipea-xtb.txt rename to src/qupkake/xtb/xtb-6.4.1/param_ipea-xtb.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/python/README.md b/src/qupkake/xtb/xtb-6.4.1/python/README.md similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/python/README.md rename to src/qupkake/xtb/xtb-6.4.1/python/README.md diff --git a/qupkake/xtb-641/xtb-6.4.1/scripts/otool_xtb b/src/qupkake/xtb/xtb-6.4.1/scripts/otool_xtb similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/scripts/otool_xtb rename to src/qupkake/xtb/xtb-6.4.1/scripts/otool_xtb diff --git a/qupkake/xtb-641/xtb-6.4.1/scripts/xtb-gaussian b/src/qupkake/xtb/xtb-6.4.1/scripts/xtb-gaussian similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/scripts/xtb-gaussian rename to src/qupkake/xtb/xtb-6.4.1/scripts/xtb-gaussian diff --git a/qupkake/xtb-641/xtb-6.4.1/src/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/aespot.f90 b/src/qupkake/xtb/xtb-6.4.1/src/aespot.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/aespot.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/aespot.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/anharmlib.f90 b/src/qupkake/xtb/xtb-6.4.1/src/anharmlib.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/anharmlib.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/anharmlib.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/aoparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/aoparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/aoparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/aoparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/api/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/api/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/calculator.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/calculator.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/calculator.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/calculator.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/environment.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/environment.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/environment.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/environment.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/interface.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/interface.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/interface.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/interface.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/api/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/api/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/molecule.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/molecule.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/molecule.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/molecule.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/results.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/results.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/results.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/results.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/utils.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/utils.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/utils.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/utils.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/api/version.f90 b/src/qupkake/xtb/xtb-6.4.1/src/api/version.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/api/version.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/api/version.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/approxrab.f90 b/src/qupkake/xtb/xtb-6.4.1/src/approxrab.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/approxrab.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/approxrab.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/axis_trafo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/axis_trafo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/axis_trafo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/axis_trafo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/basic_geo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/basic_geo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/basic_geo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/basic_geo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/bfgs.f90 b/src/qupkake/xtb/xtb-6.4.1/src/bfgs.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/bfgs.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/bfgs.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/bias_path.f90 b/src/qupkake/xtb/xtb-6.4.1/src/bias_path.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/bias_path.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/bias_path.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/blowsy.f90 b/src/qupkake/xtb/xtb-6.4.1/src/blowsy.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/blowsy.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/blowsy.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/broyden.f90 b/src/qupkake/xtb/xtb-6.4.1/src/broyden.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/broyden.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/broyden.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/charge_model.f90 b/src/qupkake/xtb/xtb-6.4.1/src/charge_model.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/charge_model.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/charge_model.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/coffee.f90 b/src/qupkake/xtb/xtb-6.4.1/src/coffee.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/coffee.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/coffee.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/constr.f90 b/src/qupkake/xtb/xtb-6.4.1/src/constr.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/constr.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/constr.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/constrain_param.f90 b/src/qupkake/xtb/xtb-6.4.1/src/constrain_param.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/constrain_param.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/constrain_param.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/constrain_pot.f90 b/src/qupkake/xtb/xtb-6.4.1/src/constrain_pot.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/constrain_pot.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/constrain_pot.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/coulomb/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/coulomb/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/coulomb/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/coulomb/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/coulomb/ewald.f90 b/src/qupkake/xtb/xtb-6.4.1/src/coulomb/ewald.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/coulomb/ewald.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/coulomb/ewald.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/coulomb/gaussian.f90 b/src/qupkake/xtb/xtb-6.4.1/src/coulomb/gaussian.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/coulomb/gaussian.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/coulomb/gaussian.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/coulomb/klopmanohno.f90 b/src/qupkake/xtb/xtb-6.4.1/src/coulomb/klopmanohno.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/coulomb/klopmanohno.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/coulomb/klopmanohno.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/coulomb/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/coulomb/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/coulomb/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/coulomb/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/cqpath.f90 b/src/qupkake/xtb/xtb-6.4.1/src/cqpath.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/cqpath.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/cqpath.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/cube.f90 b/src/qupkake/xtb/xtb-6.4.1/src/cube.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/cube.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/cube.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/david.f b/src/qupkake/xtb/xtb-6.4.1/src/david.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/david.f rename to src/qupkake/xtb/xtb-6.4.1/src/david.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/david2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/david2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/david2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/david2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/define.f90 b/src/qupkake/xtb/xtb-6.4.1/src/define.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/define.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/define.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/detrotra.f90 b/src/qupkake/xtb/xtb-6.4.1/src/detrotra.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/detrotra.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/detrotra.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/dipole.f90 b/src/qupkake/xtb/xtb-6.4.1/src/dipole.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/dipole.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/dipole.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/disp/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/disp/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/coordinationnumber.f90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/coordinationnumber.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/coordinationnumber.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/coordinationnumber.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/dftd3.f b/src/qupkake/xtb/xtb-6.4.1/src/disp/dftd3.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/dftd3.f rename to src/qupkake/xtb/xtb-6.4.1/src/disp/dftd3.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/dftd3.f90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/dftd3.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/dftd3.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/dftd3.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/dftd3_parameters.f90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/dftd3_parameters.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/dftd3_parameters.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/dftd3_parameters.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/dftd4.F90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/dftd4.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/dftd4.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/dftd4.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/dftd4_parameters.f90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/dftd4_parameters.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/dftd4_parameters.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/dftd4_parameters.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/encharges.f90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/encharges.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/encharges.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/encharges.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/disp/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/disp/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/disp/ncoord.f90 b/src/qupkake/xtb/xtb-6.4.1/src/disp/ncoord.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/disp/ncoord.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/disp/ncoord.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/drsp.f b/src/qupkake/xtb/xtb-6.4.1/src/drsp.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/drsp.f rename to src/qupkake/xtb/xtb-6.4.1/src/drsp.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/dtrafo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/dtrafo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/dtrafo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/dtrafo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/dynamic.f90 b/src/qupkake/xtb/xtb-6.4.1/src/dynamic.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/dynamic.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/dynamic.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/eeq_model.f90 b/src/qupkake/xtb/xtb-6.4.1/src/eeq_model.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/eeq_model.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/eeq_model.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/elem.f90 b/src/qupkake/xtb/xtb-6.4.1/src/elem.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/elem.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/elem.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/embedding.f90 b/src/qupkake/xtb/xtb-6.4.1/src/embedding.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/embedding.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/embedding.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/enso_printout.f90 b/src/qupkake/xtb/xtb-6.4.1/src/enso_printout.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/enso_printout.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/enso_printout.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/eqrot.f90 b/src/qupkake/xtb/xtb-6.4.1/src/eqrot.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/eqrot.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/eqrot.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/esp.f b/src/qupkake/xtb/xtb-6.4.1/src/esp.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/esp.f rename to src/qupkake/xtb/xtb-6.4.1/src/esp.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/expire.f90 b/src/qupkake/xtb/xtb-6.4.1/src/expire.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/expire.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/expire.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/extern/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/extern/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/extern/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/extern/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/extern/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/extern/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/extern/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/extern/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/extern/mopac.f90 b/src/qupkake/xtb/xtb-6.4.1/src/extern/mopac.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/extern/mopac.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/extern/mopac.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/extern/orca.f90 b/src/qupkake/xtb/xtb-6.4.1/src/extern/orca.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/extern/orca.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/extern/orca.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/extern/turbomole.f90 b/src/qupkake/xtb/xtb-6.4.1/src/extern/turbomole.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/extern/turbomole.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/extern/turbomole.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/filetools.F90 b/src/qupkake/xtb/xtb-6.4.1/src/filetools.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/filetools.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/filetools.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/fixparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/fixparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/fixparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/fixparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/foden.f90 b/src/qupkake/xtb/xtb-6.4.1/src/foden.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/foden.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/foden.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/fragment.f90 b/src/qupkake/xtb/xtb-6.4.1/src/fragment.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/fragment.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/fragment.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/freq/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/freq/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/io.f90 b/src/qupkake/xtb/xtb-6.4.1/src/freq/io.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/io.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/freq/io.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/freq/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/freq/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/numdiff.F90 b/src/qupkake/xtb/xtb-6.4.1/src/freq/numdiff.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/numdiff.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/freq/numdiff.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/project.f90 b/src/qupkake/xtb/xtb-6.4.1/src/freq/project.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/project.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/freq/project.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/turbomole.f90 b/src/qupkake/xtb/xtb-6.4.1/src/freq/turbomole.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/turbomole.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/freq/turbomole.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/freq/utils.f90 b/src/qupkake/xtb/xtb-6.4.1/src/freq/utils.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/freq/utils.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/freq/utils.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/generate_wsc.f90 b/src/qupkake/xtb/xtb-6.4.1/src/generate_wsc.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/generate_wsc.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/generate_wsc.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/geoopt_driver.f90 b/src/qupkake/xtb/xtb-6.4.1/src/geoopt_driver.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/geoopt_driver.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/geoopt_driver.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/geosum.f90 b/src/qupkake/xtb/xtb-6.4.1/src/geosum.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/geosum.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/geosum.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/getkopt.f90 b/src/qupkake/xtb/xtb-6.4.1/src/getkopt.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/getkopt.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/getkopt.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/getname.f90 b/src/qupkake/xtb/xtb-6.4.1/src/getname.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/getname.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/getname.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/getsymnum.f90 b/src/qupkake/xtb/xtb-6.4.1/src/getsymnum.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/getsymnum.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/getsymnum.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfn0param.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfn0param.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfn0param.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfn0param.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfn_paramset.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfn_paramset.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfn_paramset.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfn_paramset.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfn_prparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfn_prparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfn_prparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfn_prparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/calculator.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/calculator.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/calculator.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/calculator.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/data.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/data.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/data.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/data.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/frag_hess.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/frag_hess.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/frag_hess.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/frag_hess.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gdisp0.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gdisp0.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gdisp0.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gdisp0.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/generator.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/generator.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/generator.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/generator.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/getring36.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/getring36.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/getring36.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/getring36.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_eg.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_eg.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_eg.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_eg.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_ini.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_ini.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_ini.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_ini.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_ini2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_ini2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_ini2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_ini2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_param.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_param.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_param.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_param.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_qm.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_qm.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_qm.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_qm.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_rab.f b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_rab.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_rab.f rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_rab.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_setup.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_setup.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/gfnff_setup.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/gfnff_setup.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/math.f b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/math.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/math.f rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/math.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/mrec.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/mrec.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/mrec.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/mrec.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/neighbourlist.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/neighbourlist.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/neighbourlist.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/neighbourlist.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/shake_module.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/shake_module.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/shake_module.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/shake_module.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/shortest_distance.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/shortest_distance.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/shortest_distance.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/shortest_distance.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/struc_converter.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/struc_converter.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/struc_converter.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/struc_converter.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/gfnff/topology.f90 b/src/qupkake/xtb/xtb-6.4.1/src/gfnff/topology.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/gfnff/topology.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/gfnff/topology.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/grad_core.f90 b/src/qupkake/xtb/xtb-6.4.1/src/grad_core.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/grad_core.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/grad_core.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/header.f90 b/src/qupkake/xtb/xtb-6.4.1/src/header.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/header.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/header.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/hessian.F90 b/src/qupkake/xtb/xtb-6.4.1/src/hessian.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/hessian.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/hessian.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/hlex.f90 b/src/qupkake/xtb/xtb-6.4.1/src/hlex.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/hlex.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/hlex.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/htosq.f90 b/src/qupkake/xtb/xtb-6.4.1/src/htosq.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/htosq.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/htosq.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/ifind.f90 b/src/qupkake/xtb/xtb-6.4.1/src/ifind.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/ifind.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/ifind.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/iniq.f90 b/src/qupkake/xtb/xtb-6.4.1/src/iniq.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/iniq.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/iniq.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/intgrad.f90 b/src/qupkake/xtb/xtb-6.4.1/src/intgrad.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/intgrad.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/intgrad.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/intmodes.f90 b/src/qupkake/xtb/xtb-6.4.1/src/intmodes.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/intmodes.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/intmodes.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/intpack.f90 b/src/qupkake/xtb/xtb-6.4.1/src/intpack.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/intpack.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/intpack.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/io/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/io/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/io/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/io/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/ctfile.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/ctfile.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/ctfile.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/ctfile.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/gaussian.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/gaussian.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/gaussian.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/gaussian.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/genformat.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/genformat.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/genformat.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/genformat.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/pdb.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/pdb.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/pdb.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/pdb.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/turbomole.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/turbomole.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/turbomole.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/turbomole.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/vasp.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/vasp.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/vasp.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/vasp.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/reader/xyz.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/reader/xyz.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/reader/xyz.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/reader/xyz.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/ctfile.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/ctfile.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/ctfile.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/ctfile.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/gaussian.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/gaussian.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/gaussian.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/gaussian.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/genformat.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/genformat.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/genformat.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/genformat.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/orca.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/orca.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/orca.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/orca.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/pdb.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/pdb.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/pdb.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/pdb.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/turbomole.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/turbomole.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/turbomole.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/turbomole.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/vasp.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/vasp.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/vasp.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/vasp.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/io/writer/xyz.f90 b/src/qupkake/xtb/xtb-6.4.1/src/io/writer/xyz.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/io/writer/xyz.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/io/writer/xyz.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/lidep.f90 b/src/qupkake/xtb/xtb-6.4.1/src/lidep.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/lidep.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/lidep.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/lin.f90 b/src/qupkake/xtb/xtb-6.4.1/src/lin.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/lin.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/lin.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/lin_mod.f90 b/src/qupkake/xtb/xtb-6.4.1/src/lin_mod.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/lin_mod.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/lin_mod.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/lindh.f90 b/src/qupkake/xtb/xtb-6.4.1/src/lindh.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/lindh.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/lindh.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/local.f90 b/src/qupkake/xtb/xtb-6.4.1/src/local.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/local.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/local.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/locmode.f90 b/src/qupkake/xtb/xtb-6.4.1/src/locmode.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/locmode.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/locmode.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/lopt.f90 b/src/qupkake/xtb/xtb-6.4.1/src/lopt.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/lopt.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/lopt.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/ls_rmsd.f90 b/src/qupkake/xtb/xtb-6.4.1/src/ls_rmsd.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/ls_rmsd.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/ls_rmsd.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/main/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/main/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/defaults.f90 b/src/qupkake/xtb/xtb-6.4.1/src/main/defaults.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/defaults.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/main/defaults.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/geometry.f90 b/src/qupkake/xtb/xtb-6.4.1/src/main/geometry.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/geometry.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/main/geometry.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/json.f90 b/src/qupkake/xtb/xtb-6.4.1/src/main/json.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/json.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/main/json.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/main/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/main/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/property.F90 b/src/qupkake/xtb/xtb-6.4.1/src/main/property.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/property.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/main/property.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/run.f90 b/src/qupkake/xtb/xtb-6.4.1/src/main/run.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/run.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/main/run.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/main/setup.f90 b/src/qupkake/xtb/xtb-6.4.1/src/main/setup.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/main/setup.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/main/setup.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/makel.f90 b/src/qupkake/xtb/xtb-6.4.1/src/makel.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/makel.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/makel.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/matinv.f90 b/src/qupkake/xtb/xtb-6.4.1/src/matinv.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/matinv.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/matinv.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/mctc/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/accuracy.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/accuracy.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/accuracy.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/accuracy.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/level1.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/level1.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/level1.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/level1.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/level2.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/level2.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/level2.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/level2.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/level3.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/level3.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/level3.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/level3.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/wrap1.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/wrap1.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/wrap1.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/wrap1.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/wrap2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/wrap2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/wrap2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/wrap2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/wrap3.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/wrap3.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/blas/wrap3.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/blas/wrap3.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/boundaryconditions.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/boundaryconditions.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/boundaryconditions.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/boundaryconditions.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/chartools.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/chartools.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/chartools.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/chartools.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/convert.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/convert.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/convert.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/convert.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/error.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/error.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/error.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/error.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/filetypes.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/filetypes.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/filetypes.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/filetypes.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/io.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/io.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/io.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/io.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/eigensolve.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/eigensolve.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/eigensolve.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/eigensolve.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/geneigval.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/geneigval.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/geneigval.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/geneigval.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/gst.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/gst.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/gst.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/gst.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/stdeigval.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/stdeigval.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/stdeigval.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/stdeigval.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/trf.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/trf.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/trf.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/trf.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/tri.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/tri.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/tri.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/tri.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/trs.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/trs.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/trs.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/trs.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/wrap.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/wrap.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/lapack/wrap.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/lapack/wrap.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/linalg.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/linalg.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/linalg.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/linalg.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/math.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/math.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/math.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/math.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_constants.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_constants.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_constants.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_constants.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_filetools.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_filetools.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_filetools.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_filetools.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_global.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_global.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_global.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_global.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_init.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_init.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_init.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_init.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_linux.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_linux.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_linux.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_linux.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_param.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_param.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_param.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_param.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_strings.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_strings.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_strings.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_strings.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_timings.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_timings.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/mctc_timings.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/mctc_timings.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/mctc/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/namegen.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/namegen.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/namegen.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/namegen.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/param/atomic_masses.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/param/atomic_masses.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/param/atomic_masses.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/param/atomic_masses.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/param/chemical_hardnesses.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/param/chemical_hardnesses.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/param/chemical_hardnesses.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/param/chemical_hardnesses.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/param/covalent_radii.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/param/covalent_radii.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/param/covalent_radii.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/param/covalent_radii.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/param/electronegativities.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/param/electronegativities.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/param/electronegativities.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/param/electronegativities.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/param/pse.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/param/pse.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/param/pse.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/param/pse.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/param/r4r2_expectation_values.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/param/r4r2_expectation_values.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/param/r4r2_expectation_values.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/param/r4r2_expectation_values.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/resize.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/resize.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/resize.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/resize.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/runtypes.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/runtypes.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/runtypes.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/runtypes.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/search.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/search.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/search.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/search.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/signal.c b/src/qupkake/xtb/xtb-6.4.1/src/mctc/signal.c similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/signal.c rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/signal.c diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/sort.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/sort.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/sort.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/sort.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/symbols.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/symbols.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/symbols.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/symbols.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/systools.F90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/systools.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/systools.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/systools.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/thresholds.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/thresholds.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/thresholds.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/thresholds.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mctc/version.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mctc/version.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mctc/version.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mctc/version.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/mdoptim.f90 b/src/qupkake/xtb/xtb-6.4.1/src/mdoptim.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/mdoptim.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/mdoptim.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/metadynamic.f90 b/src/qupkake/xtb/xtb-6.4.1/src/metadynamic.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/metadynamic.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/metadynamic.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/modef.f90 b/src/qupkake/xtb/xtb-6.4.1/src/modef.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/modef.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/modef.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/model_hessian.f90 b/src/qupkake/xtb/xtb-6.4.1/src/model_hessian.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/model_hessian.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/model_hessian.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/neighbor.f90 b/src/qupkake/xtb/xtb-6.4.1/src/neighbor.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/neighbor.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/neighbor.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/nvtx.f90 b/src/qupkake/xtb/xtb-6.4.1/src/nvtx.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/nvtx.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/nvtx.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/onetri.f90 b/src/qupkake/xtb/xtb-6.4.1/src/onetri.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/onetri.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/onetri.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/optimizer.f90 b/src/qupkake/xtb/xtb-6.4.1/src/optimizer.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/optimizer.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/optimizer.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/param/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/param/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/atomicmass.f90 b/src/qupkake/xtb/xtb-6.4.1/src/param/atomicmass.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/atomicmass.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/param/atomicmass.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/atomicrad.f90 b/src/qupkake/xtb/xtb-6.4.1/src/param/atomicrad.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/atomicrad.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/param/atomicrad.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/covalentradd3.f90 b/src/qupkake/xtb/xtb-6.4.1/src/param/covalentradd3.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/covalentradd3.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/param/covalentradd3.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/param/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/param/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/paulingen.f90 b/src/qupkake/xtb/xtb-6.4.1/src/param/paulingen.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/paulingen.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/param/paulingen.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/sqrtzr4r2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/param/sqrtzr4r2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/sqrtzr4r2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/param/sqrtzr4r2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/param/vdwradd3.f90 b/src/qupkake/xtb/xtb-6.4.1/src/param/vdwradd3.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/param/vdwradd3.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/param/vdwradd3.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/pbc.f90 b/src/qupkake/xtb/xtb-6.4.1/src/pbc.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/pbc.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/pbc.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/pbc_tools.f90 b/src/qupkake/xtb/xtb-6.4.1/src/pbc_tools.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/pbc_tools.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/pbc_tools.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/peeq_module.f90 b/src/qupkake/xtb/xtb-6.4.1/src/peeq_module.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/peeq_module.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/peeq_module.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/pocketscan.f90 b/src/qupkake/xtb/xtb-6.4.1/src/pocketscan.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/pocketscan.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/pocketscan.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/pqn.f90 b/src/qupkake/xtb/xtb-6.4.1/src/pqn.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/pqn.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/pqn.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/printmold.f90 b/src/qupkake/xtb/xtb-6.4.1/src/printmold.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/printmold.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/printmold.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/printout.f90 b/src/qupkake/xtb/xtb-6.4.1/src/printout.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/printout.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/printout.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prmat.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prmat.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prmat.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prmat.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prmat2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prmat2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prmat2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prmat2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/prog/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/prog/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/argparser.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/argparser.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/argparser.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/argparser.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/info.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/info.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/info.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/info.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/main.F90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/main.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/main.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/main.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/prog/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/prog/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/primary.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/primary.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/primary.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/primary.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/submodules.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/submodules.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/submodules.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/submodules.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/thermo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/thermo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/thermo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/thermo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/prog/topology.f90 b/src/qupkake/xtb/xtb-6.4.1/src/prog/topology.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/prog/topology.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/prog/topology.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/pseudodiag.f90 b/src/qupkake/xtb/xtb-6.4.1/src/pseudodiag.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/pseudodiag.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/pseudodiag.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/qmdff.f90 b/src/qupkake/xtb/xtb-6.4.1/src/qmdff.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/qmdff.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/qmdff.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/qpot.f90 b/src/qupkake/xtb/xtb-6.4.1/src/qpot.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/qpot.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/qpot.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/qsort.f90 b/src/qupkake/xtb/xtb-6.4.1/src/qsort.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/qsort.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/qsort.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/rabguess.f90 b/src/qupkake/xtb/xtb-6.4.1/src/rabguess.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/rabguess.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/rabguess.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/rdcoord2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/rdcoord2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/rdcoord2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/rdcoord2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/read_gfn_param.f90 b/src/qupkake/xtb/xtb-6.4.1/src/read_gfn_param.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/read_gfn_param.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/read_gfn_param.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/readin.f90 b/src/qupkake/xtb/xtb-6.4.1/src/readin.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/readin.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/readin.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/readl.f90 b/src/qupkake/xtb/xtb-6.4.1/src/readl.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/readl.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/readl.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/readl2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/readl2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/readl2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/readl2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/relaxation_engine.f90 b/src/qupkake/xtb/xtb-6.4.1/src/relaxation_engine.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/relaxation_engine.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/relaxation_engine.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/restart.f90 b/src/qupkake/xtb/xtb-6.4.1/src/restart.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/restart.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/restart.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/rmrottr.f90 b/src/qupkake/xtb/xtb-6.4.1/src/rmrottr.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/rmrottr.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/rmrottr.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/rmsd.f90 b/src/qupkake/xtb/xtb-6.4.1/src/rmsd.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/rmsd.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/rmsd.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/scan_driver.f90 b/src/qupkake/xtb/xtb-6.4.1/src/scan_driver.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/scan_driver.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/scan_driver.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/scanparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/scanparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/scanparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/scanparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/scc_core.f90 b/src/qupkake/xtb/xtb-6.4.1/src/scc_core.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/scc_core.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/scc_core.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/scf_module.F90 b/src/qupkake/xtb/xtb-6.4.1/src/scf_module.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/scf_module.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/scf_module.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/screening.f90 b/src/qupkake/xtb/xtb-6.4.1/src/screening.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/screening.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/screening.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/set_module.f90 b/src/qupkake/xtb/xtb-6.4.1/src/set_module.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/set_module.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/set_module.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/setparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/setparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/setparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/setparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/shake_module.f90 b/src/qupkake/xtb/xtb-6.4.1/src/shake_module.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/shake_module.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/shake_module.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/shiftlp.f90 b/src/qupkake/xtb/xtb-6.4.1/src/shiftlp.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/shiftlp.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/shiftlp.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/single.f90 b/src/qupkake/xtb/xtb-6.4.1/src/single.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/single.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/single.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/slater.f90 b/src/qupkake/xtb/xtb-6.4.1/src/slater.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/slater.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/slater.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/solv/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/solv/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/born.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/born.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/born.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/born.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/cm5.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/cm5.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/cm5.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/cm5.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/cosmo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/cosmo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/cosmo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/cosmo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/LICENSE b/src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/LICENSE similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/LICENSE rename to src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/LICENSE diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/core.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/core.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/core.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/core.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/solver.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/solver.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/ddcosmo/solver.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/ddcosmo/solver.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/gbsa.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/gbsa.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/gbsa.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/gbsa.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/input.F90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/input.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/input.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/input.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/kernel.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/kernel.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/kernel.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/kernel.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/lebedev.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/lebedev.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/lebedev.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/lebedev.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/solv/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/solv/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/model.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/model.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/model.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/model.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/sasa.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/sasa.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/sasa.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/sasa.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/solv/state.f90 b/src/qupkake/xtb/xtb-6.4.1/src/solv/state.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/solv/state.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/solv/state.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/sphereparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/sphereparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/sphereparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/sphereparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/spline2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/spline2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/spline2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/spline2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/spline3.f90 b/src/qupkake/xtb/xtb-6.4.1/src/spline3.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/spline3.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/spline3.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/splitparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/splitparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/splitparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/splitparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/stm.f b/src/qupkake/xtb/xtb-6.4.1/src/stm.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/stm.f rename to src/qupkake/xtb/xtb-6.4.1/src/stm.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/surfac.f b/src/qupkake/xtb/xtb-6.4.1/src/surfac.f similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/surfac.f rename to src/qupkake/xtb/xtb-6.4.1/src/surfac.f diff --git a/qupkake/xtb-641/xtb-6.4.1/src/symparam.f90 b/src/qupkake/xtb/xtb-6.4.1/src/symparam.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/symparam.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/symparam.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/symtranslib.f90 b/src/qupkake/xtb/xtb-6.4.1/src/symtranslib.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/symtranslib.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/symtranslib.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/thermo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/thermo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/thermo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/thermo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/timing.f90 b/src/qupkake/xtb/xtb-6.4.1/src/timing.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/timing.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/timing.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/topology.f90 b/src/qupkake/xtb/xtb-6.4.1/src/topology.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/topology.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/topology.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/type/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/type/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/anc.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/anc.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/anc.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/anc.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/atomlist.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/atomlist.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/atomlist.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/atomlist.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/basisset.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/basisset.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/basisset.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/basisset.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/buffer.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/buffer.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/buffer.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/buffer.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/calculator.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/calculator.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/calculator.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/calculator.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/coulomb.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/coulomb.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/coulomb.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/coulomb.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/data.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/data.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/data.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/data.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/dispersion_model.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/dispersion_model.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/dispersion_model.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/dispersion_model.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/dummycalc.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/dummycalc.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/dummycalc.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/dummycalc.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/environment.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/environment.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/environment.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/environment.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/fragments.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/fragments.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/fragments.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/fragments.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/identitymap.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/identitymap.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/identitymap.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/identitymap.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/iohandler.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/iohandler.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/iohandler.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/iohandler.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/latticepoint.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/latticepoint.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/latticepoint.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/latticepoint.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/type/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/type/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/molecule.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/molecule.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/molecule.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/molecule.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/neighbourlist.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/neighbourlist.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/neighbourlist.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/neighbourlist.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/options.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/options.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/options.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/options.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/param.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/param.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/param.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/param.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/pcem.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/pcem.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/pcem.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/pcem.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/reader.F90 b/src/qupkake/xtb/xtb-6.4.1/src/type/reader.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/reader.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/reader.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/restart.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/restart.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/restart.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/restart.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/setvar.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/setvar.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/setvar.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/setvar.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/solvation.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/solvation.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/solvation.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/solvation.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/timer.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/timer.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/timer.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/timer.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/topology.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/topology.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/topology.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/topology.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/vendordata.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/vendordata.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/vendordata.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/vendordata.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/wavefunction.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/wavefunction.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/wavefunction.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/wavefunction.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/wignerseitzcell.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/wignerseitzcell.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/wignerseitzcell.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/wignerseitzcell.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/type/wsc.f90 b/src/qupkake/xtb/xtb-6.4.1/src/type/wsc.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/type/wsc.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/type/wsc.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/wrbas.f90 b/src/qupkake/xtb/xtb-6.4.1/src/wrbas.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/wrbas.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/wrbas.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/wrgbw.f90 b/src/qupkake/xtb/xtb-6.4.1/src/wrgbw.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/wrgbw.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/wrgbw.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/wrmo.f90 b/src/qupkake/xtb/xtb-6.4.1/src/wrmo.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/wrmo.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/wrmo.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/wrmodef.f90 b/src/qupkake/xtb/xtb-6.4.1/src/wrmodef.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/wrmodef.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/wrmodef.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xhelp.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xhelp.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xhelp.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xhelp.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/src/xtb/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/basisset.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/basisset.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/basisset.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/basisset.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/calculator.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/calculator.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/calculator.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/calculator.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/coulomb.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/coulomb.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/coulomb.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/coulomb.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/data.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/data.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/data.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/data.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/dispersion.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/dispersion.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/dispersion.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/dispersion.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/eeq.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/eeq.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/eeq.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/eeq.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/gfn0.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/gfn0.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/gfn0.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/gfn0.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/gfn1.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/gfn1.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/gfn1.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/gfn1.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/gfn2.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/gfn2.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/gfn2.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/gfn2.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/halogen.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/halogen.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/halogen.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/halogen.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/hamiltonian.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/hamiltonian.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/hamiltonian.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/hamiltonian.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/hamiltonian_gpu.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/hamiltonian_gpu.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/hamiltonian_gpu.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/hamiltonian_gpu.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/meson.build b/src/qupkake/xtb/xtb-6.4.1/src/xtb/meson.build similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/meson.build rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/meson.build diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/multipole.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/multipole.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/multipole.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/multipole.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/repulsion.F90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/repulsion.F90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/repulsion.F90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/repulsion.F90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/xtb/thirdorder.f90 b/src/qupkake/xtb/xtb-6.4.1/src/xtb/thirdorder.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/xtb/thirdorder.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/xtb/thirdorder.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/src/zmatpr.f90 b/src/qupkake/xtb/xtb-6.4.1/src/zmatpr.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/src/zmatpr.f90 rename to src/qupkake/xtb/xtb-6.4.1/src/zmatpr.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/symmetry/CMakeLists.txt b/src/qupkake/xtb/xtb-6.4.1/symmetry/CMakeLists.txt similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/symmetry/CMakeLists.txt rename to src/qupkake/xtb/xtb-6.4.1/symmetry/CMakeLists.txt diff --git a/qupkake/xtb-641/xtb-6.4.1/symmetry/symmetry.f90 b/src/qupkake/xtb/xtb-6.4.1/symmetry/symmetry.f90 similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/symmetry/symmetry.f90 rename to src/qupkake/xtb/xtb-6.4.1/symmetry/symmetry.f90 diff --git a/qupkake/xtb-641/xtb-6.4.1/symmetry/symmetry_i.c b/src/qupkake/xtb/xtb-6.4.1/symmetry/symmetry_i.c similarity index 100% rename from qupkake/xtb-641/xtb-6.4.1/symmetry/symmetry_i.c rename to src/qupkake/xtb/xtb-6.4.1/symmetry/symmetry_i.c diff --git a/qupkake/xtbp.py b/src/qupkake/xtbp.py similarity index 99% rename from qupkake/xtbp.py rename to src/qupkake/xtbp.py index 4b1bccc..b170893 100755 --- a/qupkake/xtbp.py +++ b/src/qupkake/xtbp.py @@ -9,9 +9,8 @@ from rdkit import Chem -from . import XTB_LOCATION +from qupkake import XTB_LOCATION -print(XTB_LOCATION) class RunXTB: diff --git a/tests/test_api.py b/tests/test_api.py new file mode 100644 index 0000000..55cf5f5 --- /dev/null +++ b/tests/test_api.py @@ -0,0 +1,42 @@ +import tempfile +import pathlib +import rdworks +import subprocess +import os + +def run_workflow(smiles: str, name: str): + with tempfile.TemporaryDirectory() as tmp_dir: + workdir = pathlib.Path(tmp_dir) + proc = subprocess.run(['qupkake', + 'smiles', smiles, + '--name', name, + '--output', 'qupkake_output.sdf', + '-r', tmp_dir, + '--tautomerize', + ], cwd=tmp_dir) + + if proc.returncode == 0: + expected_output = workdir / 'output/qupkake_output.sdf' + if expected_output.exists(): + libr = rdworks.read_sdf(expected_output, confs=True) + assert libr.count() == 1, "Expected exactly one molecule in the output" + print(libr[0].serialize()) + for conf in libr[0].confs: + print("idx=", conf.props.get('idx', 'N/A'), end=' ') + print("pka_type=", conf.props.get('pka_type', 'N/A'), end=' ') + print("pka=", conf.props.get('pka', 'N/A')) + print("success") + else: + print("no pKa output") + +def test_api(): + os.environ["device"] = "cuda:0" + for (smiles, name) in [ + ("N[C@@H](CCCCN)C(=O)O", "L-Lysine"), + ("CC(=O)OC1=CC=CC=C1C(=O)O", "Aspirin"), + ("CCN(CC)CCOC(=O)C1=CC=CC=C1", "Lidocaine"), + ("CN1C=NC2=C1C(=O)N(C(=O)N2C)C", "Theobromine"), + ("COC1=CC2=NC=CC(=C2C=C1C(=O)N)OC3=CC(=C(C=C3)NC(=O)NC4CC4)Cl", "Lenvatinib")]: + print(f"Processing {name} ({smiles})") + run_workflow(smiles, name) + break diff --git a/qupkake/tests/test_cli.py b/tests/test_cli.py similarity index 100% rename from qupkake/tests/test_cli.py rename to tests/test_cli.py diff --git a/qupkake/tests/test_featurizer.py b/tests/test_featurizer.py similarity index 100% rename from qupkake/tests/test_featurizer.py rename to tests/test_featurizer.py diff --git a/qupkake/tests/test_mol_dataset.py b/tests/test_mol_dataset.py similarity index 100% rename from qupkake/tests/test_mol_dataset.py rename to tests/test_mol_dataset.py diff --git a/qupkake/tests/test_mol_utils.py b/tests/test_mol_utils.py similarity index 100% rename from qupkake/tests/test_mol_utils.py rename to tests/test_mol_utils.py diff --git a/qupkake/tests/test_qupkake.py b/tests/test_qupkake.py similarity index 100% rename from qupkake/tests/test_qupkake.py rename to tests/test_qupkake.py diff --git a/qupkake/tests/test_xtbp.py b/tests/test_xtbp.py similarity index 98% rename from qupkake/tests/test_xtbp.py rename to tests/test_xtbp.py index 717cd76..1f68429 100644 --- a/qupkake/tests/test_xtbp.py +++ b/tests/test_xtbp.py @@ -315,7 +315,6 @@ def sample_molecule(): return mol -@pytest.mark.skip(reason="can't test xtb on github right now") def test_run_xtb_with_molecule(sample_molecule): # Create an instance of RunXTB with a molecule xtb_runner = RunXTB(mol=sample_molecule, options="--opt") @@ -333,7 +332,6 @@ def test_run_xtb_with_molecule(sample_molecule): # assert isinstance(opt_mol, Chem.Mol) -@pytest.mark.skip(reason="can't test xtb on github right now") def test_run_xtb_with_invalid_input(): # Test creating RunXTB with invalid input (e.g., missing molecule or file) with pytest.raises(RuntimeError): @@ -343,14 +341,12 @@ def test_run_xtb_with_invalid_input(): xtb_runner = RunXTB(mol="invalid_molecule", options="--opt") -@pytest.mark.skip(reason="can't test xtb on github right now") def test_run_xtb_executable_exists(): # Test that the xTB executable exists with pytest.raises(RuntimeError): xtb_runner = RunXTB(mol=None, options="--opt") -@pytest.mark.skip(reason="can't test xtb on github right now") def test_xtbp_init_from_string(): xtb_parser = XTBP(xtb_output) attributes = xtb_parser.get_attributes() @@ -469,7 +465,6 @@ def test_xtbp_init_from_string(): ] -@pytest.mark.skip(reason="can't test xtb on github right now") def test_xtbp_init_from_file(tmp_path): # Create a temporary file with xtb output xtb_file_path = tmp_path / "xtb_output.out" @@ -594,7 +589,6 @@ def test_xtbp_init_from_file(tmp_path): ] -@pytest.mark.skip(reason="can't test xtb on github right now") def test_xtbp_invalid_input_type(): with pytest.raises( TypeError, match="output must be an xTB output string or xTB Output file." @@ -602,7 +596,6 @@ def test_xtbp_invalid_input_type(): XTBP(123) -@pytest.mark.skip(reason="can't test xtb on github right now") def test_xtbp_parse_xtb_exception(): with pytest.raises(Exception): # Simulating an exception during xtb parsing @@ -610,7 +603,6 @@ def test_xtbp_parse_xtb_exception(): xtb_parser = XTBP(xtb_output) -@pytest.mark.skip(reason="can't test xtb on github right now") def test_xtbp_extract_data_exception(): with pytest.raises(Exception): # Simulating an exception during data extraction diff --git a/versioneer.py b/versioneer.py deleted file mode 100644 index 1e3753e..0000000 --- a/versioneer.py +++ /dev/null @@ -1,2277 +0,0 @@ - -# Version: 0.29 - -"""The Versioneer - like a rocketeer, but for versions. - -The Versioneer -============== - -* like a rocketeer, but for versions! -* https://github.com/python-versioneer/python-versioneer -* Brian Warner -* License: Public Domain (Unlicense) -* Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 -* [![Latest Version][pypi-image]][pypi-url] -* [![Build Status][travis-image]][travis-url] - -This is a tool for managing a recorded version number in setuptools-based -python projects. The goal is to remove the tedious and error-prone "update -the embedded version string" step from your release process. Making a new -release should be as easy as recording a new tag in your version-control -system, and maybe making new tarballs. - - -## Quick Install - -Versioneer provides two installation modes. The "classic" vendored mode installs -a copy of versioneer into your repository. The experimental build-time dependency mode -is intended to allow you to skip this step and simplify the process of upgrading. - -### Vendored mode - -* `pip install versioneer` to somewhere in your $PATH - * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is - available, so you can also use `conda install -c conda-forge versioneer` -* add a `[tool.versioneer]` section to your `pyproject.toml` or a - `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) - * Note that you will need to add `tomli; python_version < "3.11"` to your - build-time dependencies if you use `pyproject.toml` -* run `versioneer install --vendor` in your source tree, commit the results -* verify version information with `python setup.py version` - -### Build-time dependency mode - -* `pip install versioneer` to somewhere in your $PATH - * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is - available, so you can also use `conda install -c conda-forge versioneer` -* add a `[tool.versioneer]` section to your `pyproject.toml` or a - `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) -* add `versioneer` (with `[toml]` extra, if configuring in `pyproject.toml`) - to the `requires` key of the `build-system` table in `pyproject.toml`: - ```toml - [build-system] - requires = ["setuptools", "versioneer[toml]"] - build-backend = "setuptools.build_meta" - ``` -* run `versioneer install --no-vendor` in your source tree, commit the results -* verify version information with `python setup.py version` - -## Version Identifiers - -Source trees come from a variety of places: - -* a version-control system checkout (mostly used by developers) -* a nightly tarball, produced by build automation -* a snapshot tarball, produced by a web-based VCS browser, like github's - "tarball from tag" feature -* a release tarball, produced by "setup.py sdist", distributed through PyPI - -Within each source tree, the version identifier (either a string or a number, -this tool is format-agnostic) can come from a variety of places: - -* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows - about recent "tags" and an absolute revision-id -* the name of the directory into which the tarball was unpacked -* an expanded VCS keyword ($Id$, etc) -* a `_version.py` created by some earlier build step - -For released software, the version identifier is closely related to a VCS -tag. Some projects use tag names that include more than just the version -string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool -needs to strip the tag prefix to extract the version identifier. For -unreleased software (between tags), the version identifier should provide -enough information to help developers recreate the same tree, while also -giving them an idea of roughly how old the tree is (after version 1.2, before -version 1.3). Many VCS systems can report a description that captures this, -for example `git describe --tags --dirty --always` reports things like -"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the -0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has -uncommitted changes). - -The version identifier is used for multiple purposes: - -* to allow the module to self-identify its version: `myproject.__version__` -* to choose a name and prefix for a 'setup.py sdist' tarball - -## Theory of Operation - -Versioneer works by adding a special `_version.py` file into your source -tree, where your `__init__.py` can import it. This `_version.py` knows how to -dynamically ask the VCS tool for version information at import time. - -`_version.py` also contains `$Revision$` markers, and the installation -process marks `_version.py` to have this marker rewritten with a tag name -during the `git archive` command. As a result, generated tarballs will -contain enough information to get the proper version. - -To allow `setup.py` to compute a version too, a `versioneer.py` is added to -the top level of your source tree, next to `setup.py` and the `setup.cfg` -that configures it. This overrides several distutils/setuptools commands to -compute the version when invoked, and changes `setup.py build` and `setup.py -sdist` to replace `_version.py` with a small static file that contains just -the generated version data. - -## Installation - -See [INSTALL.md](./INSTALL.md) for detailed installation instructions. - -## Version-String Flavors - -Code which uses Versioneer can learn about its version string at runtime by -importing `_version` from your main `__init__.py` file and running the -`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can -import the top-level `versioneer.py` and run `get_versions()`. - -Both functions return a dictionary with different flavors of version -information: - -* `['version']`: A condensed version string, rendered using the selected - style. This is the most commonly used value for the project's version - string. The default "pep440" style yields strings like `0.11`, - `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section - below for alternative styles. - -* `['full-revisionid']`: detailed revision identifier. For Git, this is the - full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". - -* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the - commit date in ISO 8601 format. This will be None if the date is not - available. - -* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that - this is only accurate if run in a VCS checkout, otherwise it is likely to - be False or None - -* `['error']`: if the version string could not be computed, this will be set - to a string describing the problem, otherwise it will be None. It may be - useful to throw an exception in setup.py if this is set, to avoid e.g. - creating tarballs with a version string of "unknown". - -Some variants are more useful than others. Including `full-revisionid` in a -bug report should allow developers to reconstruct the exact code being tested -(or indicate the presence of local changes that should be shared with the -developers). `version` is suitable for display in an "about" box or a CLI -`--version` output: it can be easily compared against release notes and lists -of bugs fixed in various releases. - -The installer adds the following text to your `__init__.py` to place a basic -version in `YOURPROJECT.__version__`: - - from ._version import get_versions - __version__ = get_versions()['version'] - del get_versions - -## Styles - -The setup.cfg `style=` configuration controls how the VCS information is -rendered into a version string. - -The default style, "pep440", produces a PEP440-compliant string, equal to the -un-prefixed tag name for actual releases, and containing an additional "local -version" section with more detail for in-between builds. For Git, this is -TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags ---dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the -tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and -that this commit is two revisions ("+2") beyond the "0.11" tag. For released -software (exactly equal to a known tag), the identifier will only contain the -stripped tag, e.g. "0.11". - -Other styles are available. See [details.md](details.md) in the Versioneer -source tree for descriptions. - -## Debugging - -Versioneer tries to avoid fatal errors: if something goes wrong, it will tend -to return a version of "0+unknown". To investigate the problem, run `setup.py -version`, which will run the version-lookup code in a verbose mode, and will -display the full contents of `get_versions()` (including the `error` string, -which may help identify what went wrong). - -## Known Limitations - -Some situations are known to cause problems for Versioneer. This details the -most significant ones. More can be found on Github -[issues page](https://github.com/python-versioneer/python-versioneer/issues). - -### Subprojects - -Versioneer has limited support for source trees in which `setup.py` is not in -the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are -two common reasons why `setup.py` might not be in the root: - -* Source trees which contain multiple subprojects, such as - [Buildbot](https://github.com/buildbot/buildbot), which contains both - "master" and "slave" subprojects, each with their own `setup.py`, - `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI - distributions (and upload multiple independently-installable tarballs). -* Source trees whose main purpose is to contain a C library, but which also - provide bindings to Python (and perhaps other languages) in subdirectories. - -Versioneer will look for `.git` in parent directories, and most operations -should get the right version string. However `pip` and `setuptools` have bugs -and implementation details which frequently cause `pip install .` from a -subproject directory to fail to find a correct version string (so it usually -defaults to `0+unknown`). - -`pip install --editable .` should work correctly. `setup.py install` might -work too. - -Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in -some later version. - -[Bug #38](https://github.com/python-versioneer/python-versioneer/issues/38) is tracking -this issue. The discussion in -[PR #61](https://github.com/python-versioneer/python-versioneer/pull/61) describes the -issue from the Versioneer side in more detail. -[pip PR#3176](https://github.com/pypa/pip/pull/3176) and -[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve -pip to let Versioneer work correctly. - -Versioneer-0.16 and earlier only looked for a `.git` directory next to the -`setup.cfg`, so subprojects were completely unsupported with those releases. - -### Editable installs with setuptools <= 18.5 - -`setup.py develop` and `pip install --editable .` allow you to install a -project into a virtualenv once, then continue editing the source code (and -test) without re-installing after every change. - -"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a -convenient way to specify executable scripts that should be installed along -with the python package. - -These both work as expected when using modern setuptools. When using -setuptools-18.5 or earlier, however, certain operations will cause -`pkg_resources.DistributionNotFound` errors when running the entrypoint -script, which must be resolved by re-installing the package. This happens -when the install happens with one version, then the egg_info data is -regenerated while a different version is checked out. Many setup.py commands -cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into -a different virtualenv), so this can be surprising. - -[Bug #83](https://github.com/python-versioneer/python-versioneer/issues/83) describes -this one, but upgrading to a newer version of setuptools should probably -resolve it. - - -## Updating Versioneer - -To upgrade your project to a new release of Versioneer, do the following: - -* install the new Versioneer (`pip install -U versioneer` or equivalent) -* edit `setup.cfg` and `pyproject.toml`, if necessary, - to include any new configuration settings indicated by the release notes. - See [UPGRADING](./UPGRADING.md) for details. -* re-run `versioneer install --[no-]vendor` in your source tree, to replace - `SRC/_version.py` -* commit any changed files - -## Future Directions - -This tool is designed to make it easily extended to other version-control -systems: all VCS-specific components are in separate directories like -src/git/ . The top-level `versioneer.py` script is assembled from these -components by running make-versioneer.py . In the future, make-versioneer.py -will take a VCS name as an argument, and will construct a version of -`versioneer.py` that is specific to the given VCS. It might also take the -configuration arguments that are currently provided manually during -installation by editing setup.py . Alternatively, it might go the other -direction and include code from all supported VCS systems, reducing the -number of intermediate scripts. - -## Similar projects - -* [setuptools_scm](https://github.com/pypa/setuptools_scm/) - a non-vendored build-time - dependency -* [minver](https://github.com/jbweston/miniver) - a lightweight reimplementation of - versioneer -* [versioningit](https://github.com/jwodder/versioningit) - a PEP 518-based setuptools - plugin - -## License - -To make Versioneer easier to embed, all its code is dedicated to the public -domain. The `_version.py` that it creates is also in the public domain. -Specifically, both are released under the "Unlicense", as described in -https://unlicense.org/. - -[pypi-image]: https://img.shields.io/pypi/v/versioneer.svg -[pypi-url]: https://pypi.python.org/pypi/versioneer/ -[travis-image]: -https://img.shields.io/travis/com/python-versioneer/python-versioneer.svg -[travis-url]: https://travis-ci.com/github/python-versioneer/python-versioneer - -""" -# pylint:disable=invalid-name,import-outside-toplevel,missing-function-docstring -# pylint:disable=missing-class-docstring,too-many-branches,too-many-statements -# pylint:disable=raise-missing-from,too-many-lines,too-many-locals,import-error -# pylint:disable=too-few-public-methods,redefined-outer-name,consider-using-with -# pylint:disable=attribute-defined-outside-init,too-many-arguments - -import configparser -import errno -import json -import os -import re -import subprocess -import sys -from pathlib import Path -from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union -from typing import NoReturn -import functools - -have_tomllib = True -if sys.version_info >= (3, 11): - import tomllib -else: - try: - import tomli as tomllib - except ImportError: - have_tomllib = False - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - VCS: str - style: str - tag_prefix: str - versionfile_source: str - versionfile_build: Optional[str] - parentdir_prefix: Optional[str] - verbose: Optional[bool] - - -def get_root() -> str: - """Get the project root directory. - - We require that all commands are run from the project root, i.e. the - directory that contains setup.py, setup.cfg, and versioneer.py . - """ - root = os.path.realpath(os.path.abspath(os.getcwd())) - setup_py = os.path.join(root, "setup.py") - pyproject_toml = os.path.join(root, "pyproject.toml") - versioneer_py = os.path.join(root, "versioneer.py") - if not ( - os.path.exists(setup_py) - or os.path.exists(pyproject_toml) - or os.path.exists(versioneer_py) - ): - # allow 'python path/to/setup.py COMMAND' - root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) - setup_py = os.path.join(root, "setup.py") - pyproject_toml = os.path.join(root, "pyproject.toml") - versioneer_py = os.path.join(root, "versioneer.py") - if not ( - os.path.exists(setup_py) - or os.path.exists(pyproject_toml) - or os.path.exists(versioneer_py) - ): - err = ("Versioneer was unable to run the project root directory. " - "Versioneer requires setup.py to be executed from " - "its immediate directory (like 'python setup.py COMMAND'), " - "or in a way that lets it use sys.argv[0] to find the root " - "(like 'python path/to/setup.py COMMAND').") - raise VersioneerBadRootError(err) - try: - # Certain runtime workflows (setup.py install/develop in a setuptools - # tree) execute all dependencies in a single python process, so - # "versioneer" may be imported multiple times, and python's shared - # module-import table will cache the first one. So we can't use - # os.path.dirname(__file__), as that will find whichever - # versioneer.py was first imported, even in later projects. - my_path = os.path.realpath(os.path.abspath(__file__)) - me_dir = os.path.normcase(os.path.splitext(my_path)[0]) - vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) - if me_dir != vsr_dir and "VERSIONEER_PEP518" not in globals(): - print("Warning: build in %s is using versioneer.py from %s" - % (os.path.dirname(my_path), versioneer_py)) - except NameError: - pass - return root - - -def get_config_from_root(root: str) -> VersioneerConfig: - """Read the project setup.cfg file to determine Versioneer config.""" - # This might raise OSError (if setup.cfg is missing), or - # configparser.NoSectionError (if it lacks a [versioneer] section), or - # configparser.NoOptionError (if it lacks "VCS="). See the docstring at - # the top of versioneer.py for instructions on writing your setup.cfg . - root_pth = Path(root) - pyproject_toml = root_pth / "pyproject.toml" - setup_cfg = root_pth / "setup.cfg" - section: Union[Dict[str, Any], configparser.SectionProxy, None] = None - if pyproject_toml.exists() and have_tomllib: - try: - with open(pyproject_toml, 'rb') as fobj: - pp = tomllib.load(fobj) - section = pp['tool']['versioneer'] - except (tomllib.TOMLDecodeError, KeyError) as e: - print(f"Failed to load config from {pyproject_toml}: {e}") - print("Try to load it from setup.cfg") - if not section: - parser = configparser.ConfigParser() - with open(setup_cfg) as cfg_file: - parser.read_file(cfg_file) - parser.get("versioneer", "VCS") # raise error if missing - - section = parser["versioneer"] - - # `cast`` really shouldn't be used, but its simplest for the - # common VersioneerConfig users at the moment. We verify against - # `None` values elsewhere where it matters - - cfg = VersioneerConfig() - cfg.VCS = section['VCS'] - cfg.style = section.get("style", "") - cfg.versionfile_source = cast(str, section.get("versionfile_source")) - cfg.versionfile_build = section.get("versionfile_build") - cfg.tag_prefix = cast(str, section.get("tag_prefix")) - if cfg.tag_prefix in ("''", '""', None): - cfg.tag_prefix = "" - cfg.parentdir_prefix = section.get("parentdir_prefix") - if isinstance(section, configparser.SectionProxy): - # Make sure configparser translates to bool - cfg.verbose = section.getboolean("verbose") - else: - cfg.verbose = section.get("verbose") - - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -# these dictionaries contain VCS-specific tools -LONG_VERSION_PY: Dict[str, str] = {} -HANDLERS: Dict[str, Dict[str, Callable]] = {} - - -def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator - """Create decorator to mark a method as the handler of a VCS.""" - def decorate(f: Callable) -> Callable: - """Store f in HANDLERS[vcs][method].""" - HANDLERS.setdefault(vcs, {})[method] = f - return f - return decorate - - -def run_command( - commands: List[str], - args: List[str], - cwd: Optional[str] = None, - verbose: bool = False, - hide_stderr: bool = False, - env: Optional[Dict[str, str]] = None, -) -> Tuple[Optional[str], Optional[int]]: - """Call the given command(s).""" - assert isinstance(commands, list) - process = None - - popen_kwargs: Dict[str, Any] = {} - if sys.platform == "win32": - # This hides the console window if pythonw.exe is used - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - popen_kwargs["startupinfo"] = startupinfo - - for command in commands: - try: - dispcmd = str([command] + args) - # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) - break - except OSError as e: - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %s" % dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %s" % (commands,)) - return None, None - stdout = process.communicate()[0].strip().decode() - if process.returncode != 0: - if verbose: - print("unable to run %s (error)" % dispcmd) - print("stdout was %s" % stdout) - return None, process.returncode - return stdout, process.returncode - - -LONG_VERSION_PY['git'] = r''' -# This file helps to compute a version number in source trees obtained from -# git-archive tarball (such as those provided by githubs download-from-tag -# feature). Distribution tarballs (built by setup.py sdist) and build -# directories (produced by setup.py build) will contain a much shorter file -# that just contains the computed version number. - -# This file is released into the public domain. -# Generated by versioneer-0.29 -# https://github.com/python-versioneer/python-versioneer - -"""Git implementation of _version.py.""" - -import errno -import os -import re -import subprocess -import sys -from typing import Any, Callable, Dict, List, Optional, Tuple -import functools - - -def get_keywords() -> Dict[str, str]: - """Get the keywords needed to look up the version information.""" - # these strings will be replaced by git during git-archive. - # setup.py/versioneer.py will grep for the variable names, so they must - # each be defined on a line of their own. _version.py will just call - # get_keywords(). - git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" - git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" - git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" - keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} - return keywords - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - VCS: str - style: str - tag_prefix: str - parentdir_prefix: str - versionfile_source: str - verbose: bool - - -def get_config() -> VersioneerConfig: - """Create, populate and return the VersioneerConfig() object.""" - # these strings are filled in when 'setup.py versioneer' creates - # _version.py - cfg = VersioneerConfig() - cfg.VCS = "git" - cfg.style = "%(STYLE)s" - cfg.tag_prefix = "%(TAG_PREFIX)s" - cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s" - cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s" - cfg.verbose = False - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -LONG_VERSION_PY: Dict[str, str] = {} -HANDLERS: Dict[str, Dict[str, Callable]] = {} - - -def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator - """Create decorator to mark a method as the handler of a VCS.""" - def decorate(f: Callable) -> Callable: - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - return decorate - - -def run_command( - commands: List[str], - args: List[str], - cwd: Optional[str] = None, - verbose: bool = False, - hide_stderr: bool = False, - env: Optional[Dict[str, str]] = None, -) -> Tuple[Optional[str], Optional[int]]: - """Call the given command(s).""" - assert isinstance(commands, list) - process = None - - popen_kwargs: Dict[str, Any] = {} - if sys.platform == "win32": - # This hides the console window if pythonw.exe is used - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - popen_kwargs["startupinfo"] = startupinfo - - for command in commands: - try: - dispcmd = str([command] + args) - # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) - break - except OSError as e: - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %%s" %% dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %%s" %% (commands,)) - return None, None - stdout = process.communicate()[0].strip().decode() - if process.returncode != 0: - if verbose: - print("unable to run %%s (error)" %% dispcmd) - print("stdout was %%s" %% stdout) - return None, process.returncode - return stdout, process.returncode - - -def versions_from_parentdir( - parentdir_prefix: str, - root: str, - verbose: bool, -) -> Dict[str, Any]: - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for _ in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print("Tried directories %%s but none started with prefix %%s" %% - (str(rootdirs), parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords: Dict[str, str] = {} - try: - with open(versionfile_abs, "r") as fobj: - for line in fobj: - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - except OSError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords( - keywords: Dict[str, str], - tag_prefix: str, - verbose: bool, -) -> Dict[str, Any]: - """Get version information from git keywords.""" - if "refnames" not in keywords: - raise NotThisMethod("Short version file found") - date = keywords.get("date") - if date is not None: - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - - # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = {r.strip() for r in refnames.strip("()").split(",")} - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %%d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} - if verbose: - print("discarding '%%s', no digits" %% ",".join(refs - tags)) - if verbose: - print("likely tags: %%s" %% ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - # Filter out refs that exactly match prefix or that don't start - # with a number once the prefix is stripped (mostly a concern - # when prefix is '') - if not re.match(r'\d', r): - continue - if verbose: - print("picking %%s" %% r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs( - tag_prefix: str, - root: str, - verbose: bool, - runner: Callable = run_command -) -> Dict[str, Any]: - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - # GIT_DIR can interfere with correct operation of Versioneer. - # It may be intended to be passed to the Versioneer-versioned project, - # but that should not change where we get our version from. - env = os.environ.copy() - env.pop("GIT_DIR", None) - runner = functools.partial(runner, env=env) - - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=not verbose) - if rc != 0: - if verbose: - print("Directory %%s not under git control" %% root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, [ - "describe", "--tags", "--dirty", "--always", "--long", - "--match", f"{tag_prefix}[[:digit:]]*" - ], cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces: Dict[str, Any] = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) - # --abbrev-ref was added in git-1.6.3 - if rc != 0 or branch_name is None: - raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") - branch_name = branch_name.strip() - - if branch_name == "HEAD": - # If we aren't exactly on a branch, pick a branch which represents - # the current commit. If all else fails, we are on a branchless - # commit. - branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) - # --contains was added in git-1.5.4 - if rc != 0 or branches is None: - raise NotThisMethod("'git branch --contains' returned error") - branches = branches.split("\n") - - # Remove the first line if we're running detached - if "(" in branches[0]: - branches.pop(0) - - # Strip off the leading "* " from the list of branches. - branches = [branch[2:] for branch in branches] - if "master" in branches: - branch_name = "master" - elif not branches: - branch_name = None - else: - # Pick the first branch that is returned. Good or bad. - branch_name = branches[0] - - pieces["branch"] = branch_name - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%%s'" - %% describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%%s' doesn't start with prefix '%%s'" - print(fmt %% (full_tag, tag_prefix)) - pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'" - %% (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) - pieces["distance"] = len(out.split()) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%%ci", "HEAD"], cwd=root)[0].strip() - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def plus_or_dot(pieces: Dict[str, Any]) -> str: - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces: Dict[str, Any]) -> str: - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_branch(pieces: Dict[str, Any]) -> str: - """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . - - The ".dev0" means not master branch. Note that .dev0 sorts backwards - (a feature branch will appear "older" than the master branch). - - Exceptions: - 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0" - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+untagged.%%d.g%%s" %% (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: - """Split pep440 version string at the post-release segment. - - Returns the release segments before the post-release and the - post-release version number (or -1 if no post-release segment is present). - """ - vc = str.split(ver, ".post") - return vc[0], int(vc[1] or 0) if len(vc) == 2 else None - - -def render_pep440_pre(pieces: Dict[str, Any]) -> str: - """TAG[.postN.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post0.devDISTANCE - """ - if pieces["closest-tag"]: - if pieces["distance"]: - # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) - rendered = tag_version - if post_version is not None: - rendered += ".post%%d.dev%%d" %% (post_version + 1, pieces["distance"]) - else: - rendered += ".post0.dev%%d" %% (pieces["distance"]) - else: - # no commits, use the tag as the version - rendered = pieces["closest-tag"] - else: - # exception #1 - rendered = "0.post0.dev%%d" %% pieces["distance"] - return rendered - - -def render_pep440_post(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%%s" %% pieces["short"] - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%%s" %% pieces["short"] - return rendered - - -def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . - - The ".dev0" means not master branch. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%%s" %% pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+g%%s" %% pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_old(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces: Dict[str, Any]) -> str: - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces: Dict[str, Any]) -> str: - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-branch": - rendered = render_pep440_branch(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-post-branch": - rendered = render_pep440_post_branch(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%%s'" %% style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} - - -def get_versions() -> Dict[str, Any]: - """Get version information or return default if unable to do so.""" - # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have - # __file__, we can work backwards from there to the root. Some - # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which - # case we can only use expanded keywords. - - cfg = get_config() - verbose = cfg.verbose - - try: - return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, - verbose) - except NotThisMethod: - pass - - try: - root = os.path.realpath(__file__) - # versionfile_source is the relative path from the top of the source - # tree (where the .git directory might live) to this file. Invert - # this to find the root from __file__. - for _ in cfg.versionfile_source.split('/'): - root = os.path.dirname(root) - except NameError: - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree", - "date": None} - - try: - pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) - return render(pieces, cfg.style) - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - except NotThisMethod: - pass - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", "date": None} -''' - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords: Dict[str, str] = {} - try: - with open(versionfile_abs, "r") as fobj: - for line in fobj: - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - except OSError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords( - keywords: Dict[str, str], - tag_prefix: str, - verbose: bool, -) -> Dict[str, Any]: - """Get version information from git keywords.""" - if "refnames" not in keywords: - raise NotThisMethod("Short version file found") - date = keywords.get("date") - if date is not None: - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - - # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = {r.strip() for r in refnames.strip("()").split(",")} - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} - if verbose: - print("discarding '%s', no digits" % ",".join(refs - tags)) - if verbose: - print("likely tags: %s" % ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - # Filter out refs that exactly match prefix or that don't start - # with a number once the prefix is stripped (mostly a concern - # when prefix is '') - if not re.match(r'\d', r): - continue - if verbose: - print("picking %s" % r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs( - tag_prefix: str, - root: str, - verbose: bool, - runner: Callable = run_command -) -> Dict[str, Any]: - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - # GIT_DIR can interfere with correct operation of Versioneer. - # It may be intended to be passed to the Versioneer-versioned project, - # but that should not change where we get our version from. - env = os.environ.copy() - env.pop("GIT_DIR", None) - runner = functools.partial(runner, env=env) - - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=not verbose) - if rc != 0: - if verbose: - print("Directory %s not under git control" % root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, [ - "describe", "--tags", "--dirty", "--always", "--long", - "--match", f"{tag_prefix}[[:digit:]]*" - ], cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces: Dict[str, Any] = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) - # --abbrev-ref was added in git-1.6.3 - if rc != 0 or branch_name is None: - raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") - branch_name = branch_name.strip() - - if branch_name == "HEAD": - # If we aren't exactly on a branch, pick a branch which represents - # the current commit. If all else fails, we are on a branchless - # commit. - branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) - # --contains was added in git-1.5.4 - if rc != 0 or branches is None: - raise NotThisMethod("'git branch --contains' returned error") - branches = branches.split("\n") - - # Remove the first line if we're running detached - if "(" in branches[0]: - branches.pop(0) - - # Strip off the leading "* " from the list of branches. - branches = [branch[2:] for branch in branches] - if "master" in branches: - branch_name = "master" - elif not branches: - branch_name = None - else: - # Pick the first branch that is returned. Good or bad. - branch_name = branches[0] - - pieces["branch"] = branch_name - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%s'" - % describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%s' doesn't start with prefix '%s'" - print(fmt % (full_tag, tag_prefix)) - pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" - % (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) - pieces["distance"] = len(out.split()) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def do_vcs_install(versionfile_source: str, ipy: Optional[str]) -> None: - """Git-specific installation logic for Versioneer. - - For Git, this means creating/changing .gitattributes to mark _version.py - for export-subst keyword substitution. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - files = [versionfile_source] - if ipy: - files.append(ipy) - if "VERSIONEER_PEP518" not in globals(): - try: - my_path = __file__ - if my_path.endswith((".pyc", ".pyo")): - my_path = os.path.splitext(my_path)[0] + ".py" - versioneer_file = os.path.relpath(my_path) - except NameError: - versioneer_file = "versioneer.py" - files.append(versioneer_file) - present = False - try: - with open(".gitattributes", "r") as fobj: - for line in fobj: - if line.strip().startswith(versionfile_source): - if "export-subst" in line.strip().split()[1:]: - present = True - break - except OSError: - pass - if not present: - with open(".gitattributes", "a+") as fobj: - fobj.write(f"{versionfile_source} export-subst\n") - files.append(".gitattributes") - run_command(GITS, ["add", "--"] + files) - - -def versions_from_parentdir( - parentdir_prefix: str, - root: str, - verbose: bool, -) -> Dict[str, Any]: - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for _ in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print("Tried directories %s but none started with prefix %s" % - (str(rootdirs), parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -SHORT_VERSION_PY = """ -# This file was generated by 'versioneer.py' (0.29) from -# revision-control system data, or from the parent directory name of an -# unpacked source archive. Distribution tarballs contain a pre-generated copy -# of this file. - -import json - -version_json = ''' -%s -''' # END VERSION_JSON - - -def get_versions(): - return json.loads(version_json) -""" - - -def versions_from_file(filename: str) -> Dict[str, Any]: - """Try to determine the version from _version.py if present.""" - try: - with open(filename) as f: - contents = f.read() - except OSError: - raise NotThisMethod("unable to read _version.py") - mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", - contents, re.M | re.S) - if not mo: - mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", - contents, re.M | re.S) - if not mo: - raise NotThisMethod("no version_json in _version.py") - return json.loads(mo.group(1)) - - -def write_to_version_file(filename: str, versions: Dict[str, Any]) -> None: - """Write the given version number to the given _version.py file.""" - contents = json.dumps(versions, sort_keys=True, - indent=1, separators=(",", ": ")) - with open(filename, "w") as f: - f.write(SHORT_VERSION_PY % contents) - - print("set %s to '%s'" % (filename, versions["version"])) - - -def plus_or_dot(pieces: Dict[str, Any]) -> str: - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces: Dict[str, Any]) -> str: - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_branch(pieces: Dict[str, Any]) -> str: - """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . - - The ".dev0" means not master branch. Note that .dev0 sorts backwards - (a feature branch will appear "older" than the master branch). - - Exceptions: - 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0" - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: - """Split pep440 version string at the post-release segment. - - Returns the release segments before the post-release and the - post-release version number (or -1 if no post-release segment is present). - """ - vc = str.split(ver, ".post") - return vc[0], int(vc[1] or 0) if len(vc) == 2 else None - - -def render_pep440_pre(pieces: Dict[str, Any]) -> str: - """TAG[.postN.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post0.devDISTANCE - """ - if pieces["closest-tag"]: - if pieces["distance"]: - # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) - rendered = tag_version - if post_version is not None: - rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) - else: - rendered += ".post0.dev%d" % (pieces["distance"]) - else: - # no commits, use the tag as the version - rendered = pieces["closest-tag"] - else: - # exception #1 - rendered = "0.post0.dev%d" % pieces["distance"] - return rendered - - -def render_pep440_post(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - return rendered - - -def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . - - The ".dev0" means not master branch. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_old(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces: Dict[str, Any]) -> str: - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces: Dict[str, Any]) -> str: - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-branch": - rendered = render_pep440_branch(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-post-branch": - rendered = render_pep440_post_branch(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%s'" % style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} - - -class VersioneerBadRootError(Exception): - """The project root directory is unknown or missing key files.""" - - -def get_versions(verbose: bool = False) -> Dict[str, Any]: - """Get the project version from whatever source is available. - - Returns dict with two keys: 'version' and 'full'. - """ - if "versioneer" in sys.modules: - # see the discussion in cmdclass.py:get_cmdclass() - del sys.modules["versioneer"] - - root = get_root() - cfg = get_config_from_root(root) - - assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg" - handlers = HANDLERS.get(cfg.VCS) - assert handlers, "unrecognized VCS '%s'" % cfg.VCS - verbose = verbose or bool(cfg.verbose) # `bool()` used to avoid `None` - assert cfg.versionfile_source is not None, \ - "please set versioneer.versionfile_source" - assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" - - versionfile_abs = os.path.join(root, cfg.versionfile_source) - - # extract version from first of: _version.py, VCS command (e.g. 'git - # describe'), parentdir. This is meant to work for developers using a - # source checkout, for users of a tarball created by 'setup.py sdist', - # and for users of a tarball/zipball created by 'git archive' or github's - # download-from-tag feature or the equivalent in other VCSes. - - get_keywords_f = handlers.get("get_keywords") - from_keywords_f = handlers.get("keywords") - if get_keywords_f and from_keywords_f: - try: - keywords = get_keywords_f(versionfile_abs) - ver = from_keywords_f(keywords, cfg.tag_prefix, verbose) - if verbose: - print("got version from expanded keyword %s" % ver) - return ver - except NotThisMethod: - pass - - try: - ver = versions_from_file(versionfile_abs) - if verbose: - print("got version from file %s %s" % (versionfile_abs, ver)) - return ver - except NotThisMethod: - pass - - from_vcs_f = handlers.get("pieces_from_vcs") - if from_vcs_f: - try: - pieces = from_vcs_f(cfg.tag_prefix, root, verbose) - ver = render(pieces, cfg.style) - if verbose: - print("got version from VCS %s" % ver) - return ver - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - if verbose: - print("got version from parentdir %s" % ver) - return ver - except NotThisMethod: - pass - - if verbose: - print("unable to compute version") - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, "error": "unable to compute version", - "date": None} - - -def get_version() -> str: - """Get the short version string for this project.""" - return get_versions()["version"] - - -def get_cmdclass(cmdclass: Optional[Dict[str, Any]] = None): - """Get the custom setuptools subclasses used by Versioneer. - - If the package uses a different cmdclass (e.g. one from numpy), it - should be provide as an argument. - """ - if "versioneer" in sys.modules: - del sys.modules["versioneer"] - # this fixes the "python setup.py develop" case (also 'install' and - # 'easy_install .'), in which subdependencies of the main project are - # built (using setup.py bdist_egg) in the same python process. Assume - # a main project A and a dependency B, which use different versions - # of Versioneer. A's setup.py imports A's Versioneer, leaving it in - # sys.modules by the time B's setup.py is executed, causing B to run - # with the wrong versioneer. Setuptools wraps the sub-dep builds in a - # sandbox that restores sys.modules to it's pre-build state, so the - # parent is protected against the child's "import versioneer". By - # removing ourselves from sys.modules here, before the child build - # happens, we protect the child from the parent's versioneer too. - # Also see https://github.com/python-versioneer/python-versioneer/issues/52 - - cmds = {} if cmdclass is None else cmdclass.copy() - - # we add "version" to setuptools - from setuptools import Command - - class cmd_version(Command): - description = "report generated version string" - user_options: List[Tuple[str, str, str]] = [] - boolean_options: List[str] = [] - - def initialize_options(self) -> None: - pass - - def finalize_options(self) -> None: - pass - - def run(self) -> None: - vers = get_versions(verbose=True) - print("Version: %s" % vers["version"]) - print(" full-revisionid: %s" % vers.get("full-revisionid")) - print(" dirty: %s" % vers.get("dirty")) - print(" date: %s" % vers.get("date")) - if vers["error"]: - print(" error: %s" % vers["error"]) - cmds["version"] = cmd_version - - # we override "build_py" in setuptools - # - # most invocation pathways end up running build_py: - # distutils/build -> build_py - # distutils/install -> distutils/build ->.. - # setuptools/bdist_wheel -> distutils/install ->.. - # setuptools/bdist_egg -> distutils/install_lib -> build_py - # setuptools/install -> bdist_egg ->.. - # setuptools/develop -> ? - # pip install: - # copies source tree to a tempdir before running egg_info/etc - # if .git isn't copied too, 'git describe' will fail - # then does setup.py bdist_wheel, or sometimes setup.py install - # setup.py egg_info -> ? - - # pip install -e . and setuptool/editable_wheel will invoke build_py - # but the build_py command is not expected to copy any files. - - # we override different "build_py" commands for both environments - if 'build_py' in cmds: - _build_py: Any = cmds['build_py'] - else: - from setuptools.command.build_py import build_py as _build_py - - class cmd_build_py(_build_py): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - _build_py.run(self) - if getattr(self, "editable_mode", False): - # During editable installs `.py` and data files are - # not copied to build_lib - return - # now locate _version.py in the new build/ directory and replace - # it with an updated value - if cfg.versionfile_build: - target_versionfile = os.path.join(self.build_lib, - cfg.versionfile_build) - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - cmds["build_py"] = cmd_build_py - - if 'build_ext' in cmds: - _build_ext: Any = cmds['build_ext'] - else: - from setuptools.command.build_ext import build_ext as _build_ext - - class cmd_build_ext(_build_ext): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - _build_ext.run(self) - if self.inplace: - # build_ext --inplace will only build extensions in - # build/lib<..> dir with no _version.py to write to. - # As in place builds will already have a _version.py - # in the module dir, we do not need to write one. - return - # now locate _version.py in the new build/ directory and replace - # it with an updated value - if not cfg.versionfile_build: - return - target_versionfile = os.path.join(self.build_lib, - cfg.versionfile_build) - if not os.path.exists(target_versionfile): - print(f"Warning: {target_versionfile} does not exist, skipping " - "version update. This can happen if you are running build_ext " - "without first running build_py.") - return - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - cmds["build_ext"] = cmd_build_ext - - if "cx_Freeze" in sys.modules: # cx_freeze enabled? - from cx_Freeze.dist import build_exe as _build_exe # type: ignore - # nczeczulin reports that py2exe won't like the pep440-style string - # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. - # setup(console=[{ - # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION - # "product_version": versioneer.get_version(), - # ... - - class cmd_build_exe(_build_exe): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - target_versionfile = cfg.versionfile_source - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - _build_exe.run(self) - os.unlink(target_versionfile) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % - {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - cmds["build_exe"] = cmd_build_exe - del cmds["build_py"] - - if 'py2exe' in sys.modules: # py2exe enabled? - try: - from py2exe.setuptools_buildexe import py2exe as _py2exe # type: ignore - except ImportError: - from py2exe.distutils_buildexe import py2exe as _py2exe # type: ignore - - class cmd_py2exe(_py2exe): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - target_versionfile = cfg.versionfile_source - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - _py2exe.run(self) - os.unlink(target_versionfile) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % - {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - cmds["py2exe"] = cmd_py2exe - - # sdist farms its file list building out to egg_info - if 'egg_info' in cmds: - _egg_info: Any = cmds['egg_info'] - else: - from setuptools.command.egg_info import egg_info as _egg_info - - class cmd_egg_info(_egg_info): - def find_sources(self) -> None: - # egg_info.find_sources builds the manifest list and writes it - # in one shot - super().find_sources() - - # Modify the filelist and normalize it - root = get_root() - cfg = get_config_from_root(root) - self.filelist.append('versioneer.py') - if cfg.versionfile_source: - # There are rare cases where versionfile_source might not be - # included by default, so we must be explicit - self.filelist.append(cfg.versionfile_source) - self.filelist.sort() - self.filelist.remove_duplicates() - - # The write method is hidden in the manifest_maker instance that - # generated the filelist and was thrown away - # We will instead replicate their final normalization (to unicode, - # and POSIX-style paths) - from setuptools import unicode_utils - normalized = [unicode_utils.filesys_decode(f).replace(os.sep, '/') - for f in self.filelist.files] - - manifest_filename = os.path.join(self.egg_info, 'SOURCES.txt') - with open(manifest_filename, 'w') as fobj: - fobj.write('\n'.join(normalized)) - - cmds['egg_info'] = cmd_egg_info - - # we override different "sdist" commands for both environments - if 'sdist' in cmds: - _sdist: Any = cmds['sdist'] - else: - from setuptools.command.sdist import sdist as _sdist - - class cmd_sdist(_sdist): - def run(self) -> None: - versions = get_versions() - self._versioneer_generated_versions = versions - # unless we update this, the command will keep using the old - # version - self.distribution.metadata.version = versions["version"] - return _sdist.run(self) - - def make_release_tree(self, base_dir: str, files: List[str]) -> None: - root = get_root() - cfg = get_config_from_root(root) - _sdist.make_release_tree(self, base_dir, files) - # now locate _version.py in the new base_dir directory - # (remembering that it may be a hardlink) and replace it with an - # updated value - target_versionfile = os.path.join(base_dir, cfg.versionfile_source) - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, - self._versioneer_generated_versions) - cmds["sdist"] = cmd_sdist - - return cmds - - -CONFIG_ERROR = """ -setup.cfg is missing the necessary Versioneer configuration. You need -a section like: - - [versioneer] - VCS = git - style = pep440 - versionfile_source = src/myproject/_version.py - versionfile_build = myproject/_version.py - tag_prefix = - parentdir_prefix = myproject- - -You will also need to edit your setup.py to use the results: - - import versioneer - setup(version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), ...) - -Please read the docstring in ./versioneer.py for configuration instructions, -edit setup.cfg, and re-run the installer or 'python versioneer.py setup'. -""" - -SAMPLE_CONFIG = """ -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. - -[versioneer] -#VCS = git -#style = pep440 -#versionfile_source = -#versionfile_build = -#tag_prefix = -#parentdir_prefix = - -""" - -OLD_SNIPPET = """ -from ._version import get_versions -__version__ = get_versions()['version'] -del get_versions -""" - -INIT_PY_SNIPPET = """ -from . import {0} -__version__ = {0}.get_versions()['version'] -""" - - -def do_setup() -> int: - """Do main VCS-independent setup function for installing Versioneer.""" - root = get_root() - try: - cfg = get_config_from_root(root) - except (OSError, configparser.NoSectionError, - configparser.NoOptionError) as e: - if isinstance(e, (OSError, configparser.NoSectionError)): - print("Adding sample versioneer config to setup.cfg", - file=sys.stderr) - with open(os.path.join(root, "setup.cfg"), "a") as f: - f.write(SAMPLE_CONFIG) - print(CONFIG_ERROR, file=sys.stderr) - return 1 - - print(" creating %s" % cfg.versionfile_source) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - - ipy = os.path.join(os.path.dirname(cfg.versionfile_source), - "__init__.py") - maybe_ipy: Optional[str] = ipy - if os.path.exists(ipy): - try: - with open(ipy, "r") as f: - old = f.read() - except OSError: - old = "" - module = os.path.splitext(os.path.basename(cfg.versionfile_source))[0] - snippet = INIT_PY_SNIPPET.format(module) - if OLD_SNIPPET in old: - print(" replacing boilerplate in %s" % ipy) - with open(ipy, "w") as f: - f.write(old.replace(OLD_SNIPPET, snippet)) - elif snippet not in old: - print(" appending to %s" % ipy) - with open(ipy, "a") as f: - f.write(snippet) - else: - print(" %s unmodified" % ipy) - else: - print(" %s doesn't exist, ok" % ipy) - maybe_ipy = None - - # Make VCS-specific changes. For git, this means creating/changing - # .gitattributes to mark _version.py for export-subst keyword - # substitution. - do_vcs_install(cfg.versionfile_source, maybe_ipy) - return 0 - - -def scan_setup_py() -> int: - """Validate the contents of setup.py against Versioneer's expectations.""" - found = set() - setters = False - errors = 0 - with open("setup.py", "r") as f: - for line in f.readlines(): - if "import versioneer" in line: - found.add("import") - if "versioneer.get_cmdclass()" in line: - found.add("cmdclass") - if "versioneer.get_version()" in line: - found.add("get_version") - if "versioneer.VCS" in line: - setters = True - if "versioneer.versionfile_source" in line: - setters = True - if len(found) != 3: - print("") - print("Your setup.py appears to be missing some important items") - print("(but I might be wrong). Please make sure it has something") - print("roughly like the following:") - print("") - print(" import versioneer") - print(" setup( version=versioneer.get_version(),") - print(" cmdclass=versioneer.get_cmdclass(), ...)") - print("") - errors += 1 - if setters: - print("You should remove lines like 'versioneer.VCS = ' and") - print("'versioneer.versionfile_source = ' . This configuration") - print("now lives in setup.cfg, and should be removed from setup.py") - print("") - errors += 1 - return errors - - -def setup_command() -> NoReturn: - """Set up Versioneer and exit with appropriate error code.""" - errors = do_setup() - errors += scan_setup_py() - sys.exit(1 if errors else 0) - - -if __name__ == "__main__": - cmd = sys.argv[1] - if cmd == "setup": - setup_command() diff --git a/xversioneer.py b/xversioneer.py deleted file mode 100644 index 1e3753e..0000000 --- a/xversioneer.py +++ /dev/null @@ -1,2277 +0,0 @@ - -# Version: 0.29 - -"""The Versioneer - like a rocketeer, but for versions. - -The Versioneer -============== - -* like a rocketeer, but for versions! -* https://github.com/python-versioneer/python-versioneer -* Brian Warner -* License: Public Domain (Unlicense) -* Compatible with: Python 3.7, 3.8, 3.9, 3.10, 3.11 and pypy3 -* [![Latest Version][pypi-image]][pypi-url] -* [![Build Status][travis-image]][travis-url] - -This is a tool for managing a recorded version number in setuptools-based -python projects. The goal is to remove the tedious and error-prone "update -the embedded version string" step from your release process. Making a new -release should be as easy as recording a new tag in your version-control -system, and maybe making new tarballs. - - -## Quick Install - -Versioneer provides two installation modes. The "classic" vendored mode installs -a copy of versioneer into your repository. The experimental build-time dependency mode -is intended to allow you to skip this step and simplify the process of upgrading. - -### Vendored mode - -* `pip install versioneer` to somewhere in your $PATH - * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is - available, so you can also use `conda install -c conda-forge versioneer` -* add a `[tool.versioneer]` section to your `pyproject.toml` or a - `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) - * Note that you will need to add `tomli; python_version < "3.11"` to your - build-time dependencies if you use `pyproject.toml` -* run `versioneer install --vendor` in your source tree, commit the results -* verify version information with `python setup.py version` - -### Build-time dependency mode - -* `pip install versioneer` to somewhere in your $PATH - * A [conda-forge recipe](https://github.com/conda-forge/versioneer-feedstock) is - available, so you can also use `conda install -c conda-forge versioneer` -* add a `[tool.versioneer]` section to your `pyproject.toml` or a - `[versioneer]` section to your `setup.cfg` (see [Install](INSTALL.md)) -* add `versioneer` (with `[toml]` extra, if configuring in `pyproject.toml`) - to the `requires` key of the `build-system` table in `pyproject.toml`: - ```toml - [build-system] - requires = ["setuptools", "versioneer[toml]"] - build-backend = "setuptools.build_meta" - ``` -* run `versioneer install --no-vendor` in your source tree, commit the results -* verify version information with `python setup.py version` - -## Version Identifiers - -Source trees come from a variety of places: - -* a version-control system checkout (mostly used by developers) -* a nightly tarball, produced by build automation -* a snapshot tarball, produced by a web-based VCS browser, like github's - "tarball from tag" feature -* a release tarball, produced by "setup.py sdist", distributed through PyPI - -Within each source tree, the version identifier (either a string or a number, -this tool is format-agnostic) can come from a variety of places: - -* ask the VCS tool itself, e.g. "git describe" (for checkouts), which knows - about recent "tags" and an absolute revision-id -* the name of the directory into which the tarball was unpacked -* an expanded VCS keyword ($Id$, etc) -* a `_version.py` created by some earlier build step - -For released software, the version identifier is closely related to a VCS -tag. Some projects use tag names that include more than just the version -string (e.g. "myproject-1.2" instead of just "1.2"), in which case the tool -needs to strip the tag prefix to extract the version identifier. For -unreleased software (between tags), the version identifier should provide -enough information to help developers recreate the same tree, while also -giving them an idea of roughly how old the tree is (after version 1.2, before -version 1.3). Many VCS systems can report a description that captures this, -for example `git describe --tags --dirty --always` reports things like -"0.7-1-g574ab98-dirty" to indicate that the checkout is one revision past the -0.7 tag, has a unique revision id of "574ab98", and is "dirty" (it has -uncommitted changes). - -The version identifier is used for multiple purposes: - -* to allow the module to self-identify its version: `myproject.__version__` -* to choose a name and prefix for a 'setup.py sdist' tarball - -## Theory of Operation - -Versioneer works by adding a special `_version.py` file into your source -tree, where your `__init__.py` can import it. This `_version.py` knows how to -dynamically ask the VCS tool for version information at import time. - -`_version.py` also contains `$Revision$` markers, and the installation -process marks `_version.py` to have this marker rewritten with a tag name -during the `git archive` command. As a result, generated tarballs will -contain enough information to get the proper version. - -To allow `setup.py` to compute a version too, a `versioneer.py` is added to -the top level of your source tree, next to `setup.py` and the `setup.cfg` -that configures it. This overrides several distutils/setuptools commands to -compute the version when invoked, and changes `setup.py build` and `setup.py -sdist` to replace `_version.py` with a small static file that contains just -the generated version data. - -## Installation - -See [INSTALL.md](./INSTALL.md) for detailed installation instructions. - -## Version-String Flavors - -Code which uses Versioneer can learn about its version string at runtime by -importing `_version` from your main `__init__.py` file and running the -`get_versions()` function. From the "outside" (e.g. in `setup.py`), you can -import the top-level `versioneer.py` and run `get_versions()`. - -Both functions return a dictionary with different flavors of version -information: - -* `['version']`: A condensed version string, rendered using the selected - style. This is the most commonly used value for the project's version - string. The default "pep440" style yields strings like `0.11`, - `0.11+2.g1076c97`, or `0.11+2.g1076c97.dirty`. See the "Styles" section - below for alternative styles. - -* `['full-revisionid']`: detailed revision identifier. For Git, this is the - full SHA1 commit id, e.g. "1076c978a8d3cfc70f408fe5974aa6c092c949ac". - -* `['date']`: Date and time of the latest `HEAD` commit. For Git, it is the - commit date in ISO 8601 format. This will be None if the date is not - available. - -* `['dirty']`: a boolean, True if the tree has uncommitted changes. Note that - this is only accurate if run in a VCS checkout, otherwise it is likely to - be False or None - -* `['error']`: if the version string could not be computed, this will be set - to a string describing the problem, otherwise it will be None. It may be - useful to throw an exception in setup.py if this is set, to avoid e.g. - creating tarballs with a version string of "unknown". - -Some variants are more useful than others. Including `full-revisionid` in a -bug report should allow developers to reconstruct the exact code being tested -(or indicate the presence of local changes that should be shared with the -developers). `version` is suitable for display in an "about" box or a CLI -`--version` output: it can be easily compared against release notes and lists -of bugs fixed in various releases. - -The installer adds the following text to your `__init__.py` to place a basic -version in `YOURPROJECT.__version__`: - - from ._version import get_versions - __version__ = get_versions()['version'] - del get_versions - -## Styles - -The setup.cfg `style=` configuration controls how the VCS information is -rendered into a version string. - -The default style, "pep440", produces a PEP440-compliant string, equal to the -un-prefixed tag name for actual releases, and containing an additional "local -version" section with more detail for in-between builds. For Git, this is -TAG[+DISTANCE.gHEX[.dirty]] , using information from `git describe --tags ---dirty --always`. For example "0.11+2.g1076c97.dirty" indicates that the -tree is like the "1076c97" commit but has uncommitted changes (".dirty"), and -that this commit is two revisions ("+2") beyond the "0.11" tag. For released -software (exactly equal to a known tag), the identifier will only contain the -stripped tag, e.g. "0.11". - -Other styles are available. See [details.md](details.md) in the Versioneer -source tree for descriptions. - -## Debugging - -Versioneer tries to avoid fatal errors: if something goes wrong, it will tend -to return a version of "0+unknown". To investigate the problem, run `setup.py -version`, which will run the version-lookup code in a verbose mode, and will -display the full contents of `get_versions()` (including the `error` string, -which may help identify what went wrong). - -## Known Limitations - -Some situations are known to cause problems for Versioneer. This details the -most significant ones. More can be found on Github -[issues page](https://github.com/python-versioneer/python-versioneer/issues). - -### Subprojects - -Versioneer has limited support for source trees in which `setup.py` is not in -the root directory (e.g. `setup.py` and `.git/` are *not* siblings). The are -two common reasons why `setup.py` might not be in the root: - -* Source trees which contain multiple subprojects, such as - [Buildbot](https://github.com/buildbot/buildbot), which contains both - "master" and "slave" subprojects, each with their own `setup.py`, - `setup.cfg`, and `tox.ini`. Projects like these produce multiple PyPI - distributions (and upload multiple independently-installable tarballs). -* Source trees whose main purpose is to contain a C library, but which also - provide bindings to Python (and perhaps other languages) in subdirectories. - -Versioneer will look for `.git` in parent directories, and most operations -should get the right version string. However `pip` and `setuptools` have bugs -and implementation details which frequently cause `pip install .` from a -subproject directory to fail to find a correct version string (so it usually -defaults to `0+unknown`). - -`pip install --editable .` should work correctly. `setup.py install` might -work too. - -Pip-8.1.1 is known to have this problem, but hopefully it will get fixed in -some later version. - -[Bug #38](https://github.com/python-versioneer/python-versioneer/issues/38) is tracking -this issue. The discussion in -[PR #61](https://github.com/python-versioneer/python-versioneer/pull/61) describes the -issue from the Versioneer side in more detail. -[pip PR#3176](https://github.com/pypa/pip/pull/3176) and -[pip PR#3615](https://github.com/pypa/pip/pull/3615) contain work to improve -pip to let Versioneer work correctly. - -Versioneer-0.16 and earlier only looked for a `.git` directory next to the -`setup.cfg`, so subprojects were completely unsupported with those releases. - -### Editable installs with setuptools <= 18.5 - -`setup.py develop` and `pip install --editable .` allow you to install a -project into a virtualenv once, then continue editing the source code (and -test) without re-installing after every change. - -"Entry-point scripts" (`setup(entry_points={"console_scripts": ..})`) are a -convenient way to specify executable scripts that should be installed along -with the python package. - -These both work as expected when using modern setuptools. When using -setuptools-18.5 or earlier, however, certain operations will cause -`pkg_resources.DistributionNotFound` errors when running the entrypoint -script, which must be resolved by re-installing the package. This happens -when the install happens with one version, then the egg_info data is -regenerated while a different version is checked out. Many setup.py commands -cause egg_info to be rebuilt (including `sdist`, `wheel`, and installing into -a different virtualenv), so this can be surprising. - -[Bug #83](https://github.com/python-versioneer/python-versioneer/issues/83) describes -this one, but upgrading to a newer version of setuptools should probably -resolve it. - - -## Updating Versioneer - -To upgrade your project to a new release of Versioneer, do the following: - -* install the new Versioneer (`pip install -U versioneer` or equivalent) -* edit `setup.cfg` and `pyproject.toml`, if necessary, - to include any new configuration settings indicated by the release notes. - See [UPGRADING](./UPGRADING.md) for details. -* re-run `versioneer install --[no-]vendor` in your source tree, to replace - `SRC/_version.py` -* commit any changed files - -## Future Directions - -This tool is designed to make it easily extended to other version-control -systems: all VCS-specific components are in separate directories like -src/git/ . The top-level `versioneer.py` script is assembled from these -components by running make-versioneer.py . In the future, make-versioneer.py -will take a VCS name as an argument, and will construct a version of -`versioneer.py` that is specific to the given VCS. It might also take the -configuration arguments that are currently provided manually during -installation by editing setup.py . Alternatively, it might go the other -direction and include code from all supported VCS systems, reducing the -number of intermediate scripts. - -## Similar projects - -* [setuptools_scm](https://github.com/pypa/setuptools_scm/) - a non-vendored build-time - dependency -* [minver](https://github.com/jbweston/miniver) - a lightweight reimplementation of - versioneer -* [versioningit](https://github.com/jwodder/versioningit) - a PEP 518-based setuptools - plugin - -## License - -To make Versioneer easier to embed, all its code is dedicated to the public -domain. The `_version.py` that it creates is also in the public domain. -Specifically, both are released under the "Unlicense", as described in -https://unlicense.org/. - -[pypi-image]: https://img.shields.io/pypi/v/versioneer.svg -[pypi-url]: https://pypi.python.org/pypi/versioneer/ -[travis-image]: -https://img.shields.io/travis/com/python-versioneer/python-versioneer.svg -[travis-url]: https://travis-ci.com/github/python-versioneer/python-versioneer - -""" -# pylint:disable=invalid-name,import-outside-toplevel,missing-function-docstring -# pylint:disable=missing-class-docstring,too-many-branches,too-many-statements -# pylint:disable=raise-missing-from,too-many-lines,too-many-locals,import-error -# pylint:disable=too-few-public-methods,redefined-outer-name,consider-using-with -# pylint:disable=attribute-defined-outside-init,too-many-arguments - -import configparser -import errno -import json -import os -import re -import subprocess -import sys -from pathlib import Path -from typing import Any, Callable, cast, Dict, List, Optional, Tuple, Union -from typing import NoReturn -import functools - -have_tomllib = True -if sys.version_info >= (3, 11): - import tomllib -else: - try: - import tomli as tomllib - except ImportError: - have_tomllib = False - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - VCS: str - style: str - tag_prefix: str - versionfile_source: str - versionfile_build: Optional[str] - parentdir_prefix: Optional[str] - verbose: Optional[bool] - - -def get_root() -> str: - """Get the project root directory. - - We require that all commands are run from the project root, i.e. the - directory that contains setup.py, setup.cfg, and versioneer.py . - """ - root = os.path.realpath(os.path.abspath(os.getcwd())) - setup_py = os.path.join(root, "setup.py") - pyproject_toml = os.path.join(root, "pyproject.toml") - versioneer_py = os.path.join(root, "versioneer.py") - if not ( - os.path.exists(setup_py) - or os.path.exists(pyproject_toml) - or os.path.exists(versioneer_py) - ): - # allow 'python path/to/setup.py COMMAND' - root = os.path.dirname(os.path.realpath(os.path.abspath(sys.argv[0]))) - setup_py = os.path.join(root, "setup.py") - pyproject_toml = os.path.join(root, "pyproject.toml") - versioneer_py = os.path.join(root, "versioneer.py") - if not ( - os.path.exists(setup_py) - or os.path.exists(pyproject_toml) - or os.path.exists(versioneer_py) - ): - err = ("Versioneer was unable to run the project root directory. " - "Versioneer requires setup.py to be executed from " - "its immediate directory (like 'python setup.py COMMAND'), " - "or in a way that lets it use sys.argv[0] to find the root " - "(like 'python path/to/setup.py COMMAND').") - raise VersioneerBadRootError(err) - try: - # Certain runtime workflows (setup.py install/develop in a setuptools - # tree) execute all dependencies in a single python process, so - # "versioneer" may be imported multiple times, and python's shared - # module-import table will cache the first one. So we can't use - # os.path.dirname(__file__), as that will find whichever - # versioneer.py was first imported, even in later projects. - my_path = os.path.realpath(os.path.abspath(__file__)) - me_dir = os.path.normcase(os.path.splitext(my_path)[0]) - vsr_dir = os.path.normcase(os.path.splitext(versioneer_py)[0]) - if me_dir != vsr_dir and "VERSIONEER_PEP518" not in globals(): - print("Warning: build in %s is using versioneer.py from %s" - % (os.path.dirname(my_path), versioneer_py)) - except NameError: - pass - return root - - -def get_config_from_root(root: str) -> VersioneerConfig: - """Read the project setup.cfg file to determine Versioneer config.""" - # This might raise OSError (if setup.cfg is missing), or - # configparser.NoSectionError (if it lacks a [versioneer] section), or - # configparser.NoOptionError (if it lacks "VCS="). See the docstring at - # the top of versioneer.py for instructions on writing your setup.cfg . - root_pth = Path(root) - pyproject_toml = root_pth / "pyproject.toml" - setup_cfg = root_pth / "setup.cfg" - section: Union[Dict[str, Any], configparser.SectionProxy, None] = None - if pyproject_toml.exists() and have_tomllib: - try: - with open(pyproject_toml, 'rb') as fobj: - pp = tomllib.load(fobj) - section = pp['tool']['versioneer'] - except (tomllib.TOMLDecodeError, KeyError) as e: - print(f"Failed to load config from {pyproject_toml}: {e}") - print("Try to load it from setup.cfg") - if not section: - parser = configparser.ConfigParser() - with open(setup_cfg) as cfg_file: - parser.read_file(cfg_file) - parser.get("versioneer", "VCS") # raise error if missing - - section = parser["versioneer"] - - # `cast`` really shouldn't be used, but its simplest for the - # common VersioneerConfig users at the moment. We verify against - # `None` values elsewhere where it matters - - cfg = VersioneerConfig() - cfg.VCS = section['VCS'] - cfg.style = section.get("style", "") - cfg.versionfile_source = cast(str, section.get("versionfile_source")) - cfg.versionfile_build = section.get("versionfile_build") - cfg.tag_prefix = cast(str, section.get("tag_prefix")) - if cfg.tag_prefix in ("''", '""', None): - cfg.tag_prefix = "" - cfg.parentdir_prefix = section.get("parentdir_prefix") - if isinstance(section, configparser.SectionProxy): - # Make sure configparser translates to bool - cfg.verbose = section.getboolean("verbose") - else: - cfg.verbose = section.get("verbose") - - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -# these dictionaries contain VCS-specific tools -LONG_VERSION_PY: Dict[str, str] = {} -HANDLERS: Dict[str, Dict[str, Callable]] = {} - - -def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator - """Create decorator to mark a method as the handler of a VCS.""" - def decorate(f: Callable) -> Callable: - """Store f in HANDLERS[vcs][method].""" - HANDLERS.setdefault(vcs, {})[method] = f - return f - return decorate - - -def run_command( - commands: List[str], - args: List[str], - cwd: Optional[str] = None, - verbose: bool = False, - hide_stderr: bool = False, - env: Optional[Dict[str, str]] = None, -) -> Tuple[Optional[str], Optional[int]]: - """Call the given command(s).""" - assert isinstance(commands, list) - process = None - - popen_kwargs: Dict[str, Any] = {} - if sys.platform == "win32": - # This hides the console window if pythonw.exe is used - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - popen_kwargs["startupinfo"] = startupinfo - - for command in commands: - try: - dispcmd = str([command] + args) - # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) - break - except OSError as e: - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %s" % dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %s" % (commands,)) - return None, None - stdout = process.communicate()[0].strip().decode() - if process.returncode != 0: - if verbose: - print("unable to run %s (error)" % dispcmd) - print("stdout was %s" % stdout) - return None, process.returncode - return stdout, process.returncode - - -LONG_VERSION_PY['git'] = r''' -# This file helps to compute a version number in source trees obtained from -# git-archive tarball (such as those provided by githubs download-from-tag -# feature). Distribution tarballs (built by setup.py sdist) and build -# directories (produced by setup.py build) will contain a much shorter file -# that just contains the computed version number. - -# This file is released into the public domain. -# Generated by versioneer-0.29 -# https://github.com/python-versioneer/python-versioneer - -"""Git implementation of _version.py.""" - -import errno -import os -import re -import subprocess -import sys -from typing import Any, Callable, Dict, List, Optional, Tuple -import functools - - -def get_keywords() -> Dict[str, str]: - """Get the keywords needed to look up the version information.""" - # these strings will be replaced by git during git-archive. - # setup.py/versioneer.py will grep for the variable names, so they must - # each be defined on a line of their own. _version.py will just call - # get_keywords(). - git_refnames = "%(DOLLAR)sFormat:%%d%(DOLLAR)s" - git_full = "%(DOLLAR)sFormat:%%H%(DOLLAR)s" - git_date = "%(DOLLAR)sFormat:%%ci%(DOLLAR)s" - keywords = {"refnames": git_refnames, "full": git_full, "date": git_date} - return keywords - - -class VersioneerConfig: - """Container for Versioneer configuration parameters.""" - - VCS: str - style: str - tag_prefix: str - parentdir_prefix: str - versionfile_source: str - verbose: bool - - -def get_config() -> VersioneerConfig: - """Create, populate and return the VersioneerConfig() object.""" - # these strings are filled in when 'setup.py versioneer' creates - # _version.py - cfg = VersioneerConfig() - cfg.VCS = "git" - cfg.style = "%(STYLE)s" - cfg.tag_prefix = "%(TAG_PREFIX)s" - cfg.parentdir_prefix = "%(PARENTDIR_PREFIX)s" - cfg.versionfile_source = "%(VERSIONFILE_SOURCE)s" - cfg.verbose = False - return cfg - - -class NotThisMethod(Exception): - """Exception raised if a method is not valid for the current scenario.""" - - -LONG_VERSION_PY: Dict[str, str] = {} -HANDLERS: Dict[str, Dict[str, Callable]] = {} - - -def register_vcs_handler(vcs: str, method: str) -> Callable: # decorator - """Create decorator to mark a method as the handler of a VCS.""" - def decorate(f: Callable) -> Callable: - """Store f in HANDLERS[vcs][method].""" - if vcs not in HANDLERS: - HANDLERS[vcs] = {} - HANDLERS[vcs][method] = f - return f - return decorate - - -def run_command( - commands: List[str], - args: List[str], - cwd: Optional[str] = None, - verbose: bool = False, - hide_stderr: bool = False, - env: Optional[Dict[str, str]] = None, -) -> Tuple[Optional[str], Optional[int]]: - """Call the given command(s).""" - assert isinstance(commands, list) - process = None - - popen_kwargs: Dict[str, Any] = {} - if sys.platform == "win32": - # This hides the console window if pythonw.exe is used - startupinfo = subprocess.STARTUPINFO() - startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW - popen_kwargs["startupinfo"] = startupinfo - - for command in commands: - try: - dispcmd = str([command] + args) - # remember shell=False, so use git.cmd on windows, not just git - process = subprocess.Popen([command] + args, cwd=cwd, env=env, - stdout=subprocess.PIPE, - stderr=(subprocess.PIPE if hide_stderr - else None), **popen_kwargs) - break - except OSError as e: - if e.errno == errno.ENOENT: - continue - if verbose: - print("unable to run %%s" %% dispcmd) - print(e) - return None, None - else: - if verbose: - print("unable to find command, tried %%s" %% (commands,)) - return None, None - stdout = process.communicate()[0].strip().decode() - if process.returncode != 0: - if verbose: - print("unable to run %%s (error)" %% dispcmd) - print("stdout was %%s" %% stdout) - return None, process.returncode - return stdout, process.returncode - - -def versions_from_parentdir( - parentdir_prefix: str, - root: str, - verbose: bool, -) -> Dict[str, Any]: - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for _ in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print("Tried directories %%s but none started with prefix %%s" %% - (str(rootdirs), parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords: Dict[str, str] = {} - try: - with open(versionfile_abs, "r") as fobj: - for line in fobj: - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - except OSError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords( - keywords: Dict[str, str], - tag_prefix: str, - verbose: bool, -) -> Dict[str, Any]: - """Get version information from git keywords.""" - if "refnames" not in keywords: - raise NotThisMethod("Short version file found") - date = keywords.get("date") - if date is not None: - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - - # git-2.2.0 added "%%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = {r.strip() for r in refnames.strip("()").split(",")} - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %%d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} - if verbose: - print("discarding '%%s', no digits" %% ",".join(refs - tags)) - if verbose: - print("likely tags: %%s" %% ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - # Filter out refs that exactly match prefix or that don't start - # with a number once the prefix is stripped (mostly a concern - # when prefix is '') - if not re.match(r'\d', r): - continue - if verbose: - print("picking %%s" %% r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs( - tag_prefix: str, - root: str, - verbose: bool, - runner: Callable = run_command -) -> Dict[str, Any]: - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - # GIT_DIR can interfere with correct operation of Versioneer. - # It may be intended to be passed to the Versioneer-versioned project, - # but that should not change where we get our version from. - env = os.environ.copy() - env.pop("GIT_DIR", None) - runner = functools.partial(runner, env=env) - - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=not verbose) - if rc != 0: - if verbose: - print("Directory %%s not under git control" %% root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, [ - "describe", "--tags", "--dirty", "--always", "--long", - "--match", f"{tag_prefix}[[:digit:]]*" - ], cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces: Dict[str, Any] = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) - # --abbrev-ref was added in git-1.6.3 - if rc != 0 or branch_name is None: - raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") - branch_name = branch_name.strip() - - if branch_name == "HEAD": - # If we aren't exactly on a branch, pick a branch which represents - # the current commit. If all else fails, we are on a branchless - # commit. - branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) - # --contains was added in git-1.5.4 - if rc != 0 or branches is None: - raise NotThisMethod("'git branch --contains' returned error") - branches = branches.split("\n") - - # Remove the first line if we're running detached - if "(" in branches[0]: - branches.pop(0) - - # Strip off the leading "* " from the list of branches. - branches = [branch[2:] for branch in branches] - if "master" in branches: - branch_name = "master" - elif not branches: - branch_name = None - else: - # Pick the first branch that is returned. Good or bad. - branch_name = branches[0] - - pieces["branch"] = branch_name - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%%s'" - %% describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%%s' doesn't start with prefix '%%s'" - print(fmt %% (full_tag, tag_prefix)) - pieces["error"] = ("tag '%%s' doesn't start with prefix '%%s'" - %% (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) - pieces["distance"] = len(out.split()) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%%ci", "HEAD"], cwd=root)[0].strip() - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def plus_or_dot(pieces: Dict[str, Any]) -> str: - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces: Dict[str, Any]) -> str: - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%%d.g%%s" %% (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_branch(pieces: Dict[str, Any]) -> str: - """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . - - The ".dev0" means not master branch. Note that .dev0 sorts backwards - (a feature branch will appear "older" than the master branch). - - Exceptions: - 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "%%d.g%%s" %% (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0" - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+untagged.%%d.g%%s" %% (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: - """Split pep440 version string at the post-release segment. - - Returns the release segments before the post-release and the - post-release version number (or -1 if no post-release segment is present). - """ - vc = str.split(ver, ".post") - return vc[0], int(vc[1] or 0) if len(vc) == 2 else None - - -def render_pep440_pre(pieces: Dict[str, Any]) -> str: - """TAG[.postN.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post0.devDISTANCE - """ - if pieces["closest-tag"]: - if pieces["distance"]: - # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) - rendered = tag_version - if post_version is not None: - rendered += ".post%%d.dev%%d" %% (post_version + 1, pieces["distance"]) - else: - rendered += ".post0.dev%%d" %% (pieces["distance"]) - else: - # no commits, use the tag as the version - rendered = pieces["closest-tag"] - else: - # exception #1 - rendered = "0.post0.dev%%d" %% pieces["distance"] - return rendered - - -def render_pep440_post(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%%s" %% pieces["short"] - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%%s" %% pieces["short"] - return rendered - - -def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . - - The ".dev0" means not master branch. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%%s" %% pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+g%%s" %% pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_old(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%%d" %% pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces: Dict[str, Any]) -> str: - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces: Dict[str, Any]) -> str: - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%%d-g%%s" %% (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-branch": - rendered = render_pep440_branch(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-post-branch": - rendered = render_pep440_post_branch(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%%s'" %% style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} - - -def get_versions() -> Dict[str, Any]: - """Get version information or return default if unable to do so.""" - # I am in _version.py, which lives at ROOT/VERSIONFILE_SOURCE. If we have - # __file__, we can work backwards from there to the root. Some - # py2exe/bbfreeze/non-CPython implementations don't do __file__, in which - # case we can only use expanded keywords. - - cfg = get_config() - verbose = cfg.verbose - - try: - return git_versions_from_keywords(get_keywords(), cfg.tag_prefix, - verbose) - except NotThisMethod: - pass - - try: - root = os.path.realpath(__file__) - # versionfile_source is the relative path from the top of the source - # tree (where the .git directory might live) to this file. Invert - # this to find the root from __file__. - for _ in cfg.versionfile_source.split('/'): - root = os.path.dirname(root) - except NameError: - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to find root of source tree", - "date": None} - - try: - pieces = git_pieces_from_vcs(cfg.tag_prefix, root, verbose) - return render(pieces, cfg.style) - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - return versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - except NotThisMethod: - pass - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, - "error": "unable to compute version", "date": None} -''' - - -@register_vcs_handler("git", "get_keywords") -def git_get_keywords(versionfile_abs: str) -> Dict[str, str]: - """Extract version information from the given file.""" - # the code embedded in _version.py can just fetch the value of these - # keywords. When used from setup.py, we don't want to import _version.py, - # so we do it with a regexp instead. This function is not used from - # _version.py. - keywords: Dict[str, str] = {} - try: - with open(versionfile_abs, "r") as fobj: - for line in fobj: - if line.strip().startswith("git_refnames ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["refnames"] = mo.group(1) - if line.strip().startswith("git_full ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["full"] = mo.group(1) - if line.strip().startswith("git_date ="): - mo = re.search(r'=\s*"(.*)"', line) - if mo: - keywords["date"] = mo.group(1) - except OSError: - pass - return keywords - - -@register_vcs_handler("git", "keywords") -def git_versions_from_keywords( - keywords: Dict[str, str], - tag_prefix: str, - verbose: bool, -) -> Dict[str, Any]: - """Get version information from git keywords.""" - if "refnames" not in keywords: - raise NotThisMethod("Short version file found") - date = keywords.get("date") - if date is not None: - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - - # git-2.2.0 added "%cI", which expands to an ISO-8601 -compliant - # datestamp. However we prefer "%ci" (which expands to an "ISO-8601 - # -like" string, which we must then edit to make compliant), because - # it's been around since git-1.5.3, and it's too difficult to - # discover which version we're using, or to work around using an - # older one. - date = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - refnames = keywords["refnames"].strip() - if refnames.startswith("$Format"): - if verbose: - print("keywords are unexpanded, not using") - raise NotThisMethod("unexpanded keywords, not a git-archive tarball") - refs = {r.strip() for r in refnames.strip("()").split(",")} - # starting in git-1.8.3, tags are listed as "tag: foo-1.0" instead of - # just "foo-1.0". If we see a "tag: " prefix, prefer those. - TAG = "tag: " - tags = {r[len(TAG):] for r in refs if r.startswith(TAG)} - if not tags: - # Either we're using git < 1.8.3, or there really are no tags. We use - # a heuristic: assume all version tags have a digit. The old git %d - # expansion behaves like git log --decorate=short and strips out the - # refs/heads/ and refs/tags/ prefixes that would let us distinguish - # between branches and tags. By ignoring refnames without digits, we - # filter out many common branch names like "release" and - # "stabilization", as well as "HEAD" and "master". - tags = {r for r in refs if re.search(r'\d', r)} - if verbose: - print("discarding '%s', no digits" % ",".join(refs - tags)) - if verbose: - print("likely tags: %s" % ",".join(sorted(tags))) - for ref in sorted(tags): - # sorting will prefer e.g. "2.0" over "2.0rc1" - if ref.startswith(tag_prefix): - r = ref[len(tag_prefix):] - # Filter out refs that exactly match prefix or that don't start - # with a number once the prefix is stripped (mostly a concern - # when prefix is '') - if not re.match(r'\d', r): - continue - if verbose: - print("picking %s" % r) - return {"version": r, - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": None, - "date": date} - # no suitable tags, so version is "0+unknown", but full hex is still there - if verbose: - print("no suitable tags, using unknown + full revision id") - return {"version": "0+unknown", - "full-revisionid": keywords["full"].strip(), - "dirty": False, "error": "no suitable tags", "date": None} - - -@register_vcs_handler("git", "pieces_from_vcs") -def git_pieces_from_vcs( - tag_prefix: str, - root: str, - verbose: bool, - runner: Callable = run_command -) -> Dict[str, Any]: - """Get version from 'git describe' in the root of the source tree. - - This only gets called if the git-archive 'subst' keywords were *not* - expanded, and _version.py hasn't already been rewritten with a short - version string, meaning we're inside a checked out source tree. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - - # GIT_DIR can interfere with correct operation of Versioneer. - # It may be intended to be passed to the Versioneer-versioned project, - # but that should not change where we get our version from. - env = os.environ.copy() - env.pop("GIT_DIR", None) - runner = functools.partial(runner, env=env) - - _, rc = runner(GITS, ["rev-parse", "--git-dir"], cwd=root, - hide_stderr=not verbose) - if rc != 0: - if verbose: - print("Directory %s not under git control" % root) - raise NotThisMethod("'git rev-parse --git-dir' returned error") - - # if there is a tag matching tag_prefix, this yields TAG-NUM-gHEX[-dirty] - # if there isn't one, this yields HEX[-dirty] (no NUM) - describe_out, rc = runner(GITS, [ - "describe", "--tags", "--dirty", "--always", "--long", - "--match", f"{tag_prefix}[[:digit:]]*" - ], cwd=root) - # --long was added in git-1.5.5 - if describe_out is None: - raise NotThisMethod("'git describe' failed") - describe_out = describe_out.strip() - full_out, rc = runner(GITS, ["rev-parse", "HEAD"], cwd=root) - if full_out is None: - raise NotThisMethod("'git rev-parse' failed") - full_out = full_out.strip() - - pieces: Dict[str, Any] = {} - pieces["long"] = full_out - pieces["short"] = full_out[:7] # maybe improved later - pieces["error"] = None - - branch_name, rc = runner(GITS, ["rev-parse", "--abbrev-ref", "HEAD"], - cwd=root) - # --abbrev-ref was added in git-1.6.3 - if rc != 0 or branch_name is None: - raise NotThisMethod("'git rev-parse --abbrev-ref' returned error") - branch_name = branch_name.strip() - - if branch_name == "HEAD": - # If we aren't exactly on a branch, pick a branch which represents - # the current commit. If all else fails, we are on a branchless - # commit. - branches, rc = runner(GITS, ["branch", "--contains"], cwd=root) - # --contains was added in git-1.5.4 - if rc != 0 or branches is None: - raise NotThisMethod("'git branch --contains' returned error") - branches = branches.split("\n") - - # Remove the first line if we're running detached - if "(" in branches[0]: - branches.pop(0) - - # Strip off the leading "* " from the list of branches. - branches = [branch[2:] for branch in branches] - if "master" in branches: - branch_name = "master" - elif not branches: - branch_name = None - else: - # Pick the first branch that is returned. Good or bad. - branch_name = branches[0] - - pieces["branch"] = branch_name - - # parse describe_out. It will be like TAG-NUM-gHEX[-dirty] or HEX[-dirty] - # TAG might have hyphens. - git_describe = describe_out - - # look for -dirty suffix - dirty = git_describe.endswith("-dirty") - pieces["dirty"] = dirty - if dirty: - git_describe = git_describe[:git_describe.rindex("-dirty")] - - # now we have TAG-NUM-gHEX or HEX - - if "-" in git_describe: - # TAG-NUM-gHEX - mo = re.search(r'^(.+)-(\d+)-g([0-9a-f]+)$', git_describe) - if not mo: - # unparsable. Maybe git-describe is misbehaving? - pieces["error"] = ("unable to parse git-describe output: '%s'" - % describe_out) - return pieces - - # tag - full_tag = mo.group(1) - if not full_tag.startswith(tag_prefix): - if verbose: - fmt = "tag '%s' doesn't start with prefix '%s'" - print(fmt % (full_tag, tag_prefix)) - pieces["error"] = ("tag '%s' doesn't start with prefix '%s'" - % (full_tag, tag_prefix)) - return pieces - pieces["closest-tag"] = full_tag[len(tag_prefix):] - - # distance: number of commits since tag - pieces["distance"] = int(mo.group(2)) - - # commit: short hex revision ID - pieces["short"] = mo.group(3) - - else: - # HEX: no tags - pieces["closest-tag"] = None - out, rc = runner(GITS, ["rev-list", "HEAD", "--left-right"], cwd=root) - pieces["distance"] = len(out.split()) # total number of commits - - # commit date: see ISO-8601 comment in git_versions_from_keywords() - date = runner(GITS, ["show", "-s", "--format=%ci", "HEAD"], cwd=root)[0].strip() - # Use only the last line. Previous lines may contain GPG signature - # information. - date = date.splitlines()[-1] - pieces["date"] = date.strip().replace(" ", "T", 1).replace(" ", "", 1) - - return pieces - - -def do_vcs_install(versionfile_source: str, ipy: Optional[str]) -> None: - """Git-specific installation logic for Versioneer. - - For Git, this means creating/changing .gitattributes to mark _version.py - for export-subst keyword substitution. - """ - GITS = ["git"] - if sys.platform == "win32": - GITS = ["git.cmd", "git.exe"] - files = [versionfile_source] - if ipy: - files.append(ipy) - if "VERSIONEER_PEP518" not in globals(): - try: - my_path = __file__ - if my_path.endswith((".pyc", ".pyo")): - my_path = os.path.splitext(my_path)[0] + ".py" - versioneer_file = os.path.relpath(my_path) - except NameError: - versioneer_file = "versioneer.py" - files.append(versioneer_file) - present = False - try: - with open(".gitattributes", "r") as fobj: - for line in fobj: - if line.strip().startswith(versionfile_source): - if "export-subst" in line.strip().split()[1:]: - present = True - break - except OSError: - pass - if not present: - with open(".gitattributes", "a+") as fobj: - fobj.write(f"{versionfile_source} export-subst\n") - files.append(".gitattributes") - run_command(GITS, ["add", "--"] + files) - - -def versions_from_parentdir( - parentdir_prefix: str, - root: str, - verbose: bool, -) -> Dict[str, Any]: - """Try to determine the version from the parent directory name. - - Source tarballs conventionally unpack into a directory that includes both - the project name and a version string. We will also support searching up - two directory levels for an appropriately named parent directory - """ - rootdirs = [] - - for _ in range(3): - dirname = os.path.basename(root) - if dirname.startswith(parentdir_prefix): - return {"version": dirname[len(parentdir_prefix):], - "full-revisionid": None, - "dirty": False, "error": None, "date": None} - rootdirs.append(root) - root = os.path.dirname(root) # up a level - - if verbose: - print("Tried directories %s but none started with prefix %s" % - (str(rootdirs), parentdir_prefix)) - raise NotThisMethod("rootdir doesn't start with parentdir_prefix") - - -SHORT_VERSION_PY = """ -# This file was generated by 'versioneer.py' (0.29) from -# revision-control system data, or from the parent directory name of an -# unpacked source archive. Distribution tarballs contain a pre-generated copy -# of this file. - -import json - -version_json = ''' -%s -''' # END VERSION_JSON - - -def get_versions(): - return json.loads(version_json) -""" - - -def versions_from_file(filename: str) -> Dict[str, Any]: - """Try to determine the version from _version.py if present.""" - try: - with open(filename) as f: - contents = f.read() - except OSError: - raise NotThisMethod("unable to read _version.py") - mo = re.search(r"version_json = '''\n(.*)''' # END VERSION_JSON", - contents, re.M | re.S) - if not mo: - mo = re.search(r"version_json = '''\r\n(.*)''' # END VERSION_JSON", - contents, re.M | re.S) - if not mo: - raise NotThisMethod("no version_json in _version.py") - return json.loads(mo.group(1)) - - -def write_to_version_file(filename: str, versions: Dict[str, Any]) -> None: - """Write the given version number to the given _version.py file.""" - contents = json.dumps(versions, sort_keys=True, - indent=1, separators=(",", ": ")) - with open(filename, "w") as f: - f.write(SHORT_VERSION_PY % contents) - - print("set %s to '%s'" % (filename, versions["version"])) - - -def plus_or_dot(pieces: Dict[str, Any]) -> str: - """Return a + if we don't already have one, else return a .""" - if "+" in pieces.get("closest-tag", ""): - return "." - return "+" - - -def render_pep440(pieces: Dict[str, Any]) -> str: - """Build up version string, with post-release "local version identifier". - - Our goal: TAG[+DISTANCE.gHEX[.dirty]] . Note that if you - get a tagged build and then dirty it, you'll get TAG+0.gHEX.dirty - - Exceptions: - 1: no tags. git_describe was just HEX. 0+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_branch(pieces: Dict[str, Any]) -> str: - """TAG[[.dev0]+DISTANCE.gHEX[.dirty]] . - - The ".dev0" means not master branch. Note that .dev0 sorts backwards - (a feature branch will appear "older" than the master branch). - - Exceptions: - 1: no tags. 0[.dev0]+untagged.DISTANCE.gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "%d.g%s" % (pieces["distance"], pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0" - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+untagged.%d.g%s" % (pieces["distance"], - pieces["short"]) - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def pep440_split_post(ver: str) -> Tuple[str, Optional[int]]: - """Split pep440 version string at the post-release segment. - - Returns the release segments before the post-release and the - post-release version number (or -1 if no post-release segment is present). - """ - vc = str.split(ver, ".post") - return vc[0], int(vc[1] or 0) if len(vc) == 2 else None - - -def render_pep440_pre(pieces: Dict[str, Any]) -> str: - """TAG[.postN.devDISTANCE] -- No -dirty. - - Exceptions: - 1: no tags. 0.post0.devDISTANCE - """ - if pieces["closest-tag"]: - if pieces["distance"]: - # update the post release segment - tag_version, post_version = pep440_split_post(pieces["closest-tag"]) - rendered = tag_version - if post_version is not None: - rendered += ".post%d.dev%d" % (post_version + 1, pieces["distance"]) - else: - rendered += ".post0.dev%d" % (pieces["distance"]) - else: - # no commits, use the tag as the version - rendered = pieces["closest-tag"] - else: - # exception #1 - rendered = "0.post0.dev%d" % pieces["distance"] - return rendered - - -def render_pep440_post(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX] . - - The ".dev0" means dirty. Note that .dev0 sorts backwards - (a dirty tree will appear "older" than the corresponding clean one), - but you shouldn't be releasing software with -dirty anyways. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - return rendered - - -def render_pep440_post_branch(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]+gHEX[.dirty]] . - - The ".dev0" means not master branch. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0]+gHEX[.dirty] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += plus_or_dot(pieces) - rendered += "g%s" % pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["branch"] != "master": - rendered += ".dev0" - rendered += "+g%s" % pieces["short"] - if pieces["dirty"]: - rendered += ".dirty" - return rendered - - -def render_pep440_old(pieces: Dict[str, Any]) -> str: - """TAG[.postDISTANCE[.dev0]] . - - The ".dev0" means dirty. - - Exceptions: - 1: no tags. 0.postDISTANCE[.dev0] - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"] or pieces["dirty"]: - rendered += ".post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - else: - # exception #1 - rendered = "0.post%d" % pieces["distance"] - if pieces["dirty"]: - rendered += ".dev0" - return rendered - - -def render_git_describe(pieces: Dict[str, Any]) -> str: - """TAG[-DISTANCE-gHEX][-dirty]. - - Like 'git describe --tags --dirty --always'. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - if pieces["distance"]: - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render_git_describe_long(pieces: Dict[str, Any]) -> str: - """TAG-DISTANCE-gHEX[-dirty]. - - Like 'git describe --tags --dirty --always -long'. - The distance/hash is unconditional. - - Exceptions: - 1: no tags. HEX[-dirty] (note: no 'g' prefix) - """ - if pieces["closest-tag"]: - rendered = pieces["closest-tag"] - rendered += "-%d-g%s" % (pieces["distance"], pieces["short"]) - else: - # exception #1 - rendered = pieces["short"] - if pieces["dirty"]: - rendered += "-dirty" - return rendered - - -def render(pieces: Dict[str, Any], style: str) -> Dict[str, Any]: - """Render the given version pieces into the requested style.""" - if pieces["error"]: - return {"version": "unknown", - "full-revisionid": pieces.get("long"), - "dirty": None, - "error": pieces["error"], - "date": None} - - if not style or style == "default": - style = "pep440" # the default - - if style == "pep440": - rendered = render_pep440(pieces) - elif style == "pep440-branch": - rendered = render_pep440_branch(pieces) - elif style == "pep440-pre": - rendered = render_pep440_pre(pieces) - elif style == "pep440-post": - rendered = render_pep440_post(pieces) - elif style == "pep440-post-branch": - rendered = render_pep440_post_branch(pieces) - elif style == "pep440-old": - rendered = render_pep440_old(pieces) - elif style == "git-describe": - rendered = render_git_describe(pieces) - elif style == "git-describe-long": - rendered = render_git_describe_long(pieces) - else: - raise ValueError("unknown style '%s'" % style) - - return {"version": rendered, "full-revisionid": pieces["long"], - "dirty": pieces["dirty"], "error": None, - "date": pieces.get("date")} - - -class VersioneerBadRootError(Exception): - """The project root directory is unknown or missing key files.""" - - -def get_versions(verbose: bool = False) -> Dict[str, Any]: - """Get the project version from whatever source is available. - - Returns dict with two keys: 'version' and 'full'. - """ - if "versioneer" in sys.modules: - # see the discussion in cmdclass.py:get_cmdclass() - del sys.modules["versioneer"] - - root = get_root() - cfg = get_config_from_root(root) - - assert cfg.VCS is not None, "please set [versioneer]VCS= in setup.cfg" - handlers = HANDLERS.get(cfg.VCS) - assert handlers, "unrecognized VCS '%s'" % cfg.VCS - verbose = verbose or bool(cfg.verbose) # `bool()` used to avoid `None` - assert cfg.versionfile_source is not None, \ - "please set versioneer.versionfile_source" - assert cfg.tag_prefix is not None, "please set versioneer.tag_prefix" - - versionfile_abs = os.path.join(root, cfg.versionfile_source) - - # extract version from first of: _version.py, VCS command (e.g. 'git - # describe'), parentdir. This is meant to work for developers using a - # source checkout, for users of a tarball created by 'setup.py sdist', - # and for users of a tarball/zipball created by 'git archive' or github's - # download-from-tag feature or the equivalent in other VCSes. - - get_keywords_f = handlers.get("get_keywords") - from_keywords_f = handlers.get("keywords") - if get_keywords_f and from_keywords_f: - try: - keywords = get_keywords_f(versionfile_abs) - ver = from_keywords_f(keywords, cfg.tag_prefix, verbose) - if verbose: - print("got version from expanded keyword %s" % ver) - return ver - except NotThisMethod: - pass - - try: - ver = versions_from_file(versionfile_abs) - if verbose: - print("got version from file %s %s" % (versionfile_abs, ver)) - return ver - except NotThisMethod: - pass - - from_vcs_f = handlers.get("pieces_from_vcs") - if from_vcs_f: - try: - pieces = from_vcs_f(cfg.tag_prefix, root, verbose) - ver = render(pieces, cfg.style) - if verbose: - print("got version from VCS %s" % ver) - return ver - except NotThisMethod: - pass - - try: - if cfg.parentdir_prefix: - ver = versions_from_parentdir(cfg.parentdir_prefix, root, verbose) - if verbose: - print("got version from parentdir %s" % ver) - return ver - except NotThisMethod: - pass - - if verbose: - print("unable to compute version") - - return {"version": "0+unknown", "full-revisionid": None, - "dirty": None, "error": "unable to compute version", - "date": None} - - -def get_version() -> str: - """Get the short version string for this project.""" - return get_versions()["version"] - - -def get_cmdclass(cmdclass: Optional[Dict[str, Any]] = None): - """Get the custom setuptools subclasses used by Versioneer. - - If the package uses a different cmdclass (e.g. one from numpy), it - should be provide as an argument. - """ - if "versioneer" in sys.modules: - del sys.modules["versioneer"] - # this fixes the "python setup.py develop" case (also 'install' and - # 'easy_install .'), in which subdependencies of the main project are - # built (using setup.py bdist_egg) in the same python process. Assume - # a main project A and a dependency B, which use different versions - # of Versioneer. A's setup.py imports A's Versioneer, leaving it in - # sys.modules by the time B's setup.py is executed, causing B to run - # with the wrong versioneer. Setuptools wraps the sub-dep builds in a - # sandbox that restores sys.modules to it's pre-build state, so the - # parent is protected against the child's "import versioneer". By - # removing ourselves from sys.modules here, before the child build - # happens, we protect the child from the parent's versioneer too. - # Also see https://github.com/python-versioneer/python-versioneer/issues/52 - - cmds = {} if cmdclass is None else cmdclass.copy() - - # we add "version" to setuptools - from setuptools import Command - - class cmd_version(Command): - description = "report generated version string" - user_options: List[Tuple[str, str, str]] = [] - boolean_options: List[str] = [] - - def initialize_options(self) -> None: - pass - - def finalize_options(self) -> None: - pass - - def run(self) -> None: - vers = get_versions(verbose=True) - print("Version: %s" % vers["version"]) - print(" full-revisionid: %s" % vers.get("full-revisionid")) - print(" dirty: %s" % vers.get("dirty")) - print(" date: %s" % vers.get("date")) - if vers["error"]: - print(" error: %s" % vers["error"]) - cmds["version"] = cmd_version - - # we override "build_py" in setuptools - # - # most invocation pathways end up running build_py: - # distutils/build -> build_py - # distutils/install -> distutils/build ->.. - # setuptools/bdist_wheel -> distutils/install ->.. - # setuptools/bdist_egg -> distutils/install_lib -> build_py - # setuptools/install -> bdist_egg ->.. - # setuptools/develop -> ? - # pip install: - # copies source tree to a tempdir before running egg_info/etc - # if .git isn't copied too, 'git describe' will fail - # then does setup.py bdist_wheel, or sometimes setup.py install - # setup.py egg_info -> ? - - # pip install -e . and setuptool/editable_wheel will invoke build_py - # but the build_py command is not expected to copy any files. - - # we override different "build_py" commands for both environments - if 'build_py' in cmds: - _build_py: Any = cmds['build_py'] - else: - from setuptools.command.build_py import build_py as _build_py - - class cmd_build_py(_build_py): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - _build_py.run(self) - if getattr(self, "editable_mode", False): - # During editable installs `.py` and data files are - # not copied to build_lib - return - # now locate _version.py in the new build/ directory and replace - # it with an updated value - if cfg.versionfile_build: - target_versionfile = os.path.join(self.build_lib, - cfg.versionfile_build) - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - cmds["build_py"] = cmd_build_py - - if 'build_ext' in cmds: - _build_ext: Any = cmds['build_ext'] - else: - from setuptools.command.build_ext import build_ext as _build_ext - - class cmd_build_ext(_build_ext): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - _build_ext.run(self) - if self.inplace: - # build_ext --inplace will only build extensions in - # build/lib<..> dir with no _version.py to write to. - # As in place builds will already have a _version.py - # in the module dir, we do not need to write one. - return - # now locate _version.py in the new build/ directory and replace - # it with an updated value - if not cfg.versionfile_build: - return - target_versionfile = os.path.join(self.build_lib, - cfg.versionfile_build) - if not os.path.exists(target_versionfile): - print(f"Warning: {target_versionfile} does not exist, skipping " - "version update. This can happen if you are running build_ext " - "without first running build_py.") - return - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - cmds["build_ext"] = cmd_build_ext - - if "cx_Freeze" in sys.modules: # cx_freeze enabled? - from cx_Freeze.dist import build_exe as _build_exe # type: ignore - # nczeczulin reports that py2exe won't like the pep440-style string - # as FILEVERSION, but it can be used for PRODUCTVERSION, e.g. - # setup(console=[{ - # "version": versioneer.get_version().split("+", 1)[0], # FILEVERSION - # "product_version": versioneer.get_version(), - # ... - - class cmd_build_exe(_build_exe): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - target_versionfile = cfg.versionfile_source - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - _build_exe.run(self) - os.unlink(target_versionfile) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % - {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - cmds["build_exe"] = cmd_build_exe - del cmds["build_py"] - - if 'py2exe' in sys.modules: # py2exe enabled? - try: - from py2exe.setuptools_buildexe import py2exe as _py2exe # type: ignore - except ImportError: - from py2exe.distutils_buildexe import py2exe as _py2exe # type: ignore - - class cmd_py2exe(_py2exe): - def run(self) -> None: - root = get_root() - cfg = get_config_from_root(root) - versions = get_versions() - target_versionfile = cfg.versionfile_source - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, versions) - - _py2exe.run(self) - os.unlink(target_versionfile) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % - {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - cmds["py2exe"] = cmd_py2exe - - # sdist farms its file list building out to egg_info - if 'egg_info' in cmds: - _egg_info: Any = cmds['egg_info'] - else: - from setuptools.command.egg_info import egg_info as _egg_info - - class cmd_egg_info(_egg_info): - def find_sources(self) -> None: - # egg_info.find_sources builds the manifest list and writes it - # in one shot - super().find_sources() - - # Modify the filelist and normalize it - root = get_root() - cfg = get_config_from_root(root) - self.filelist.append('versioneer.py') - if cfg.versionfile_source: - # There are rare cases where versionfile_source might not be - # included by default, so we must be explicit - self.filelist.append(cfg.versionfile_source) - self.filelist.sort() - self.filelist.remove_duplicates() - - # The write method is hidden in the manifest_maker instance that - # generated the filelist and was thrown away - # We will instead replicate their final normalization (to unicode, - # and POSIX-style paths) - from setuptools import unicode_utils - normalized = [unicode_utils.filesys_decode(f).replace(os.sep, '/') - for f in self.filelist.files] - - manifest_filename = os.path.join(self.egg_info, 'SOURCES.txt') - with open(manifest_filename, 'w') as fobj: - fobj.write('\n'.join(normalized)) - - cmds['egg_info'] = cmd_egg_info - - # we override different "sdist" commands for both environments - if 'sdist' in cmds: - _sdist: Any = cmds['sdist'] - else: - from setuptools.command.sdist import sdist as _sdist - - class cmd_sdist(_sdist): - def run(self) -> None: - versions = get_versions() - self._versioneer_generated_versions = versions - # unless we update this, the command will keep using the old - # version - self.distribution.metadata.version = versions["version"] - return _sdist.run(self) - - def make_release_tree(self, base_dir: str, files: List[str]) -> None: - root = get_root() - cfg = get_config_from_root(root) - _sdist.make_release_tree(self, base_dir, files) - # now locate _version.py in the new base_dir directory - # (remembering that it may be a hardlink) and replace it with an - # updated value - target_versionfile = os.path.join(base_dir, cfg.versionfile_source) - print("UPDATING %s" % target_versionfile) - write_to_version_file(target_versionfile, - self._versioneer_generated_versions) - cmds["sdist"] = cmd_sdist - - return cmds - - -CONFIG_ERROR = """ -setup.cfg is missing the necessary Versioneer configuration. You need -a section like: - - [versioneer] - VCS = git - style = pep440 - versionfile_source = src/myproject/_version.py - versionfile_build = myproject/_version.py - tag_prefix = - parentdir_prefix = myproject- - -You will also need to edit your setup.py to use the results: - - import versioneer - setup(version=versioneer.get_version(), - cmdclass=versioneer.get_cmdclass(), ...) - -Please read the docstring in ./versioneer.py for configuration instructions, -edit setup.cfg, and re-run the installer or 'python versioneer.py setup'. -""" - -SAMPLE_CONFIG = """ -# See the docstring in versioneer.py for instructions. Note that you must -# re-run 'versioneer.py setup' after changing this section, and commit the -# resulting files. - -[versioneer] -#VCS = git -#style = pep440 -#versionfile_source = -#versionfile_build = -#tag_prefix = -#parentdir_prefix = - -""" - -OLD_SNIPPET = """ -from ._version import get_versions -__version__ = get_versions()['version'] -del get_versions -""" - -INIT_PY_SNIPPET = """ -from . import {0} -__version__ = {0}.get_versions()['version'] -""" - - -def do_setup() -> int: - """Do main VCS-independent setup function for installing Versioneer.""" - root = get_root() - try: - cfg = get_config_from_root(root) - except (OSError, configparser.NoSectionError, - configparser.NoOptionError) as e: - if isinstance(e, (OSError, configparser.NoSectionError)): - print("Adding sample versioneer config to setup.cfg", - file=sys.stderr) - with open(os.path.join(root, "setup.cfg"), "a") as f: - f.write(SAMPLE_CONFIG) - print(CONFIG_ERROR, file=sys.stderr) - return 1 - - print(" creating %s" % cfg.versionfile_source) - with open(cfg.versionfile_source, "w") as f: - LONG = LONG_VERSION_PY[cfg.VCS] - f.write(LONG % {"DOLLAR": "$", - "STYLE": cfg.style, - "TAG_PREFIX": cfg.tag_prefix, - "PARENTDIR_PREFIX": cfg.parentdir_prefix, - "VERSIONFILE_SOURCE": cfg.versionfile_source, - }) - - ipy = os.path.join(os.path.dirname(cfg.versionfile_source), - "__init__.py") - maybe_ipy: Optional[str] = ipy - if os.path.exists(ipy): - try: - with open(ipy, "r") as f: - old = f.read() - except OSError: - old = "" - module = os.path.splitext(os.path.basename(cfg.versionfile_source))[0] - snippet = INIT_PY_SNIPPET.format(module) - if OLD_SNIPPET in old: - print(" replacing boilerplate in %s" % ipy) - with open(ipy, "w") as f: - f.write(old.replace(OLD_SNIPPET, snippet)) - elif snippet not in old: - print(" appending to %s" % ipy) - with open(ipy, "a") as f: - f.write(snippet) - else: - print(" %s unmodified" % ipy) - else: - print(" %s doesn't exist, ok" % ipy) - maybe_ipy = None - - # Make VCS-specific changes. For git, this means creating/changing - # .gitattributes to mark _version.py for export-subst keyword - # substitution. - do_vcs_install(cfg.versionfile_source, maybe_ipy) - return 0 - - -def scan_setup_py() -> int: - """Validate the contents of setup.py against Versioneer's expectations.""" - found = set() - setters = False - errors = 0 - with open("setup.py", "r") as f: - for line in f.readlines(): - if "import versioneer" in line: - found.add("import") - if "versioneer.get_cmdclass()" in line: - found.add("cmdclass") - if "versioneer.get_version()" in line: - found.add("get_version") - if "versioneer.VCS" in line: - setters = True - if "versioneer.versionfile_source" in line: - setters = True - if len(found) != 3: - print("") - print("Your setup.py appears to be missing some important items") - print("(but I might be wrong). Please make sure it has something") - print("roughly like the following:") - print("") - print(" import versioneer") - print(" setup( version=versioneer.get_version(),") - print(" cmdclass=versioneer.get_cmdclass(), ...)") - print("") - errors += 1 - if setters: - print("You should remove lines like 'versioneer.VCS = ' and") - print("'versioneer.versionfile_source = ' . This configuration") - print("now lives in setup.cfg, and should be removed from setup.py") - print("") - errors += 1 - return errors - - -def setup_command() -> NoReturn: - """Set up Versioneer and exit with appropriate error code.""" - errors = do_setup() - errors += scan_setup_py() - sys.exit(1 if errors else 0) - - -if __name__ == "__main__": - cmd = sys.argv[1] - if cmd == "setup": - setup_command()