https://github.com/bayer-group/xtbf

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

beat-undefined
Last synced: 7 months ago · JSON representation

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
beat-undefined
Created over 2 years ago · Last pushed about 1 year ago
Metadata Files
Readme Contributing License Codeowners

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

Science for a better life

GitHub Events

Total
  • Push event: 3
Last Year
  • Push event: 3

Committers

Last synced: 10 months ago

All Time
  • Total Commits: 28
  • Total Committers: 1
  • Avg Commits per committer: 28.0
  • Development Distribution Score (DDS): 0.0
Past Year
  • Commits: 3
  • Committers: 1
  • Avg Commits per committer: 3.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email 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

  • Versions: 3
  • Dependent Packages: 0
  • Dependent Repositories: 0
  • Downloads: 5 Last month
Rankings
Dependent packages count: 10.2%
Forks count: 29.8%
Average: 36.4%
Stargazers count: 38.8%
Dependent repos count: 67.0%
Maintainers (1)
Last synced: 7 months ago