Skip to main content

Java QEPest but written in Python

Project description

pythonQEPest

pythonQEPest PyPI Version

Python implementation of QEPest (Quantitative Estimation of Pesticide), a program for scoring molecules as herbicides (QEH), insecticides (QEI), and fungicides (QEF).

Originally published in: J Cheminform - QEPest Original Program Link is here

Features

  • Calculate pesticide scores for herbicidal, insecticidal, and fungicidal activity
  • Command-line interface (CLI)
  • Graphical User Interface (GUI)
  • Support for JSON and TXT output formats

Pre-built binaries

Download ready-to-use executables from Releases:

Platform Download
Windows CLI main.exe
Windows GUI gui.exe

Installation

pip install pythonQEPest

Or from source:

git clone https://github.com/PonyLianna/pythonQEPest.git
cd pythonQEPest
poetry install

With GUI support

pip install pythonQEPest[gui]
# or
poetry install --extras ui

Quick Start

CLI

pythonqepest -i data.txt -o result.txt
pythonqepest --input data.txt --format json
pythonqepest -v  # show version

GUI

pythonqepest-gui
# or
python -m pythonQEPest.gui.gui

Python API

from pythonQEPest import QEPest, QEPestInput

# Create input data
qepest = QEPest()
qepest.initialize_coefficients()
qepest.initialize_normalisers()

# From individual values
inp = QEPestInput(
    name="mol1",
    mol_weight=240.2127,
    log_p=3.2392,
    hbond_acceptors=5,
    hbond_donors=1,
    rotatable_bonds=4,
    aromatic_rings=1
)

result = qepest.compute_params(inp)

print(result.name)       # mol1
print(result.data.qe_herb)   # 0.8511
print(result.data.qe_insect) # 0.5339
print(result.data.qe_fung)   # 0.6224

# Convert to array
print(result.to_array())  # ["mol1", 0.6224, 0.8511, 0.5339]

Input Format

The input file should be a tab-separated text file with the following columns:

Column Description
Name Molecule name
MW Molecular weight (g/mol)
LogP Hydrophobicity (octanol-water partition coefficient)
HBA Number of hydrogen bond acceptors
HBD Number of hydrogen bond donors
RB Number of rotatable bonds
arR Number of aromatic rings

Example data.txt:

Name	MW	LogP	HBA	HBD	RB	arR
mol1	240.2127	3.2392	5	1	4	1
mol2	249.091	3.0273	3	1	5	1
mol3	308.354	2.1086	1	0	7	1

Output Format

TXT (default output for CLI)

Name	QEF	QEH	QEI
mol1	0.6224	0.8511	0.5339
mol2	0.7310	0.9750	0.6913

JSON

[
  {"name": "mol1", "qe_fung": 0.6224, "qe_herb": 0.8511, "qe_insect": 0.5339},
  {"name": "mol2", "qe_fung": 0.731, "qe_herb": 0.975, "qe_insect": 0.6913}
]

Configuration

Custom Coefficients

from pythonQEPest import QEPest

custom_coefficients = {
    "herb": [
        (70.77, 283.0, 84.97, -1.185),
        (93.81, 3.077, 1.434, 0.6164),
        # ... 6 tuples total
    ],
    "insect": [...],
    "fung": [...]
}

qepest = QEPest(coefficients=custom_coefficients)

Custom Normalisers

from pythonQEPest import QEPest
from pythonQEPest.dto.normalisation.Normaliser import Normaliser

qepest = QEPest(normalisers={"herb": Normaliser(...), ...})

CLI Options

Option Description Default
-i, --input Input file path data.txt
-o, --output Output file path data.out.txt
-f, --format Output format (json, txt) txt
-v, --version Show version -

Development

Run tests

poetry run pytest

Build

# CLI executable
poetry run poe build-simple

# GUI executable
poetry run poe build-gui

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pythonqepest-2.0.0a4.tar.gz (19.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pythonqepest-2.0.0a4-py3-none-any.whl (34.8 kB view details)

Uploaded Python 3

File details

Details for the file pythonqepest-2.0.0a4.tar.gz.

File metadata

  • Download URL: pythonqepest-2.0.0a4.tar.gz
  • Upload date:
  • Size: 19.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pythonqepest-2.0.0a4.tar.gz
Algorithm Hash digest
SHA256 a4d887ab3ee79690448a168f08b1a51080c6dfe638e7b225b746c620f7c25f6f
MD5 1a40a1697451846665a95a1aea3cf4c4
BLAKE2b-256 d6aa955a472c85fd5cc25df5b3c0105c5d8378f1e4b25088102e4b98a28f0039

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythonqepest-2.0.0a4.tar.gz:

Publisher: python-publish.yml on PonyLianna/pythonQEPest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pythonqepest-2.0.0a4-py3-none-any.whl.

File metadata

  • Download URL: pythonqepest-2.0.0a4-py3-none-any.whl
  • Upload date:
  • Size: 34.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for pythonqepest-2.0.0a4-py3-none-any.whl
Algorithm Hash digest
SHA256 4dce478063d0a7c5b2c4440e7c570e152ece84ab0db12a4f68b477676fc835ed
MD5 a85dc956a54d75b28f61e8ad07b7e29c
BLAKE2b-256 470b27755ef5b6746413fe9f10fddb9bef870f8b81062d8e031a923567006681

See more details on using hashes here.

Provenance

The following attestation bundles were made for pythonqepest-2.0.0a4-py3-none-any.whl:

Publisher: python-publish.yml on PonyLianna/pythonQEPest

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page