Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Knitwork

latest release

Refactor of FragmentKnitwork

Installation

Knitwork is published to PyPI as xchem-knitwork (the Python package is still imported as knitwork):

pip install xchem-knitwork

For development, install from a clone of the repository:

git clone https://github.com/xchem/Knitwork
cd Knitwork
pip install --user -e .

Testing

Tests use uv and the dev dependency group:

uv run --only-group dev pytest

Releasing

Releases are made by pushing a semantic version tag (with no v prefix), e.g. 1.2.0 or 1.2.0-rc.1. The package version is taken from the tag. The release workflow then publishes: -

  • The Python package to PyPI (using PyPI Trusted Publishing)
  • A Docker image to Docker Hub (as xchem/knitwork:<tag>)

Configuration

The configure command can be used to set variables that the package will use when running commands:

e.g.

python -m knitwork configure GRAPH_LOCATION XXXXX
python -m knitwork configure GRAPH_USERNAME XXXXX
python -m knitwork configure GRAPH_PASSWORD XXXXX

Running Fragment Knitwork

Run the following steps to generate merges from ligands in an SDF.

Fragmentation

To run the Fragment process which looks for subnodes and synthons for a given set of fragments/molecules in an SDF and groups them into pairs:

python -m knitwork fragment INPUT_SDF

This will generate pickled pandas dataframes, along with caches and other outputs in fragment_output by default:

  • molecules.pkl.gz: pickled dataframe of input molecules
  • molecules.sdf: SDF of input molecules
  • pairs.pkl.gz: pickled dataframe of output pairs

For more options see:

python -m knitwork fragment --help

Pure Knitting

To query the graph database for "pure" merges matching fragment pairs in the fragment_output folder by default:

python -m knitwork pure-merge

This will generate pickled pandas dataframes, along with caches and other outputs in knitwork_output by default:

  • pure_merges.pkl.gz: pickled dataframe of merges
  • pure_merges.sdf: SDF of merges

Impure Knitting

To query the graph database for "impure" merges matching fragment pairs in the fragment_output folder by default:

python -m knitwork impure-merge

This will generate pickled pandas dataframes, along with caches and other outputs in knitwork_output by default:

  • impure_merges.pkl.gz: pickled dataframe of merges
  • impure_merges.sdf: SDF of merges

Metadata

Release files for xchem-knitwork 1.2.0rc2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xchem-knitwork 1.2.0rc2
File Size Uploaded
xchem_knitwork-1.2.0rc2.tar.gz 87.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xchem-knitwork 1.2.0rc2
File Interpreter ABI Platform
xchem_knitwork-1.2.0rc2-py3-none-any.whl Python 3 none any Details

Total release size: 100.7 kB

Release files / xchem_knitwork-1.2.0rc2.tar.gz

Download URL xchem_knitwork-1.2.0rc2.tar.gz
Size 87.0 kB
Tags Source
SHA-256 checksum
How to use checksums
0935c1f716a4d27c628688235829d89188fbf0253990cef6babeded464ff66ee
BLAKE2b-256 checksum
How to use checksums
a37553842ae05d85f8d8931705d896ba8e80120b58076de32194f426b38904d1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / xchem_knitwork-1.2.0rc2-py3-none-any.whl

Download URL xchem_knitwork-1.2.0rc2-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c4a7eb3f85a58515482ef2f22adddb59d0a8cf05303a74c59242c7f83b6a60e
BLAKE2b-256 checksum
How to use checksums
bf8f75b832ecf9df10aeffaa87dfbf387abc63a08445870f93e656b6c16c00ab
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

1.2.0

2 release files

This release

1.2.0rc2 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page