pyocl-idor 0.8.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyocl_idor-0.8.2/.gitattributes +4 -0
- pyocl_idor-0.8.2/.github/workflows/release.yml +127 -0
- pyocl_idor-0.8.2/.gitignore +10 -0
- pyocl_idor-0.8.2/LICENSE +32 -0
- pyocl_idor-0.8.2/MANIFEST.in +2 -0
- pyocl_idor-0.8.2/PKG-INFO +102 -0
- pyocl_idor-0.8.2/README.md +90 -0
- pyocl_idor-0.8.2/docs/Makefile +20 -0
- pyocl_idor-0.8.2/docs/_static/.gitkeep +0 -0
- pyocl_idor-0.8.2/docs/conf.py +38 -0
- pyocl_idor-0.8.2/docs/getting_started.rst +17 -0
- pyocl_idor-0.8.2/docs/index.rst +35 -0
- pyocl_idor-0.8.2/docs/make.bat +35 -0
- pyocl_idor-0.8.2/docs/modules.rst +7 -0
- pyocl_idor-0.8.2/docs/tutorials/conformer_generation.ipynb +84 -0
- pyocl_idor-0.8.2/docs/tutorials/conformer_generation.py +18 -0
- pyocl_idor-0.8.2/docs/tutorials/conformer_generation.rst +42 -0
- pyocl_idor-0.8.2/docs/tutorials/data/2amb_ligand.sdf +111 -0
- pyocl_idor-0.8.2/docs/tutorials/data/2amb_receptor.sdf +10730 -0
- pyocl_idor-0.8.2/docs/tutorials/docking.ipynb +148 -0
- pyocl_idor-0.8.2/docs/tutorials/docking.py +31 -0
- pyocl_idor-0.8.2/docs/tutorials/docking.rst +58 -0
- pyocl_idor-0.8.2/docs/tutorials/properties.ipynb +189 -0
- pyocl_idor-0.8.2/docs/tutorials/properties.py +25 -0
- pyocl_idor-0.8.2/docs/tutorials/properties.rst +100 -0
- pyocl_idor-0.8.2/docs/tutorials/reactions.ipynb +210 -0
- pyocl_idor-0.8.2/docs/tutorials/reactions.py +82 -0
- pyocl_idor-0.8.2/docs/tutorials/reactions.rst +112 -0
- pyocl_idor-0.8.2/docs/tutorials/reactor.ipynb +124 -0
- pyocl_idor-0.8.2/docs/tutorials/reactor.py +51 -0
- pyocl_idor-0.8.2/docs/tutorials/reactor.rst +68 -0
- pyocl_idor-0.8.2/docs/tutorials/stereomolecule_creation.ipynb +89 -0
- pyocl_idor-0.8.2/docs/tutorials/stereomolecule_creation.py +17 -0
- pyocl_idor-0.8.2/docs/tutorials/stereomolecule_creation.rst +36 -0
- pyocl_idor-0.8.2/docs/tutorials/synthons.ipynb +123 -0
- pyocl_idor-0.8.2/docs/tutorials/synthons.py +29 -0
- pyocl_idor-0.8.2/docs/tutorials/synthons.rst +47 -0
- pyocl_idor-0.8.2/docs/tutorials.rst +17 -0
- pyocl_idor-0.8.2/pyocl/__init__.py +38 -0
- pyocl_idor-0.8.2/pyocl/_version.py +24 -0
- pyocl_idor-0.8.2/pyocl/bindings.py +92 -0
- pyocl_idor-0.8.2/pyocl/chem/__init__.py +102 -0
- pyocl_idor-0.8.2/pyocl/chem/atom_function_analyzer.py +108 -0
- pyocl_idor-0.8.2/pyocl/chem/chemicalspaces/__init__.py +24 -0
- pyocl_idor-0.8.2/pyocl/chem/chemicalspaces/chemical_space_creator.py +169 -0
- pyocl_idor-0.8.2/pyocl/chem/chemicalspaces/synthon/__init__.py +25 -0
- pyocl_idor-0.8.2/pyocl/chem/chemicalspaces/synthon/synthon_creator.py +30 -0
- pyocl_idor-0.8.2/pyocl/chem/chemicalspaces/synthon/synthon_reactor.py +103 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/__init__.py +45 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/conformer.py +299 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/conformer_set.py +108 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/conformer_set_generator.py +116 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/gen/__init__.py +20 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/gen/conformer_generator.py +133 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/hydrogen_assembler.py +59 -0
- pyocl_idor-0.8.2/pyocl/chem/conf/molecular_flexibility_calculator.py +71 -0
- pyocl_idor-0.8.2/pyocl/chem/coordinates.py +181 -0
- pyocl_idor-0.8.2/pyocl/chem/descriptor/__init__.py +20 -0
- pyocl_idor-0.8.2/pyocl/chem/descriptor/descriptor_handler_skeleton_spheres.py +160 -0
- pyocl_idor-0.8.2/pyocl/chem/docking/__init__.py +19 -0
- pyocl_idor-0.8.2/pyocl/chem/docking/docking_engine.py +116 -0
- pyocl_idor-0.8.2/pyocl/chem/element.py +48 -0
- pyocl_idor-0.8.2/pyocl/chem/extended_molecule.py +92 -0
- pyocl_idor-0.8.2/pyocl/chem/forcefield/__init__.py +21 -0
- pyocl_idor-0.8.2/pyocl/chem/forcefield/abstract_force_field.py +59 -0
- pyocl_idor-0.8.2/pyocl/chem/forcefield/mmff/__init__.py +31 -0
- pyocl_idor-0.8.2/pyocl/chem/forcefield/mmff/force_field_mmff94.py +88 -0
- pyocl_idor-0.8.2/pyocl/chem/forcefield/mmff/mmff_molecule.py +48 -0
- pyocl_idor-0.8.2/pyocl/chem/forcefield/mmff/tables.py +69 -0
- pyocl_idor-0.8.2/pyocl/chem/io/__init__.py +27 -0
- pyocl_idor-0.8.2/pyocl/chem/io/dwar_file_parser.py +33 -0
- pyocl_idor-0.8.2/pyocl/chem/io/pdb/__init__.py +22 -0
- pyocl_idor-0.8.2/pyocl/chem/io/pdb/parser/__init__.py +25 -0
- pyocl_idor-0.8.2/pyocl/chem/io/pdb/parser/pdb_file_parser.py +40 -0
- pyocl_idor-0.8.2/pyocl/chem/io/pdb/parser/structure_assembler.py +25 -0
- pyocl_idor-0.8.2/pyocl/chem/mmp/__init__.py +20 -0
- pyocl_idor-0.8.2/pyocl/chem/mmp/mmp_fragmenter.py +40 -0
- pyocl_idor-0.8.2/pyocl/chem/molecular_formula.py +67 -0
- pyocl_idor-0.8.2/pyocl/chem/molecule.py +290 -0
- pyocl_idor-0.8.2/pyocl/chem/molecule3d.py +38 -0
- pyocl_idor-0.8.2/pyocl/chem/molecule_standardizer.py +73 -0
- pyocl_idor-0.8.2/pyocl/chem/parallel_similarity_search.py +75 -0
- pyocl_idor-0.8.2/pyocl/chem/periodic_table.py +27 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/__init__.py +60 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/atomic_gaussian.py +66 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/descriptor_handler_shape.py +108 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/descriptor_handler_shape_one_conf.py +36 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/gaussian_3d.py +148 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/molecular_volume.py +76 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/pharmacophore/__init__.py +21 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/pharmacophore/pharmacophore_calculator.py +52 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/pharmacophore/pp/__init__.py +26 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/pharmacophore/pp/i_pharmacophore_point.py +37 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/pharmacophore/pp/pp_gaussian.py +199 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/phesa_molecule.py +59 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/shape_volume.py +119 -0
- pyocl_idor-0.8.2/pyocl/chem/phesa/volume_gaussian.py +30 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/__init__.py +46 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/clogp_predictor.py +33 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/druglikeness_predictor_with_index.py +64 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/molecular_shape_calculator.py +32 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/solubility_predictor.py +34 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/total_surface_area_predictor.py +74 -0
- pyocl_idor-0.8.2/pyocl/chem/prediction/toxicity_predictor.py +56 -0
- pyocl_idor-0.8.2/pyocl/chem/reaction/__init__.py +41 -0
- pyocl_idor-0.8.2/pyocl/chem/reaction/mcs_reaction_mapper.py +72 -0
- pyocl_idor-0.8.2/pyocl/chem/reaction/molecule_auto_mapper.py +56 -0
- pyocl_idor-0.8.2/pyocl/chem/reaction/reaction.py +244 -0
- pyocl_idor-0.8.2/pyocl/chem/reaction/reaction_encoder.py +187 -0
- pyocl_idor-0.8.2/pyocl/chem/reaction/reactor.py +147 -0
- pyocl_idor-0.8.2/pyocl/chem/scaffold_helper.py +49 -0
- pyocl_idor-0.8.2/pyocl/chem/sssearcher.py +194 -0
- pyocl_idor-0.8.2/pyocl/chem/sssearcher_with_index.py +101 -0
- pyocl_idor-0.8.2/pyocl/chem/stereo_molecule.py +618 -0
- pyocl_idor-0.8.2/pyocl/convert.py +538 -0
- pyocl_idor-0.8.2/pyocl/docking.py +41 -0
- pyocl_idor-0.8.2/pyocl/java/CustomObjectInputStream.class +0 -0
- pyocl_idor-0.8.2/pyocl/java/CustomObjectInputStream.java +21 -0
- pyocl_idor-0.8.2/pyocl/java/ParallelSimilaritySearch$Query.class +0 -0
- pyocl_idor-0.8.2/pyocl/java/ParallelSimilaritySearch$Result.class +0 -0
- pyocl_idor-0.8.2/pyocl/java/ParallelSimilaritySearch.class +0 -0
- pyocl_idor-0.8.2/pyocl/java/ParallelSimilaritySearch.java +118 -0
- pyocl_idor-0.8.2/pyocl/lib/openchemlib-2026.2.1.jar +0 -0
- pyocl_idor-0.8.2/pyocl/phesa.py +60 -0
- pyocl_idor-0.8.2/pyocl/util/__init__.py +16 -0
- pyocl_idor-0.8.2/pyocl/util/chem.py +50 -0
- pyocl_idor-0.8.2/pyocl/util/exceptions.py +3 -0
- pyocl_idor-0.8.2/pyocl/util/io.py +21 -0
- pyocl_idor-0.8.2/pyocl/util/java.py +148 -0
- pyocl_idor-0.8.2/pyocl/util/surface_area.py +182 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/PKG-INFO +102 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/SOURCES.txt +150 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/dependency_links.txt +1 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/not-zip-safe +1 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/requires.txt +2 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/scm_file_list.json +145 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/scm_version.json +8 -0
- pyocl_idor-0.8.2/pyocl_idor.egg-info/top_level.txt +1 -0
- pyocl_idor-0.8.2/pyproject.toml +34 -0
- pyocl_idor-0.8.2/requirements.txt +4 -0
- pyocl_idor-0.8.2/setup.cfg +4 -0
- pyocl_idor-0.8.2/tests/__init__.py +0 -0
- pyocl_idor-0.8.2/tests/chem/__init__.py +0 -0
- pyocl_idor-0.8.2/tests/chem/conf/__init__.py +0 -0
- pyocl_idor-0.8.2/tests/chem/conf/gen/__init__.py +0 -0
- pyocl_idor-0.8.2/tests/chem/conf/gen/test_conformer_generator.py +54 -0
- pyocl_idor-0.8.2/tests/chem/conf/test_conformer.py +151 -0
- pyocl_idor-0.8.2/tests/chem/conf/test_conformer_set.py +27 -0
- pyocl_idor-0.8.2/tests/chem/conf/test_conformer_set_generator.py +29 -0
- pyocl_idor-0.8.2/tests/chem/reaction/__init__.py +0 -0
- pyocl_idor-0.8.2/tests/chem/reaction/test_reaction.py +185 -0
- pyocl_idor-0.8.2/tests/chem/test_stereomolecule.py +493 -0
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
name: CI and PyPI release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: ["**"]
|
|
6
|
+
tags: ["v*"]
|
|
7
|
+
pull_request:
|
|
8
|
+
workflow_dispatch:
|
|
9
|
+
|
|
10
|
+
permissions:
|
|
11
|
+
contents: read
|
|
12
|
+
|
|
13
|
+
jobs:
|
|
14
|
+
build:
|
|
15
|
+
name: Build and validate distributions
|
|
16
|
+
runs-on: ubuntu-latest
|
|
17
|
+
steps:
|
|
18
|
+
- uses: actions/checkout@v7.0.1
|
|
19
|
+
with:
|
|
20
|
+
fetch-depth: 0
|
|
21
|
+
persist-credentials: false
|
|
22
|
+
- uses: actions/setup-python@v7.0.0
|
|
23
|
+
with:
|
|
24
|
+
python-version: "3.12"
|
|
25
|
+
- name: Install build tools
|
|
26
|
+
run: python -m pip install build twine
|
|
27
|
+
- name: Build wheel and source distribution
|
|
28
|
+
run: python -m build
|
|
29
|
+
- name: Validate package metadata
|
|
30
|
+
run: python -m twine check --strict dist/*
|
|
31
|
+
- name: Check bundled Java files and release version
|
|
32
|
+
env:
|
|
33
|
+
IS_RELEASE: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v') }}
|
|
34
|
+
RELEASE_TAG: ${{ github.ref_name }}
|
|
35
|
+
run: |
|
|
36
|
+
python - <<'PY'
|
|
37
|
+
from email.parser import Parser
|
|
38
|
+
import os
|
|
39
|
+
from pathlib import Path
|
|
40
|
+
from packaging.version import Version
|
|
41
|
+
from zipfile import ZipFile
|
|
42
|
+
|
|
43
|
+
wheel, = Path("dist").glob("*.whl")
|
|
44
|
+
with ZipFile(wheel) as archive:
|
|
45
|
+
names = archive.namelist()
|
|
46
|
+
required = {
|
|
47
|
+
"pyocl/lib/openchemlib-2026.2.1.jar",
|
|
48
|
+
"pyocl/java/CustomObjectInputStream.class",
|
|
49
|
+
"pyocl/java/ParallelSimilaritySearch.class",
|
|
50
|
+
"pyocl/java/ParallelSimilaritySearch$Query.class",
|
|
51
|
+
"pyocl/java/ParallelSimilaritySearch$Result.class",
|
|
52
|
+
}
|
|
53
|
+
missing = required.difference(names)
|
|
54
|
+
if missing:
|
|
55
|
+
raise SystemExit(f"Missing Java files: {sorted(missing)}")
|
|
56
|
+
bundled_jars = {name for name in names if name.endswith(".jar")}
|
|
57
|
+
if bundled_jars != {"pyocl/lib/openchemlib-2026.2.1.jar"}:
|
|
58
|
+
raise SystemExit(f"Unexpected bundled JARs: {sorted(bundled_jars)}")
|
|
59
|
+
metadata_file, = [name for name in names if name.endswith(".dist-info/METADATA")]
|
|
60
|
+
metadata = Parser().parsestr(archive.read(metadata_file).decode())
|
|
61
|
+
version = Version(metadata["Version"])
|
|
62
|
+
|
|
63
|
+
if os.environ["IS_RELEASE"] == "true":
|
|
64
|
+
expected = Version(os.environ["RELEASE_TAG"][1:])
|
|
65
|
+
if expected.local is not None or expected.is_devrelease:
|
|
66
|
+
raise SystemExit("Release tags must use a public release version")
|
|
67
|
+
if version != expected:
|
|
68
|
+
raise SystemExit(f"Built version {version} does not match tag {expected}")
|
|
69
|
+
print(f"Validated {metadata['Name']} {version}")
|
|
70
|
+
PY
|
|
71
|
+
- uses: actions/upload-artifact@v7.0.2
|
|
72
|
+
with:
|
|
73
|
+
name: distributions
|
|
74
|
+
path: dist/*
|
|
75
|
+
if-no-files-found: error
|
|
76
|
+
|
|
77
|
+
test:
|
|
78
|
+
name: Test wheel (${{ matrix.os }}, Python ${{ matrix.python }})
|
|
79
|
+
needs: build
|
|
80
|
+
runs-on: ${{ matrix.os }}
|
|
81
|
+
strategy:
|
|
82
|
+
fail-fast: false
|
|
83
|
+
matrix:
|
|
84
|
+
os: [ubuntu-latest, windows-latest, macos-latest]
|
|
85
|
+
python: ["3.10", "3.12"]
|
|
86
|
+
steps:
|
|
87
|
+
- uses: actions/checkout@v7.0.1
|
|
88
|
+
with:
|
|
89
|
+
persist-credentials: false
|
|
90
|
+
- uses: actions/setup-python@v7.0.0
|
|
91
|
+
with:
|
|
92
|
+
python-version: ${{ matrix.python }}
|
|
93
|
+
- uses: actions/setup-java@v6.0.1
|
|
94
|
+
with:
|
|
95
|
+
distribution: temurin
|
|
96
|
+
java-version: "21"
|
|
97
|
+
- uses: actions/download-artifact@v8.0.1
|
|
98
|
+
with:
|
|
99
|
+
name: distributions
|
|
100
|
+
path: dist
|
|
101
|
+
- name: Install built wheel and test dependencies
|
|
102
|
+
shell: bash
|
|
103
|
+
run: python -m pip install dist/*.whl pytest
|
|
104
|
+
- name: Test installed package outside the checkout
|
|
105
|
+
working-directory: ${{ runner.temp }}
|
|
106
|
+
shell: bash
|
|
107
|
+
run: python -m pytest --import-mode=importlib "$GITHUB_WORKSPACE/tests" -q
|
|
108
|
+
|
|
109
|
+
publish:
|
|
110
|
+
name: Publish to PyPI
|
|
111
|
+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
|
|
112
|
+
needs: [build, test]
|
|
113
|
+
runs-on: ubuntu-latest
|
|
114
|
+
environment:
|
|
115
|
+
name: pypi
|
|
116
|
+
url: https://pypi.org/project/pyocl-idor/
|
|
117
|
+
permissions:
|
|
118
|
+
id-token: write
|
|
119
|
+
concurrency:
|
|
120
|
+
group: pypi-${{ github.ref }}
|
|
121
|
+
cancel-in-progress: false
|
|
122
|
+
steps:
|
|
123
|
+
- uses: actions/download-artifact@v8.0.1
|
|
124
|
+
with:
|
|
125
|
+
name: distributions
|
|
126
|
+
path: dist
|
|
127
|
+
- uses: pypa/gh-action-pypi-publish@v1.14.2
|
pyocl_idor-0.8.2/LICENSE
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Copyright (c) 1997 - 2016
|
|
3
|
+
* Actelion Pharmaceuticals Ltd.
|
|
4
|
+
* Gewerbestrasse 16
|
|
5
|
+
* CH-4123 Allschwil, Switzerland
|
|
6
|
+
*
|
|
7
|
+
* All rights reserved.
|
|
8
|
+
*
|
|
9
|
+
* Redistribution and use in source and binary forms, with or without
|
|
10
|
+
* modification, are permitted provided that the following conditions are met:
|
|
11
|
+
*
|
|
12
|
+
* 1. Redistributions of source code must retain the above copyright notice, this
|
|
13
|
+
* list of conditions and the following disclaimer.
|
|
14
|
+
* 2. Redistributions in binary form must reproduce the above copyright notice,
|
|
15
|
+
* this list of conditions and the following disclaimer in the documentation
|
|
16
|
+
* and/or other materials provided with the distribution.
|
|
17
|
+
* 3. Neither the name of the the copyright holder nor the
|
|
18
|
+
* names of its contributors may be used to endorse or promote products
|
|
19
|
+
* derived from this software without specific prior written permission.
|
|
20
|
+
*
|
|
21
|
+
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
|
22
|
+
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
|
23
|
+
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
|
24
|
+
* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
|
25
|
+
* ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
|
26
|
+
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
|
27
|
+
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
|
28
|
+
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
29
|
+
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
|
30
|
+
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
31
|
+
*
|
|
32
|
+
*/
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pyocl-idor
|
|
3
|
+
Version: 0.8.2
|
|
4
|
+
Summary: OpenChemLib via python
|
|
5
|
+
Author-email: Julien Hazemann <julien.hazemann@idorsia.com>, Manuel Sellner <manuel.sellner@idorsia.com>, Thomas Liphardt <thomas.liphardt@idorsia.com>
|
|
6
|
+
Requires-Python: >=3.10
|
|
7
|
+
Description-Content-Type: text/markdown
|
|
8
|
+
License-File: LICENSE
|
|
9
|
+
Requires-Dist: jpype1>=1.5.1
|
|
10
|
+
Requires-Dist: numba>=0.61.0
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# PyOCL
|
|
14
|
+
|
|
15
|
+
## Description
|
|
16
|
+
|
|
17
|
+
The PyOCL (Python OpenChemLib) is a python wrapper for the Java-based [OpenChemLib](https://github.com/Actelion/openchemlib).
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
## Prerequisites
|
|
21
|
+
|
|
22
|
+
Environment variable ```JAVA_HOME``` must point to a Java 21 or newer runtime.
|
|
23
|
+
The bundled PyOCL helper classes require Java 21. E.g.
|
|
24
|
+
```bash
|
|
25
|
+
export JAVA_HOME=/path/to/jdk-21
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Dependencies
|
|
29
|
+
|
|
30
|
+
Some functionalities of PyOCL require RDKit or pandas to be installed (conversion between OCL StereoMolecules and RDKit molecules, conversion between DataWarrior dwar files and pandas dataframes).
|
|
31
|
+
If you need these functionalities, you have to install RDKit and/or pandas separately:
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install pandas==2.2.3
|
|
35
|
+
pip install rdkit==2024.3.6
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Installation
|
|
39
|
+
|
|
40
|
+
1. Generate and activate virtual environment:
|
|
41
|
+
```bash
|
|
42
|
+
# Conda
|
|
43
|
+
conda create -n pyocl python=3.10
|
|
44
|
+
conda activate pyocl
|
|
45
|
+
|
|
46
|
+
# Python venv
|
|
47
|
+
python -m venv venv
|
|
48
|
+
. venv/bin/activate # Command for Linux
|
|
49
|
+
.\venv\Scripts\activate # Command for Windows
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
2. Install PyOCL:
|
|
53
|
+
```bash
|
|
54
|
+
# From PyPI
|
|
55
|
+
python -m pip install pyocl-idor
|
|
56
|
+
|
|
57
|
+
# From cloned repository
|
|
58
|
+
git clone https://github.com/actelion/pyocl.git
|
|
59
|
+
python -m pip install pyocl/
|
|
60
|
+
|
|
61
|
+
# Directly from GitHub with pip
|
|
62
|
+
python -m pip install git+https://github.com/actelion/pyocl.git
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
The PyPI distribution is named `pyocl-idor`; Python imports use `pyocl`, for
|
|
66
|
+
example `from pyocl.chem import StereoMolecule`.
|
|
67
|
+
|
|
68
|
+
## Documentation
|
|
69
|
+
|
|
70
|
+
You can build a local version of the full PyOCL documentation:
|
|
71
|
+
|
|
72
|
+
```bash
|
|
73
|
+
# Create environment and install dependencies
|
|
74
|
+
conda create -n pyocl python=3.10
|
|
75
|
+
conda activate pyocl
|
|
76
|
+
git clone https://github.com/actelion/pyocl.git
|
|
77
|
+
python -m pip install pyocl/ sphinx==8.1.3 sphinx-rtd-theme==3.0.2 pandas==2.2.3 rdkit==2024.3.6
|
|
78
|
+
|
|
79
|
+
# Build documentation
|
|
80
|
+
cd pyocl/docs/
|
|
81
|
+
sphinx-apidoc -o . ../pyocl
|
|
82
|
+
make html # Command for Linux
|
|
83
|
+
.\make.bat html # Command for Windows
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
This creates the directory `docs/_build/html` in which you can find a file called `index.html`. You can open this file in your browser to access the documentation.
|
|
87
|
+
|
|
88
|
+
This package also contains tutorials about specific functionalities of PyOCL. While they are covered in the html version of the documentation, there is also a **Python script** and a **Jupyter notebook** for each of the tutorials. These files can be found in `docs/tutorials`.
|
|
89
|
+
|
|
90
|
+
## CI and PyPI releases
|
|
91
|
+
|
|
92
|
+
The GitHub Actions workflow in `.github/workflows/release.yml` builds a wheel and
|
|
93
|
+
source distribution on branch pushes and pull requests. It checks package
|
|
94
|
+
metadata and bundled Java files, then tests the installed wheel on Linux,
|
|
95
|
+
Windows, and macOS with Python 3.10 and 3.12 and Java 21. The Java setup action
|
|
96
|
+
sets `JAVA_HOME` and adds Java to `PATH` in every test job.
|
|
97
|
+
|
|
98
|
+
Pushing a version tag such as `v0.8.2` also publishes the tested distributions to
|
|
99
|
+
PyPI under the distribution name `pyocl-idor`. Branch pushes, pull requests, and
|
|
100
|
+
manual workflow runs run the checks
|
|
101
|
+
without publishing. Versions are derived from Git tags by `setuptools_scm`;
|
|
102
|
+
the release build must match the pushed tag.
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
# PyOCL
|
|
2
|
+
|
|
3
|
+
## Description
|
|
4
|
+
|
|
5
|
+
The PyOCL (Python OpenChemLib) is a python wrapper for the Java-based [OpenChemLib](https://github.com/Actelion/openchemlib).
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
## Prerequisites
|
|
9
|
+
|
|
10
|
+
Environment variable ```JAVA_HOME``` must point to a Java 21 or newer runtime.
|
|
11
|
+
The bundled PyOCL helper classes require Java 21. E.g.
|
|
12
|
+
```bash
|
|
13
|
+
export JAVA_HOME=/path/to/jdk-21
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
## Dependencies
|
|
17
|
+
|
|
18
|
+
Some functionalities of PyOCL require RDKit or pandas to be installed (conversion between OCL StereoMolecules and RDKit molecules, conversion between DataWarrior dwar files and pandas dataframes).
|
|
19
|
+
If you need these functionalities, you have to install RDKit and/or pandas separately:
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
pip install pandas==2.2.3
|
|
23
|
+
pip install rdkit==2024.3.6
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Installation
|
|
27
|
+
|
|
28
|
+
1. Generate and activate virtual environment:
|
|
29
|
+
```bash
|
|
30
|
+
# Conda
|
|
31
|
+
conda create -n pyocl python=3.10
|
|
32
|
+
conda activate pyocl
|
|
33
|
+
|
|
34
|
+
# Python venv
|
|
35
|
+
python -m venv venv
|
|
36
|
+
. venv/bin/activate # Command for Linux
|
|
37
|
+
.\venv\Scripts\activate # Command for Windows
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
2. Install PyOCL:
|
|
41
|
+
```bash
|
|
42
|
+
# From PyPI
|
|
43
|
+
python -m pip install pyocl-idor
|
|
44
|
+
|
|
45
|
+
# From cloned repository
|
|
46
|
+
git clone https://github.com/actelion/pyocl.git
|
|
47
|
+
python -m pip install pyocl/
|
|
48
|
+
|
|
49
|
+
# Directly from GitHub with pip
|
|
50
|
+
python -m pip install git+https://github.com/actelion/pyocl.git
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
The PyPI distribution is named `pyocl-idor`; Python imports use `pyocl`, for
|
|
54
|
+
example `from pyocl.chem import StereoMolecule`.
|
|
55
|
+
|
|
56
|
+
## Documentation
|
|
57
|
+
|
|
58
|
+
You can build a local version of the full PyOCL documentation:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Create environment and install dependencies
|
|
62
|
+
conda create -n pyocl python=3.10
|
|
63
|
+
conda activate pyocl
|
|
64
|
+
git clone https://github.com/actelion/pyocl.git
|
|
65
|
+
python -m pip install pyocl/ sphinx==8.1.3 sphinx-rtd-theme==3.0.2 pandas==2.2.3 rdkit==2024.3.6
|
|
66
|
+
|
|
67
|
+
# Build documentation
|
|
68
|
+
cd pyocl/docs/
|
|
69
|
+
sphinx-apidoc -o . ../pyocl
|
|
70
|
+
make html # Command for Linux
|
|
71
|
+
.\make.bat html # Command for Windows
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This creates the directory `docs/_build/html` in which you can find a file called `index.html`. You can open this file in your browser to access the documentation.
|
|
75
|
+
|
|
76
|
+
This package also contains tutorials about specific functionalities of PyOCL. While they are covered in the html version of the documentation, there is also a **Python script** and a **Jupyter notebook** for each of the tutorials. These files can be found in `docs/tutorials`.
|
|
77
|
+
|
|
78
|
+
## CI and PyPI releases
|
|
79
|
+
|
|
80
|
+
The GitHub Actions workflow in `.github/workflows/release.yml` builds a wheel and
|
|
81
|
+
source distribution on branch pushes and pull requests. It checks package
|
|
82
|
+
metadata and bundled Java files, then tests the installed wheel on Linux,
|
|
83
|
+
Windows, and macOS with Python 3.10 and 3.12 and Java 21. The Java setup action
|
|
84
|
+
sets `JAVA_HOME` and adds Java to `PATH` in every test job.
|
|
85
|
+
|
|
86
|
+
Pushing a version tag such as `v0.8.2` also publishes the tested distributions to
|
|
87
|
+
PyPI under the distribution name `pyocl-idor`. Branch pushes, pull requests, and
|
|
88
|
+
manual workflow runs run the checks
|
|
89
|
+
without publishing. Versions are derived from Git tags by `setuptools_scm`;
|
|
90
|
+
the release build must match the pushed tag.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
# Minimal makefile for Sphinx documentation
|
|
2
|
+
#
|
|
3
|
+
|
|
4
|
+
# You can set these variables from the command line, and also
|
|
5
|
+
# from the environment for the first two.
|
|
6
|
+
SPHINXOPTS ?=
|
|
7
|
+
SPHINXBUILD ?= sphinx-build
|
|
8
|
+
SOURCEDIR = .
|
|
9
|
+
BUILDDIR = _build
|
|
10
|
+
|
|
11
|
+
# Put it first so that "make" without argument is like "make help".
|
|
12
|
+
help:
|
|
13
|
+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
14
|
+
|
|
15
|
+
.PHONY: help Makefile
|
|
16
|
+
|
|
17
|
+
# Catch-all target: route all unknown targets to Sphinx using the new
|
|
18
|
+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
|
|
19
|
+
%: Makefile
|
|
20
|
+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
|
|
File without changes
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# Configuration file for the Sphinx documentation builder.
|
|
2
|
+
#
|
|
3
|
+
# For the full list of built-in configuration values, see the documentation:
|
|
4
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html
|
|
5
|
+
|
|
6
|
+
# -- Project information -----------------------------------------------------
|
|
7
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
|
|
8
|
+
|
|
9
|
+
import os
|
|
10
|
+
import sys
|
|
11
|
+
sys.path.insert(0, os.path.abspath('../pyocl'))
|
|
12
|
+
|
|
13
|
+
project = 'PyOCL'
|
|
14
|
+
copyright = '2024, Julien Hazemann, Thomas Liphardt, Manuel Sellner'
|
|
15
|
+
author = 'Julien Hazemann, Thomas Liphardt, Manuel Sellner'
|
|
16
|
+
|
|
17
|
+
# -- General configuration ---------------------------------------------------
|
|
18
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
|
|
19
|
+
|
|
20
|
+
extensions = [
|
|
21
|
+
"sphinx.ext.autodoc",
|
|
22
|
+
"sphinx.ext.viewcode",
|
|
23
|
+
]
|
|
24
|
+
|
|
25
|
+
templates_path = ['_templates']
|
|
26
|
+
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
|
|
27
|
+
|
|
28
|
+
language = "EN"
|
|
29
|
+
|
|
30
|
+
pygments_style = "default"
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
# -- Options for HTML output -------------------------------------------------
|
|
35
|
+
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
|
|
36
|
+
|
|
37
|
+
html_theme = 'sphinx_rtd_theme'
|
|
38
|
+
html_static_path = ['_static']
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
Getting Started
|
|
2
|
+
===============
|
|
3
|
+
|
|
4
|
+
This page details how to use PyOCL.
|
|
5
|
+
|
|
6
|
+
Installation
|
|
7
|
+
------------
|
|
8
|
+
|
|
9
|
+
You can install PyOCL either from pip or from GitHub:
|
|
10
|
+
|
|
11
|
+
.. code:: bash
|
|
12
|
+
|
|
13
|
+
# Install with pip
|
|
14
|
+
python -m pip install pyocl-idor
|
|
15
|
+
|
|
16
|
+
# Install from GitHub
|
|
17
|
+
python -m pip install git+https://github.com/idorsia/pyocl.git
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
.. PyOCL documentation master file, created by
|
|
2
|
+
sphinx-quickstart on Fri Nov 15 17:30:00 2024.
|
|
3
|
+
You can adapt this file completely to your liking, but it should at least
|
|
4
|
+
contain the root `toctree` directive.
|
|
5
|
+
|
|
6
|
+
PyOCL documentation
|
|
7
|
+
===================
|
|
8
|
+
|
|
9
|
+
PyOCL is a Python library that provides seamless access to the powerful cheminformatics capabilities of the Java-based OpenChemLib.
|
|
10
|
+
By wrapping OpenChemLib's Java classes, this project enables Python developers to leverage advanced chemical structure representation,
|
|
11
|
+
manipulation, and analysis tools directly within their Python workflows. The integration bridges the gap between Java's robust
|
|
12
|
+
cheminformatics ecosystem and Python's versatile data science and machine learning stack, making it an ideal tool for researchers,
|
|
13
|
+
chemists, and developers in computational chemistry and related fields.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
.. toctree::
|
|
17
|
+
:maxdepth: 2
|
|
18
|
+
:caption: Contents:
|
|
19
|
+
|
|
20
|
+
getting_started
|
|
21
|
+
tutorials
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
.. toctree::
|
|
25
|
+
:maxdepth: 3
|
|
26
|
+
|
|
27
|
+
modules
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
Indices and Tables
|
|
31
|
+
==================
|
|
32
|
+
|
|
33
|
+
* :ref:`genindex`
|
|
34
|
+
* :ref:`modindex`
|
|
35
|
+
* :ref:`search`
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
@ECHO OFF
|
|
2
|
+
|
|
3
|
+
pushd %~dp0
|
|
4
|
+
|
|
5
|
+
REM Command file for Sphinx documentation
|
|
6
|
+
|
|
7
|
+
if "%SPHINXBUILD%" == "" (
|
|
8
|
+
set SPHINXBUILD=sphinx-build
|
|
9
|
+
)
|
|
10
|
+
set SOURCEDIR=.
|
|
11
|
+
set BUILDDIR=_build
|
|
12
|
+
|
|
13
|
+
%SPHINXBUILD% >NUL 2>NUL
|
|
14
|
+
if errorlevel 9009 (
|
|
15
|
+
echo.
|
|
16
|
+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
|
|
17
|
+
echo.installed, then set the SPHINXBUILD environment variable to point
|
|
18
|
+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
|
|
19
|
+
echo.may add the Sphinx directory to PATH.
|
|
20
|
+
echo.
|
|
21
|
+
echo.If you don't have Sphinx installed, grab it from
|
|
22
|
+
echo.https://www.sphinx-doc.org/
|
|
23
|
+
exit /b 1
|
|
24
|
+
)
|
|
25
|
+
|
|
26
|
+
if "%1" == "" goto help
|
|
27
|
+
|
|
28
|
+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
29
|
+
goto end
|
|
30
|
+
|
|
31
|
+
:help
|
|
32
|
+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
|
|
33
|
+
|
|
34
|
+
:end
|
|
35
|
+
popd
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "code",
|
|
5
|
+
"execution_count": 1,
|
|
6
|
+
"metadata": {},
|
|
7
|
+
"outputs": [],
|
|
8
|
+
"source": [
|
|
9
|
+
"import pyocl\n",
|
|
10
|
+
"from pyocl.chem.conf import ConformerSetGenerator\n",
|
|
11
|
+
"\n",
|
|
12
|
+
"\n",
|
|
13
|
+
"daridorexant = pyocl.convert.smiles_to_stereo_molecule(\"CC1=C(C=CC2=C1N=C(N2)[C@@]3(CCCN3C(=O)C4=C(C=CC(=C4)OC)N5N=CC=N5)C)Cl\")"
|
|
14
|
+
]
|
|
15
|
+
},
|
|
16
|
+
{
|
|
17
|
+
"cell_type": "code",
|
|
18
|
+
"execution_count": 2,
|
|
19
|
+
"metadata": {},
|
|
20
|
+
"outputs": [],
|
|
21
|
+
"source": [
|
|
22
|
+
"confgen = ConformerSetGenerator(max_nr_confs=200)"
|
|
23
|
+
]
|
|
24
|
+
},
|
|
25
|
+
{
|
|
26
|
+
"cell_type": "code",
|
|
27
|
+
"execution_count": 3,
|
|
28
|
+
"metadata": {},
|
|
29
|
+
"outputs": [
|
|
30
|
+
{
|
|
31
|
+
"name": "stdout",
|
|
32
|
+
"output_type": "stream",
|
|
33
|
+
"text": [
|
|
34
|
+
"181\n"
|
|
35
|
+
]
|
|
36
|
+
}
|
|
37
|
+
],
|
|
38
|
+
"source": [
|
|
39
|
+
"conformer_set = confgen.generate_conformer_set(daridorexant)\n",
|
|
40
|
+
"print(len(conformer_set))"
|
|
41
|
+
]
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
"cell_type": "code",
|
|
45
|
+
"execution_count": 4,
|
|
46
|
+
"metadata": {},
|
|
47
|
+
"outputs": [
|
|
48
|
+
{
|
|
49
|
+
"name": "stdout",
|
|
50
|
+
"output_type": "stream",
|
|
51
|
+
"text": [
|
|
52
|
+
"0.00038681084215447145\n"
|
|
53
|
+
]
|
|
54
|
+
}
|
|
55
|
+
],
|
|
56
|
+
"source": [
|
|
57
|
+
"most_likely_conformers = conformer_set.sort_by_likelihood()[:100]\n",
|
|
58
|
+
"highest_likelihood = most_likely_conformers[0].get_likelihood()\n",
|
|
59
|
+
"print(highest_likelihood)"
|
|
60
|
+
]
|
|
61
|
+
}
|
|
62
|
+
],
|
|
63
|
+
"metadata": {
|
|
64
|
+
"kernelspec": {
|
|
65
|
+
"display_name": "venv",
|
|
66
|
+
"language": "python",
|
|
67
|
+
"name": "python3"
|
|
68
|
+
},
|
|
69
|
+
"language_info": {
|
|
70
|
+
"codemirror_mode": {
|
|
71
|
+
"name": "ipython",
|
|
72
|
+
"version": 3
|
|
73
|
+
},
|
|
74
|
+
"file_extension": ".py",
|
|
75
|
+
"mimetype": "text/x-python",
|
|
76
|
+
"name": "python",
|
|
77
|
+
"nbconvert_exporter": "python",
|
|
78
|
+
"pygments_lexer": "ipython3",
|
|
79
|
+
"version": "3.10.9"
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
"nbformat": 4,
|
|
83
|
+
"nbformat_minor": 2
|
|
84
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import pyocl
|
|
2
|
+
from pyocl.chem.conf import ConformerSetGenerator
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
# Define molecule to create conformers for
|
|
6
|
+
daridorexant = pyocl.convert.smiles_to_stereo_molecule("CC1=C(C=CC2=C1N=C(N2)[C@@]3(CCCN3C(=O)C4=C(C=CC(=C4)OC)N5N=CC=N5)C)Cl")
|
|
7
|
+
|
|
8
|
+
# Initialize conformer set generator
|
|
9
|
+
confgen = ConformerSetGenerator(max_nr_confs=200)
|
|
10
|
+
|
|
11
|
+
# Generate set of conformers
|
|
12
|
+
conformer_set = confgen.generate_conformer_set(daridorexant)
|
|
13
|
+
print(len(conformer_set))
|
|
14
|
+
|
|
15
|
+
# Sort by highest likelihood and get 100 most likely conformers
|
|
16
|
+
most_likely_conformers = conformer_set.sort_by_likelihood()[:100]
|
|
17
|
+
highest_likelihood = most_likely_conformers[0].get_likelihood()
|
|
18
|
+
print(highest_likelihood)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
Conformer Generation
|
|
2
|
+
====================
|
|
3
|
+
|
|
4
|
+
This tutorial explains how to generate conformers for a given molecule.
|
|
5
|
+
|
|
6
|
+
First, let's define the molecule we want to generate conformers for. We will do that using a SMILES string.
|
|
7
|
+
|
|
8
|
+
.. code-block:: python
|
|
9
|
+
|
|
10
|
+
import pyocl
|
|
11
|
+
from pyocl.chem.conf import ConformerSetGenerator
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
daridorexant = pyocl.convert.smiles_to_stereo_molecule("CC1=C(C=CC2=C1N=C(N2)[C@@]3(CCCN3C(=O)C4=C(C=CC(=C4)OC)N5N=CC=N5)C)Cl")
|
|
15
|
+
|
|
16
|
+
Next, we need to initialize the conformer set generator. This is done by using the wrapper for the :code:`ConformerSetGenerator` class.
|
|
17
|
+
|
|
18
|
+
.. code-block:: python
|
|
19
|
+
|
|
20
|
+
confgen = ConformerSetGenerator(max_nr_confs=200)
|
|
21
|
+
|
|
22
|
+
Now we are ready to actually generate conformers for our molecule.
|
|
23
|
+
|
|
24
|
+
.. code-block:: python
|
|
25
|
+
|
|
26
|
+
conformer_set = confgen.generate_conformer_set(daridorexant)
|
|
27
|
+
|
|
28
|
+
The output is an instance of the :code:`ConformerSet` class which contains :code:`Conformer` objects and has all the functionalities of a normal python set.
|
|
29
|
+
|
|
30
|
+
.. code-block:: python
|
|
31
|
+
|
|
32
|
+
print(len(conformer_set))
|
|
33
|
+
|
|
34
|
+
Let's say we are only interested in the 100 most likely conformers.
|
|
35
|
+
|
|
36
|
+
.. code-block:: python
|
|
37
|
+
|
|
38
|
+
most_likely_conformers = conformer_set.sort_by_likelihood()[:100]
|
|
39
|
+
highest_likelihood = most_likely_conformers[0].get_likelihood()
|
|
40
|
+
print(highest_likelihood)
|
|
41
|
+
|
|
42
|
+
For more details, see the API documentation for :class:`pyocl.chem.conf.conformer_set_generator.ConformerSetGenerator`, :class:`pyocl.chem.conf.conformer_set.ConformerSet`, and :class:`pyocl.chem.conf.conformer.Conformer`.
|