https://github.com/bayer-group/xtbf
Science Score: 49.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
✓DOI references
Found 1 DOI reference(s) in README -
✓Academic publication links
Links to: wiley.com -
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (11.2%) to scientific vocabulary
Keywords
Repository
Basic Info
- Host: GitHub
- Owner: Bayer-Group
- License: bsd-3-clause
- Language: Python
- Default Branch: main
- Size: 648 KB
Statistics
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 0
- Releases: 0
Topics
Metadata Files
README.md
xtbf
A minimal, functional interface to the semiempirical extended tight-binding (xtb) program package (https://github.com/grimme-lab/xtb).
For a read on the theoretical background and applicability of the method, see https://wires.onlinelibrary.wiley.com/doi/full/10.1002/wcms.1493.
The goal is to make it easy to produce physical descriptors to feed those into machine learning models as informative features.
Two examples of it's usefulness:
#1 Example: Octanol / Water Partitioning Coefficients
With the high-level functionality exposed by xtbf, the water/octanol partitioning coefficient can be computed within below 20 lines of code: ```python from xtbf import runxtb from xtbf.parsers import totalenergy
def xtblogpow(mol) -> float: """ Computes the octanol/water partitioning coefficient logPow or None in case any computation fails. Takes an rdkit molecule as input. """ ensuccess, enwater = runxtb("--alpb water",mol,1) if not ensuccess: return None enwater = totalenergy(enwater) ensuccess, enoctanol = runxtb("--alpb octanol",mol,1) if not ensuccess: return None enoctanol = totalenergy(en_octanol)
en_delta = en_water - en_octanol
k = 3.166811563E-6
T = 298
return - np.log10( np.e ** ( - en_delta / (k * T)) )
``` and already gives good qualitative results:

using the following code to evaluate: ```python from smal.all import * import seaborn as sns
datalogp = pd.DataFrame([ {"iupac": "acetamide", "logp": -1.16,}, {"iupac": "methanol", "logp": -0.81,}, {"iupac": "formic acid", "logp": -0.41,}, {"iupac": "diethylether", "logp": 0.83,}, {"iupac": "p-dichlorobenzene", "logp": 3.37,}, {"iupac": "hexamethylbenzene", "logp": 4.61,}, {"iupac": "2,2',4,4',5-Pentachlorobiphenyl", "logp": 6.41,}, ]) # source https://en.wikipedia.org/wiki/Partitioncoefficient
datalogp["smiles"] = datalogp["iupac"].apply(iupactosmiles) datalogp["mol"] = datalogp["smiles"].apply(fromsmi) datalogp["predlogp"] = datalogp["mol"].apply(xtblogp) sns.scatterplot( data=datalogp, x="pred_logp", y="logp", ) ```
#2 Example: Partial Charges
The following example shows how to compute partial charges: ```python >>> from xtbf import * >>> from xtbf.shortcuts import * >>> mol = Chem.MolFromSmiles("NCCCO") >>> mol = embedmolecule(mol) >>> addxtbcharges(mol) True >>> for atm in mol.GetAtoms(): ... print(atm.GetSymbol(),"<>",atm.GetDoubleProp('xtbpartial_charge')) N <> -0.343 C <> 0.021 C <> -0.074 C <> 0.075 O <> -0.442 H <> 0.138 H <> 0.137 H <> 0.007 H <> 0.035 H <> 0.034 H <> 0.043 H <> 0.049 H <> 0.036 H <> 0.284
```
Getting Started
Installation is possible via pip
bash
pip install xtbf
To run XTB-related functionality, XTB needs to be installed from:
https://github.com/grimme-lab/xtb/releases
or alternatively via conda:
conda install -c conda-forge xtb
(see here: https://anaconda.org/conda-forge/xtb)
To run the iupac-to-smiles conversion, opsin needs to be installed:
bash
conda install bioconda::opsin
Dependencies
You need to have the following minimal dependencies:
joblib, tqdm, numpy, pandas
aka:
pip install joblib
pip install tqdm
pip install numpy
pip install pandas
alternatively, run from make:
make install-deps
For documentation gen, pdoc needs to be installed:
pip install pdoc
Running Tests
make doctests
runs all doctests.
Documentation
Found in doc/ folder. Interactively generated using
make doc-show
Owner
- Name: Bayer Open Source
- Login: Bayer-Group
- Kind: organization
- Website: https://bayer.com/
- Repositories: 98
- Profile: https://github.com/Bayer-Group
Science for a better life
GitHub Events
Total
- Push event: 3
Last Year
- Push event: 3
Committers
Last synced: 10 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Jan Wollschlaeger | j****l@g****m | 28 |
Issues and Pull Requests
Last synced: 8 months ago
All Time
- Total issues: 0
- Total pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Total issue authors: 0
- Total pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
Pull Request Authors
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- pypi 5 last-month
- Total dependent packages: 0
- Total dependent repositories: 0
- Total versions: 3
- Total maintainers: 1
pypi.org: xtbf
A minimal, functional interface to the semiempirical extended tight-binding (xtb) program
- Homepage: https://github.com/Bayer-Group/xtbf
- Documentation: https://xtbf.readthedocs.io/
- License: BSD 3-clause
-
Latest release: 0.1.3
published almost 2 years ago